A path \(p\)  from vertex \(v_1\)  to vertex \(v_2\)  in \(\text{Cay}(G, S)\)  can be represented by a sequence of generators \(g_1, g_2,\ldots , g_k\) , where \(g_i \in S\)  for \(1 \le i \le k\) . By abuse of notation, we let \(p=g_1 g_2\ldots g_k\) . Note that \(p\)  is also a path from vertex \(v_2^{-1}v_1\)  to vertex \(I\)  (i.e., \(v_1p=v_2\)  if and only if \(v_2^{-1}v_1p=I\)  for the identity permutation \(I\)  in \(G\) ). Thus, to find a path from vertex \(v_1\)  to vertex \(v_2\)  is reduced to find a path from vertex \(v_2^{-1}v_1\)  to vertex \(I\) , which in turn is reduced to the problem of sorting \(v_2^{-1}v_1\)  to \(I\)  using the generating set \(S\)  [1]}.
