Answer: no. Each table a1b1a2b2…anbn corresponds to a pair of permutations (s,t)∈Sn×Sn such that
s=(1a12a2……nan)andt=(1b12b2……nbn).
The operation A transforms a pair (s,t) into the pair (st,t), where the composition of the permutations st is read from left to right – first the permutation s is applied, and then the permutation t. Accordingly, the operation B transforms a pair (s,t) into the pair (s,ts).
For each pair of permutations (s,t) we can consider the expression sts−1t−1, which is called the commutator of this pair and is denoted by [s,t]. Let us calculate the commutators of the pairs (st,t) and (s,ts):
[st,t]=(st)t(st)−1t−1=sttt−1s−1t−1=[s,t]and[s,ts]=s(ts)s−1(ts)−1=stss−1s−1t−1=[s,t].
Thus, the commutator is invariant under the operations A and B.
The table
22133445……n−1nn1
corresponds to a pair of permutations (1 2) and (1 2 … n),
which are cycles, and the table
22331445……n−1nn1
corresponds to a pair of permutations
(1 2 3) and (1 2 … n), which are also cycles. Their commutators are easy to find:
[(1 2),(1 2 … n)]=(1 2)(1 2 … n)(2 1)(n … 2 1)=(1 2 n),
[(1 2 3),(1 2 … n)]=(1 2 3)(1 2 … n)(3 2 1)(n … 2 1)=(1 2 3 n).
Since they are not equal, Dima will not be able to get the second table from the first one.