I'm trying to solve a twisty puzzle that permutes the integers 1 thru 20 according to the following rules:
$R = \begin{pmatrix} 1 & 2 & \cdots & 19 & 20\\ 20 & 1 & \cdots & 18 & 19 \end{pmatrix},\quad$ a "slide" to the right
$L = R^{-1} = \begin{pmatrix} 1 & 2 & \cdots & 19 & 20\\ 2 & 3 & \cdots & 20 & 1 \end{pmatrix},\quad$ a "slide" to the left
$T = \begin{pmatrix} 1 & 2 & 3 & 4 & 5 & \cdots & 20\\ 4 & 3 & 2 & 1& 5 & \cdots & 20 \end{pmatrix},\quad$ a "twist" of the first four elements
After fidgeting around with it a bit, I quickly realized that if $n$ is at the front, and $n+1$ is in the third position, then the operation $RTRTLTL$ (from right to left, as operators) will leave $n$ fixed, and move $n+1$ after it as desired.
Repeating this procedure numerous times, it's not hard to solve most of the puzzle. However things get tricky when you get to the last 4 integers than need sorting. In particular, I'm currently stuck with only 1 and 20 swapped, and everything else in-order.
Does anyone have any suggestions about how one might create commutators (or other operations) to swap a single pair of adjacent integers?
And, more generally, how does this puzzle change with adjustments to the length of integers, or the size of the "twist"? More precisely, if we are working in $S_n$, and the "twist" operation reverses the first $k$ integers, with $k < n$, what can we say about the puzzles various states? Is this enough to generate the entire group $S_n$? Does the answer depend on the values of $n$ and $k$ explicitly? Is there something particularly interesting about $n=20$, or was this just a design choice by the manufacturer of the puzzle?
$(TRTLTR)^{17}=(1,2)$, an adjacent transposition (product from right to left). Together with the cycle $R$, it generates $S_{20}$. So it's always possible to solve the puzzle.
The procedure is systematic, but does not necessarily produce the shortest sequence of products of $L, T$ and $R$ to achieve a given permutation.