Blocks in cycles and kcommuting permutations
 Rutilo Moreno^{1} and
 Luis Manuel Rivera^{2, 3}Email author
Received: 27 November 2015
Accepted: 2 November 2016
Published: 10 November 2016
Abstract
We introduce and study kcommuting permutations. One of our main results is a characterization of permutations that kcommute with a given permutation. Using this characterization, we obtain formulas for the number of permutations that kcommute with a permutation \(\beta \), for some cycle types of \(\beta \). Our enumerative results are related with integer sequences in “The Online Encyclopedia of Integer Sequences”, and in some cases provide new interpretations for such sequences.
Keywords
Mathematics Subject Classification
Background
The symmetric group as a metric space has been studied with different metrics and for different purposes (see, e.g., Deza and Huang 1998; Diaconis 1988; Farahat 1960), and the metric that seems to be more used is the Hamming metric. This metric was introduced by Hamming (1950) for the case of binary strings and in connection with digital communications. For the case of permutations, it was used by Farahat (1960), who studied the symmetries of the metric space \((S_n, H)\), where \(S_n\) denotes the symmetric group on the set \(\{1, \dots ,n\}\) and H the Hamming metric between permutations. Also, Gorenstein et al. (1962) studied a problem about permutations that almost commute, in the sense of normalized Hamming metric.
Other problems are showed in the survey of Quistorff (2006), about the packing and covering problem, and in the survey of Cameron (2010), about permutation codes. This last problem have turned out to be useful in applications to power line communications, as was showed in Chu et al. (2004).
In this paper, we introduce and study kcommuting permutations. It seems that this is the first time this issued is studied. Shallit (2009) worked in an slightly similar problem but with strings. One of our main results is a characterization of the permutations that kcommute with a given permutation \(\beta \). This characterization is given in terms of blocks formed by strings of points in cycles in the decomposition of \(\beta \) as a product of disjoint cycles.
Our original motivation to study this type of questions was to develop tools to work with problems related with the stability of the commutator relator in permutations. Recently, Arzhantseva and Păunescu (2015) proved that the equation \(xy=yx\) is stable in permutations. The concept of stability of equations in permutations appears recently in Glebsky and Rivera (2009), in the context of sofic groups, that is a class of groups of growing interest that was defined by Gromov (1999) [details about sofic groups can be consulted in the monograph of CeccheriniSilberstein and Coornaert (2010) or in the survey of Pestov (2008)].
The analogous problem about the stability of \(xy=yx\) in matrices is a classical problem in linear algebra and operator theory, and has been widely studied (see, e.g., Friis and Rørdam 1996; Hastings 2009; Lin 1997; Voiculescu 1983; Filonov and Safarov 2011; Glebsky 2010).
In some cases, we need to know upper bounds for the number of permutations that almost commute with a given permutation, as in Păunescu (2016). With this in mind, we work in the problem of determine the number \(c(k,\beta )\) of permutations that kcommute with \(\beta \). In this paper, we present explicit formulas for \(c(k,\beta )\), when \(\beta \) is any permutation and \(k\le 4\). The study of this small cases sheds light of how difficult it can be the problem of computing \(c(k, \beta )\) in its generality. So, we have worked with several specific types of permutations. Surprisingly, we have found some relations between \(c(k, \beta )\) and the following integer sequences in the OEIS database of Sloane (2015): A208529, A208528 and A098916 when \(\beta \) is a transposition, A000757 when \(\beta \) is an ncycle (this relationship allows us to obtain the binomial transform of sequence A000757), and A053871 when \(\beta \) is a fixedpoint free involution.
The relationship between the number \(c(k, \beta )\) with some integers sequences in the OEIS database have provided another motivation to studied this problem. Using the techniques developed in this paper, Rivera (2015) showed more such relationship, and also identities between integer sequences in the OEIS database.
We review our results. We present a characterization of permutations that kcommute with a given permutation \(\beta \). This characterization is given in terms of blocks in cycles in the decomposition of \(\beta \) as a product of disjoint cycles. Also, we present a formula and a bivariate generating function for the number of permutations that kcommute with any ncycle. We present explicit formulas for the number \(c(k, \beta )\), when \(\beta \) is any permutation and \(k\le 4\). Finally, we present formulas for the cases when \(\beta \) is either a transposition or a fixedpoint free involution. In all cases, we present relationship between our formulas and sequences in the OEIS database.
Definitions and notation
We first give some definitions and notation used throughout the work. The elements in the set \([n]:=\{1, \dots , n\}\) are called points. We write \(\pi =p_1 p_2 \dots p_n \) for the oneline notation of \(\pi \in S_n\), i.e., \(\pi (i)=p_i\) for every \(i \in [n]\). We compute the product \(\alpha \beta \) of permutations \(\alpha \) and \(\beta \) by first applying \(\beta \) and then \(\alpha \). It is a known fact that any permutation can be written in essentially one way as a product of disjoint cycles, called its cycle decomposition (Dummit and Foote 2004, Sec. 1.3, p. 29). We say that \(\pi \) has cycle \(\pi '\) or that \(\pi '\) is a cycle of \(\pi \) if \(\pi '\) is a cycle in the disjoint cycle factorization of \(\pi \). Let \(\pi '=(a_1 \dots a_m)\) be a cycle of \(\pi \), we use \(\mathrm{set}(\pi ')\) to denote the set \(\{a_1, \dots , a_m\}\). We say that a is a point in cycle \(\pi '\) if \(a \in \mathrm{set}(\pi ')\). The cycle type of a permutation \(\beta \) is a vector \((c_1, \dots , c_n)\) such that \(\beta \) has exactly \(c_i\) cycles of length i in its cycle decomposition. The Hamming metric between permutations \(\alpha , \beta \in S_n\), denoted \(H(\alpha , \beta )\), is \(\{ a \in [n] :\alpha (a) \ne \beta (a)\}\) [see the survey of Deza and Huang (1998) for more details about this metric]. It is wellknown that this metric is biinvariant, that not two permutations have Hamming metric equal to 1, and that \(H(\alpha , \beta )=2\) if and only if \(\alpha \beta ^{1}\) is a transposition. We say that \(a\in [n]\) is a good commuting point (resp. bad commuting point) of \(\alpha \) and \(\beta \) if \(\alpha \beta (a)= \beta \alpha (a)\) (resp. \(\alpha \beta (a)\ne \beta \alpha (a)\)). Usually, we abbreviate good commuting points (resp. bad commuting points) with g.c.p. (resp. b.c.p.). In this work, we use the convention \(m \bmod m = m\) for any positive integer m.
Blocks in cycles
Our definition of blocks was motivated by the definitions presented in the work of Christie (1996) and in the work of Bóna and Flynn (2009). A block A in a cycle \(\pi '=(a_1a_2\dots a_m)\) of \(\pi \in S_n\) is a consecutive nonempty substring \(a_ia_{i+1} \dots a_{i+l}\), of \(a_i\dots a_{i1}\) where \((a_i\dots a_{i1})\) is one of the m equivalent expressions of \(\pi '\) (the sums are taken modulo m). The length A of block \(A=a_i \dots a_{i+l}\) is the number of elements in the string A, and the points \(a_i\) and \(a_{i+l}\) are the first and the last element of the block, respectively. A proper block (resp. improper block) of an mcycle is a block of length \(l < m\) (resp. \(l=m\)). Two blocks A and B are disjoint if they do not have points in common. The product AB of two disjoint blocks, A and B, not necessarily from the same cycle of \(\pi \), is defined as the usual concatenation of strings (AB is not necessarily a block in a cycle of \(\pi \)). If \((a_1\dots a_m)\) is a cycle of \(\pi \) we write \((A_1\dots A_k)\) to mean that \(A_1\dots A_k=a_i\dots a_{i1}\), where \((a_i \dots a_{i1})=(a_1\dots a_m)\). A block partition of cycle \(\pi '\) is a set \(\{A_1, \dots , A_l\}\) of pairwise disjoint blocks in \(\pi '\) such that there exist a block product \(A_{i_1}\dots A_{i_l}\) of these blocks such that \(\pi '=(A_{i_1}\dots A_{i_l})\). Let \(p= J_{1}J_{2}\dots J_{k}\) be a block product of k pairwise disjoint blocks, not necessarily from the same cycle of \(\pi \), and let \(\tau \) be a permutation in \(S_k\). The block permutation \(\phi _\tau (P)\) of P, induced by \(\tau \), is defined as the block product \(J_{\tau (1)}J_{\tau (2)}\dots J_{\tau (k)}\).
Example 1
Let \(\pi =(1\;2\;3\;4)(5\;6\;7\;8\;9)\in S_9\). Some blocks in cycles of \(\pi \) are \(P_1=2\;3\;4\;1\) and \(P_2=1\;2\), \(B_1=5\;6\;7\), \(B_2=8\), \(B_3=9\). The set \(\{B_1, B_2, B_3\}\) is a block partition of \((5\;6\;7\;8\;9)\). The product \(B_1B_2\) is a block in \((5\;6\;7\;8\;9)\). The product \(P_2B_2=128\) is not a block in any cycle of \(\pi \). Let \(\tau =(3\;1\;2) \in S_3\), then \(\phi _\tau (B_1B_2B_3)=B_2B_3B_1=8\;9\;5\;6\;7\).
Example 2
Permutations that kcommute with a cycle
In this section, we show the relation between blocks in cycles of \(\beta \) and the permutations that kcommute with \(\beta \).
Let \(\beta '\) be a cycle of \(\beta \). Let \(\alpha \) be a permutation. If \(\alpha \beta '\alpha ^{1}\) is also a cycle of \(\beta \), then we say that \(\alpha \) transforms the cycle \(\beta '\) into the cycle \(\alpha \beta '\alpha ^{1}\). Let \(B=b_1 \dots b_l\) be a block in \(\beta '\). We say that permutation \(\alpha \) commutes with \(\beta \) on the block B if \(\alpha \beta (b_i)=\beta \alpha (b_i)\), for every \(i \in \{1, \dots , l \}\). We say that \(\alpha \) commutes (resp. do not commute) with \(\beta \) on \(\beta '\), if \(\alpha \beta (b)=\beta \alpha (b)\), for every \(b \in \mathrm{set}(\beta ')\) (resp. \(\alpha \beta (b) \ne \beta \alpha (b)\), for some \(b \in \mathrm{set}(\beta ')\)).
The following result is the key to relate commutation and blocks in cycles.
Proposition 1
Let \(\alpha , \beta \in S_n\). Let \(\ell , m\) be integers, with \(1 \le \ell < m\). Let \(\beta '=(b_1 \; \dots \; b_m)\) be a cycle of \(\beta \). If \(\alpha \) commutes with \(\beta \) on the block \(b_1 \dots b_\ell \), then \(\alpha (b_1)\dots \alpha (b_\ell )\alpha (b_{\ell +1})\) is a block in a cycle of \(\beta \).
Proof
It is enough to prove that \(\alpha (b_{i})=\beta ^{i1}(\alpha (b_1))\), for \(i \in \{1, \dots , \ell +1\}\). The proof is by induction on i. The base case \(i=1\) is trivial. Assume as inductive hypothesis that the statement is true for every \(k <\ell +1\). As \(\alpha \) and \(\beta \) commute on \(b_k\), then \(\alpha (b_{k+1})=\alpha (\beta (b_{k}))=\beta (\alpha (b_{k}))\), and by the inductive hypothesis, \(\beta (\alpha (b_{k}))=\beta (\beta ^{k1}(\alpha (b_1)))=\beta ^{k}(\alpha (b_1))\) as desired. \(\square \)
The following result is an easy exercise.
Proposition 2
Let \(\beta '\) be an mcycle of \(\beta \). Then \(\alpha \) commutes with \(\beta \) on \(\beta '\) if and only if \(\alpha \) transforms \(\beta '\) into an mcycle of \(\beta \).
Let \(\beta '\) be a cycle of \(\beta \). We say that \(\alpha (r, \beta )\)commutes with \(\beta '\) if there exists exactly r points in \(\beta '\) on which \(\alpha \) and \(\beta \) do not commute.
We now present one of our main results.
Theorem 1
 1
if \(k=1\), then \(P_1\) is a proper block in a cycle of \(\beta \);
 2
if \(k >1\), then \(P_1, \dots , P_k\) are k pairwise disjoint blocks, from one or more cycles of \(\beta \), such that the string \(P_iP_{i+1\bmod k }\) is not a block in any cycle of \(\beta \), for every \(i \in [k]\).
Proof
(1) Suppose that \(\alpha \beta '\alpha ^{1}=(P_1)\) where \(P_1\) is a proper block in a cycle of \(\beta \). Without lost of generality assume that \(\beta '=(b_1 \dots b_m)\) and \(P_1=\alpha (b_1) \dots \alpha (b_m)\). As \(P_1\) is a block in a cycle of \(\beta \), then \(\beta (\alpha (b_i))=\alpha (b_{i+1})\), for \(i \in \{1, \dots , m1\}\), which implies that \(\beta (\alpha (b_i))=\alpha (\beta (b_i))\), for \(i \in \{1, \dots , m1\}\). Finally, as \(P_1\) is an improper block in a cycle of \(\beta \), then \(\beta (\alpha (b_m)) \ne \alpha (b_1)\), which implies that \(\beta (\alpha (b_m)) \ne \alpha (\beta (b_m))\). Therefore \(\alpha \) \((1, \beta )\)commutes with \(\beta '\).
Conversely, we can assume, without lost of generality, that \(\alpha \) commutes with \(\beta \) on block \(b_1 \dots b_{m1}\) of \(\beta '=(b_1 \dots b_{m1}b_m)\) and that does not commute on \(b_m\). By Proposition 1, \(\alpha (b_1) \dots \alpha (b_{m1})\alpha (b_m)\) is a block in a cycle of \(\beta \) and it is a proper block due to Proposition 2.
Conversely, if \(\alpha \) does not commute with \(\beta \) on exactly k points in \(\mathrm{set}(\beta ')\), then we can write \(\beta '\) as \((B_1 \dots B_k)\), where \(B_i=b_{i1}b_{i2} \dots b_{i\ell _i}\) is a block in a cycle of \(\beta \), for every \(i\in \{1, \dots , k\}\), and in this block, \(\alpha \) and \(\beta \) commute on \(b_{ij}\), for \(1\le j <\ell _i\), and does not commute on \(b_{i\ell _i}\). By Proposition 1, we have that \(P_i:=\alpha (b_{i1})\alpha (b_{i2}) \dots \alpha (b_{i\ell _i})\) is a block in a cycle of \(\beta \). Now, suppose that for some i, \(P_iP_{i+1 \bmod k}\) is a block in a cycle of \(\beta \), then \(\beta (\alpha (b_{i\ell _i}))=\alpha (b_{(i+1 \bmod k)1})=\alpha (\beta (b_{i\ell _i}))\), contradicting the assumption that \(\alpha \) does not commute with \(\beta \) on \(b_{i\ell _i}\). \(\square \)
Remark 1
Using Theorem 1 we can characterize permutations that kcommute with \(\beta \).
Corollary 1
 1
if \(k_i=1\), then \(P^{(i)}_1\) is a proper block in a cycle of \(\beta \),
 2
if \(k_i >1\), then \(P^{(i)}_1, \dots , P^{(i)}_{k_i}\) are \(k_i\) pairwise disjoint blocks, from one or more cycles of \(\beta \), such that \(P^{(i)}_rP^{(i)}_{r+1\bmod k_i }\) is not a block in any cycle of \(\beta \), for any \(r \in [k_i]\).
 3
\(\{P_1^{(1)}, \dots , P_{k_1}^{(1)}, \dots ,P_1^{(h)}, \dots , P_{k_h}^{(h)}\}\) is a set of pairwise disjoints blocks from one or more cycles of \(\beta \).
Example 3
As a first application of Theorem 1, we obtain the following result, that is used in the proof of Theorem 8
Proposition 3
Let \(\beta \) be a permutation whose maximum cycle length in its cycle decomposition is m. If \(\alpha \) commutes with \(\beta \) on \(m1\) points in an mcycle \(\beta '\) of \(\beta \), then \(\alpha \) commutes with \(\beta \) on \(\beta '\).
Proof
Suppose that \(\alpha \) and \(\beta \) do not commute on the remaining point in \(\beta '\). By part (1) of Theorem 1, \(\alpha \beta '\alpha ^{1}=(P)\), where P is a proper block in an lcycle of \(\beta \), i.e., \(l > m\), but this is a contradiction because m is the maximum cycle length of cycles in \(\beta \). \(\square \)
Previous propositions is a generalization of Lemma 2(b) in Gorenstein et al. (1962). The following proposition will be useful in the proofs of some of our results.
Proposition 4
Let \(\alpha \) and \(\beta \) be two permutations that kcommute, \(k>0\). Suppose that \(\alpha \) does not commute with \(\beta \) on the cycles \(\beta _1, \dots , \beta _r\), of lengths \(l_1, \dots , l_r\), respectively, and that commutes with \(\beta \) on the rest of cycles of \(\beta \) (if any). Then, there exists exactly r cycles of \(\beta \), say \(\beta _1', \dots , \beta _r'\), of lengths \(l_1, \dots l_r\), respectively, such that \(\alpha \left( \mathrm{set}(\beta _1) \cup \dots \cup \mathrm{set}(\beta _r)\right) =\mathrm{set}(\beta _1') \cup \dots \cup \mathrm{set}(\beta _r')\). Even more, suppose that \(\alpha \) does not commute with \(\beta \) on exactly \(h_i\) icycles of \(\beta \) and that commutes with \(\beta \) on the rest of the icycles of \(\beta \) (if any). Then there exists exactly \(h_i\) icycles of \(\beta \) such that each of them contains at least one point that is the image under \(\alpha \) of one b.c.p. of \(\alpha \) and \(\beta \).
Proof
Let \(\beta _{r+1}, \dots , \beta _{s}\) the rest of cycles of \(\beta \) of lengths \(l_{r+1}, \dots l_s\), respectively. As \(\alpha \) commutes with \(\beta \) on every one of this cycles, then \(\alpha \) transforms each \(\beta _{t}\) into an \(l_t\)cycle \(\beta _t'\), with \(r+1 \le t \le s\) (by Proposition 2). Then, there are cycles of \(\beta \), say \(\beta _{r+1}', \dots , \beta _{s}'\), of lengths \(l_{r+1}, \dots , l_s\), respectively, such that \(\alpha \left( \mathrm{set}(\beta _{r+1}) \cup \dots \cup \mathrm{set}(\beta _s)\right) =\mathrm{set}(\beta _{r+1}') \cup \dots \cup \mathrm{set}(\beta _s')\), and the result of the first part of the proposition follows because \(\alpha \) is a bijection.
By a similar argument, we can show that if \(\alpha \) does not commute with \(\beta \) on exactly \(h_i\) icycles of \(\beta \) and commutes with \(\beta \) on the rest of the icycles of \(\beta \) (if any), then there exists exactly \(h_i\) icycles of \(\beta \), say \(\beta _1', \dots , \beta _{h_i}'\), such that \(\beta _t'\ne \alpha \beta _j \alpha ^{1}\), for every \(t \in \{1, \dots , h_i\}\) and every cycle \(\beta _j\) of \(\beta \). The following claim completes the proof of the second part
Claim 1
If all the points in an icycle \(\beta _{1}\) of \(\beta \) are images under \(\alpha \) of g.c.p., then there exists an icycle \(\beta _2\) of \(\beta \) such that \(\beta _{1}=\alpha \beta _2 \alpha ^{1}\).
Proof
First, we prove, by contradiction, that if all the points in the icycle \(\beta _{1}\) are images under \(\alpha \) of g.c.p. of \(\alpha \) and \(\beta \), then these g.c.p. belong to exactly one lcycle, say \(\beta _2=(b_1 \dots b_l)\), of \(\beta \), with \(l \ge i\). Suppose that \(\beta _{1}\) contains the images under \(\alpha \) of g.c.p. in different cycles of \(\beta \), then \(\beta _{2}\) contains the string \(\alpha (x)\alpha (y)\), with x and y in different cycles of \(\beta \), i.e., \(\beta (x) \ne y\), but this implies that x is a b.c.p. because \(\alpha (\beta (x))\ne \alpha (y)= \beta (\alpha (x))\). It is clear that \(l \ge i\). Now, we show that \(l \le i\). Suppose that \(l >i\), then, and without lost of generality, we have that \(\beta _2=(\alpha (b_1)\dots \alpha (b_i))\), i.e., \(\beta (\alpha (b_t))=\alpha (b_{t+1 \bmod i})\), for every \(t \in \{1, \dots , i\}\) (if \(\beta (\alpha (b_t)) \ne \alpha (b_{t+1 \bmod i})\), for some t, then \(b_t\) will be a b.c.p. of \(\alpha \) and \(\beta \)). But this implies that \(b_i\) is a b.c.p. because, for one side, \(\beta (\alpha (b_i))=\alpha (b_1)\), and for the other side, \(\alpha (b_1) \ne \alpha (b_{i+1})=\alpha (\beta (b_i))\) (as \(l > i\), then \(i+1 \bmod l \ne 1\) and hence \(b_1 \ne b_{i+1}\)) which is a contradiction. Therefore \(l \le i\), and then \(l=i\), i.e., \(\beta _{1}= \alpha \beta _2\alpha ^{1}\). \(\square \)
With this claim, every cycle in \(\{\beta _1', \dots , \beta _{h_i}'\}\) contains at least one point that is the image under \(\alpha \) of one b.c.p. of \(\alpha \) and \(\beta \) as desired. \(\square \)
We finish this subsection with the following result
Theorem 2
Let \(\alpha , \beta \in S_n\). If one cycle of \(\beta \) has exactly one b.c.p. of \(\alpha \) and \(\beta \), then there exist a cycle of \(\beta \) that contains at least two b.c.p. of \(\alpha \) and \(\beta \).
Proof
Let \(\beta _1\) be a cycle of \(\beta \) that has exactly one b.c.p of \(\alpha \) and \(\beta \). The proof is by induction on the length l of cycle \(\beta _1\). If \(\beta _1\) is an 1cycle, then, by Proposition 4, there exists an 1cycle \(\beta _2\) of \(\beta \) that fixed a point, say x, such that \(x'=\alpha ^{1}(x)\) is a b.c.p. of \(\alpha \) and \(\beta \). From Proposition 2 it follows that \(x'\) is a point in a cycle \(\beta _{3}\) of \(\beta \) of length greater than one. That is, \(\beta _{3}\) is a cycle of the form \((x'B)\), with B a block of length \(B\ge 1\). Therefore, \(\alpha \beta _{3} \alpha ^{1}=\left( xB'\right) \), and by Theorem 1, \(\beta _{3}\) has at least two b.c.p. of \(\alpha \) and \(\beta \).

Case I. If \(m >r\), then \(\beta _3\) has at least two b.c.p. of \(\alpha \) and \(\beta \) (by Theorem 1).

Case II. If \(m=r\), then \(r < l\) (because \(m \ne l\) and \(1\le r \le l\)) and then \(\alpha \beta _3 \alpha ^{1}=(a_1 \dots a_m)\). As \(a_1 \dots a_m\) is a proper block in \(\beta _2\), then \(\beta _3\) has exactly one b.c.p. of \(\alpha \) and \(\beta \) (by Theorem 1), and by the inductive hypothesis it follows that \(\beta \) has a cycle with at least two b.c.p. of \(\alpha \) and \(\beta \).
Permutations that \((k, \beta )\)commute with a cycle of \(\beta \)
Let \(\beta \in S_n\) be a fixed permutation and \(k \ge 3\) be a positive integer. Let \(\alpha \) be any permutation that kcommutes with \(\beta \) and that \((k, \beta )\)commutes with an mcycle, say \(\beta _1\), of \(\beta \), i.e., \(m \ge k\) and all the b.c.p. of \(\alpha \) and \(\beta \) are in \(\beta _1\). From Proposition 4 it follows that there exists exactly one mcycle, say \(\beta _{2}\), of \(\beta \) such that \(\mathrm{set}(\beta _{2})=\alpha (\mathrm{set}(\beta _1))\). Using this fact we present a procedure (Algorithm 1) that allows us to obtain any such permutation \(\alpha \). First we give some definitions. The canonical cycle notation of a permutation \(\pi \) is defined as follows: first, write the largest element of each cycle, and then arrange the cycles in increasing order of their first elements. Let \(\pi \) be a permutation written in its canonical cycle notation, the transition function of \(\pi \) from canonical cycle notation to oneline notation is the map \(\Psi : S_n \rightarrow S_n\) that sends \(\pi \) to the permutation \(\Psi (\pi )\) written in oneline notation that is obtained from \(\pi \) by omitting all the parentheses. This map is a bijection (Bóna 2004, p. 97).
Example 4
Let \(\pi \in S_7\) be \((4\;3\;1)(6\;5)(7\;2)\) (\(\pi \) is written in its canonical cycle notation). Then \(\Psi (\pi )=4316572\).
Algorithm 1
 Step 1:

Choose two mcycles, say \(\beta _{1}\) and \(\beta _{2}=(p_1 \dots p_m)\), of \(\beta \) (with the possibility that \(\beta _{2}=\beta _1\)).
 Step 2:

Choose a ksubset \(\{p_{h_1}, \dots , p_{h_k}\}\) of \(\mathrm{set}(\beta _{2})\). Without lost of generality suppose that \(p_{h_k}=p_m\), and that \(h_1< \dots < h_k\). Now, to make a block partition \(\{P_1, \dots , P_k\}\) of \(P=p_1 \dots p_m\) as followsNotice that \(p_{h_r}\) is the last point of \(P_r\), \(1\le r \le k\).$$\begin{aligned} \underbrace{p_1 \dots p_{h_1}}_{P_1}\underbrace{p_{h_1+1} \dots p_{h_2}}_{P_2} \dots \underbrace{p_{h_{k1}+1} \dots p_{h_k}}_{P_k}. \end{aligned}$$
 Step 3:

Choose a kcycle permutation \(\tau =(i_1 \dots i_k)\) of \([k]=\{1, \dots ,k\}\) such that \(\tau (a) \ne a+1 \bmod k\), for every \(a\in [k]\), and make the block permutation$$\begin{aligned} P':=P_{\Psi (\tau )(1)} P_{\Psi (\tau )(2)} \dots P_{\Psi (\tau )(k)}=P_{i_1} P_{i_2} \dots P_{i_k}. \end{aligned}$$
 Step 4:

Construct \(\alpha _{\mathrm{set}(\beta _1)}: \mathrm{set}(\beta _1) \rightarrow \mathrm{set}(\beta _{2})\) as it follows:where \(\beta _1=(B_1\dots B_k)\) and \(B_r=P_{i_r}\), for every \(r \in \{1, \dots , k\}\).$$\begin{aligned} \alpha _{\mathrm{set}(\beta _1), k}=\left( \begin{array}{c} B_1 B_2 \dots B_k \\ P_{i_1} P_{i_2} \dots P_{i_k} \end{array} \right) . \end{aligned}$$
 Step 5:

Construct \(\alpha _{[n] \setminus \mathrm{set}(\beta _1)} :[n] \setminus \mathrm{set}(\beta _1) \rightarrow [n] \setminus \mathrm{set}(\beta _{2})\) as any bijection that commutes with \(\beta _{[n] \setminus \mathrm{set}(\beta _1)} :[n] \setminus \mathrm{set}(\beta _1) \rightarrow [n] \setminus \mathrm{set}(\beta _{2})\).
Let \(c_m\) be the number of m cycles of \(\beta \). For Step 5, \(\alpha \) can be constructed in such a way that it transforms the \(c_m1\) mcycles of \(\beta \) different than \(\beta _1\) (if any) into the \(c_m1\) mcycles of \(\beta \) different than \(\beta _{2}\) (if any), and that transforms the lcycles of \(\beta \) (if any), with \(l \ne m\), into lcycles of \(\beta \) (if any).
The following two propositions shows that Algorithm 1 produces all the permutations with the desired properties.
Proposition 5
Any permutation \(\alpha \) constructed with Algorithm 1 does not commute with \(\beta \) on all points in \({\mathcal {A}}:=\alpha ^{1}(\{p_{h_1},\dots , p_{h_k}\})\) and commutes with \(\beta \) on all points in \([n] \setminus {\mathcal {A}}\).
Proof
Let \(\beta _1\) and \(\beta _{2}\) be the cycles of \(\beta \) selected in Step 1 of Algorithm 1, and \(\{p_{h_1}, \dots , p_{h_k}\} \) the subset of \(\mathrm{set}(\beta _{2})\) selected in Step 2. By the way in which \(\alpha \) is constructed of in Step 3 and 4, \(\alpha \beta _1 \alpha ^{1}=(P_{i_1} P_{i_2} \dots P_{i_k})\), where \(P_{i_r}P_{i_{r+1 \bmod k}}\), is not a block in any cycle of \(\beta \) (by Step 3, \(i_{r+1 \bmod k}  i_r \bmod k \ne 1\)), \(1\le r \le k\). From Theorem 1, we have that \(\alpha \) does not commute with \(\beta \) on exactly k points in \(\mathrm{set}(\beta _1)\). Even more, in the proof of Theorem 1 was showed that \(\alpha \) and \(\beta \) do not commute on \(\alpha ^{1}(p_{h_r})\), for \(r\in \{1, \dots , k\}\) (see Remark 1). Finally, by the construction of \(\alpha \) in Step 5, \(\alpha \) and \(\beta \) commute on all points in \([n] \setminus \mathrm{set}(\beta _1)\). \(\square \)
Proposition 6
Let \(k \ge 3\). Let \(\alpha \) be any permutation that kcommutes with \(\beta \) and such that all the b.c.p. of \(\alpha \) and \(\beta \) are in exactly one mcycle of \(\beta \). Then \(\alpha \) can be obtained with Algorithm 1.
Proof
Let \(\beta _1\) be the m cycle of \(\beta \) that has all the b.c.p. of \(\alpha \) and \(\beta \). From Proposition 4 it follows that there exists exactly one mcycle, \(\beta _{2}\), of \(\beta \) such that \(\alpha (\mathrm{set}(\beta _1))=\mathrm{set}(\beta _{2})\). By Theorem 1, we have that \(\alpha \beta _1 \alpha ^{1}=(P_1 \dots P_k)\), where \(P_{1}, \dots , P_{k}\) are k pairwise disjoint blocks in \(\beta _{2}\) and \(P_{r} P_{r+1 \mod k}\) is not a block in any cycle of \(\beta \), for every \(r \in \{1, \dots , k\}\). As \(\alpha (\mathrm{set}(\beta _1))=\mathrm{set}(\beta _{2})\), we have that \(P_{1} \dots P_{k} \) is a block permutation of \(B'=P_{i_1} \dots P_{i_k}\), where \(\beta _{2}=(B')\). Now, rename the blocks \(P_{i_s}\) as \(B'_s\) to obtain \(B'=B'_1 \dots B'_k\). In this way, \(\alpha \beta _1 \alpha ^{1}=(B'_{l_1}\dots B'_{l_k})\), with \(l_{r+1 \bmod k}l_r \bmod k \ne 1\), for every \(r \in \{1, \dots , k\}\). Indeed, if \(l_{r+1 \bmod k}l_r \bmod k= 1\) for some \(r \in \{1, \dots , k\}\), then \(B'_{l_r}B'_{l_{r+1 \bmod k}}\) will be a block in \(\beta _{2}\), and hence the number of b.c.p. of \(\alpha \) and \(\beta \) will be less than k, which is a contradiction.
Now, we consider \(l_1 \dots l_{k}\) as a permutation, named \(\pi \), of \(\{1, \dots , k\}\) in oneline notation. As \(l_1\) (that is equal to k) is the greatest element in \(\{l_1, \dots , l_k\}\), then \(\tau :=\Psi ^{1}(\pi )=(l_1 \dots l_{k})\), where \(\Psi \) is the transition function from the canonical cycle notation to oneline notation. Notice that \(\tau \) is a kcycle in \(S_k\) such that \(\tau (a) \ne a+1\), for any \(a \in [k]\). Thus we conclude that \(\alpha _{\mathrm{set}(\beta _j)}\) can be obtained by Steps 1–4 of Algorithm 1. As \(\alpha \) commutes with \(\beta \) on all cycles different than \(\beta _j\), \(\alpha _{[n]\setminus \mathrm{set}(\beta _j)}\) can be obtained with Step 5 of Algorithm 1. \(\square \)
On the number \(c(k, \beta )\)
In this section we present some results about the number \(c(k, \beta )\) of permutations that kcommute with \(\beta \). Let \(C_{S_n}(\beta )\) denote the centralizer of \(\beta \). Let \(C(k, \beta )\) be the set \(\{\alpha \in S_n :H(\alpha \beta , \beta \alpha )=k\}\), then \(c(k, \beta )=C(k, \beta )\).
Proposition 7
Let \(\beta \in S_n\) be a permutation of cycle type \((c_1, \dots , c_n)\). Then \(c(0, \beta )=\prod _{i=1}^{n}i^{c_i}c_i!\), and \(c(1,\beta )=c(2,\beta )=0\).
Proof
When \(k=0\), \(c(0,\beta )\) is the size of the centralizer of \(\beta \). As no two permutations have Hamming metric equal to 1 then \(c(1, \beta )=0\). Finally, it is easy to see that \(H(\pi , \tau )=2\) if and only if \(\pi \tau ^{1}\) is a transposition. If \(H(\alpha \beta , \beta \alpha ) = 2\) then the even permutation \(\alpha \beta \alpha ^{1}\beta ^{1}\) should be a transposition which is a contradiction. \(\square \)
Now we show that for any nonnegative integer k and any \(\beta \in S_n\), the number \(c(k, \beta )\) is invariant under conjugation.
Proposition 8
If \(\beta \in S_n\), then \(c(k, \tau \beta \tau ^{1}) =c(k, \beta )\), for any \(\tau \in S_n\).
Sketch of the proof
The following result shows that \(c(k, \beta )\) is a multiple of \(C_{S_n}(\beta )\).
Proposition 9
Proof
On the number \(c([k], \beta )\)
Let \(c([k], \beta )\) denotes the number of permutations \(\alpha \) that kcommutes with \(\beta \) which satisfy the extra condition that all the b.c.p. of \(\alpha \) and \(\beta \) are in exactly one cycle of \(\beta \).
Let f(k) be the number of cyclic permutations (kcycles) of \(\{1, \dots , k\}\) with no \(i \mapsto i+1\bmod k\) (Stanley 1997, exercise 8, p. 88). Sequence \(\{f(k)\}\) is labeled as A000757 in the OEIS database.
Theorem 3
Proof
Let T(k, n) denote the number of npermutations that kcommute with an ncycle.
Corollary 2
The number T(k, n) is now sequence A233440 in the OEIS database. With this corollary we can obtain, in an easy way, the binomial transform of sequence A000757. Let \(A=\{f(0), f(1), \dots \}\) be sequence A000757, and let \(B=\{b_0, b_1, \dots \}\) be the binomial transform of A. In Spivey and Steil (2006), \(b_n\) is defined as \(\sum _{k=0}^n \left( {\begin{array}{c}n\\ k\end{array}}\right) f(k)\). By Corollary 2, \(b_n=\sum _{k=0}^n T(k, n)/n\). As \(\sum _{k=0}^nT(k, n)=n!\), then \(b_n=(n1)!\).
We have the following limit property for T(k, n).
Proposition 10
Proof
Theorem 4
Proof
The number \(c(k, \beta )\) for \(k=3, 4\)
In this section we present formulas for the number \(c(k, \beta )\), when \(\beta \) is any permutation of cycle type \((c_1, \dots , c_n)\) and \(k=3, 4\). We use the following notation: Let \([k_1, \dots , k_h]\) denote an integer partition of k, with \(k_i \ge 1\). We define a set \(C([k_1, \dots , k_h], \beta )\) as follows: \(\alpha \in C([k_1, \dots , k_h], \beta )\) if and only if \(\alpha \) kcommutes with \(\beta \), and there are exactly h cycles, says \(\beta _1, \dots , \beta _h\), in \(\beta \), such that \(\alpha \) \((k_1, \beta )\)commutes with \(\beta _1\), \((k_2, \beta )\)commutes with \(\beta _2\), ..., \((k_h, \beta )\)commutes with \(\beta _h\). Let \(c([k_1, \dots , k_h], \beta )\) be the cardinality of \(C([k_1, \dots , k_h], \beta )\). By Theorem 2, we have that \(c([1, \dots , 1], \beta )=0\), where \([1, \dots , 1]\) denotes the partition of k that consists of k ones.
Theorem 5
Proof
 (a)
\(\beta _1=(A_1)\), \(\beta _2=(B_1B_2)\), \(X_2, X_3\) are blocks distributed in \(\beta '_1\) and \(\beta '_2\), and \(X_1\) is a block in a cycle of length greater that \(A_1\), i.e., \(X_1\) is a block in \(\beta '_2\);
 (b)
the strings \(X_2X_3\) and \(X_3X_2\) are not blocks in any cycle of \(\beta \),
 (c)
The set of all points in the blocks \(X_1, X_2, X_3\) is equal to \(\mathrm{set}(\beta '_1)\cup \mathrm{set}(\beta '_2)\).
In a similar way, but with many more cases to consider, we have obtained a formula for \(c(4, \beta )\), for any \(\beta \). In order to avoid an unnecessarily increase in the length of this paper, we have omitted the proof but the interested reader can consulted it in the preprint version of this paper (Moreno and Rivera 2014).
Theorem 6
Transpositions and fixedpoint free involutions
In this section we show formulas for \(c(k, \beta )\) when \(\beta \) is either a transposition or a fixedpoint free involution. Let \(\mathrm {fix}(\beta )\) denotes the set of fixed points of \(\beta \) and \(\mathrm {supp}(\beta )=[n] {\setminus} \mathrm {fix}(\beta )\).
Proposition 11
Let \(\alpha , \beta \in S_n\) and let \(H(\alpha \beta , \beta \alpha )=k\), then \(0 \le k \le 2  \mathrm {supp}(\beta )\).
Proof
If \(\alpha \) commutes with \(\beta \), then \(k=0\). If \(\beta \) does not have fixed points then \(\mathrm {supp}(\beta )=n\) and \(k < 2\mathrm {supp}(\beta )\). Now, let \(x \in \mathrm {fix}(\beta )\). If \(\beta \alpha (x) \ne \alpha \beta (x)\) then \(\alpha (x) \in \mathrm {supp}(\beta )\) (Theorem 1). Thus, \(\alpha \) does not commute with \(\beta \) on at most \( \mathrm {supp}(\beta )\) fixed points of \(\beta \) and then \(k \le 2  \mathrm {supp}(\beta )\). \(\square \)
The following theorem is a consequence of Proposition 7, Theorem 5, Theorem 6 and Proposition 11.
Theorem 7
 1
\(c(0, \beta )=2(n2)!\), \(n >1\).
 2
\(c(3,\beta )=4(n2)(n2)!\), \(n >1\).
 3
\(c(4,\beta )=(n2)(n3)(n2)!\), \(n >2\).
 4
\(c(k, \beta )=0\), for \(5\le k\le n\).
Formulas (1), (2) and (3) in previous proposition coincide with the number of permutations of n symbols, with \(n > 1\), having exactly 2, 3 and 4 points, respectively, on the boundary of their bounding square (that are labeled as sequences A208529, A208528 and A098916 in the OEIS database, respectively). Details about this definitions can be consulted in Deutsch (2012). Therefore, our result provides another interpretation for these sequences in the OEIS database.
Now we give a formula for \(c(k, \beta )\) when \(\beta \) is any fixedpoint free involution. Let a(n) be the “number of deranged matchings of 2n people with partners (of either sex) other than their spouse” (sequence A053871).
Theorem 8
 1
\(c(k, \beta )=0\), for k and odd integer,
 2
\(c(k, \beta )=2^{m}m!\left( {\begin{array}{c}m\\ j\end{array}}\right) a(j)\), for \(k=2j\), \(j=0, 1, 2, \dots \)
Proof
Theorem 9
Sketch
Conclusions
In this paper we give some techniques to work with kcommuting permutations. We present some formulas for the number of permutations that kcommute with \(\beta \), when \(\beta \) is any permutation and \(k\le 4\). Also we obtain formulas for \(c(k, \beta )\) when \(\beta \) is either a transposition, or an ncycle, or a fixedpoint free involution, for any k. These results could be useful when we work in problems related with almost commuting permutations. Even more, these enumerative results could be useful to find relations between integer sequences in the OEIS database, as Rivera (2015) showed.
The problem of computing in an exact way the number \(c(k, \beta )\) could be a difficult task. However, it is possible that for some specific cycle type of permutations, the problem can be managed. We leave as an open problem to find another technique, or a refinement of the presented in this article, to compute \(c(k, \beta )\) in exact way, or at least to obtain non trivial upper and lower bounds for this number.
Declarations
Authors' contributions
This work was carried out by the two authors, in collaboration. LMR designed research; RM and LMR performed research; and RM and LMR wrote the paper. Both authors read and approved the final manuscript.
Acknowledgements
The authors would like to thank L. Glebsky for very useful suggestions and comments. The authors also would like to thank Jesús Leaños for his careful reading of the paper and his very valuable suggestions. Also, the authors would like to thank the anonymous reviewer for his/her suggestions. The second author was supported by the European Research Council (ERC) Grant of Goulnara Arzhantseva, Grant Agreement No. 259527 and by PROMEP (SEP, México) Grant UAZPTC103 (No. 103.5/09/4144 and No. 103.5/11/3795).
Competing interests
The authors declare that they have no competing interests.
Open AccessThis article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.
Authors’ Affiliations
References
 Arzhantseva G, Păunescu L (2015) Almost commuting permutations are near commuting permutations. J Funct Anal 269(3):745–757MathSciNetView ArticleMATHGoogle Scholar
 Bóna M (2004) Combinatorics of permutations. Discrete mathematics and its applications (Boca Raton). Chapman & Hall/CRC, Boca Raton, Florida, p 383. With a foreword by Richard StanleyGoogle Scholar
 Bóna M, Flynn R (2009) The average number of block interchanges needed to sort a permutation and a recent result of Stanley. Inf Process Lett 109(16):927–931MathSciNetView ArticleMATHGoogle Scholar
 Cameron PJ (2010) Permutation codes. Eur J Comb 31(2):482–490MathSciNetView ArticleMATHGoogle Scholar
 CeccheriniSilberstein T, Coornaert M (2010) Cellular automata and groups. Springer monographs in mathematics. Springer, Berlin, p 439Google Scholar
 Christie DA (1996) Sorting permutations by blockinterchanges. Inf Process Lett 60(4):165–169MathSciNetView ArticleMATHGoogle Scholar
 Chu W, Colbourn CJ, Dukes P (2004) Constructions for permutation codes in powerline communications. Des Codes Cryptogr 32(1–3):51–64MathSciNetView ArticleMATHGoogle Scholar
 Deutsch E (2012) Permutations and their bounding squares. Math Mag 85(1):63MathSciNetGoogle Scholar
 Deza M, Huang T (1998) Metrics on permutations, a survey. J Comb Inf Syst Sci 23(1–4):173–185 J. N. Srivastava: felicitation volumeMathSciNetMATHGoogle Scholar
 Diaconis P (1988) Group representations in probability and statistics. Institute of mathematical statistics lecture notes—monograph series, 11. Institute of Mathematical Statistics, Hayward, CA, p 198Google Scholar
 Dummit DS, Foote RM (2004) Abstract algebra, 3rd edn. Wiley, Hoboken, NJMATHGoogle Scholar
 Farahat HK (1960) The symmetric group as metric space. J Lond Math Soc 35:215–220MathSciNetView ArticleMATHGoogle Scholar
 Filonov N, Safarov Y (2011) On the relation between an operator and its selfcommutator. J Funct Anal 260(10):2902–2932MathSciNetView ArticleMATHGoogle Scholar
 Flajolet P, Sedgewick R (2009) Analytic combinatorics. Cambridge University Press, CambridgeView ArticleMATHGoogle Scholar
 Friis P, Rørdam M (1996) Almost commuting selfadjoint matrices—a short proof of huaxin lin’s theorem. J Reine Angew Math 479:121–131MathSciNetMATHGoogle Scholar
 Glebsky L (2010) Almost commuting matrices with respect to normalized Hilbert–Schmidt norm. arXiv:1002.3082
 Glebsky L, Rivera LM (2009) Almost solutions of equations in permutations. Taiwan J Math 13(2A):493–500MathSciNetMATHGoogle Scholar
 Gorenstein D, Sandler R, Mills WH (1962) On almostcommuting permutations. Pac J Math 12:913–923MathSciNetView ArticleMATHGoogle Scholar
 Gromov M (1999) Endomorphisms of symbolic algebraic varieties. J Eur Math Soc (JEMS) 1(2):109–197MathSciNetView ArticleMATHGoogle Scholar
 Hamming RW (1950) Error detecting and error correcting codes. Bell Syst Tech J 29:147–160MathSciNetView ArticleGoogle Scholar
 Hastings MB (2009) Making almost commuting matrices commute. Commun Math Phys 291(2):321–345ADSMathSciNetView ArticleMATHGoogle Scholar
 Lin H (1997) Almost commuting selfadjoint matrices and applications. In: Operator algebras and their applications (Waterloo, ON, 1994/1995). Fields Institute Communications, vol 13. American Mathematical Society, Providence, RI, pp 193–233Google Scholar
 Moreno R, Rivera LM (2014) Blocks in cycles and \(k\)commuting permutations. arXiv:1306.5708, 1–25
 Păunescu L (2016) Convex structures revisited. Ergod Theory Dyn Syst 36(5):1596–1615MathSciNetView ArticleMATHGoogle Scholar
 Pestov VG (2008) Hyperlinear and sofic groups: a brief guide. Bull Symb Logic 14(4):449–480MathSciNetView ArticleMATHGoogle Scholar
 Quistorff J (2006) A survey on packing and covering problems in the hamming permutation space. Electron J Comb 13(1):1–13MathSciNetMATHGoogle Scholar
 Rivera LM (2015) Integer sequences and \(k\)commuting permutations. Integers 15(A46):1–22MathSciNetMATHGoogle Scholar
 Shallit J (2009) Hamming distance for conjugates. Discret Math 309(12):4197–4199MathSciNetView ArticleMATHGoogle Scholar
 Sloane NJA (2015) The online encyclopedia of integer sequencesGoogle Scholar
 Spivey MZ, Steil LL (2006) The \(k\)binomial transforms and the Hankel transform. J Integer Seq 9(1):06–1119MathSciNetMATHGoogle Scholar
 Stanley RP (1997) enumerative combinatorics. Vol. 1. Cambridge studies in advanced mathematics, vol 49. Cambridge University Press, Cambridge, p 325. With a foreword by GianCarlo Rota, Corrected reprint of the 1986 originalGoogle Scholar
 Voiculescu D (1983) Asymptotically commuting finite rank unitary operators without commuting approximants. Acta Sci Math (Szeged) 45(1–4):429–431MathSciNetMATHGoogle Scholar
 Wilf HS (1994) Generatingfunctionology, 2nd edn. Academic Press Inc, Boston, MA, p 228MATHGoogle Scholar