This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

Short reachability networks

Carla Groenland111Utrecht University, Utrecht, The Netherlands, c.e.groenland@uu.nl. This project has received funding from the European Union’s Horizon 2020 research and innovation programme under the ERC grant CRACKNP (number 853234) and the Marie Skłodowska-Curie grant GRAPHCOSY (number 101063180). Views and opinions expressed are however those of the author(s) only.  Tom Johnston222School of Mathematics, University of Bristol, Bristol, BS8 1UG, UK and Heilbronn Institute for Mathematical Research, Bristol, UK, tom.johnston@bristol.ac.uk.
Jamie Radcliffe333University of Nebraska-Lincoln, USA,jamie.radcliffe@unl.edu.  Alex Scott22footnotemark: 2 444Mathematical Institute, University of Oxford, Oxford OX2 6GG, UK, scott@maths.ox.ac.uk. Supported by EPSRC grant EP/V007327/1.
Abstract

We investigate a generalisation of permutation networks. We say a sequence T=(T1,,T)T=(T_{1},\dots,T_{\ell}) of transpositions in SnS_{n} forms a tt-reachability network if for every choice of tt distinct points x1,,xt{1,,n}x_{1},\dots,x_{t}\in\{1,\dots,n\}, there is a subsequence of TT whose composition maps jj to xjx_{j} for every 1jt1\leq j\leq t. When t=nt=n, any permutation in SnS_{n} can be created and TT is a permutation network. Waksman [JACM, 1968] showed that the shortest permutation networks have length about nlog2(n)n\log_{2}(n). In this paper, we investigate the shortest tt-reachability networks for other values of tt. Our main result settles the case of t=2t=2: the shortest 22-reachability network has length 3n/22\lceil 3n/2\rceil-2. For fixed tt, we give a simple randomised construction which shows there exist tt-reachability networks using (2+ot(1))n(2+o_{t}(1))n transpositions. We also study the effect of restricting to star-transpositions, i.e. when all transpositions have the form (1,)(1,\cdot).

1 Introduction

Let SnS_{n} be the symmetric group on nn elements, and write (a,b)Sn(a,b)\in S_{n} for the transposition that swaps aa and bb, and 1Sn1\in S_{n} for the identity permutation. Let T1,,TT_{1},\dots,T_{\ell} be a sequence of transpositions with Ti=(ai,bi)T_{i}=(a_{i},b_{i}) for i=1,,i=1,\dots,\ell. The sequence forms a permutation network if for every choice of σSn\sigma\in S_{n}, there is some subsequence Ti1,,TiT_{i_{1}},\dots,T_{i_{\ell^{\prime}}} such that

σ=(ai1,bi1)(ai,bi).\sigma=(a_{i_{1}},b_{i_{1}})\dotsb(a_{i_{\ell^{\prime}}},b_{i_{\ell^{\prime}}}).

Equivalently, if counters are placed on each vertex of a complete graph on nn vertices, then a permutation network can reach any configuration of counters by following the switches prescribed by a suitable subsequence of T1,,TT_{1},\dots,T_{\ell}.

Each transposition in a permutation network can only increase the number of possible final states by a factor of two, and so there must be at least log2(n!)=i=1nlog2(i)\log_{2}(n!)=\sum_{i=1}^{n}\log_{2}(i) transpositions. A construction of Waksman [15] shows that permutation networks can be constructed with at most i=1nlog2(i)\sum_{i=1}^{n}\left\lceil\log_{2}(i)\right\rceil transpositions when nn is a power of two (and this was independently shown by Goldstein and Leibholz [6]). This bound was later extended by Beauquier and Darrot [2] to hold for all values of nn (although this was known to Green much earlier [11]).

Theorem 1 (Waksman [15], Goldstein and Leibholz [6], Beauquier and Darrot [2]).

There is a permutation network on nn elements using i=1nlog2(i)\sum_{i=1}^{n}\left\lceil\log_{2}(i)\right\rceil transpositions.

Permutation networks are also called rearrangeable non-blocking networks and have been extensively studied due to their usefulness in communication networks, cryptographic applications and distributed computing (see e.g. [4, 5, 8, 14]).

While Θ(nlogn)\Theta(n\log n) transpositions are needed for a permutation network, we can still hope to get good distributional properties with much shorter sequences of transpositions. In this paper, we consider networks in which a given number of counters can be moved to any set of positions. We say a sequence of transpositions T1,,TSnT_{1},\dots,T_{\ell}\in S_{n} is a tt-reachability network if for every choice of tt distinct ordered points x1,,xt[n]={1,,n}x_{1},\dots,x_{t}\in[n]=\{1,\dots,n\}, there is some subsequence Ti1,,TiT_{i_{1}},\dots,T_{i_{\ell^{\prime}}} such that the composition (ai1,bi1)(ai,bi)(a_{i_{1}},b_{i_{1}})\dotsb(a_{i_{\ell^{\prime}}},b_{i_{\ell^{\prime}}}) maps jxjj\mapsto x_{j} for 1jt1\leq j\leq t (so when t=nt=n we obtain a permutation network). Similar networks have been studied (e.g.  [9, 12, 13]), but without any attempt to obtain tight bounds. Our aim in this paper is to provide exact or nearly tight bounds where possible.

Let us first consider the case of 11-reachability where we want to shuffle one counter across nn positions. By noting there are at most 22^{\ell} possible subsequences of a sequence of length \ell, we immediately get a lower bound log2(n)\ell\geq\log_{2}(n), but this is far from optimal. Indeed, a transposition (a,b)(a,b) can only move the counter if either aa or bb is a position where there may already be a counter, and the number of ‘reachable positions’ can only increase by one for each transposition. This implies n1n-1 transpositions are needed, and it is easy to find a tight example, e.g. (1,2),(1,3),,(1,n)(1,2),(1,3),\dots,(1,n).

Our main result is an exact bound for 22-reachability.

Theorem 2.

Let n2n\geq 2. The shortest 22-reachability network on nn elements contains 3n/22\left\lceil 3n/2\right\rceil-2 transpositions.

The technical difficulty lies in proving an exact lower bound.

We also give a simple randomised construction which shows that one can achieve tt-reachability using (2+ot(1))n(2+o_{t}(1))n transpositions. Surprisingly, the coefficient of the leading term is independent of tt.

Theorem 3.

Let t3t\geq 3. There is a tt-reachability network on nn elements of length at most (2+ot(1))n(2+o_{t}(1))n.

Reachability questions are related to the problem of generating uniform random permutations. A lazy transposition T=(a,b,p)T=(a,b,p) is the random permutation

T={(a,b) with probability p,1 otherwise.T=\begin{cases}(a,b)&\text{ with probability }p,\\ 1&\text{ otherwise}.\end{cases}

The composition of an independent sequence of lazy transpositions is also a random permutation. A transposition shuffle is an independent sequence of lazy transpositions T1,,TT_{1},\dots,T_{\ell} such that T1TUniform(Sn)T_{1}\cdots T_{\ell}\sim\operatorname{Uniform}(S_{n}), the uniform distribution over SnS_{n}. Let U(n)U(n) denote the minimum \ell for which there exists a transposition shuffle on nn elements of length \ell. Angel and Holroyd [1] asked whether U(n)=(n2)U(n)=\binom{n}{2}. This is disproved in [7], which shows that U(n)23(n2)+O(nlogn)U(n)\leq\frac{2}{3}\binom{n}{2}+O(n\log n) (which is currently the best upper bound). For a lower bound, note that by ignoring the probabilities, any transposition shuffle gives a permutation network, and so U(n)=Ω(nlogn)U(n)=\Omega(n\log n).555Conversely, any sorting network can be used to give a sequence which achieves every permutation with non-zero probability, but not necessarily the uniform distribution. It is important here that the sequence of permutations achieves the uniform distribution exactly: Czumaj [3] showed that there are sequences of lazy transpositions of length O(nlogn)O(n\log n) which are very close to uniform. But a very substantial gap remains between upper and lower bounds.

Stronger results are known when the transpositions are restricted to specific families. In the case when all transpositions are of the form (i,i+1)(i,i+1), Angel and Holroyd [1] showed that (n2)\binom{n}{2} is best possible. However, with this restriction there is also a lower bound of (n2)\binom{n}{2} from the ‘reachability’ point of view: (n2)\binom{n}{2} transpositions are needed to reach the ‘reverse permutation’ that maps ii to (n+1)i(n+1)-i. It is an interesting open problem to prove lower bounds that are better than Ω(nlogn)\Omega(n\log n) in the general case.

Another natural family of transpositions are the star transpositions, that is all transpositions of form (1,)(1,\cdot) (corresponding to the edges of a star K1,n1K_{1,n-1}). This does not affect the order of magnitude for uniformity, as any lazy transposition (i,j,p)(i,j,p) can be simulated by the three star transpositions (1,i,1),(1,j,p),(1,i,1)(1,i,1),(1,j,p),(1,i,1).

A modification of Theorem 2 shows that 22-reachability remains possible with around 3n/23n/2 transpositions, even when restricting to star transpositions.

Theorem 4.

For n3n\geq 3, the shortest 22-reachability network on nn elements in which each transposition is a star transposition, contains 3(n1)/2\left\lceil 3(n-1)/2\right\rceil transpositions.

Just as permutation networks strengthen to transposition shuffles, there is a natural strengthening of tt-reachability in the stochastic setting. A sequence of lazy transpositions T1,,TT_{1},\dots,T_{\ell} is a tt-uniformity network if the composition T1TT_{1}\dots T_{\ell} maps the tuple (1,,t)(1,\dots,t) to (x1,,xt)(x_{1},\dots,x_{t}) with equal probability for each tuple (x1,,xt)(x_{1},\dots,x_{t}) of tt distinct elements from [n][n]. Of course, any tt-uniformity network is also a tt-reachability network.

Using the restrictive nature of the transpositions, we are able to show that achieving 22-uniformity is strictly harder than achieving 22-reachability.

Theorem 5.

For some C>0C>0, any 22-uniformity network on nn elements in which each transposition is a star transposition has length at least 1.6nC1.6n-C.

This is the only setting in which a separation between reachability and uniformity is known. In the setting of star transpositions, we also provide a lower bound on the length of tt-reachability networks (see Proposition 7).

The remainder of the paper is organised as follows. We settle the case of 2-reachability (Theorem 2) in Section 2 and prove Theorem 3 in Section 3. In Section 4 we study star transpositions, providing a separation between 2-reachability and 2-uniformity (Theorem 4 and Theorem 5). We finish with some open problems in Section 5.

2 Exact bound for 2-reachability

We prove Theorem 2: the smallest 22-reachability network on nn elements has length 3n/22\lceil 3n/2\rceil-2.

Proof of Theorem 2.

We first give an upper bound construction. Let n2n\geq 2 be given. Our sequence of transpositions starts with the following transpositions, in order.

  1. 1.

    (1,2)(1,2).

  2. 2.

    (1,x)(1,x) for all odd 3xn3\leq x\leq n.

  3. 3.

    (2,y)(2,y) for all even 4yn4\leq y\leq n.

  4. 4.

    (x,x+1)(x,x+1) for all odd 3xn13\leq x\leq n-1.

If nn is odd, we also add the transposition (1,2)(1,2) at the end, which will be needed to reach the position (1,n)(1,n). This defines a sequence of transpositions of length 3n/22\left\lceil 3n/2\right\rceil-2, and it is straightforward to check that this sequence forms a 2-reachability network.

129
Figure 1: The multigraph corresponding to the minimum 2-reachable sequence given in the proof of Theorem 2. All vertices except 11 and 99 have deficiency 0.

The main work in this proof is in showing the lower bound. Suppose that σ=(σ1,,σ)\sigma=(\sigma_{1},\dots,\sigma_{\ell}) is a shortest 22-reachability network on n2n\geq 2 elements. Given two (distinct) counters on positions 11 and 22, a subsequence of σ\sigma defines a permutation that moves the counters to new (distinct) positions x,y{1,,n}x,y\in\{1,\dots,n\}. By the definition of 22-reachability, it must be possible to reach any such pair of positions (x,y)(x,y).

We will consider a process on an auxiliary multigraph GG with vertex set {1,,n}\{1,\dots,n\}. An example is drawn in Figure 1 for the sequence of transpositions given earlier for the upper bound (for n=9n=9). The process begins by growing two trees of black edges from the vertices 1 and 2, which we denote T1T_{1} and T2T_{2} respectively. We initialise GG as the empty graph and process the transpositions in order, adding an edge for each. We start with a set of active vertices {1,2}\{1,2\}. Any other vertex becomes active when it first appears in a transposition with an active vertex. Note that no counter can be sitting on an inactive vertex, and (by minimality) no transposition joins two inactive vertices. When we process a transposition (a,b)(a,b), we add an edge abab to GG. We colour the edge black if either aa or bb was inactive, and red otherwise. The black edges always form a forest consisting of at most two trees each containing one of the starting positions.

We now modify our sequence to obtain a sequence with a nicer form (and at most the same length). Let c1c_{1} and c2c_{2} denote the counters that start on 11 and 22 respectively, and let (a,b)(a,b) where aV(T1)a\in V(T_{1}) and bV(T2)b\in V(T_{2}) be the transposition at the first time the two trees meet. Before this time, the counter c1c_{1} is contained in V(T1)V(T_{1}) and the counter c2c_{2} is contained in V(T2)V(T_{2}), so immediately after (a,b)(a,b) the first counter c1c_{1} is contained in V(T1){b}V(T_{1})\cup\{b\} and the second counter c2c_{2} is contained in V(T2){a}V(T_{2})\cup\{a\}. We replace the initial sequence of transpositions, up to and including (a,b)(a,b), by the following sequence. Start with the transpositions (1,v)(1,v) for all vV(T1){a}v\in V(T_{1})\setminus\{a\}, followed by the transpositions (1,u)(1,u) for all uV(T2){b}u\in V(T_{2})\setminus\{b\}. Lastly, we do (1,2)(1,2), (1,a)(1,a) and (2,b)(2,b). The new sequence can reach every pair (x,y)(x,y) that the original sequence could reach, and uses at most as many transpositions. We colour the edge (1,2)(1,2) black, so the black edges form a spanning tree which we will view as rooted at the pair of vertices {1,2}\{1,2\}.

We now prove that the sum of the red degrees (counted at the end of the process) is at least n2n-2, which shows that the number of edges in GG (and transpositions in our sequence) is at least n1+(n2)/2=3n/22n-1+\left\lceil(n-2)/2\right\rceil=\left\lceil 3n/2\right\rceil-2, as desired. We first need some more definitions. The subtree TvT_{v} rooted at vv is the set of vertices uu (including vv) such that the unique path from uu to {1,2}\{1,2\} in the black tree passes through vv. Any vertex in the subtree rooted at vv is said to be above vv. The deficit of a vertex vv is defined as

def(v)=|V(Tv)|uV(Tv)dR(u),\operatorname{def}(v)=|V(T_{v})|-\sum_{u\in V(T_{v})}d_{R}(u),

where dR(u)d_{R}(u) denotes the number of red edges incident to uu. Note that the red edges may join vertices of TvT_{v} to vertices outside TvT_{v}, so may not sit inside the tree. In order to bound the sum of the red degrees, we will inductively bound the deficit of vertices.

Each vertex v{1,2}v\not\in\{1,2\} has a unique vertex adjacent to vv on the unique path in the black tree from {1,2}\{1,2\} to vv. We call this the parent of vv and we denote it by p(v)p(v) (which could equal 11 or 22). The children 𝒞(v)\mathcal{C}(v) of a vertex vv are the vertices uu for which p(u)=vp(u)=v. We may rewrite the formula for the deficit of vv in the following inductive manner.

def(v)=1dR(v)+u𝒞(v)def(u).\operatorname{def}(v)=1-d_{R}(v)+\sum_{u\in\mathcal{C}(v)}\operatorname{def}(u).

Note that the first edge that can carry a counter to v{1,2}v\not\in\{1,2\} is the black edge to its parent; if vv is not incident to a red edge, then this is the only way to get a counter to vv.

We show the following claim inductively, which we will extend to v{1,2}v\in\{1,2\} to finish the proof.

Claim 6.

Every vertex v{1,2}v\not\in\{1,2\} has deficit at most 1. Moreover, if the deficit of vv is equal to 1, then there is a vertex \ell such that the only way for a counter to reach \ell is to enter vv using the black edge p(v)vp(v)v and then to follow the path of black edges from vv to \ell.

Proof.

We prove the claim by induction on the height of the subtree rooted at v{1,2}v\not\in\{1,2\}. If the height is 0, that is, vv is a leaf of the black tree, then the deficit is at most 11 and equals 11 if and only if vv can only be reached via the black edge from its parent p(v)p(v).

Now suppose that the claim has been shown up to height h0h\geq 0, and suppose the subtree rooted at vv has height h+1h+1. We first show that there are at least as many red edges incident to vv as there are children of vv with deficit 1, which implies that the deficit uV(Tv)(1dR(u))\sum_{u\in V(T_{v})}(1-d_{R}(u)) of vv is at most 1.

If a vertex uu of deficit 11 is above vv and connected to vv via a black edge, then by induction there exists a vertex (u)\ell(u) in the subtree rooted at uu which can only be reached using black edges from vv. Let vzvz be the last black edge from vv to a child of vv with deficit 11. Then it is not possible to get counters into both vv and (z)\ell(z) unless there is a red edge incident with vv after (v,z)(v,z). Similarly, if vv has black edges to vertices x,y𝒞(v)x,y\in\mathcal{C}(v) that have deficit 1, then there has to be a red edge incident with vv, produced by some transposition that occurs between the transpositions (v,x)(v,x) and (v,y)(v,y) else there is no way to reach ((x),(y))(\ell(x),\ell(y)).

Suppose now that vv has deficit exactly 1. We need to find a vertex \ell which can only be reached using a path of black edges from the parent of vv. If none of the children of vv have deficit 1, then the deficit of vv is 1dR(v)1-d_{R}(v) and there are no red edges incident to vv. Hence, we can take =v\ell=v. Otherwise, let xx be the first neighbour above vv which has deficit 1. Since, vv has deficit exactly 1, our argument above shows that there cannot be a red edge incident to vv which corresponds to a transposition before (v,x)(v,x). Hence, the only way of getting a counter into (x)\ell(x) is using the black edge to vv, the edge (v,x)(v,x) and the path of black edges from xx to (x)\ell(x), and we take =(x)\ell=\ell(x). This completes the proof of Claim 6. ∎

We now show that the vertices 11 and 22 have deficit at most 11 as well. The difficulty in this case is that it is possible to put a counter on 11 (say) using the black edge (1,2)(1,2). This means that we can put a counter on (x)\ell(x) and (y)\ell(y) without requiring a red edge between them. However, this does not take into account the fact that the counters are distinguishable, and we only need to modify the argument from the claim slightly to make use of this.

Let the counters starting in positions 1 and 2 be c1c_{1} and c2c_{2} respectively, and suppose there is a child xx of 11 which has deficit 1. Then there is a vertex (x)\ell(x) such that the only way for a counter to reach (x)\ell(x) is to follow the path of black edges from 11 to xx to (x)\ell(x). If the transposition (1,x)(1,x) occurs before the black edge (1,2)(1,2), then there is no way to move the counter c2c_{2} to (x)\ell(x), and xx must have deficit 0. The black edge (1,2)(1,2) is the only way to put a counter on 11 without using a red edge, so after this transposition we can apply a proof similar to that of the claim above to see the deficit of 1 is at most 1. Indeed, if xx and yy are children of 11 with deficit 1, then there has to be some transposition that can place a counter on 11 in between (1,x)(1,x) and (1,y)(1,y) in order to reach ((x),(y))(\ell(x),\ell(y)). We have just argued that this is not the transposition (1,2)(1,2), and so it must be a red transposition. Likewise, there must be a red transposition after the last black edge to a vertex zz of deficit 1 in order to end with the counters in 11 and (z)\ell(z).

Since every vertex is in either the subtree rooted at 1 or the subtree rooted at 2 and the deficit of these two subtrees is at most 11, the sum of the red degrees must be at least n2n-2. Hence, there are at least (n2)/2\left\lceil(n-2)/2\right\rceil red edges and at least 3n/22\left\lceil 3n/2\right\rceil-2 transpositions in the sequence. ∎

3 Upper bound for tt-reachability

We now give a probabilistic construction which shows that there are tt-reachability networks on nn elements of length (2+ot(1))n(2+o_{t}(1))n. This is much smaller than the best known constructions for uniformity and, surprisingly, the coefficient of the leading term is bounded. We remark that all the transpositions used in this construction are star transpositions.

Proof of Theorem 3.

Let t3t\geq 3 be a natural number and choose ε(0,1t+1)\varepsilon\in(0,\frac{1}{t+1}). Let n>tn>t and set L=n1εL=\left\lfloor n^{1-\varepsilon}\right\rfloor. Recall that the counters start in positions {1,,t}\{1,\dots,t\}.

Let GG be a random bipartite graph with vertices AB={at+1,,an}{b1,,bL}A\cup B=\{a_{t+1},\dots,a_{n}\}\cup\{b_{1},\dots,b_{L}\} constructed by adding two uniformly random edges from aja_{j} to {b1,,bL}\{b_{1},\dots,b_{L}\} for each jj. The random transposition sequence begins with LL phases. In the iith phase, we add the transpositions (1,j)(1,j) for each j{2,,t}j\in\{2,\dots,t\} followed by (1,j)(1,j) for the j{t+1,n}j\in\{t+1,\dots n\} such that aja_{j} is adjacent to bib_{i}. Finally, the sequence ends with a tt-reachable network over the first tt positions.

Fix positions x1,,xt{1,,n}x_{1},\dots,x_{t}\in\{1,\dots,n\} for which we need to find a subsequence that puts our tt counters into those positions. Let the xix_{i} which are in {t+1,,n}\{t+1,\dots,n\} be xi1,,xim=y1,,ymx_{i_{1}},\dots,x_{i_{m}}=y_{1},\dots,y_{m}.

Suppose that there is a matching {ayjbsj:j[m]}\{a_{y_{j}}b_{s_{j}}:j\in[m]\} in GG containing the vertices ay1,,ayma_{y_{1}},\dots,a_{y_{m}}. For j[t]j\in[t], we can put the jjth counter in position yj=xijy_{j}=x_{i_{j}} during phase sjs_{j} using the transpositions (1,j)(1,j) and (1,yj)(1,y_{j}). The remaining counters can easily be positioned using the tt-reachable sequence at the end.

It remains to show that there is some choice for GG such that every set of sts\leq t vertices from AA is in a matching. The probability that a given set of ss vertices from AA has at most s1s-1 neighbours in BB is at most

(Ls1)(s1L)2s(s1)2s(s1)!L(1+s).\binom{L}{s-1}\left(\frac{s-1}{L}\right)^{2s}\leq\frac{(s-1)^{2s}}{(s-1)!}L^{-(1+s)}.

Hence, by the union bound, the probability that there is a set AAA^{\prime}\subseteq A of size at most tt and with at most |A|1|A^{\prime}|-1 neighbours is at most

s=3t(ns)(s1)2s(s1)!L(1+s)s=3t(s1)2ss!(s1)!nsLs+1=Ot(n1+(t+1)ε).\sum_{s=3}^{t}\binom{n}{s}\frac{(s-1)^{2s}}{(s-1)!}L^{-(1+s)}\leq\sum_{s=3}^{t}\frac{(s-1)^{2s}}{s!(s-1)!}\frac{n^{s}}{L^{s+1}}=O_{t}\left(n^{-1+(t+1)\varepsilon}\right).

Since ε<1/(t+1)\varepsilon<1/(t+1), this probability is less than 1 for nn sufficiently large. This implies there exists a suitable choice for the graph GG (for sufficiently large nn).

Note that for j{t+1,,n}j\in\{t+1,\dots,n\}, the transposition (1,j)(1,j) appears exactly twice in the sequence since the vertex aja_{j} has degree exactly 2. We can create a tt-reachable network on the first tt positions using O(tlogt)O(t\log t) star transpositions. Hence, there exists a tt-reachability network using at most

(t1)L+2(nt)+O(tlogt)=2n+ot(n)(t-1)L+2(n-t)+O(t\log t)=2n+o_{t}(n)

transpositions. ∎

4 Star transpositions

We now turn our attention to the setting where all transpositions are of the form (1,)(1,\cdot) and prove Theorem 4, which shows that restricting to star transpositions leads to only a small difference in the number of transpositions needed for 22-reachability. In fact, there is no difference when nn is odd, and they differ by only 1 when nn is even.

Let us first consider the upper bound. The idea is simple: we will start with the transposition (1,2)(1,2) so the two counters are indistinguishable, then we will sweep through the even numbers and potentially load one of them with a counter. Finally, we will sweep through every position. That is,

  1. 1.

    (1,2)(1,2),

  2. 2.

    (1,4),(1,6),,(1,2n/2)(1,4),(1,6),\dots,(1,2\!\left\lfloor n/2\right\rfloor),

  3. 3.

    (1,2),(1,3),(1,4),,(1,n)(1,2),(1,3),(1,4),\dots,(1,n).

It is easy to see that the counters can reach (x,y)(x,y) when xx and yy are not both odd: simply place one counter in an even position in the first sweep and place the other counter in the second sweep. To put a counter on xx and yy when both are odd and 1<x<y1<x<y, we load (x+1)(x+1) in the first sweep and use this to “reload” 11 before the transposition (1,y)(1,y). When x=1x=1, this sequence works when nn is even and we can use (1,n)(1,n) to leave a counter on 1, but it breaks down when nn is odd. This could be fixed by appending the transposition (1,2)(1,2) say, but it is possible to do slightly better with the following “twisted” sequence. Let n=2m+1n=2m+1. The following sequence of transpositions is 2-reachable.

  1. 1.

    (1,2)(1,2),

  2. 2.

    (1,4),(1,6),,(1,2m)(1,4),(1,6),\dots,(1,2m),

  3. 3.

    (1,3),(1,2),(1,5),(1,4),,(1,2m+1),(1,2m)(1,3),(1,2),(1,5),(1,4),\dots,(1,2m+1),(1,2m).

Proof of Theorem 4.

The upper bound is given in the discussion above, so we only need to prove a matching lower bound. For this we proceed much as in the proof of Theorem 2. We colour the transposition (1,x)(1,x) black if it is the only occurrence, red if it has occurred previously and blue otherwise (i.e. if it is a first occurrence, but will occur later as well). There are n1n-1 transpositions that are either black or blue, and it suffices to show that there are at least (n1)/2(n-1)/2 red transpositions.

We claim that the number of red transpositions is at least the number of black transpositions. Let the two counters be c1c_{1} and c2c_{2}. Suppose (1,x)(1,x) is the last black transposition where x3x\geq 3. Then there needs to be a red transposition after (1,x)(1,x) in order to leave the counters c1c_{1} and c2c_{2} in 11 and xx respectively. Similarly, in between any pair of black transpositions (1,x)(1,x) and (1,y)(1,y) where x,y3x,y\geq 3 there has to be a red transposition in order to leave the counters c1c_{1} and c2c_{2} in yy and xx respectively. This shows the claim when (1,2)(1,2) is used multiple times, and there is no black (1,2)(1,2).

If (1,2)(1,2) is used exactly once, then it must be the first black transposition. Indeed, if (1,x)(1,x) is a black transposition where x3x\geq 3, then there is no way to put the counter c2c_{2} in xx unless (1,2)(1,2) has already been. If (1,2)(1,2) were to be the only black transposition, then (1,x)(1,x) must appear twice for every x3x\geq 3 and there are 2(n2)+12(n-2)+1 transpositions. This is at least 3(n1)/2\left\lceil 3(n-1)/2\right\rceil for n3n\geq 3 and we would therefore be done. Hence, if (1,2)(1,2) is used exactly once, it must be the first but not the last black transposition. The above argument shows there is a red transposition after the last black transposition and in between every pair of black transpositions (1,x)(1,x) and (1,y)(1,y) where x,y3x,y\geq 3. It is enough to show there is a red transposition between (1,2)(1,2) and the first black transposition (1,x)(1,x) where x3x\geq 3, and this is easy to argue: there must be a red transposition between (1,2)(1,2) and (1,x)(1,x) in order to leave c1c_{1} in xx and c2c_{2} in 11.

By definition, the number of red transpositions is at least the number of blue transpositions. Since there is a total of n1n-1 black and blue transpositions, there must be at least (n1)/2(n-1)/2 of one of them and there are at least (n1)/2(n-1)/2 red transpositions. ∎

The lower bound for 2-reachability above immediately gives a lower bound for the more difficult problem of constructing a 2-uniformity network with star transpositions but, using the restrictive nature of the transpositions, we can show that a 2-uniformity network has length at least 1.6nC1.6n-C, a constant factor higher. This confirms, for this specific case, that the problem of uniformity is strictly more difficult than reachability.

Proof of Theorem 5.

We use a discharging argument to show that, after disregarding a constant number of the transpositions, 1.6 is a lower bound on the average number of times that a star transposition is used.

Let T=(T1,,T)T=(T_{1},\dots,T_{\ell}) be a sequence of star transpositions that forms a 2-uniformity network on nn elements. We assign each transposition (1,a)(1,a) a weight equal to the number of times (1,a)(1,a) is used in TT. Let σ1,,σm\sigma_{1},\dots,\sigma_{m} be the transpositions of TT which are used exactly once and are of the form (1,x)(1,x) for x3x\geq 3. We transfer weight from the transpositions which are used multiple times to the transpositions which are used exactly once according to the following rules.

  • If the last appearance of (1,a)(1,a) and (1,b)(1,b) is between σi\sigma_{i} and σi+1\sigma_{i+1}, then they each transfer 0.30.3 to σi\sigma_{i} and 0.10.1 to σi+1\sigma_{i+1}.

  • If there is only one transposition which appears for the last time between σi\sigma_{i} and σi+1\sigma_{i+1}, it transfers 0.40.4 to σi\sigma_{i}.

  • Each transposition which appears between σi\sigma_{i} and σi+1\sigma_{i+1} for neither the first time nor the last time, transfers 0.60.6 to σi\sigma_{i} and 0.20.2 to σi+1\sigma_{i+1}.

If (1,a)(1,a) is used exactly twice, then it transfers 0.40.4 and ends with weight 1.61.6. A transposition used more than twice transfers 0.8(i2)+0.40.8(i-2)+0.4 so ends with weight 1.6+0.2(i2)1.6+0.2(i-2). Hence, we only need to show that all but a constant number of the transpositions that are used once (the σi\sigma_{i}) end with weight at least 1.61.6.

Let σi1=(1,a)\sigma_{i-1}=(1,a) and σi=(1,b)\sigma_{i}=(1,b). In order to end with counters in both aa and bb, there must a transposition between σi1\sigma_{i-1} and σi\sigma_{i} which can place a counter in position 1. In particular, there is either a transposition which is not appearing for the first time, or (1,2)(1,2) appearing for the first time. This immediately shows that all but one of σ1,,σm1\sigma_{1},\dots,\sigma_{m-1} have weight at least 1.4. We claim that in between either σi1\sigma_{i-1} and σi\sigma_{i} or between σi\sigma_{i} and σi+1\sigma_{i+1} one of the following must hold:

  1. 1.

    there are at least two transpositions appearing for the last time,

  2. 2.

    there is a transposition appearing for neither the first nor the last time,

  3. 3.

    there is the transposition (1,2)(1,2) appearing for the first time.

If one of the first two cases occurs, then σi\sigma_{i} ends with weight at least 1.6, while the last case can only occur twice. This analysis does not apply to σ1\sigma_{1} and σm\sigma_{m}, showing that the number of σi\sigma_{i} which end up with weight less than 1.6 is at most four.

We now prove the above claim. Let σi1=(1,a)\sigma_{i-1}=(1,a), σi=(1,b)\sigma_{i}=(1,b) and σi+1=(1,c)\sigma_{i+1}=(1,c) and assume that none of the conditions above hold. In between σi1\sigma_{i-1} and σi\sigma_{i}, there can be only transpositions used for the first time and a single transposition (1,)(1,\ell) used for the last time. We may write the sequence as

(1,a),(1,f1),,(1,fk),(1,),(1,fk+1),,(1,fs),(1,b)(1,a),(1,f_{1}),\dots,(1,f_{k}),(1,\ell),(1,f_{k+1}),\dots,(1,f_{s}),(1,b) (1)

where the fjf_{j} are distinct, not equal to 2 and are appearing for the first time.

The only way to end the sequence of lazy transpositions with the counters in {a,b}\{a,b\}, {a,}\{a,\ell\} or {b,}\{b,\ell\} is to start the sequence (1) with the two counters in {1,}\{1,\ell\}. Let pjp_{j} be the probability associated with the transposition (1,j)(1,j) in (1). The probability that this sequence ends with counters in {a,b}\{a,b\} and {a,}\{a,\ell\} must be equal, so

pa(1p)=pap(1pfk+1)(1pfs)pb.p_{a}(1-p_{\ell})=p_{a}p_{\ell}(1-p_{f_{k+1}})\cdots(1-p_{f_{s}})p_{b}.

In particular, if q=(1pfk+1)(1pfs)q=(1-p_{f_{k+1}})\cdots(1-p_{f_{s}}), then 1p=pqpb1-p_{\ell}=p_{\ell}qp_{b} which implies p=1/(qpb+1)1/2p_{\ell}=1/(qp_{b}+1)\geq 1/2. We now claim that the probability a counter ends in \ell is strictly higher than the probability a counter ends in bb unless qpb=1qp_{b}=1. We condition on which of 11 and \ell contain a counter before the transposition (1,)(1,\ell) and calculate the probability a counter ends in each of the positions \ell and bb.

Starting positions {1,\ell} {\ell} {1} \emptyset
Counter ends in \ell 1 1p1-p_{\ell} pp_{\ell} 0
Counter ends in bb qpbqp_{b} pqpbp_{\ell}qp_{b} (1p)qpb(1-p_{\ell})qp_{b} 0

In every case, the probability that a counter ends in \ell is at least the probability that a counter ends in bb, and the first one is strict unless qpb=1qp_{b}=1.

Now we consider the transpositions between (1,b)(1,b) and (1,c)(1,c) below.

(1,b),(1,f1),,(1,fk),(1,),(1,fk+1),,(1,fs),(1,c)(1,b),(1,f_{1}^{\prime}),\dots,(1,f_{k}^{\prime}),(1,\ell^{\prime}),(1,f_{k+1}^{\prime}),\dots,(1,f_{s}^{\prime}),(1,c)

Since the transposition (1,b)(1,b) fires with probability 1, there is no way for the counters to end in both \ell^{\prime} and cc, giving a contradiction and proving the claim. ∎

We have seen in Theorem 4 that the shortest 2-reachability network has length approximately 3n/23n/2. Moreover, it is possible to construct a 3-reachable network using 5n/3+C5n/3+C such transpositions. Using a similar argument to the proof of Theorem 5, we offer the following lower bound for arbitrary tt when using star transpositions, which is tight up to additive constants when t=2,3t=2,3.

Proposition 7.

For each t1t\geq 1, there is a constant CtC_{t} such that any tt-reachability network on nn elements using only star transpositions has length at least (21/t)nCt(2-1/t)n-C_{t}.

Proof.

We will again apply a discharging argument. Let TT be a given tt-reachability network consisting of star transpositions. As before, we assign the transposition (1,a)(1,a) a weight equal to the number of times (1,a)(1,a) is used and let σ1,,σm\sigma_{1},\dots,\sigma_{m} be the subsequence of transpositions that are used exactly once and are of the form (1,x)(1,x) for x[t]x\not\in[t]. We transfer weight from a transposition used multiple times according to the σi\sigma_{i} using the following simple rules.

  • For each transposition between σi\sigma_{i} and σi+1\sigma_{i+1} used for the last time (but not the first), transfer 1/t1/t to σi\sigma_{i}.

  • For each transposition between σi\sigma_{i} and σi+1\sigma_{i+1} used for neither the first time nor the last time, transfer 1 to σi\sigma_{i}.

We will show all but at most 2t2t transpositions end up with weight at least 21/t2-1/t. Clearly, any transposition which is used multiple times ends with weight 21/t2-1/t as required. We will ignore any σi,σi+1\sigma_{i},\sigma_{i+1} for which some transposition (1,x)(1,x) with x[t]x\in[t] occurs for the first time between them. This disregards at most 2(t1)2(t-1) of the σi\sigma_{i}.

We show all the other σi\sigma_{i} (except σm\sigma_{m}) get weight at least 21/t2-1/t. Consider the section between σi=(1,a)\sigma_{i}=(1,a) and σi+1=(1,b)\sigma_{i+1}=(1,b)

(1,a),(1,s1),,(1,s),(1,b).(1,a),(1,s_{1}),\dots,(1,s_{\ell}),(1,b).

If there is a transposition between σi\sigma_{i} and σi+1\sigma_{i+1} used for neither the first nor the last time, then σi\sigma_{i} has weight at least 2. So we assume all (1,sj)(1,s_{j}) are used for either the first or last time. Let s1,,ss_{1}^{\prime},\dots,s_{\ell^{\prime}}^{\prime} be the transpositions used for the last time. If t1\ell^{\prime}\geq t-1, then σi\sigma_{i} receives weight at least 21/t2-1/t as desired, and we show that this is always the case.

We show this by proving that we cannot simultaneously leave counters in the positions {a,s1,,s,b}\{a,s_{1}^{\prime},\dots,s_{\ell^{\prime}}^{\prime},b\} (which we should be able to if the set has at most tt elements). The transposition σi=(1,a)\sigma_{i}=(1,a) must be used (as this is the only way to put a counter on aa) and then the only way for a counter to ‘reload’ position 1 before σi+1\sigma_{i+1} is using a transposition (1,sj)(1,s_{j}^{\prime}) that has been used before. (Here we use our assumption that no (1,x)(1,x) appears for the first time in our segment for x[t]x\in[t].) When we use (1,sj)(1,s_{j}^{\prime}) to ‘reload’, then no counter can end in position sjs_{j}^{\prime} since this is the last use of this transposition. Hence, we cannot ‘reload’ position 11 to leave a counter in bb. ∎

5 Open problems

We determined exactly the minimum number of transpositions needed in a 22-reachable network. We also gave upper and lower bounds for tt-reachable networks using star transpositions, although there is still a small gap between them.

Problem 1.

What is the minimum number of transpositions needed in a tt-reachable network? What if all transpositions are of the form (1,)(1,\cdot)?

We proved in Theorem 5 that there is a gap between 2-uniformity and 2-reachability when restricting to star transpositions. There are many 2-uniformity networks of length 2n32n-3, e.g. consider the sequence of lazy transpositions

(1,2,12),(1,3,2n),(1,2,12),(1,4,2n1),,(1,2,12),(1,n,23),(1,2,12),(1,2,\tfrac{1}{2}),(1,3,\tfrac{2}{n}),(1,2,\tfrac{1}{2}),(1,4,\tfrac{2}{n-1}),\dots,(1,2,\tfrac{1}{2}),(1,n,\tfrac{2}{3}),(1,2,\tfrac{1}{2}),

and we conjecture that no smaller sequences exist.

Conjecture 1.

For n2n\geq 2, U2(n)=2n3U_{2}(n)=2n-3.

We remark that, if this were to be true, it would match nicely with selection networks.666After a preliminary version of this paper was put on arXiv, Conjecture 1 was proven by Janzer, Johnson and Leader [10].

References

  • [1] O. Angel and A. E. Holroyd. Perfect shuffling by lazy swaps. Electronic Communications in Probability, 23, 2018.
  • [2] B. Beauquier and E. Darrot. On arbitrary size Waksman networks and their vulnerability. Parallel Processing Letters, 12(03n04):287–296, 2002.
  • [3] A. Czumaj. Random permutations using switching networks. In STOC’15—Proceedings of the 2015 ACM Symposium on Theory of Computing, pages 703–712. ACM, New York, 2015.
  • [4] W. J. Dally and B. P. Towles. Principles and Practices of Interconnection Networks. Elsevier, 2004.
  • [5] B. H. Falk and R. Ostrovsky. Secure merge with O(nloglogn)O(n\log\log n) secure operations. In 2nd Conference on Information-Theoretic Cryptography, volume 199 of LIPIcs. Leibniz Int. Proc. Inform., pages Art. No. 7, 29. Schloss Dagstuhl. Leibniz-Zent. Inform., Wadern, 2021.
  • [6] L. J. Goldstein and S. W. Leibholz. On the synthesis of signal switching networks with transient blocking. IEEE Transactions on Electronic Computers, (5):637–641, 1967.
  • [7] C. Groenland, T. Johnston, J. Radcliffe and A. Scott. Perfect shuffling with fewer lazy transpositions. arXiv:2208.06629, 2022.
  • [8] W. Holland, O. Ohrimenko and A. Wirth. Efficient oblivious permutation via the Waksman network. In Proceedings of the 2022 ACM on Asia Conference on Computer and Communications Security, Asia Ccs ’22, pages 771–783, New York, NY, USA, 2022. Association for Computing Machinery.
  • [9] J. Hromkovič, P. Kanarek, R. Klasing, K. Loryś, W. Unger and H. Wagener. On the size of permutation networks and consequences for efficient simulation of hypercube algorithms on bounded-degree networks. SIAM Journal on Discrete Mathematics, 23(3):1612–1645, 2009.
  • [10] B. Janzer, J. R. Johnson and I. Leader. Partial shuffles by lazy swaps. arXiv:2210.13286, 2022.
  • [11] W. H. Kautz, K. N. Levitt and A. Waksman. Cellular interconnection arrays. IEEE Transactions on Computers, 100(5):443–451, 1968.
  • [12] J. Lenfant. Parallel permutations of data: a Benes network control algorithm for frequently used permutations. Institute of Electrical and Electronics Engineers. Transactions on Computers, 27(7):637–647, 1978.
  • [13] A. Y. Oruç. A study of permutation networks: some generalizations and tradeoffs. Journal of Parallel and Distributed Computing, pages 359–366, 1994.
  • [14] N. P. Smart and Y. T. Alaoui. Distributing any elliptic curve based protocol. In Cryptography and coding, volume 11929 of Lecture Notes in Comput. Sci., pages 342–366. Springer, Cham, 2019.
  • [15] A. Waksman. A permutation network. Journal of the ACM (JACM), 15(1):159–163, 1968.