A Permutation Network



Similar documents
α = u v. In other words, Orthogonal Projection

6.2 Permutations continued

Modern Optimization Methods for Big Data Problems MATH11146 The University of Edinburgh

Lecture 3: Finding integer solutions to systems of linear equations

I. GROUPS: BASIC DEFINITIONS AND EXAMPLES

NIM with Cash. Abstract. loses. This game has been well studied. For example, it is known that for NIM(1, 2, 3; n)

Lecture 18: Applications of Dynamic Programming Steven Skiena. Department of Computer Science State University of New York Stony Brook, NY

Full and Complete Binary Trees

AN ALGORITHM FOR DETERMINING WHETHER A GIVEN BINARY MATROID IS GRAPHIC

Polynomial Degree and Lower Bounds in Quantum Complexity: Collision and Element Distinctness with Small Range

SCORE SETS IN ORIENTED GRAPHS

Split Nonthreshold Laplacian Integral Graphs

The four [10,5,4] binary codes

Closest Pair Problem

Inner Product Spaces

Scheduling Shop Scheduling. Tim Nieberg

Notes on Determinant

Mathematical Induction

MATH10212 Linear Algebra. Systems of Linear Equations. Definition. An n-dimensional vector is a row or a column of n numbers (or letters): a 1.

GREATEST COMMON DIVISOR

Math 4310 Handout - Quotient Vector Spaces

Math 319 Problem Set #3 Solution 21 February 2002

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS

Let H and J be as in the above lemma. The result of the lemma shows that the integral

Chapter 3. Cartesian Products and Relations. 3.1 Cartesian Products

INDISTINGUISHABILITY OF ABSOLUTELY CONTINUOUS AND SINGULAR DISTRIBUTIONS

WRITING PROOFS. Christopher Heil Georgia Institute of Technology

Tail inequalities for order statistics of log-concave vectors and applications

A REMARK ON ALMOST MOORE DIGRAPHS OF DEGREE THREE. 1. Introduction and Preliminaries

Quotient Rings and Field Extensions

5. Orthogonal matrices

Discrete Mathematics & Mathematical Reasoning Chapter 10: Graphs

1 Review of Least Squares Solutions to Overdetermined Systems

Handout #Ch7 San Skulrattanakulchai Gustavus Adolphus College Dec 6, Chapter 7: Digraphs

ON THE K-WINNERS-TAKE-ALL NETWORK

CS473 - Algorithms I

Continued Fractions and the Euclidean Algorithm

Systems of Linear Equations

JUST THE MATHS UNIT NUMBER 8.5. VECTORS 5 (Vector equations of straight lines) A.J.Hobson

The sum of digits of polynomial values in arithmetic progressions

3. Mathematical Induction

DETERMINANTS IN THE KRONECKER PRODUCT OF MATRICES: THE INCIDENCE MATRIX OF A COMPLETE GRAPH

Design Methods for Binary to Decimal Converters Using Arithmetic Decompositions

Notes on Symmetric Matrices

JUST-IN-TIME SCHEDULING WITH PERIODIC TIME SLOTS. Received December May 12, 2003; revised February 5, 2004

Lecture 13 - Basic Number Theory.

7 Gaussian Elimination and LU Factorization

MATH 4330/5330, Fourier Analysis Section 11, The Discrete Fourier Transform

Max-Min Representation of Piecewise Linear Functions

A Piggybacking Design Framework for Read-and Download-efficient Distributed Storage Codes

a 11 x 1 + a 12 x a 1n x n = b 1 a 21 x 1 + a 22 x a 2n x n = b 2.

On an algorithm for classification of binary self-dual codes with minimum distance four

Beyond the Stars: Revisiting Virtual Cluster Embeddings

4.5 Linear Dependence and Linear Independence

The Matrix Elements of a 3 3 Orthogonal Matrix Revisited

2.3 Convex Constrained Optimization Problems

PRIME FACTORS OF CONSECUTIVE INTEGERS

MATH 304 Linear Algebra Lecture 18: Rank and nullity of a matrix.

Annual Report H I G H E R E D U C AT I O N C O M M I S S I O N - PA K I S TA N

ML for the Working Programmer

Lecture 22: November 10

Vector and Matrix Norms

Test1. Due Friday, March 13, 2015.

A Note on the Bertsimas & Sim Algorithm for Robust Combinatorial Optimization Problems

8. Matchings and Factors

Local periods and binary partial words: An algorithm

A Study on the Necessary Conditions for Odd Perfect Numbers

Customer Classification And Prediction Based On Data Mining Technique

Well-Separated Pair Decomposition for the Unit-disk Graph Metric and its Applications

IRREDUCIBLE OPERATOR SEMIGROUPS SUCH THAT AB AND BA ARE PROPORTIONAL. 1. Introduction

1 A duality between descents and connectivity.

Math 223 Abstract Algebra Lecture Notes

Suk-Geun Hwang and Jin-Woo Park

CAPM, Arbitrage, and Linear Factor Models

Chapter 7. Permutation Groups

A characterization of trace zero symmetric nonnegative 5x5 matrices

Row Echelon Form and Reduced Row Echelon Form

Sample Induction Proofs

Lecture 4: BK inequality 27th August and 6th September, 2007

Orthogonal Diagonalization of Symmetric Matrices

Data Structures Fibonacci Heaps, Amortized Analysis

CONTROLLABILITY. Chapter Reachable Set and Controllability. Suppose we have a linear system described by the state equation

8 Divisibility and prime numbers

Direct Methods for Solving Linear Systems. Matrix Factorization

Polarization codes and the rate of polarization

A note on companion matrices

ON GALOIS REALIZATIONS OF THE 2-COVERABLE SYMMETRIC AND ALTERNATING GROUPS

Linear Maps. Isaiah Lankham, Bruno Nachtergaele, Anne Schilling (February 5, 2007)

Metric Spaces. Chapter Metrics

1. Prove that the empty set is a subset of every set.

The Method of Least Squares

1 if 1 x 0 1 if 0 x 1

Transcription:

A Permutation Network ABRAHAM WAKSMAN Stanford Research nstitute, Menlo Park, California,~BS'rm~CT. n this paper the construction of a switching network capable of n!-permutation of its n is:put terminals to its n output terminals is described. The building blocks for this network are binary cells capable of permuting their two input terminals to their two output terminals. The number of cells used by the network is (n.log2 n - n + 1} = ~,~1 (loge k), t could be argued that for such a network this number of cells is a lower bound, by noting th:tt binary decision trees in the network can resolve individual terminal assignments only and not the partitioning of the permutation set itself which requires only (log2 n!) = (~=~ log2 k) binary dedsions. An algorithm is also given for the sel~ting of the binary cells in the network according to any specified permutation. KEY WORDS AND PHRASES: permutation, signal set, network, network design, flipflop for CATEGORES: 6.1, 6.39, 6.9 n many applications of computer design it is desirable to efficiently construct a network which permutes u set of signals. Let the "elenmntat cell" be the basic building block of such a network, which by itself is a permutation network on two inputs and presumably can be constructed using a single flipflop (see Figure 1). Clearly, the lower bound on the number of elementary cells required for a permutation network on N signals is log,2 (N!). We describe a construction which utilizes F(N) cells, where N is a power of two, such that N~ \log, (N:)/ Definition 1. Definition 2. u~, u~,..., uu are the N inlets to the permutation networks. v~, v2,.. -, vu art the N outlets from the permutation network. Definition 3. {~r(u~) --, v~ : i, j = 1, --., N} is a permutation assigning u~ to some v~ for all i and j. Definition 4. Xi is a variable ranging over the pair (u2i, u2i-1) for i = 1,..., (,~/2). Definition 5. Yj is a variable ranging over the pair (v2j, v~j_:) forj = 1,..., (~'/2). "'~EO~EM 1. There exists a permutation {Tr(Xi) --~ Yj : i, j = 1, "", (N/2)} Under the permutation [Tr(ul) -~ vi : i,j = 1,, N}. Paoo~. LetKi = ~'(X0-+ Yi,under {rr(ui) ~v~:i,j = 1, -.., N}.That is: K~ is a mapping of some u, u C X~, onto some v, v C Yi. For each K~ there This research was supported by the Office of Naval Research under Contract Nonr-4833(00). J~amal of the Association for Computing Machinery, Vol. 15, No. 1, January 1968, pp. 159-163.

160 ABRAtAM WAKS~i~,~ u 2... ~ v 2 u 2 L,L-------V 2 F[m. 1. a, resetstate;b, setstste b FG. 2 art at most two such mappings where the two elements of Xi do not map onto t~ ::~ elements of a single Yj. Thus the set, {Ki} contains at most two elements. N~)'~:,~,. under the permutation{at(u,) -~ v i : i,j : 1,..., N}, no two elements of {u,: i... 1, - -, N} are mapped onto a single element of {vj : j = 1, -, N} so that ] U K,... N/2, 1 < i < N/2. But 1 U X~[ = N/2, 1 < i < N/2, so that by P. Hall's theoretic, [1] on distinct representatives of sets (set Appendix), each X~ has a distinct reprv sentative ia U K~, 1 < i < N/2. Consequently there is a set {Tr(X~) + Y~ : i, j : i~...., N/2)} which is one-to-one; hence a permutation. Q.E.D. COROLLARY 1. {Tr(Xi) -* Yj} is a subassignment of the assignmcnt under ~ ~L permulali~m {~r(ui) --~ vj} that involves exactly one u ~ Xi and one v C Y ~, for ~>:';" i and j. CO~mLLARY 2. VK, an element of the,set { vi : i = l,., N}, can be selected (~.~'5~ trarily as a fixed representative of its corresponding Y j, where v~ ~ Y j for {rr(x~)... Yi} under all the permulations of {rr(ui) --~ v~ : i,j = 1,..., N}. PROOF. Since [ U K,] = N/2, 1 < i< Y/2, there arc always two sets of represent, atives which exhaust {ul} and {vi}. Thus, h.~.,~' any given permutation, we select the set that includes v~-. Networt~ Ctmstruction n Figure 2, 1,..., ~v/2 and 0t, -.., O~e/~_l represent elementary cells, and F~,~ ~ P~ represent permutation networks oil N/2 inputs each. By Theorem 1 and Co r~:~ lary 1, the subassignment {rr(x,) ~ Yj} ca~t be made through Pa so that each f and Oi has a single link to P~.~ and a single link to P, for all i and j. By Corollary 2 we can fix one Y variable, i.e., eliminate one cell, and we cho ~.>~ to eliminate the cell associated with vt and v~. Thus Figure 2 is a permutation ~e~ work decomposed into N - 1 elementary cells and two permutation networks ({~ Journal of the Association for Computing Machinery, Vol. 15, No. 1, January 1968

Permutation Network 161 N/2 inputs each. Clearly the process of decomposition can be continued until the complete network is decomposed into linked elementary cells. For N = 2 r there are r such decompositions, which result in the following number of elementary cells: F(N) = (2 ~ - 1) + 2(2 ~-~ - 1) -t- 22(2 ~-2 -- 1) +... -t- 2~'-~(2-1) = r2 ~ -- (1 + 2' -- 2 2-1- 2 3 -k- "'" -t- 2 ~-~) = r2 ~- (2 ~- 1) = r2 "- 2 ~+ 1, F(N) = Nlog2N- N+ 1. A constructive proof ~ showing that the network of Figm'e 2 is indeed a permutation network is as follows. Consider a network as in Figure 2 where the links between P~, P8 and the inputoutput cells are omitted. Now let it be desired to realize a given arbitrary permutation by establishing the links one by one as dictated by the permutation assignment. Start with Vl and establish a link through Px to some u~ through its corresponding, Let state b of Figure 1 be the set state. Set if u is even. Proceed next with the second u associated with this and establish a link through P~ to its corresponding v through the 0 associated with it. Set this 0 if v is even. Repeat the process until all input-output pairs have been matched and the appropriate input and output cells have been set. Note that in case a specific permutation involves more than a single cycle, a link will be established to v2 via PB before all assignments are made hi this case any inlet or outlet terminal not yet linked can be used as a starting point. : Now, since by construction P~ and P, are each associated with exactly N/2 inputs and N/2 outputs, and since by assumption Pa and PB are permutation networks, the assignment {u~ --~ vi : i, j = 1,, N} is complete and the link pattern is as in Figure 2. Q.E.D. An algorithm can now be established for setting the decomposed cells of a network as well as the permutation required of PA and P. at any decomposition stage. Algorithm 1. Express the given permutation to be realized by the network in an N X N permutation matrix. 2. Rewrite the N X N permutation matrix a.s an (N/2) X (N/2) partition matrix by merging coordinates corresponding to each common input or output cell. 3. Decompose the partition matrix into the sum of two (N/2) X (N/2) permutation matrices by letting vl be a coordinate in one (corresponding to P~) and letting v~ be a coordinate in the other (corresponding to PB). 4. dentify the entries in the N X N matrix which correspond to the entries in the matrix of PA. 5. dentify the coordinates in the N X N matrix which correspond to the entries identified in step 4. 6. dentify the cells associated with the coordinates identified in step 5. 7. Set (that is, put in state b, Figure 1) any cell identified in step 6 which is associated with an even coordinate identified in step 5. This proof is due to H. Stone. Journal of the Association for Computing Machinery, Vol. 15, No. 1, January 1968

162 A.BRAHAM WAKSMAN U - Vl u 2 ~ PA ] F -v2 t ~j./]~ncludes CELLS r~.. /,~ --F----~'#k/1 NO, ~,6,7,,o,,3 N.,~--;~ U6 v 6 16 U7 - v7 U8 V 8 4 17 FG. 3 Ui.,. r---~-.. F~----J. v u2 ~ vz u3 ---F-,x-F "1-'Y-'F ""--',~'- ~ ~ 6 10 13 Fro. 4 U U2 ' ~ E ~ X - ~ r. ~ _, m -- V vl 2 ~3 t V3 8 12 14 FG. 5 u,,. vi U2 ~ v2 u 4 v 4 U5 ~ v5 u6 ~ V 6 Example U8 V 8 4 8 i2 14 17 FG. 6 Let N = 8 and the required permutatiol 12845678~, i 2 3,4 5 6 718 i [ P 27e84315). The permutation matrix is i 3 (Z) 5 Q 6 7Q s i The partition matrix is 1,2 Y Y2 Y3 Xi --! x2 x~, 2 X4i # Journal of the Association for Computing Machinery, Vol. 15, No, 1~ January 1968

[~,.:'~:~la~ i~<~,: ivch~,t: 163 the two correspo::di::g pe::muta,tio:: n::strices are Pl P2,;~h{:.rc P: corr{~pol~d~ to tho pormutation ~quired by PA, and P2 corresponds to i.l:e porn::.:tati<>:: ::<tuired of.p~. The e~:t.ries in ~he 8 X 8 matrix corresponding {o P., :re oh'clod. Thus since u=,, v.:, and v: are even, we set the cells 1, 15, attd 16 in Fig:~ro 3. We are loft with the task of decomposing and setting the permutation networks P~ a~:d P~,. The p~:rmutation a:~d p~rtition matrices for P~ are The corr(,sp<)ndi~g permt~tatioa networks P: and P2 of P<, are Pl ;%~e:~ the <.yea eooali::a~es in the 4 X 4 Pa matrix identified with P: are u4 and ~, we s~:.t, cell< 6 ~md 13 in Figure 4. l>~ and P~ also represent the permutation r~,<iuir~d ef eeil:~ 9 a~d 10 ~:spectively in Figure 4, which call for setting these cells. By h:,ihr d~:g a similar pr<)cedure we arrive at Figure 5, which represents the netw~)rk required for ~.}:w r~ alizatiott of P,. Vig~re ~i repr(',~ont~ the c<m~plete network which realizes the required permu;ation. A pp~<:.nd iz }t ~* ~,'s T,~;()~:a:. ]/,el A be any,set, and let At, A~,.., A, be any r subsels of A. nz :~ neeese~ary and a~flici):~nt cvnditic~n that there exists a set of distinct representatives a, ",a, ofa~,..,,a~,i.e.,elementsa~,..., a~ of A such that a~ ~ A ~, i = 1,..., r; ~,, ~ a~ j)~r i ~ j, il i:s "neee~'sary and sufliciez~t that ]br each K in the range 1 <. K < r ~ e unh>n of any K of #w sets A~,..., A~ have at least K elements. }~2;:FER EN Ci:S } H ~:~:~, P ()~: rep~'euen~ives of subsets. J. London Math. Soe. 10 (1965), 26-30. 2, B~:x~:s, V. E. Mathemal@al Theory of C h~:c Press Ne,,v- York, 1935, onnectzng hretworks and Telephone Tra~c. Aea- P2 Jo:u~nal of the Association for Computing Machinery, Vol. 15, No., January 1968