Question 2. What if we consider arbitrary words instead of permutations? Let us say we requirelet $\sigma$ and $\tau$ to be distinct (because if they are equal, $Q\left(\sigma\right)$ and $Q\left(\tau\right)$ are just equal and cannot differ by a flip).arbitrary words instead of permutations? Does the possibility of repeated letters break something?
A word over a set $A$ means an $n$-tuple of elements $A$ for some $n\in\mathbb N$ (where $0 \in \mathbb N$). The word $\left(a_1,a_2,...,a_n\right)$ is often written as $a_1a_2...a_n$. The entries of a word are called its letters. We identify every $a\in A$ with the one-letter word $\left(a\right)=a$$\left(a\right)$. For any two words $u$ and $v$ over the same set $A$, we denote by $uv$ the concatenation of $u$ with $v$ (that is, the word $\left(a_1,a_2,...,a_n,b_1,b_2,...,b_m\right)$, where $\left(a_1,a_2,...,a_n\right)=u$ and $\left(b_1,b_2,...,b_m\right)=v$).
For any $n\in\mathbb N$, any permutation $\sigma \in S_n$ is identified with the $n$-letter word $\sigma\left(1\right) \sigma\left(2\right) ... \sigma\left(n\right)$ over $\mathbb Z$.
If $u$ and $v$ are two words over $\mathbb Z$, then we say that $u$ and $v$ differ by a Knuth transformation if either of the following four cases holds: