This is motivated by Aaronson's post, Probability of generating a desired permutation by random swaps. I am interested in a related problem where the swaps are given in the input.
We're given as input a "target permutation" $\sigma\in S_n$, as well as an list of pairs of indices $[i_1,i_2], \ldots, [i_{2k-1},i_{2k}],\ldots,[i_{m-1}, i_m]$. Starting with the list $(1,2,\ldots,n)$, pair $[i_{2k-1}, i_{2k}]$ swaps the elements at positions $i_{2k-1}$ and $i_{2k}$. Indices $i_1, i_2, \dots, i_m$ are not necessarily distinct.
Can we generate the target permutation by applying the given swaps in some order? Each swap must be used exactly once, so this is different from testing membership in a permutation group.
Is this problem NP-complete? Is it efficiently solvable?
This was asked on TCS SE without getting any answer