ISOTROPIC GRAPHS WITH APPLICATIONS TO PARALLEL COMPUTATION BY ANDREA PIETRACAPRINA Laurea, University of Pisa, 1987 M.S., University of Illinois, 1991 THESIS Submitted in partial fulfillment of the requirements for the degree of Doctor of Philosophy in Computer Science in the Graduate College of the University of Illinois at Urbana-Champaign, 1994 Urbana, Illinois Abstract This thesis studies the construction of expanding graphs and their applications to a number of problems in parallel computation. In particular, we consider explicit construction techniques that provide graphs which exhibit good expansion properties at low densities and can be efficiently implemented. These techniques are related to the one introduced by Morgenstern in [34], based on quotients of the projective linear group over a finite field, which was originally employed for constructing bounded concentrators (a particular kind of expanding graphs utilized as building blocks for concentrators and superconcentrators) of density q, for any prime power q ? 2. We first analyze a subfamily of Morgenstern's bounded concentrators showing their excellent expansion properties in some special cases, and proving a number of important structural properties that should facilitate their analysis in the general case. We then generalize the technique, constructing expanding graphs that are suitable to design memory organization schemes for multiprocessor systems where M shared variables are to be distributed among N processors connected by a network (a problem largely studied in the context of PRAM simulation). We devise three schemes for M 2 O(N 1:5), M 2 O(N 2) and M 2 O(N 3), respectively, on the Module Parallel Computer (MPC), consisting of N processors fully interconnected. In each scheme the variables are replicated into a (constant) number of copies, and the distribution of the copies among the processors is governed by a certain expanding graph. An ad-hoc access protocol, whose performance is strictly dependent on the expansion properties of the underlying graph, allows the processors to read or write in parallel any set of N variables in time O(N 1=3), O(N 1=2) and O(N 2=3), respectively, in the worst case. The three schemes have a practical implementation and represent the first explicit deterministic memory organization schemes for the MPC to achieve a nontrivial time performance. Finally, we develop a memory organization scheme to distribute M = N ff variables, 1 ! ff ! 2, among N processors interconnected by a mesh. The limited bandwidth of the network plays now a crucial role, as opposed to the case of the MPC where the interprocessor communication is idealized. The memory distribution is governed a by hierarchical structure, consisting of a cascade of expanding graphs, and an ad-hoc access protocol allows the processors to read or write in parallel any set of N variables in time that, for ff ^ 3=2 is close to the \Omega (pN ) lower bound imposed by the network's diameter, and that, in general, is an increasing function of iii ff, never exceeding N 5=8. This scheme has an efficient implementation and represents the first explicit deterministic memory organization scheme on a bounded degree network. Moreover, it uses the properties of the underlying expanding graphs to control both memory contention and network congestion, two problems that previous works have always tackled separately. iv Dedication To my parents and my family. v Acknowledgments I want to express gratitude to my advisor, Professor Franco Preparata, whose guidance and support have been fundamental for the completion of this thesis. He suggested the topic and followed my work with dedication, providing technical assistance and constant encouragement. A very special acknowledgement goes to my friend Geppino Pucci. We met during the first year of undergraduate school and have been working together ever since, providing each other support and, most of all, cultivating a priceless friendship. Another special acknowledge goes to Arvind Krishna, a generous friend with whom I had fruitful collaborations. Among my teachers, I want to specially thank Professor Fabrizio Luccio who, as mentor and friend, has initiated me into research, and Professor Bruce Hajek, an excellent teacher and researcher with whom I had the honor and pleasure to work. I also would like to acknowledge the other members of my committee, Professors Chung Laung Liu, Pravin Vaidya, Josep Torrellas for their valuable comments, and all teachers and researchers who, over the years, have contributed to my formation. I affectionately acknowledge, for their support and unconditional love, the members of my family and all my friends, whose names would form a list too long to be included here. I would like to thank the Coordinated Science Laboratory at the University of Illinois and the Department of Computer Science at Brown University for providing me computer facilities and staff support. It has been a pleasure to work in both places where I always felt very welcome and where I made many good friends. This work has been partially supported by NSF Grant CCR-91-96152. vi Table of Contents Chapter Page 1 Introduction : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 1 2 Definitions and Notations : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 5 2.1 Technical Facts : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 5 2.2 Graph G1 = (V1; U1; E1) : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 7 2.3 Graph G2 = (V2; U2; E2) : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 9 2.4 Graph G3 = (V3; U3; E3) : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 11 3 Bounded Concentrators : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 14 3.1 Background : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 14 3.2 Eigenvalue Bound : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 17 3.3 Analysis of G1 : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 18 3.3.1 Case n = 2 and q even : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 20 3.3.2 Case n = 2 and q odd : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 24 3.3.3 General Case : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 27 4 Memory Organization Schemes on the MPC : : : : : : : : : : : : : : : : : : 35 4.1 Background : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 35 4.2 Framework : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 38 4.3 Memory Organization Scheme for M 2 O(N 1:5) variables : : : : : : : : : : : : : 42 4.3.1 The graph : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 42 4.3.2 Implementation : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 47 4.4 Memory Organization Scheme for M 2 O(N 2) variables : : : : : : : : : : : : : : 51 4.4.1 The graph : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 51 4.4.2 Implementation : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 53 4.5 Memory Organization Scheme for M 2 O(N 3) variables : : : : : : : : : : : : : : 56 4.5.1 The graph : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 56 4.5.2 Implementation : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 58 4.6 Comparison with the lower bound : : : : : : : : : : : : : : : : : : : : : : : : : : 62 vii 5 A Memory Organization Scheme on the Mesh : : : : : : : : : : : : : : : : : 64 5.1 Introduction : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 64 5.2 Routing on the Mesh : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 67 5.3 The HMOS : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 68 5.4 Access protocol : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 72 5.4.1 Copy selection : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 73 5.4.2 Routing : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 78 5.5 Subgraph of a balanced incomplete block design : : : : : : : : : : : : : : : : : : : 82 6 Conclusions : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 87 References : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 90 A Representatives for P GL2(qn)=H0 : : : : : : : : : : : : : : : : : : : : : : : : : 94 Vita : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 104 viii List of Tables Table Page 4.1 Performance of the memory organization schemes : : : : : : : : : : : : : : : : : : 37 4.2 Lower bounds VS upper bounds : : : : : : : : : : : : : : : : : : : : : : : : : : : : 63 ix List of Figures Figure Page 1.1 An expanding graph : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 2 3.1 Recursive Construction of an (M; kM)-superconcentrator S : : : : : : : : : : : : 15 3.2 \Gamma 2-neighbors for q even : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 22 3.3 \Gamma 2-neighbors for q odd : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 26 4.1 Access Protocol : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 39 4.2 AH0, BH0, CHn\Gamma 1, and DHn\Gamma 1 : : : : : : : : : : : : : : : : : : : : : : : : : : : 44 4.3 Code for STEP 2 : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 51 4.4 Construction of a (qn; q)-BIBD : : : : : : : : : : : : : : : : : : : : : : : : : : : : 53 4.5 Construction of a 3-(qn + 1; q; q \Gamma 2) design : : : : : : : : : : : : : : : : : : : : : 61 5.1 A k-module : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 69 5.2 The graph G : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 70 5.3 Minimal 1-target set vs minimal target set : : : : : : : : : : : : : : : : : : : : : 74 5.4 Procedure copy-selection : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 75 5.5 For each v 2 R1 there exist two modules u1 and u2 which have blocks that have overflown : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 76 5.6 For each u 2 Z there exist two modules u1 and u2 which have blocks that have overflown : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 78 A.1 Table of the indices 0; : : :; 22n \Gamma 2 : : : : : : : : : : : : : : : : : : : : : : : : : : : 103 x CHAPTER 1 Introduction The construction of bipartite graphs that exhibit good expansion capabilities represents a fundamental problem in computer science. These graphs find applications in the design of efficient communication networks and in the implementation of parallel systems. They have been extensively used in several contexts during the last twenty years, although, most of the times, it has only been possible to prove their existence via counting arguments, without providing explicit constructions. The generation of such graphs has been an open problem for many years and only a few constructions, yet not as efficient as what was existentially exhibited, have been presented in the literature [31, 12, 46, 1, 28, 34]. Let G = (V; U ; E) be a bipartite graph with jV j = M , jU j = N , where M ? N , andj Ej = kM ; k represents the average degree of a node of V and is called the density of the graph. Let \Gamma (\Delta ) be the function that, applied to a node or a set of nodes of the graph, returns the set of its neighbors. Given two nonnegative real valued functions f and g, we call G an expanding graph if for any subset S ae V of size jSj ^ f (M ), j\Gamma (S)j * g(jSj) (Figure 1.1). Clearly we must have f (M ) ^ M . Particularly interesting for applications are those graphs that, for given values of the parameters M , N , f and g, exhibit the desired property at minimum "cost", where cost is expressed in terms of ffl Number of edges; or, equivalently, the density k. ffl Simplicity; i.e., how easily the graph can be represented and implemented. Expanding graphs are used for many applications, and different applications require different values of the parameters and, in particular, different ratios between N and M . For example, expanding graphs with N and M differing by only a small constant factor, commonly referred to as bounded concentrators, are used as building blocks for the construction of concentrators and superconcentrators, as long as they possess certain expansion properties (specifically, f (M ) = M=2 and g(x) = x, for any x). A concentrator is a network with two distinguished sets of nodes serving as inputs and outputs, such that from any subset of the inputs it is possible to find vertex-disjoint paths to some (unspecified) set of outputs of identical size. A superconcentrator is similarly defined but possesses the stronger property that vertex-disjoint paths exist between any two specified subsets of inputs and outputs, of identical size. Concentrators 1 M NS (S) g( )M|S| f( )|S|(S)| | Figure 1.1 An expanding graph and superconcentrators, among other uses, are employed for designing efficient communication networks (e.g., they are used in the Fat Tree [27]). At the other extreme, expanding graphs with M AE N are at the core of memory organization schemes used to partition M shared data among N processors of a distributed system, guaranteeing an efficient access in parallel, to these data. In particular, this represents a crucial problem for the emulation of the PRAM (Parallel Random Access Machine) on parallel machines. A PRAM consists of N processors that have direct access to M shared variables. The important feature of this model, which makes it very attractive for the design of parallel algorithms, is that any set of N variables can be read/written in parallel by the processors in constant time. For large values of M and N , however, this assumption represents a serious obstacle to any realistic implementation, and, in practice, one has to emulate the PRAM on a more feasible machine which typically consists of a network of N processors with the shared memory subdivided into modules made local to the processors. Within this setting, the modules become the bottleneck of the system since only one variable per module can be accessed in one time unit. In order to avoid worst-case scenarios in which few modules are overloaded by requests, it is necessary to replicate each variable into a number of copies, say k, stored by distinct modules, and only a subset of the copies (enough to guarantee consistency) needs to be reached by any operation. The distribution of the copies among the modules is specified by a memory organization scheme (a terminology introduced in [48]), represented by an expanding 2 graph G = (V; U ; E), where V is the set of PRAM variables, U the set of modules, and k edges connect each variable to the modules storing its copies -- thus, each node of V has the same degree k. In addition to the memory organization scheme, a protocol is given that specifies how a set of variables is accessed in parallel by the processors. The efficiency of the protocol is strictly dependent on the expansion properties of the graph G. As mentioned earlier, the explicit construction of low-cost expanding graphs appears to be extremely hard, and only few constructions are known in the literature, all of them providing bounded concentrators, (i.e., graphs of comparable input and output sizes). Morgenstern has recently introduced a new construction technique based on quotients of the projective linear group of order 2 over a finite field [34, 35]. The two sets of nodes of the graphs are associated with the cosets of two distinct quotients (i.e., quotients with respect to distinct subgroups), and the edges are given by pairs of cosets with nonempty intersections. In particular, Morgenstern provides an infinite family of bounded concentrators that appear to have suitable expansion properties for building superconcentrators with low density. Unfortunately, the proof of this result is not complete and relies on very complicated group theoretic arguments. The techniques introduced by Morgenstern can be generalized and further exploited to construct other kinds of expanding graphs. The purpose of this thesis is to analyze a number of such graphs and to show how, due to their structural properties and expansion capabilities, they can be profitably employed in applications. We consider expanding graphs for the two types of applications illustrated above, although the most relevant results concerns the second application, i.e., the design of efficient memory organization schemes. In Chapter 3, we study a subfamily of the bounded concentrators presented in [34], which constitutes the core of that construction. The study provides a complete analysis their expansion capabilities for certain values of the parameters, and reveals important structural characteristics that may lead to a complete analysis, in the general case. The analysis focuses on the spectrum of these graphs and, in particular, on the determination of the second largest eigenvalue, which can be used to estimate the expansion capabilities, through a bound independently discovered by [46] and [2]. In Chapter 4, we consider three expanding graphs constructed using different quotients of the projective linear group, and employ them to devise three memory organization schemes for the emulation of an N -processor PRAM with shared memories of size M 2 O(N 1:5), M 2 O(N 2) and M 2 O(N 3), respectively, on a distributed system consisting of N processor/module pairs interconnected by a complete network, known as MPC (Module Parallel Computer) [32]. We 3 carry out an accurate analysis of the expansion properties of these graphs and show how such properties influence the efficiency of the memory organization schemes. Specifically, we show that an ad hoc protocol, the same for all three schemes, allows the processors of the MPC to access any set of N variables in worst-case time O(N 1=3), O(N 1=2) and O(N 2=3), respectively. The relevance of these results resides in the fact that they are the first deterministic schemes that are explicit (i.e., constructible) and achieve a time complexity less than the trivial O(N ) bound. Another important aspect regards their implementation which is practical and requires only a constant amount of extra storage at each processor, which is not the case for any of the (nonconstructive) schemes known in the literature. Also, we improve a lower bound on the performance of any memory organization scheme originally proved in [48], and show that the performance of our schemes is not very far from optimal. Preliminary versions of these results appeared in [37, 38, 36]. Although the MPC is a more feasible model than the PRAM, in that it does not view the shared memory as one single block, it still idealizes the communication between the processors assuming a complete interconnection. In any realistic parallel machine, built with today's or even foreseeable technology, the processors have to communicate through a bounded-degree network. Therefore, when designing a PRAM emulation on such a machine, one has to deal not only with the problem of memory distribution, but also with routing issues. In Chapter 5, we develop a memory organization scheme for the emulation of an N -processor PRAM with N ff variables, for any 1 ! ff ! 2, on an N -node mesh, each node hosting a processor and a memory module. The distribution of the variables among the nodes of the mesh is governed by a multileveled structure obtained as a cascade of expanding graphs. Again, the expansion properties of the graphs, combined with an ad hoc protocol and an ad hoc routing strategy, allow us to obtain a time performance that, for ff ^ 3=2 is close to the \Omega (pN ) lower bound imposed by the network's diameter, and that, in general, is an increasing function of ff, bounded from above by O(N 5=8). This scheme has an efficient implementation and represents the first explicit deterministic emulation of the PRAM on a bounded degree network. These results appeared in [40, 39]. The rest of the thesis is organized as follows. Chapter 2 introduces some general definitions and notations that will be used throughout the thesis. Chapters 3, 4 and 5, as described above, contain the main results. Finally, in Chapter 6 we conclude by indicating possible directions for future research. 4 CHAPTER 2 Definitions and Notations 2.1 Technical Facts Let q be a prime power and n * 2 an integer, and let Fqn denote the finite field with qn elements, and F*qn its multiplicative group. Let fl be a primitive element of Fqn . As is well known from Galois theory, Fqn = ncn\Gamma 1fln\Gamma 1 + \Delta \Delta \Delta + c1fl + c0 : ci 2 Fqo and F*qn = nfli : 0 ^ i ! qn \Gamma 1o : Throughout the thesis, either representation will be employed for Fqn , whichever more appropriate. Unless differently specified, small case roman letters will be used for the elements of Fq , and small case greek letters, for those of Fqn . In particular, when a numbering is needed, the elements of Fq will be denoted as a0; a1 : : : ; aq\Gamma 1, and those of Fqn as ff0; ff1 : : : ; ffqn\Gamma 1, consistently with the lexicographic ordering of the n-tuples of coefficients. We need to distinguish particular subsets of Fqn , which will play an important role in the subsequent presentation. Let P0 = ncn\Gamma 1fln\Gamma 1 + \Delta \Delta \Delta + c1fl : ci 2 Fq o P1 = ncn\Gamma 1fln\Gamma 1 + \Delta \Delta \Delta + c2fl2 : ci 2 Fqo That is, P0 (P1, resp.) is the set of polynomials with the coefficient of the degree 0 (degrees 0 and 1, resp.) term equal to 0. Clearly, jP0j = qn\Gamma 1 and jP1j = qn\Gamma 2. The polynomials in P0 will be often denoted as p0i , 0 ^ i ! qn\Gamma 1, and the polynomials in P1 as p1i , 0 ^ i ! qn\Gamma 2. Also, let P monic be the set of monic polynomials in fl of degree less than n. It is not hard to show that P monic consists of q n\Gamma 1 q\Gamma 1 polynomials which we will often denote as pmi , 0 ^ i ! qn\Gamma 1 q\Gamma 1 . The elements of P monic, as well as those of nfli : 0 ^ i ! q n\Gamma 1 q\Gamma 1 o, can be reckoned as distinct representatives for the quotient F*qn =F*q . This implies that no two elements, of either sets, differ 5 by a scalar multiple, and that for each p 2 P monic there exists i, 0 ^ i ! q n\Gamma 1 q\Gamma 1 and a 2 F*q , such that p = afli. The projective linear group of degree 2 over Fqn (P GL2(qn)) is the group of 2\Theta 2 nonsingular matrices with entries in Fqn , modulo its center, the group of scalar matrices [14]. It is well known that jP GL2(qn)j = qn(q2n \Gamma 1). For convenience, a matrix of P GL2(qn) will be written either as 24 ff fiffi 1 35 or as 24 ff fi1 ffi 35, with ff; fi; ffi 2 Fqn , and the equality between matrices will be modulo scalar multiples. The node sets of the graphs analyzed in the thesis will be associated with quotients of P GL2(qn) with respect to the subgroups defined below. Let H0 = P GL2(q) H1 = 8!:24 a bfl + c0 1 35 : a; b; c 2 Fq ; a 6= 09=; Hn\Gamma 1 = 8!:24 a ff0 1 35 : a 2 F*q ; ff 2 Fqn 9=; Hn = 8!:24 ff fi0 1 35 : ff; fi 2 Fqn ; ff 6= 09=; It is easily seen that jH0j = q(q2 \Gamma 1), jH1j = q2(q \Gamma 1), jHn\Gamma 1j = qn(q \Gamma 1) and jHnj = qn(qn \Gamma 1). Observe that H0 has exactly the same intersection with any of the other subgroups. More precisely, H0 " H1 = H0 " Hn\Gamma 1 = H0 " Hn = 8!:24 a b0 1 35 : a; b 2 Fq ; a 6= 09=; 4= H; (2.1) where, jHj = q(q \Gamma 1). The following lemma defines a set of representatives for H0=H. Lemma 1 Let Fq = fa0; : : : ; aq\Gamma 1g and define L0\Gamma 1 = 24 1 00 1 35 L0k = 24 ak 11 0 35 0 ^ k ! q: (2.2) 6 Then, H0 = q\Gamma 1[ k=\Gamma 1 L0kH: Proof: Since L0k 2 H0, for \Gamma 1 ^ k ! q, we have that H0 ' q\Gamma 1[ k=\Gamma 1 L0kH: Simple calculations show that, for \Gamma 1 ^ k1 6= k2 ! q, L0k1 H " L0k2 H = ;, therefore, sincej H0=Hj = q + 1, the above containment relation is indeed an equality. 2 The following sections define the graphs that will be studied in the thesis. Throughout the thesis, the function \Gamma (\Delta ) will be used to denote the neighborhood of a node, or of a set of nodes. 2.2 Graph G1 = (V1; U1; E1) The graph is defined as follows. Let V1 = P GL2(qn)=H1 U1 = P GL2(qn)=H0 That is, the nodes of V1 (U1, resp.) are associated with the left cosets of H1 (H0, resp.). It follows that jV1j = qn\Gamma 2 q 2n \Gamma 1 q \Gamma 1 jU1j = qn\Gamma 1 q 2n \Gamma 1 q2 \Gamma 1 : Thus, jU1j=jV1j = q=(q + 1). The edge set is defined as E1 = f(AH1; BH0) : A; B 2 P GL2(qn) and AH1 " BH0 6= ;g: We now show that the edges are in one-to-one correspondence with the left cosets of H. First, we need to find a set of representatives for H1=H as we did in Lemma 1 for H0=H. Note 7 that jH1=Hj = q, and define L1k = 24 1 akfl0 1 35 ak 2 Fq ; 0 ^ k ! q: (2.3) Arguing as in the proof of Lemma 1, we can show that H1 = q\Gamma 1[ k=0 L1kH: Lemma 2 For any A 2 P GL2(qn) \Gamma (AH1) = nAL1hH0 : 0 ^ h ! qo ; and \Gamma (AH0) = nAL0kH1 : \Gamma 1 ^ k ! qo : Proof: By definition, \Gamma (AH1) = fBH0 : AH1 " BH0 6= ;g Suppose AH1 " BH0 6= ; and let C 2 AH1 " BH0, i.e., C 2 AH1 and C 2 BH0. But C 2 AH1 implies AH1 = CH1, and, analogously, we have BH1 = CH1. This yields AH1 " BH0 = C(H1 " H0) = CH. This implies that the edges incident to AH1 are associated with the cosets of AH1=H, and, by Lemma 1, the result follows. The argument for \Gamma (AH0) is identical. 2 Thus, the graph is regular and every node of V1 has degree q and every node of U1 has degree q + 1, which agrees with the fact that jU1j=jV1j = q=(q + 1). In addition to regularity, G1 possesses a highly isotropic structure, which is a direct consequence of its concise definition. In fact, the graph is completely specified by the two parameters q and n, so that, in a sense, strong structural properties are to be expected. An automorphism of a graph is defined as a permutation acting on its nodes which preserves adjacencies [6]. We define a set of jP GL2(qn)j automorphisms for G1, namely foeA : A 2 P GL2(qn)g, where oeA(BH1) = ABH1, for any BH1 2 V1, and oeA(BH0) = ABH0, for any BH0 2 U1. The definition of V1 and U1, and a well known property of quotients imply that oeA is a permutation. Moreover, since ABH1"ACH0 = A(BH1"CH0), we have that (BH1; CH0) 2 E1 if and only if (oeA(BH1); oeA(CH0)) 2 E1, for any B; C 2 P GL2(qn); therefore oeA is, indeed, an automorphism. Notice that given two nodes BH1; B0H1 2 V1 there is an automorphism, 8 namely oeB0B\Gamma 1, which maps BH1 onto B0H1. (The same holds for two nodes of U1.) A consequence of this fact if that the graph is isotropic, in the sense that it appears identical viewed from any node. This property, which is also exhibited by the other graphs defined in this chapter, will be frequently used in the analysis. Before closing this section we find a set of representatives for P GL2(qn)=H1, which will be conveniently used to denote the nodes of V1. Lemma 3 V1 = 8!:24 fl i 0 0 1 35 24 1 p 0 1 35 H1 : 0 ^ i ! q n \Gamma 1 q \Gamma 1 ; p 2 P19=;[ 8! :24 ff fli 1 0 35 24 1 p 0 1 35 H1 : ff 2 Fqn ; 0 ^ i ! q n \Gamma 1 q \Gamma 1 ; p 2 P19=; (2.4) Proof: The number of cosets included in the RHS of (2.4) is qn\Gamma 2 q n \Gamma 1 q \Gamma 1 + q nqn\Gamma 2 qn \Gamma 1 q \Gamma 1 = jV1j; therefore all we have to prove is that they are distinct. Suppose, for example, that2 4 fl i 0 0 1 35 24 1 p1 0 1 35 H1 = 24 fl i flip1 0 1 35 H1 = 24 fl j 0 0 1 35 24 1 p2 0 1 35 H1 = 24 fl j fljp2 0 1 35 H1 Then, there must be a; b; c 2 Fq , a 6= 0 such that2 4 fl j fljp2 0 1 35 = 24 fl i flip1 0 1 35 24 a bfl + c 0 1 35 = 24 afl i fli(p1 + bfl + c) 0 1 35 and since 0 ^ i; j ! q n\Gamma 1 q\Gamma 1 , and p1; p2 2 P1, we must have a = 1 and bfl + c = 0, which implies i = j and p1 = p2. The other cases can be dealt with in a similar fashion. 2 2.3 Graph G2 = (V2; U2; E2) The graph is defined as follows. V2 = P GL2(qn)=H0 U2 = P GL2(qn)=Hn\Gamma 1: 9 Note that V2 = U1, and we have jV2j = qn\Gamma 1 q 2n \Gamma 1 q2 \Gamma 1 jU2j = q 2n \Gamma 1 q \Gamma 1 Thus, jU2j=jV2j = (q + 1)=qn\Gamma 1. The edge set is E2 = f(AH0; BHn\Gamma 1) : A; B 2 P GL2(qn) and AH0 " BHn\Gamma 1 6= ;g: As in the graph G1, the edges are in one-to-one correspondence with the left cosets of H. Note that jHn\Gamma 1=Hj = qn\Gamma 1 and define Ln\Gamma 1k = 24 1 p 0k 0 1 35 0 ^ k ! qn\Gamma 1: (2.5) It can be easily shown that Hn\Gamma 1 = qn\Gamma 1\Gamma 1[ k=0 Ln\Gamma 1k H; and we have Lemma 4 For any A 2 P GL2(qn) \Gamma (AH0) = nAL0kHn\Gamma 1 : \Gamma 1 ^ k ! qo ; \Gamma (AHn\Gamma 1) = nALn\Gamma 1h H0 : 0 ^ h ! qn\Gamma 1o : Proof: Analogous to the proof of Lemma 2. 2 Therefore, each node of V2 has degree q + 1, and each node of U2 has degree qn\Gamma 1. The following lemma identifies a set of representatives for P GL2(qn)=Hn\Gamma 1, which will be associated with the nodes of U2. Lemma 5 U2 = 8!:24 fl i 0 0 1 35 Hn\Gamma 1 : 0 ^ i ! q n \Gamma 1 q \Gamma 1 9=;[ 8! :24 ff fli 1 0 35 Hn\Gamma 1 : ff 2 Fqn ; 0 ^ i ! q n \Gamma 1 q \Gamma 1 9=; (2.6) 10 Proof: Observe that H1 is a subgroup of Hn\Gamma 1, and then V1 = P GL2(qn)=H1 = P GL2(qn)=Hn\Gamma 1=H1 = U2=H1: The lemma follows from Lemma 3, since Hn\Gamma 1 = [ p2P1 24 1 p 0 1 35 H1: 2 2.4 Graph G3 = (V3; U3; E3) The last graph we define in this chapter, G3, is similar to G2, with Hn\Gamma 1 replaced by Hn. More specifically, let V3 = P GL2(qn)=H0 U3 = P GL2(qn)=Hn; We have jV3j = qn\Gamma 1 q 2n \Gamma 1 q2 \Gamma 1j U3j = qn + 1: Therefore, jU3j=jV3j = (q + 1)= iqn\Gamma 1 q n\Gamma 1 q\Gamma 1 j. Note that V3 = V2 = U1. The edge set is E3 = f(AH0; BHn) : A; B 2 P GL2(qn) and AH0 " BHn 6= ;g: As in the previous graphs, E3 is in one-to-one correspondence with the left cosets of H. Define Lns;t = 24 p ms pms p0t 0 1 35 0 ^ s ! q n \Gamma 1 q \Gamma 1 and 0 ^ t ! q n\Gamma 1: (2.7) Noting that jHn=Hj = qn\Gamma 1 q n\Gamma 1 q\Gamma 1 , it can be easily shown that Hn = qn\Gamma 1 q\Gamma 1 \Gamma 1[ s=0 qn\Gamma 1\Gamma 1[ t=0 Lns;tH: 11 Thus, Lemma 6 For any A 2 P GL2(qn) \Gamma (AH0) = nAL0kHn : \Gamma 1 ^ k ! qo ; \Gamma (AHn\Gamma 1) = aeALns;tH0 : 0 ^ s ! q n \Gamma 1 q \Gamma 1 ; 0 ^ t ! q n\Gamma 1oe : Proof: Analogous to the proof of Lemma 2. 2 Each node of V3 has degree q + 1, and each node of U2 has degree qn\Gamma 1 q n\Gamma 1 q\Gamma 1 . In the following lemma, a set of representatives for P GL2(qn)=Hn is given, which will be associated with the nodes of U3. Lemma 7 U3 = fHng [ 8!:24 ff 11 0 35 Hn : ff 2 Fqn ; 0 ^ i ! q n \Gamma 1 q \Gamma 1 9=; Proof: Recall that (by Lemma 5) P GL2(qn)=Hn\Gamma 1 = 8!:24 fl i 0 0 1 35 Hn\Gamma 1 : 0 ^ i ! q n \Gamma 1 q \Gamma 1 9=;[ 8! :24 ff fli 1 0 35 Hn\Gamma 1 : ff 2 Fqn ; 0 ^ i ! q n \Gamma 1 q \Gamma 1 9=; It is not hard to see that8! :24 ff fli 1 0 35 Hn\Gamma 1 : ff 2 Fqn ; 0 ^ i ! q n \Gamma 1 q \Gamma 1 9=; =8! :24 fli 0 0 1 35 24 ff 1 1 0 35 Hn\Gamma 1 : ff 2 Fqn ; 0 ^ i ! q n \Gamma 1 q \Gamma 1 9=; : The lemma is proved by observing that Hn\Gamma 1 is a subgroup of Hn and Hn = qn\Gamma 1 q\Gamma 1 \Gamma 1[ i=0 24 fli 0 0 1 35 Hn\Gamma 1: 2 12 G3, as well as the two graphs derived from G3 which we will use in two of the memory organization schemes presented in Chapter 4, belong to a well known class of combinatorial structures: the block designs. (See [15] and [21] for an extensive presentation of design theory.) Definition 1 A block design with parameters t, v, k * t and *, also called a t-(v; k; *) design, is a bipartite graph with node sets X and Y such that ffl jY j = v; ffl Each node of X has degree k; ffl For any t nodes of Y there exist exactly * nodes of X adjacent to all t of them1. A simple combinatorial argument shows that jXj = * 0@ vt 1A ,0@ kt 1A . The following fact is proved in [21, Theorem 4.10]. Fact 1 G3 is a 3-(qn + 1; q + 1; 1) design, with X = V3 and Y = U3. A particularly interesting kind of designs are those with t = 2 and * = 1. Definition 2 A (v; k) balanced incomplete block design or (v; k)-BIBD is a 2-(v; k; 1) block design. 1For historical reasons, since block designs have been originally introduced for statistical applications, the nodes of Y are often called varieties and the nodes of X are viewed as blocks of k varieties. 13 CHAPTER 3 Bounded Concentrators 3.1 Background Expanding graphs are often used as building blocks for the construction of several kinds of communication networks. In particular, a class of expanding graphs, called bounded concentrators, have been extensively employed for this purpose. Definition 3 An (M; `; k; ff; fi)-bounded concentrator, with 0 ! `; ff ! 1 and fi ? 0, is a bipartite graph with M inputs, `M outputs and kM edges, such that any set of at most s ^ ffM inputs is connected to at least fis outputs. The value k is called the density of the bounded concentrator. By Hall's theorem, in a bounded concentrator with fi * 1 there is a perfect matching between any set of at most ffM inputs and some set of outputs of equal size. This property, makes the graph very attractive for solving connectivity problems. For example, bounded concentrators of this kind are used in the Fat Tree as an alternative to the more powerful concentrators [27]. More often, however, bounded concentrators form the basis for the construction of concentrators and superconcentrators, defined below. Definition 4 An (M1; M2; k)-concentrator is a graph with M1 inputs, M2 ^ M1 outputs and kM1 edges, such that any set of s ^ M2 inputs can be connected to s unspecified outputs by vertex-disjoint paths. The value k is called the density of the concentrator. Definition 5 An (M; k)-superconcentrator is a graph with M inputs, M outputs and kM edges, such that any two sets of s ^ M inputs and outputs can be connected by vertex-disjoint paths. The value k is called the density of the superconcentrator. Historically, these graphs have been introduced for establishing lower bounds for Boolean circuit complexity, but, besides their applications to theoretical computer science, they soon began to play a fundamental role in the development of efficient communication networks, especially telephone networks, where dedicated connections between arbitrary sets of inputs and outputs are to be guaranteed; and, more generally, as resource allocators in computer hardware. (See [43] for a more detailed survey of their applications.) Since the cost of a 14 BS' inputs B outputsM M Figure 3.1 Recursive Construction of an (M; kM )-superconcentrator S network is mainly determined by the number of components it uses, it is desirable to have concentrators and superconcentrators that satisfy their connectivity requirements with a small number of edges, i.e., with low density. This has become the focus of a large body of research in the past twenty years. In particular, much attention has been devoted to the construction of superconcentrators, which are more useful for applications. Most of the known constructions (explicit and existential) are based on a recursive approach that employs bounded concentrators as building blocks [41, 42, 8, 12]. Consider the construction of an (M; kM)-superconcentrator S (for convenience, the value of the density is expressed as a function of the input size). The inputs of S are connected to the inputs of an (`M; k`M )-superconcentrator S0, 0 ! ` ! 1, through an (M; `; h; 12; 1)-bounded concentrator B. Correspondingly, the outputs of S are connected to the outputs of S0 through the reverse of B, denoted by _B. S0 is recursively constructed. The construction is illustrated in Figure 3.1 where dotted lines between two nodes do not represent edges but indicate that the nodes are identified. A simple argument shows that S is indeed a superconcentrator. The density kM is obtained by solving the recurrence relation kM = 1 + 2h + `k`M For fixed ` and h, the superconcentrator has depth O(log M ) and constant density. Note that the entire construction requires the existence of (M `i; `; h; 12 ; 1)-bounded concentrators, for any i, 0 ^ i ! blog` M c. Counting arguments are often used to establish the existence but not to show the construction of specific bounded concentrators to be incorporated in similar constructions. For example, 15 Chung [8] showed that (M; 57 ; 5; 12 ; 1)-bounded concentrators exist for any M , so yielding superconcentrators of density 38:5 (the best density currently known). Unfortunately, the explicit construction of good bounded concentrators turns out to be quite hard, the difficulty being increased by the fact that the construction has to provide a family of bounded concentrators with input sizes in a dense and possibly infinite range of values. Few constructions are currently known. Most explicit bounded concentrators have been obtained via indirect constructions that use expanders (see [12] for an illustration of this technique). Expanders are bipartite graphs with identical input and output sizes, which exhibit certain expansion properties. Explicit constructions for expanders are given in [31, 12, 1, 28]. From the expanders [12], for example, one can obtain (M; 1617; 12817 ; 12; 1)-bounded concentrators, and these in turn give superconcentrators of density 273 (which can be improved to 271.8 with special techniques). Later [1] and [28] constructed better expanders yielding superconcentrators of densities 123 and 78, respectively. The problem with bounded concentrators (and, therefore, superconcentrators) obtained via expanders is that the edges are not evenly distributed among the nodes, which makes them difficult to control. Tanner [46] presented a direct construction for bounded concentrators, but only for a finite number of input sizes. In [34] and [35], Morgenstern introduces a new direct construction for a family of bounded concentrators, namely (M; qq+1 ; q; q\Gamma 3q\Gamma 4 ; 1)-bounded concentrators, for infinite many M and for any prime power q. A complete proof of this result, however, is not provided by the author and appears to rely on very complicated group theoretic arguments. The importance of these bounded concentrators, assuming the correctness of Morgenstern's claim, is that, taking q = 5 they allow us to construct superconcentrators of density 66. Moreover, if taking q = 4 and q = 3 it could be proved that their expansion coefficient is at least 1=2, (a problem left open in [34]) the density of the resulting superconcentrators would improve to 45 and 28, respectively, which, in the latter case, would be even better than the best existential construction. The graph G1 defined in Chapter 2 is the template for the subfamily of Morgenstern's bounded concentrators with M = qn\Gamma 2 q 2n\Gamma 1 q\Gamma 1 for any integer n * 2. (Bounded concentrators with other values of M are defined in a similar fashion, with appropriate modifications.) In the following sections we report a number of results concerning the expansion capabilities of G1, which illustrate the interesting characteristics of this type of construction and may form the base for a complete proof of Morgenstern's result, and for the solution of the cases q = 3; 4. 16 3.2 Eigenvalue Bound In this section we recall the eigenvalue bound which is the only general tool available to estimate the expansion capabilities of graphs. The bound was discovered independently by Tanner [46] and Alon and Milman [2], and applied thereafter in several different yet equivalent forms. Here we present the bound as in [46], which is specifically derived for bipartite graphs. Let G = (V; U ; E) be a bipartite graph with jV j = M , jU j = N , with N ^ M , such that each node of V has degree k and each node of U has degree h = kM=N . Let M be the adjacency matrix of the graph (i.e., M[i; j] = 1 if (vi; uj) 2 E, and M[i; j] = 0 otherwise), and consider the matrix MMT . It can be easily seen that MMT is semipositive definite and, therefore, has a complete set of real nonnegative eigenvalues and orthonormal eigenvectors. Let *1 * *2 * \Delta \Delta \Delta * *M * 0 be the eigenvalues of MMT . The regularity of the graph implies that *1 = kh and, if the graph is connected, *1 has multiplicity 1. Let 0 ! ff ! 1 and consider a subset S ae V of size jSj ^ ffM . Let AS be the characteristic vector of S (i.e., AS [i] = 1 if vi 2 S, and AS [i] = 0 otherwise) and define C = AS M. Note that C is an N -vector, whose jth entry indicates the number of nodes in S connected to output uj. The following two inequalities are proved in [46]. j\Gamma (S)j * (jSjk) 2k Ck2 (3.1) kCk2 ^ jSj[ff(*1 \Gamma *2) + *2] (3.2) Combining (3.1) and (3.2) we obtain j\Gamma (S)j * k 2 ff(*1 \Gamma *2) + *2 jSj (3.3) This shows that the graph G is an (M; N=M; k; ff; fi)-bounded concentrator with fi * k 2 ff(*1 \Gamma *2) + *2 : Once ff is fixed, *2 becomes the only unknown parameter in the formula. As observed in [37], Inequality (3.3) can be grossly inaccurate when M AE N , as a consequence of the weakness of (3.1) and (3.2). Specifically, the accuracy of (3.1) depends on the uniformity of the vector C, since it is proved using Jensen's inequality. When M AE N , each entry of C can take values in a large range, namely [0; kM=N ], and therefore C tends to be 17 highly nonuniform. On the other hand, (3.2) is proved using *2 as an upper bound to any eigenvalue *i with i * 3. Basic linear algebra shows that 0 is an eigenvalue of MMT with multiplicity at least M \Gamma N , so that there are at most N nonzero eigenvalues. Since the trace of MMT is M k and *1 = kh = k2M=N , we have *2 * M k \Gamma k 2M=N N \Gamma 1 If k o/ N , then *2 2 \Omega (kM=N ), which weakens the upper bound to kCk2. In conclusion, the best estimate to j\Gamma (S)j that (3.3) provides is of order O(jSjkN=M ), whereas, when M AE N , probabilistic countings show that there exist graphs with better expansion capabilities. 3.3 Analysis of G1 From the above discussion we conclude that, among the three graphs defined in Chapter 2, G1 is the only one for which the eigenvalue bound can be used to obtain an accurate estimate of the expansion capabilities, since it is the only one whose nodes sets have almost equal size. Recall from Section 2.2 that G1 = (V1; U1; E1) is such that M 4= jV1j = qn\Gamma 2 q 2n \Gamma 1 q \Gamma 1 N 4= jU1j = qn\Gamma 1 q 2n \Gamma 1 q2 \Gamma 1 : where q is a prime power and n an integer * 2, and that each node of V1 has degree q and each node of U1 has degree q + 1. Let M denote the adjacency matrix of G1. By the regularity of the graph the largest eigenvalue of MMT is *1 = q(q + 1). In order to prove that G1 is indeed an (M; qq+1 ; q; 12 ; 1)-bounded concentrator, we must prove that for any set S ae V1, with jSj ^ 12 M ,j \Gamma (S)j * jSj. Letting k = q, ff = 1=2 and *1 = q(q + 1) in Formula (3.3), we obtain j\Gamma (S)j * jSj q 2 12(q(q + 1) \Gamma *2) + *2 (3.4) Morgenstern [34] claims that *2 ^ 4q, which insures j\Gamma (S)j * jSj, when q * 5. However, the bound is not proved in the paper, and even the proof given in another paper [35] is sketchy and makes use of highly specialized mathematical concepts. Note that, in order to apply the eigenvalue bound to G1, the graph has to be connected and, therefore, *1 has to have multiplicity 1. As we will see later in this section, this is not always the case. 18 Let us have a closer look at MMT . The matrix has M rows and M columns, indexed by the nodes of V1 = fv1; : : : ; vM g. Entry MMT [i; j] denotes the number of paths of length two between vi and vj in G1, i.e., paths of kind vi ! u ! vj, with u 2 U1. Clearly, MMT [i; i] = q, for any i, and the entries in each row (column) add up to q(q + 1) (i.e., the product of input and output degree). For determining the off-diagonal entries it is useful to introduce the function \Gamma 2 defined on the nodes V1, as follows. Recall V1 = P GL2(qn)=H1 and that the function \Gamma , when applied to a node in the graph, returns the set of its neighbors. For any A 2 P GL2(qn) let \Gamma 2(AH1) 4= \Gamma (\Gamma (AH1)) \Gamma fAH1g; that is, \Gamma 2(AH1) consists of the nodes at distance two from AH1, excluding AH1 itself. We call these nodes the \Gamma 2-neighbors of AH1. Therefore, the nonzero off-diagonal entries in row AH1, are those relative to the nodes of \Gamma 2(AH1). Lemma 8 For any A 2 P GL2(qn), \Gamma 2(AH1) = 8!:A 24 afl + b 11 0 35 H1 : a; b 2 Fq 9=; Proof: Applying Lemma 2 we get \Gamma (AH1) = 8!:A 24 1 afl0 1 35 H0 : a 2 Fq 9=; : and \Gamma 0@A 24 1 afl0 1 35 H01A = 8!:A 24 1 afl0 1 35 H19=; [ 8!:A 24 afl + b 11 0 35 H1 : a; b 2 Fq 9=; = fAH1g [ 8!:A 24 afl + b 10 1 35 H1 : a; b 2 Fq 9=; Hence, \Gamma 2(AH1) = 8!:A 24 afl + b 11 0 35 H1 : a; b 2 Fq 9=; 2 19 Using the result of Lemma 3 one can easily see that \Gamma 2(AH1) consists of q2 distinct cosets. As a consequence, in the row of MMT associated with AH1, the entries relative to the cosets of \Gamma 2(AH1) are equal to 1, and all other off-diagonal entries are equal to 0. When n = 2 we are able to determine the complete spectrum of MMT . Note that in this case P1 = ;, and that q 2\Gamma 1 q\Gamma 1 = q + 1, so 1; fl; : : :; flq forms a set of representatives for F*q2 =F*q . Therefore, the elements of V1 can be rewritten as V1 = 8!:24 fl i 0 0 1 35 H1 : 0 ^ i ^ q9=; [ 8!:24 ff fli 1 0 35 H1 : ff 2 Fq2 ; 0 ^ i ^ q; 9=; We also have that fafl +b : a; b 2 Fqg = Fq2 , therefore, H1 = 8!:24 a ff0 1 35 : a 2 F*q ; ff 2 Fq2 9=; ; and, for any A 2 P GL2(qn), \Gamma 2(AH1) = 8!:A 24 ff 11 0 35 H1 : ff 2 Fq2 9=; (3.5) To further proceed with the analysis of G1, when n = 2, we need to distinguish the cases q even and q odd, that induce some differences in the structure of the graph. 3.3.1 Case n = 2 and q even Partition V1 into the four subsets, called levels, defined below L1 = fH1g L2 = 8!:24 ff 11 0 35 H1 : ff 2 Fq2 9=; L3 = 8!:24 ff fl i 1 0 35 H1 : ff 2 Fq2 ; 1 ^ i ^ q; 9=; L4 = 8!:24 fl i 0 0 1 35 H1 : 1 ^ i ^ q9=; 20 The following lemmas determine the connections among different levels of nodes, with respect to \Gamma 2. Lemma 9 \Gamma 2(H1) = L2. Proof: Immediate for (3.5). 2 Lemma 10 Let AH1 2 L2. Then \Gamma 2(AH1) consists of H1, q \Gamma 1 nodes of L2 and q2 \Gamma q nodes of L3. Proof: Let A = 24 fi 11 0 35, for some fi 2 Fq2 , so that AH1 2 L2. By (3.5) we have \Gamma 2 0@24 fi 11 0 35 H11A = 8!:24 fi 11 0 35 24 ff 11 0 35 H1 : ff 2 Fq2 9=; = 8!:24 fiff + 1 fiff 1 35 H1 : ff 2 Fq2 9=; Now, if ff = 0 then 24 fiff + 1 fiff 1 35 H1 = H1. Otherwise, let k, 0 ^ k ^ q, be such that \Gamma ff\Gamma 2 = bflk, for some k, 0 ^ k ^ q, and b 2 F*q . Simple calculations show that2 4 fi + ff\Gamma 1 flk 1 0 35 24 b\Gamma 1 0 0 1 35 24 1 ff\Gamma 1 0 1 35 H1 = b\Gamma 1ff\Gamma 1 24 fiff + 1 fiff 1 35 H1 = 24 fiff + 1 fiff 1 35 H1: Since both 24 b\Gamma 1 0 0 1 35 2 H1 and 24 1 ff\Gamma 1 0 1 35 2 H1, we obtain 24 fiff + 1 fi ff 1 35 H1 = 24 fi + ff\Gamma 1 flk 1 0 35 H1: Notice that f\Gamma ff\Gamma 2 : ff 2 F*q2 g = ffl2i : 0 ^ i ^ q2 \Gamma 2g = F*q2 ; since q is even. Therefore, there are exactly q \Gamma 1 values of ff such that \Gamma ff\Gamma 2 2 F*q . For such values of ff we must have 21 q q L L L L q-1 q -q q-1 2 2 q -q2 2 1 2 3 4 Figure 3.2 \Gamma 2-neighbors for q even flk = 1 and, therefore, 24 fi + ff\Gamma 1 flk 1 0 35 H1 2 L2, whereas for the remaining q2 \Gamma q values flk 6= 1 and 24 fi + ff\Gamma 1 flk 1 0 35 H1 2 L3. 2 With similar arguments we can prove Lemma 11 Let AH1 2 L3. Then \Gamma 2(AH1) consists of q \Gamma 1 nodes of L2, q2 \Gamma q nodes of L3 and one node of L4. Lemma 12 Let AH1 2 L4. Then \Gamma 2(AH1) ae L3. The above lemmas indicate that the nodes in each Li, i = 1; 2; 3; 4, are indistinguishable for what concerns the distribution of their \Gamma 2-neighbors among the levels. The situation is pictorially represented in Figure 3.2, where we indicate how the q2 \Gamma 2-neighbors of a generic node of Li, 1 ^ i ^ 4, are partitioned among the levels. This fact has an important consequence stated in the following theorem. Theorem 1 Subdivide the entries of MMT into four block, consistently with the partition of V1 into levels. Let Bi;j, 1 ^ i; j ^ 4 be the submatrix of MMT whose rows are indexed by the nodes of Li, and the columns by those of Lj. Then, the row sum in each Bi;j is constant and, 22 letting bi;j denote such row sum and B the matrix with the bi;j's as entries, we have B = 2666 6664 q q2 0 0 1 2q \Gamma 1 q2 \Gamma q 0 0 q \Gamma 1 q2 1 0 0 q2 q 3777 7775 : Proof: By Lemmas 9, 10, 11, 12 and the fact that MMT [i; i] = q for any i. (Recall that self-loops are not captured by the function \Gamma 2.) 2 Theorem 2 MMT has four distinct eigenvalues, which are the same eigenvalues of B. These eigenvalues and their multiplicities are *1 = q(q + 1) _1 = 1 *2 = 2q _2 = q 3+q 2 *3 = q \Gamma 1 _3 = q2 *4 = 0 _4 = q 3+q 2 Proof: By a known result [9, Theorem 0.12] we know that the spectrum of B is contained in the spectrum of MMT . We now prove that all the distinct eigenvalues of MMT are those ofB . As observed before, the regularity of the graph implies *1 = q(q + 1). Also, since MMT can be regarded as the adjacency matrix of a regular connected graph, there exists a unique monic polynomial p(x) of lowest degree such that p(MMT ) = cJ, where J is the matrix with all entries equal to 1 and c is some constant [7]. The roots of this polynomial are all the distinct eigenvalues of MMT except for the largest. Therefore, all we have to show is that, indeed p(x) = (x \Gamma 2q)(x \Gamma (q \Gamma 1))(x \Gamma 0) = x3 \Gamma (3q \Gamma 1)x2 + 2q(q \Gamma 1)x: Without loss of generality, let the first row of MMT be associated with the coset H1, and consider the entries of this row partitioned according to the subdivision of V1 in levels. Using the results of the previous lemmas, it is not difficult to argue that, for every block of the partition, the entries in that block are equal, in any power of the matrix. In particular, letting li;j denote the value of any entry in the first row of iMMT j i relative to a node of L j, 1 ^ i ^ 3 23 and 1 ^ j ^ 4, one can easily show that L 4= [li;j] = 26664 q 1 0 0 2q2 3q \Gamma 1 q \Gamma 1 0 5q3 \Gamma q2 q3 + 6q2 \Gamma 4q + 1 q3 + 2q2 \Gamma 4q + 1 q2(q \Gamma 1) 3777 5 Simple calculations show that [2q(q \Gamma 1); (1 \Gamma 3q); 1] \Delta L = [c; c; c; c] with c = q2(q \Gamma 1). Therefore, the first row of p(MMT ) has all entries equal to c. Using the isotropy of the graph discussed in Section 2.2 we can come to the same conclusion for any other row. More precisely, consider the coset AH1. It is easy to see that, in any power of MMT , the entries of the row associated with AH1 form a permutation of the first row, such permutation being given by the automorphism oeA. Thus, i MMT j 3 \Gamma (3q \Gamma 1) iMMT j2 + 2q(q \Gamma 1) iMMT j = q2(q \Gamma 1)J; showing that MMT has four distinct eigenvalues, namely q(q + 1), 2q, q \Gamma 1 and 0, which are the same eigenvalues of B. As for the multiplicities, using once again Lemmas 9, 10, 11, 12 one can easily see that the graph G1 is connected and, therefore, _1 = 1. The other multiplicities are determined by solving the linear system whose equations are obtained from the traces ofMM T and iMMT j2, that is, T r iMMT j = P4i=1 _i*i and T r `iMMT j2' = P4i=1 _i*2i . 2 Applying the eigenvalue bound (3.3), we finally get Corollary 1 For any even prime power q * 4 and n = 2, G1 is a i q 4\Gamma 1 q\Gamma 1 ; q q+1 ; q; q\Gamma 2 q\Gamma 1 ; 1j-bounded concentrator. Note that q\Gamma 2q\Gamma 1 ? 12 for q * 4, so G1 is also a i q 4\Gamma 1 q\Gamma 1 ; q q+1 ; q; 12; 1j-bounded concentrator. 3.3.2 Case n = 2 and q odd If q is odd the graph G1 splits into two isomorphic and disjoint connected components, whose expansion capabilities we analyze with the techniques of the previous subsection. Let us 24 first identify the two components. Let V 01 ae V1 be the set of nodes defined as the union of the four sets (levels) below. L01 = fH1g L02 = 8!:24 ff 11 0 35 H1 : ff 2 Fq2 9=; L03 = 8!:24 ff fl 2i 1 0 35 H1 : ff 2 Fq2 ; 1 ^ i ^ (q \Gamma 1)=2; 9=; L04 = 8!:24 fl 2i 0 0 1 35 H1 : 1 ^ i ^ (q \Gamma 1)=29=; We have jV 01j = jL01j + jL02j + jL03j + jL04j = 1 + q2 + q2 q \Gamma 12 + q \Gamma 12 = q 4 \Gamma 1 2(q \Gamma 1) = j V1j 2 Note that L02 = L2 and, as proved in Lemma 9, \Gamma 2(H1) = L02. The following three lemmas are the analogous of Lemmas 10, 11 and 12. Lemma 13 Let AH1 2 L02. Then \Gamma 2(AH1) consists of H1, 2(q \Gamma 1) nodes of L02 and q2 \Gamma 2q + 1 nodes in L03. Proof: Let A = 24 fi 11 0 35, for some fi 2 Fq2 , so that AH1 2 L02. As in the proof of Lemma 10, we can show that H1 2 \Gamma 2(AH1) and that the other cosets in \Gamma 2(AH1) are of the kind24 fi + ff\Gamma 1 flk 1 0 35 where ff 2 F*q2 and k is a value between 0 and q such that \Gamma ff\Gamma 2 = bflk, for some b 2 Fq . Now, since q is odd, f\Gamma ff\Gamma 2 : ff 2 F*q2 g = ffl2i : 0 ^ i ^ q2 \Gamma 2g = ffl2i : 0 ^ i ! (q2 \Gamma 1)=2g; and F*q = hflq+1i ae ffl2i : 0 ^ i ! (q2 \Gamma 1)=2g. This implies that there are exactly 2(q \Gamma 1) values of ff such that \Gamma ff\Gamma 2 2 F*q , whereas for the remaining q2 \Gamma 2q + 1 values we have\Gamma ff\Gamma 2 = bfl2i, for some i, 1 ^ i ^ (q \Gamma 1)=2. 2 The following two theorems can be proved in a similar fashion. Lemma 14 Let AH1 2 L03. Then \Gamma 2(AH1) consists of 2(q \Gamma 1) nodes of L02, q2 \Gamma 2q + 1 nodes of L03 and one node of L04. 25 q q -2q+1 2 (q-1) q 2 2 2 2 (q-1) q -2q+12 L' L' L' L'1 2 3 4 Figure 3.3 \Gamma 2-neighbors for q odd Lemma 15 Let AH1 2 L04. Then \Gamma 2(AH1) ae L03. For a generic node of each L0i, Figure 3.3 shows the distribution of its \Gamma 2-neighbors among the levels. Let G01 and G01 be the two subgraphs of G1 induced by V 01 and its complement V1 \Gamma V 01, respectively. That is, G01 = (V 01; U 01; E01) and G01 = (V1 \Gamma V 01; U1\Gamma U 01; E1\Gamma E01), where U 01 = \Gamma (V 01), and E01 denotes the edges between V 01 and U 01. Claim 1 G01 and G01 constitute two disjoint and isomorphic connected components. Proof: From the above lemmas, we derive that there is a path in G1 from any node of V 01 to every other node of V 01 in G1, but a node of V 01 cannot reach V1 \Gamma V 01. This implies that G01 and G01 are disconnected. In order to show that they are isomorphic we resort to the isotropy of the graph. For any A 2 V1 \Gamma V 01 we must have oeA(V 01) = V1 \Gamma V 01. To see this, first note that since oeA is an automorphism joeA(V 01)j = jV 01j = jV1 \Gamma V 01j. Suppose there exist a coset BH1 2 oeA(V 01)"V 01. Then, since both AH1 and BH1 are in oeA(V 01) and oeA(V 01) is an isomorphic image of V 01, AH1 must be reachable from BH1, which contradicts the fact that V 01 and V1 \Gamma V 01 are disconnected. Analogously, we can prove that oeA(U 01) = U1 \Gamma U 01, therefore G01 and G01 are isomorphic. 2 Let us focus on G01 and let M0 denote its adjacency matrix. With arguments similar to the ones used in the previous subsection to prove Theorem 2, we can prove the following. 26 Theorem 3 M0M0T has the same distinct eigenvalues as the matrix B = 2666 6664 q q2 0 0 1 3q \Gamma 2 (q \Gamma 1)2 0 0 2(q \Gamma 1) (q \Gamma 1)2 + q 1 0 0 q2 q 3777 7775 : These eigenvalues and their multiplicities are *1 = q(q + 1) _1 = 1 *2 = 2q _2 = q 3\Gamma q2+q\Gamma 1 4 *3 = q \Gamma 1 _3 = q2 *4 = 0 _4 = q 3\Gamma q2+q\Gamma 1 4 Therefore, Corollary 2 For any odd prime power q * 3 and n = 2, G01 is a i q 4\Gamma 1 2(q\Gamma 1); q q+1 ; q; q\Gamma 2 q\Gamma 1 ; 1j-bounded concentrator. Again, note that when q * 3, q\Gamma 2q\Gamma 1 * 12 , so G01 is also a i q 4\Gamma 1 2(q\Gamma 1); q q+1 ; q; 12 ; 1j-bounded concentrator. Clearly, the same property holds for G01. 3.3.3 General Case The aim of this section is to show that, for any q and n, the nodes of V1 can be ordered in such a way to make the matrix MMT block circulant. This fact enables us to derive spectral properties of MMT from smaller matrices, obtained as linear combination of the blocks ofMM T . We believe this should simplifies the task of determining an upper bound, or even the exact value, of the second eigenvalue *2, needed to establish the expansion capabilities of the graph. First we recall the definition and basic properties of block circulant matrices (see [10] for more details). 27 Definition 6 Let A0, A1; : : : ; A_\Gamma 1 be _ square matrices of order *. The block circulant matrix of type (_; *) with the Ai's as blocks is the matrix BC(A0; A1; : : : ; A_\Gamma 1) = 0BBB BBBBBB B@ A0 A1 \Delta \Delta \Delta A_\Gamma 1 A_\Gamma 1 A0 \Delta \Delta \Delta A_\Gamma 2\Delta \Delta \Delta \Delta \Delta \Delta A1 A2 \Delta \Delta \Delta A0 1CCC CCCCCC CA When the block size * is equal to 1, block circulant matrices are simply called circulant matrices. It is well known [10, theorem 3.2.2] that any circulant matrix is diagonalized by the Fourier matrix. We extend this property showing how a generalization of the Fourier matrix can be used to transform a block circulant into a block diagonal matrix. Let BF \Lambda _;* , be the _* \Theta _* matrix consisting of _2 square blocks of order *, namely BF \Lambda _;* [i; j], 0 ^ i; j ^ _, with BF \Lambda _;* [i; j] = 1p_ !(i\Gamma 1)(j\Gamma 1)I, where ! = e 2ssi _ is the _th root of unity, and I the identity matrix of order *. That is, BF \Lambda _;* = 1p_ 0BBB BBBBBB B@ I I \Delta \Delta \Delta I I !I \Delta \Delta \Delta !_\Gamma 1I\Delta \Delta \Delta \Delta \Delta \Delta I !_\Gamma 1I \Delta \Delta \Delta !(_\Gamma 1)(_\Gamma 1)I 1CCC CCCCCC CA We define the block Fourier matrix of type (_; *), BF_;* to be the matrix such that BF \Lambda _;* is its transpose conjugate. Simple calculations show that BF_;* \Delta BF \Lambda _;* = BF \Lambda _;* \Delta BF_;* = I_* ; therefore, BF \Lambda _;* = BF \Gamma 1_;* . We have Fact 2 Let T = BC(A0; A1; : : :; A_\Gamma 1) be a block circulant matrix of type (_; *). Then BF_;* \Delta T \Delta BF \Lambda _;* = diag (D0; D1; : : : ; D_\Gamma 1) with Di = P_\Gamma 1j=0 !ij Aj. The eigenvalues of T are, therefore, the eigenvalues of all of the Di's. 28 Proof: It can be proved as [10, Theorem 3.2.2], using block matrix multiplication instead of the ordinary matrix multiplication. 2 We will now see that, for a certain ordering of the rows and, accordingly, of the columns,MM T is block circulant. Let w 4= gcd ` q n \Gamma 1 q \Gamma 1 ; q \Gamma 1' ; and ffi 4= flw(q\Gamma 1): Note that the subgroup of F*qn generated by ffi has order k 4= q n\Gamma 1 w(q\Gamma 1), and that gcd(k; q \Gamma 1) = 1. Fact 3 There exist c0; c1; : : : ; ck\Gamma 1 2 F*q , such that fffij : 0 ^ j ! kg = fcj0flwj 0 : 0 ^ j0 ! kg: Proof: Since F*q = hfl qn\Gamma 1 q\Gamma 1 i, we have ffij = flw(q\Gamma 1)j = cflw(q\Gamma 1)jmod qn\Gamma 1 q\Gamma 1 = cflwj 0 for some c 2 F*q and j0, 0 ^ j0 ! k. So, letting cj0 = c we have fffij : 0 ^ j ! kg ` fcj0flwj 0 : 0 ^ j0 ! kg: In order to show equality, we must prove that if ffij1 = cj0 1fl wj01 and ffij2 = cj0 2fl wj02, then j1 6= j2 implies j01 6= j02. Suppose for a contradiction, that j01 = j02. Then ffij1 =ffij2 2 F*q , i.e., (j1 \Gamma j2)w(q \Gamma 1) = h q n\Gamma 1 q\Gamma 1 for some h, 0 ^ h ! q \Gamma 1. But (j1\Gamma j2)w(q\Gamma 1) = h q n \Gamma 1 q \Gamma 1 () (j1\Gamma j2)w(q\Gamma 1) = hw qn \Gamma 1 w(q \Gamma 1) () (j1\Gamma j2)(q\Gamma 1) = h qn \Gamma 1 w(q \Gamma 1) : Since gcd(k; q \Gamma 1) = 1, we must have hj(q \Gamma 1), which implies h = 0 and, therefore j1 = j2, contradicting the hypothesis. 2 Using the above result, we slightly modify the set of representatives of V1 given in Lemma 3. These new representatives will be conveniently associated with the rows and columns of MMT to insure circularity. For 0 ^ i ! k, 0 ^ j ! w, ff 2 Fqn [ f1g (1 is an extra symbol that we 29 use for convenience) and p 2 P1 define A[i; j; ff; p] = 8??????! ??????: 24 ffii 0 0 1 35 24 flj 0 0 1 35 24 1 p 0 1 35 if ff = 12 4 ffi i 0 0 1 35 24 flj 0 0 1 35 24 ff 1 1 0 35 24 1 p 0 1 35 otherwise: (3.6) Lemma 16 V1 = fA[i; j; ff; p]H1 : 0 ^ i ! k; 0 ^ j ! w; ff 2 Fqn [ f1g; p 2 P1g Proof: First note that, by Fact 3, we have8! :24 ffii 0 0 1 35 24 flj 0 0 1 35 : 0 ^ i ! k; 0 ^ j ! w9=; = 8!:24 ffi iflj 0 0 1 35 : 0 ^ i ! k; 0 ^ j ! w9=; = 8!:24 cifl i+j 0 0 1 35 : 0 ^ i ! k; 0 ^ j ! w9=; : Also, as observed in the proof of Lemma 5, Hn\Gamma 1 = Sp2P1 24 1 p0 1 35 H1. Therefore, fA[i; j; ff; p]H1 : 0 ^ i ! k; 0 ^ j ! w; ff 2 Fqn [ f1g; p 2 P1g = 8!:24 cifl i+j 0 0 1 35 Hn\Gamma 1 : 0 ^ i ! k; 0 ^ j ! w9=; [ 8!:24 cifli+j 0 0 1 35 24 ff 1 1 0 35 Hn\Gamma 1 : 0 ^ i ! k; 0 ^ j ! w ff 2 Fqn ; 9=; : Now, 24 cifli+j 0 0 1 35 Hn\Gamma 1 = 24 fl i+j 0 0 1 35 24 ci 0 0 1 35 Hn\Gamma 1 = 24 fl i+j 0 0 1 35 Hn\Gamma 1; 30 and 8! :24 cifli+j 0 0 1 35 24 ff 1 1 0 35 Hn\Gamma 1 : ff 2 Fqn 9=; = 8!:24 fl i+j 0 0 1 35 24 ciff ci 1 0 35 Hn\Gamma 1 : ff 2 Fqn 9=; = 8!:24 fl i+j 0 0 1 35 24 ciff 1 1 0 35 24 1 0 0 ci 35 Hn\Gamma 1 : ff 2 Fqn 9=; = 8!:24 fl i+j 0 0 1 35 24 ff 1 1 0 35 Hn\Gamma 1 : ff 2 Fqn 9=; Combining these facts and resetting Hn\Gamma 1 = Sp2P1 24 1 p0 1 35 H1, we get fA[i; j; ff; p]H1 : 0 ^ i ! k; 0 ^ j ! w; ff 2 Fqn [ f1g; p 2 P1g = 8!:24 fl i 0 0 1 35 24 1 p 0 1 35 H1 : 0 ^ i ! q n \Gamma 1 q \Gamma 1 ; p 2 P19=;[ 8! :24 fli 0 0 1 35 24 ff 1 1 0 35 24 1 p 0 1 35 H1 : 0 ^ i ! q n \Gamma 1 q \Gamma 1 ; ff 2 Fq n ; p 2 P19=; The proof is completed by returning to the set of representatives for V1 given in Lemma 3, and observing that 8! :24 fli 0 0 1 35 24 ff 1 1 0 35 : ff 2 Fqn 9=; = 8!:24 ff fl i 1 0 35 : ff 2 Fqn 9=; 2 We associate each row (column) of MMT with a quadruplet (i; j; ff; p), meaning that the row (column) is relative to the node A[i; j; ff; p]H1. The quadruplets are ordered lexicographically, with i being the most significant index, and with the elements of Fqn [ f1g and P1 indexed in some arbitrary fashion. Since the index i ranges in [0; k \Gamma 1], we subdivide MMT into k2 square blocks of size M=k \Theta M=k (recall that M = jV1j), namely Bi1;i2 for 0 ^ i1; i2 ! k, where Bi1;i2 denote the submatrix of MMT relative to rows (i1; j; ff; p), and columns (i2; j; ff; p), with 31 j, ff and p taking all possible values. That is MMT = 0BBB BBBBBB B@ B0;0 B0;1 \Delta \Delta \Delta B0;k\Gamma 1 B1;0 B1;1 \Delta \Delta \Delta B1;k\Gamma 1\Delta \Delta \Delta \Delta \Delta \Delta Bk\Gamma 1;0 Bk\Gamma 1;1 \Delta \Delta \Delta Bk\Gamma 1;k\Gamma 1 1CCC CCCCCC CA Theorem 4 MMT is block circulant of type (k; M=k), with the Bi1;i2's as blocks. That is MMT = BC(B0;0; : : : ; B0;k\Gamma 1) Proof: We must show that Bi;i0 = Bi+1;i0+1, where the index addition is modulo k. That is, for any i, i0, j, j0, ff, ff0, p and p0, we must show that the entry in row (i; j; ff; p) and column (i0; j0; ff0; p0) is equal to the entry in row (i + 1; j; ff; p) and column (i0 + 1; j0; ff0; p0). This is clearly true for diagonal entries, i.e., i = i0 ^ j = j0 ^ ff = ff0 ^ p = p0, since, as observed earlier, all diagonal entries are equal to q. By Lemma 8 we know that there are exactly q2 nonzero entries off-diagonal in each row (each such entry equal to 1); in particular, for row (i; j; ff; p) these entries are associated with A[i; j; ff; p] 24 afl + b 11 0 35 H1; for every a; b 2 Fq . Fix a and b and suppose A[i; j; ff; p] 24 afl + b 11 0 35 H1 = A[i0; j0; ff0; p0]H1: From (3.6) we obtain A[i + 1; j; ff; p] 24 afl + b 11 0 35 H1 = 24 ffi i 0 0 1 35 A[i; j; ff; p] 24 afl + b 11 0 35 H1 = 24 ffi i 0 0 1 35 A[i0; j0; ff0; p0]H1 = A[i0 + 1; j0; ff0; p0]H1; 32 with index addition modulo k. Thus, if row (i; j; ff; p) has a 1 in column (i0; j0; ff0; p0), then row (i + 1; j; ff; p) has a 1 in column (i0 + 1; j0; ff0; p0), which proves the theorem. 2 Combining the above theorem with Fact 2, we get Corollary 3 The eigenvalues of MMT are given by the eigenvalues of Dr = k\Gamma 1X i=0 !riB0;i; for 0 ^ r ! k. Note that the Dr's are matrices of order M k = q n\Gamma 2 q2n \Gamma 1 q \Gamma 1 w(q \Gamma 1) qn \Gamma 1 = q n\Gamma 2(qn + 1)w which is, for fixed q, O(M 2=3). Thus, we have reduced the complexity of determining the eigenvalues of MMT . Observe that, the fact that MMT is symmetric yields, as an immediate consequence, that each Dr is Hermitian. Furthermore, it is easy to see that *1 = q(q + 1) is an eigenvalue of D0 = Pk\Gamma 1i=0 B0;i. Thus, if the graph is connected (i.e., *1 has multiplicity 1), *1 does not belong to the spectrum of any of the Dr's with r ? 0. Moreover, a number of specific cases we have observed lead us to formulate the following conjecture: Conjecture 1 *2 is the largest eigenvalue of any Dr with r ? 0. If the conjecture turn out to be true, the computation of *2 would be simplified, since the first eigenvalue is generally easier to determine than the second, especially if other properties of the matrix are know, like being Hermitian, which is our case. Notice that MMT is block circulant regardless of whether the graph is connected or not. Earlier in this chapter we have shown that, when n = 2, G1 splits into two connected and isomorphic components if q is odd, whereas it is connected if q is even. This property seems to generalize to other values of n. Proposition 1 If q is odd and n is even, G1 is not connected. Proof: Let us go back to the definition of G1 given in Section 2.2. It is not difficult to see that the nodes of V1 reachable from H1 are all those nodes in hH1; H0i=H1, where hH1; H0i denotes the subgroup of P GL2(qn) generated by H1 and H0. Note that for q and n even, 33 qn\Gamma 1 q\Gamma 1 is even, therefore any element of F*q = hfl qn\Gamma 1 q\Gamma 1 i is an even power of fl. Now, since the determinant of any matrix of H1 [ H0 is in F*q , the determinant of any matrix of hH1; H0i is also in F*q , and, therefore, is an even power of fl. Scalar multiples do not affect this property, since det (fliA) = fl2idet (A). Thus, we conclude that 24 fl 00 1 35 62 hH1; H0i, and, therefore, the node 24 fl 00 1 35 H1 is not reachable from H1. 2 The following conjecture, which generalizes the case n = 2, turns out to be true in all the cases we have analyzed. Conjecture 2 G1 consists of two disjoint and isomorphic connected components if q is odd and n is even, and is connected in all other cases. 34 CHAPTER 4 Memory Organization Schemes on the MPC 4.1 Background Consider a parallel system with N processors and N memory modules collectively storing M AE N variables that are available for access by the processors. A memory organization scheme is sought to distribute the data among the modules so that any set of N variables can be efficiently accessed by the processors in parallel. This problem, originally referred to as granularity problem, naturally arises in the design and implementation of parallel systems (such as PRAMs and parallel databases), and has received considerable attention in the literature. An early survey by [25] quotes fourteen papers that deal with some special cases. More recently, it has become the main focus of the large body of work concerning the simulation of the PRAM on distributed memory machines [32, 48, 3, 22, 29, 16, 20, 30, 17, 18, 44, 33, 23, 11]. In this chapter, we study the granularity problem on the MPC (Module Parallel Computer) [32], a synchronous system where processors and memories are ideally thought of as being connected by a complete bipartite graph and each memory module is able to fulfill at most one access request (read/write) per time unit. Thus, the time needed to access a set of variables is proportional to the maximum number of access requests that a single module must fulfill, and we do not have to deal with routing issues but only focus on reducing memory contention. In the next chapter, we will consider a realistic parallel system that uses a mesh as interconnection network, and develop an ad-hoc memory organization scheme that controls both memory contention and network congestion. A number of randomized schemes have been successfully developed based on the use of universal classes of hash functions to distribute the variables among the modules [32, 22, 29, 44, 33, 23, 11]. Instead, the development of efficient deterministic schemes, which is the focus of this research, appears to be much harder. The pioneering work of Mehlhorn and Vishkin [32] introduced the idea of representing each variable by several copies so that a read operation needs to access only one (the most convenient) copy. This is necessary to avoid the worst case when all the requests are addressed to the same module. For M 2 O(N r), they present a memory organization scheme for the MPC that uses r copies per variable and allows a set of N read requests to be satisfied in time O(rN 1\Gamma 1=r). However, their use of the copies penalizes the 35 execution of write operations where all the copies of the variables must be accessed, so requiring O(rN ) time in the worst case. Later, Upfal and Widgerson [48] proposed a more balanced use of the multiple copies exploiting the majority concept previously adopted for databases [13, 47]. Each variable is represented by r copies. Each copy contains the value of the variable and a time-stamp indicating the last time that particular copy has been accessed. A read/write operation needs to access only a majority br=2c + 1 of the copies to assure that the most recent value of the variable is always retrieved. The assignment of the copies to the memory modules is represented by a bipartite graph G = (V; U ; E), where V represents the set of variables, U the set of modules, and r edges connect each variable to the modules that store its copies. For M polynomial in N and r 2 \Theta (log N ), [48] show that there exist graphs with suitable expansion properties so that N variables can be accessed in O(log N (log log N )2) worst-case time on the MPC. They do not provide an explicit construction for G but show that a random graph exhibits the desired properties, with high probability. Several authors followed the ideas in [48] improving the time complexity and using bounded degree networks instead of the complete network of the MPC [3, 19, 16, 20, 30, 17, 18, 4]. Such schemes, however, rest on the fact that such expanding random graphs simply exist, which represents the basic shortcoming (maybe fatal from the practical standpoint) of this class of approaches, for the following reasons. (1) No efficient way is known of testing the required expansion properties in a random graph. As we pointed out in Chapter 2, the eigenvalue bound cannot be applied when the sizes of the two sets V and U differ by more than a constant factor, which is the case for nontrivial memory organizations. (2) The representation of the memory map poses substantial implementation problems. How can a processor determine, for a variable, the modules storing its copies and the physical address of each copy within its module? The hypothesis of a complete memory map stored internally in each processor appears eminently impractical and even the approach of Herley [17], where the memory map is distributed among the processors, has a very involved implementation. In this chapter, we present three memory organization schemes to distribute O(N 1:5), O(N 2) and O(N 3) variables, respectively, among N modules of an MPC. The schemes are presented in a framework similar to the one of [48]; however, the graphs used for variable distribution are given explicitly. Also, all these schemes use constant redundancy (i.e., number of copies per variable). To read/write any given set of N variables, an ad-hoc access protocol is used, 36 whose worst-case performance is analyzed exploiting the expansion properties of the graphs. The results are reported in the Table 4.1 where for each scheme, identified by the number of variables M , we indicate the worst-case time taken by the protocol for N requests, and the storage required in each processor to represent to memory map. (These results appeared in [37, 38, 36]). M Time Complexity Storage/Proc. O(N 1:5) O(N 1=3) O(1) O(N 2) O(N 1=2) O(1) O(N 3) O(N 2=3) O(1) Table 4.1 Performance of the memory organization schemes The core of the schemes is represented by the construction and implementation of the underlying expanding graphs, and the analysis of their expansion capabilities. The scheme for O(N 1:5) variables is based on the graph G2 defined in Section 2.3, whereas the schemes for O(N 2) and O(N 3) variables are based on two graphs derived from G3, defined in Section 2.4, which belong to the class of block designs [15, 21]. The relevance of our results is twofold: (1) They are the first constructive approaches known to achieve sublinear worst-case access time for both read and write operations. (2) Their implementation is simple and involves only elementary algebra, so that the address computation can be carried out efficiently with a limited use of resources. Although the time complexity appears less attractive than that of the nonconstructive schemes cited before, it must be pointed out that using constant redundancy (which is desirable from a practical standpoint) a polylogarithmic complexity cannot be obtained, at least for M 2 \Omega (N 1+ffl). In fact, Upfal and Wigderson [48] show that using a fixed number r of copies per variables on average, the time complexity of any memory organization scheme is at least \Omega ((M=N )1=2r). In this chapter, we raise the lower bound to \Omega ((M=N )1=r) when each variable is represented by exactly r copies, thus showing that the time performance of our schemes is not so far from being optimal. The rest of the chapter is organized as follows. In Section 4.2 we describe the general framework that will be used to present the memory organization schemes, together with the protocol that specifies how the processors of the MPC access, in parallel, a set of variables. A general formula for the time complexity of the protocol is given in terms of the expansion capabilities of the graph that governs the memory organization. Also included in this section is the lower bound on the time complexity of any memory organization scheme, which improves 37 the one in [48]. The three memory organization schemes are presented in Sections 4.3, 4.4 and 4.5, respectively. For each scheme we analyze the expansion capabilities of the underlying graph, which are needed to derive the time complexity of the access protocol, and show how the graph can be represented so that a processor is able to efficiently determine the addresses of the copies of any given variable. Finally, in Section 4.6 we compare the performance of our schemes with the aforementioned lower bound. 4.2 Framework As mentioned earlier, the parallel model we refer to is the MPC, consisting of N processors and N memory modules fully interconnected. (Equivalently, one may think of each module as being assigned to a distinct processor, and of each processor as being directly connected to every other processor.) The main characteristic of this model is that in one step each module can satisfy one read/write request; therefore, in order to guarantee efficient parallel access to a set of variables, we must insure that the variables are well spread among the modules. Suppose we want to distribute M ? N shared variables among the N modules. Our approach is similar to that introduced by [48] and subsequently followed by several authors. Each variable is replicated into r copies stored into distinct modules, only a majority br=2c + 1 of which needs to be accessed to perform a read/write operation. Each copy is provided with a timestamp which is updated every time the copy is written, so that a majority of the copies is always guaranteed to contained at least one most recently updated copy. The distribution of the copies of the variables among the modules is governed by a bipartite graph G = (V; U ; E), where V represents the set of variables, U the set of modules, and r edges connect each variable to the modules that store its copies. Suppose each processor issues an access (read/write) request for a distinct variable1. In order to satisfy the requests, the following protocol is executed by the processors, in parallel. The N processors are subdivided into N=r clusters, with r processors per cluster. Let P (i; j) denote the jth processor in cluster i, for 1 ^ i ^ N=r and 1 ^ j ^ r. Let also v(i; j) denote the variable requested by processor P (i; j). The protocol consists of r phases. In the kth phase the processors of each cluster cooperate to access the variable requested by their kth companion. More specifically, processor P (i; j) is in charge of the jth copy of v(i; k), for any i and j. A 1For simplicity, we will consider only the case of N distinct requests. The cases of fewer processors issuing requests and/or multiple requests can be handled with minor modifications, obtaining the same time complexity, where N is replaced by the actual number of requests 38 ACCESS PROTOCOL begin for j := 1 to r don\Lambda PHASE j \Lambda n foreach 1 ^ i ^ N=r do in parallel P (i; j) broadcasts v(i; j) to the processors in cluster i; foreach 1 ^ l ^ r do in parallel P (i; l) determines the address of the lth copy of v(i; j); set f lag(i; j) `alive'; while f lag(i; j) = `alive' do foreach 1 ^ l ^ r do in parallel P (i; l) tries to access the lth copy of v(i; j), if not yet accessed;n\Lambda Each memory module accepts one request (if any) \Lambda n count the number of copies of v(i; j) accessed so far; if count * br=2c + 1 then set f lag(i; j) = `dead' endwhile endforeach-i endfor-j end. Figure 4.1 Access Protocol number of iterations are executed. In each iteration, every processor tries to access its assigned copy unless it previously succeeded or other br=2c + 1 copies of the same variable have already been accessed. A memory module can satisfy at most one request per iteration, so the number of copies accessed in an iteration is equal to the number of modules receiving requests in that iteration. At some point during the execution of a given phase, a copy is said to be alive if it has not been accessed yet; a variable is said to be alive if at least br=2c + 1 of its copies are still alive. (This terminology is used only for variables and copies requested in the phase under consideration.) The code for the entire protocol is shown in Figure 4.1. For each variable a flag is used to indicate whether the variable remains alive or not. As we shall see later, all the schemes presented here use constant redundancy, i.e., r 2 O(1), and their implementations allows each processor to determine the physical address of any copy in O(log N ) time. Thus, letting \Phi denote the maximum number of iterations of the while loop, executed in any of the r phases, one can easily see that the entire access protocol takes O(\Phi +log N ) steps on the MPC. We now prove a general expression for \Phi based on the expansion capabilities of the graph G. For a set of S ae V of live variables, let \Gamma l(S) be the set of modules storing their live copies. 39 Definition 7 G has the (*; _) expansion property is for any set S ae V of live variables j\Gamma l(S)j * _jSj1\Gamma *: The following lemma is similar to Lemma 3.3 of [48]. Lemma 17 Consider k consecutive iterations of the while loop in a given phase and suppose that at the beginning of this set of iterations there are X live copies. Let Rk be the number of live copies remaining after the kth iteration. If G has the (*; _) expansion property, then Rk ^ X `1 \Gamma ffX* ' k ; with ff = _r1\Gamma * . Proof: The proof is by induction on k. Let k = 1. At the beginning, there are X live copies, which means that there are at least X=r live variables. By definition of the (*; _) expansion property, the live copies occupy at least _(X=r)1\Gamma * modules, and, therefore, after the first iteration R1 ^ X \Gamma _ ` Xr ' 1\Gamma * = X `1 \Gamma ffX* ' copies are still alive. This establishes the basis. Assuming the theorem true for k \Gamma 1, we have: Rk ^ Rk\Gamma 1 \Gamma _ ` Rk\Gamma 1r ' 1\Gamma * = Rk\Gamma 1 1 \Gamma ffR* k\Gamma 1 ! ^ X `1 \Gamma ff X* ' k\Gamma 1 1 \Gamma ffR* k\Gamma 1 ! : Since Rk\Gamma 1 ^ X, we have `1 \Gamma ffR* k\Gamma 1 ' ^ \Gamma 1 \Gamma ff X* \Delta , which concludes the proof. 2 Theorem 5 Suppose that G has the (*; _) expansion property, for some constant *, 0 ! * ! 1, and let ff = _r1\Gamma * 2 \Theta (1). Then \Phi 2 O(N *) iterations of the while loop are sufficient to access the N=r variables requested in any phase. Therefore, the access protocol requires a total of O(N *) steps on the MPC. Proof: Consider a phase of the protocol where N=r variables are accessed, one per cluster (for a total of N copies), and let \Phi be the number of iterations in this phase. We let \Phi = k0 + k1 + : : : + kJ\Gamma 1, where ki iterations are used to reduce the number of live copies from Ri to Ri+1 = Ri=eff, and R0 = N . Choosing R*i as an upper bound to ki, and applying Lemma 17, 40 we obtain Ri+1 ^ Ri 1 \Gamma ffR* i ! ki ^ Ri 1 \Gamma ffR* i ! R*i ! Rie\Gamma ff: Therefore, Ri ^ N e\Gamma iff; i = 0; 1; : : :; J \Gamma 1; and for J 2 O(log N ) we achieve RJ\Gamma 1 ^ 1. It follows that \Phi = J\Gamma 1X i=0 ki ^ J\Gamma 1X i=0 R*i ^ N * J\Gamma 1X i=0 e\Gamma iff* 2 O(N *): 2 The analysis of the memory organization schemes presented in this chapter will be aimed at determining the parameters _ and * for their graphs, so that the above theorem can be used to establish the time performance. Before closing this section, we wish to elaborate on the intrinsic difficulty of developing efficient memory organization schemes. The crucial problem is represented by the memory contention that arises in any parallel system where the shared memory is distributed among memory modules, each module being able to satisfy one request at a time. The following theorem, patterned after [48, Theorem 4.1] with appropriate modifications, shows that in such case the use of multiple copies is necessary to obtain a good worst-case-time performance, and that, in fact, a nonconstant number of copies is necessary in order to insure polylogarithmic time. Theorem 6 Consider any memory organization scheme where M variables, each represented by exactly r copies, are distributed among N memory modules (with copies of the same variable assigned to distinct modules), and N processors are connected to the memories. If the number of variables that can be stored in the processors' internal registers is negligible with respect to M , then the worst-case time needed to access a set of N variables is \Omega (min(N=r; (M=N )1=r)) Proof: Let t \Gamma 1 be the number of parallel steps needed to access a set of N variables, in the worst case. If t ? N=(cr), for some constant c ? 2 then we are done. Therefore, assume t ^ N=(cr). Since at least one copy per variable has to be accessed, for any set of N variables their copies must reside in more than N=t modules, otherwise at least N=(N=t) = t steps would 41 be required. Thus any set of N=t modules contain all of the copies of at most N \Gamma 1 variables. Note that the r copies of any variable occur in exactly0 @ N \Gamma r N=t \Gamma r 1A of the 0@ NN=t 1A sets of N=t modules. Counting these variables by rows and columns in a (variables) \Theta (sets of modules) array, we obtain M ^ (N \Gamma 1) 0@ NN=t 1A0 @ N \Gamma r N=t \Gamma r 1A : Using standard techniques based on the Stirling approximation of the factorial, we obtain M 2 O(N tr), whence t 2 \Omega ((M=N )1=r) 2 Note that the result is independent of any strategy adopted to access the variables (e.g., majority rule) and of any interconnection pattern between processors and memories. 4.3 Memory Organization Scheme for M 2 O(N 1:5) variables 4.3.1 The graph Let G2 = (V2; U2; E2) represent the assignment of the copies of M = qn\Gamma 1 q 2n\Gamma 1 q2\Gamma 1 variables (set V2) among N = q 2n\Gamma 1 q\Gamma 1 memory modules of an MPC (set U2), with q a prime power and n an integer. In the following we assume that q is a fixed (small) value, so that M 2 \Theta (N 1:5) and n 2 O(log M ) = O(log N ). Also we assume, for convenience, that either q is even, or both q and n are odd2. From the definition of G2 given in Section 2.3, we have that the variables are identified with the cosets of P GL2(qn)=H0, and the modules with those of P GL2(qn)=Hn\Gamma 1. Furthermore, for any A; B 2 P GL2(qn), variable AH0 is represented by r = q + 1 copies stored 2The case q odd and n even can be dealt with in a similar fashion but requires slight modifications, which we omit for simplicity. 42 in the modules \Phi AL0kHn\Gamma 1 : \Gamma 1 ^ k ! q\Psi = \Gamma (AH0), and that module BHn\Gamma 1 contains qn\Gamma 1 copies belonging to the variables nBLn\Gamma 1h H0 : 0 ^ h ! qn\Gamma 1o = \Gamma (BHn\Gamma 1) (see Lemma 4). The following theorem shows that the copies of any pair of variables share at most one memory module. Theorem 7 Let A; B 2 P GL2(qn) with AH0 6= BH0. Then j\Gamma (AH0) " \Gamma (BH0)j ^ 1: Proof: For a contradiction suppose that j\Gamma (AH0) " \Gamma (BH0)j * 2. Then, there exist C; D 2 P GL2(qn) with CHn\Gamma 1 6= DHn\Gamma 1, such that CHn\Gamma 1; DHn\Gamma 1 2 \Gamma (AH0)"\Gamma (BH0) (see Fig. 4.2). Without loss of generality, we assume that CHn\Gamma 1 = Hn\Gamma 1, otherwise such situation could be obtained by premultiplying A; B; C and D by C\Gamma 1. Thus, by Lemma 4 we must have A = Ln\Gamma 1i = 24 1 p 0i 0 1 35 and B = Ln\Gamma 1j = 24 1 p 0j 0 1 35 , for some p0i ; p0j 2 P0 with i 6= j. It is easy to see that AL0\Gamma 1Hn\Gamma 1 = BL0\Gamma 1Hn\Gamma 1 = Hn\Gamma 1 and, therefore, \Gamma (AH0) \Gamma Hn\Gamma 1 = \Gamma (AH0) \Gamma AL0\Gamma 1Hn\Gamma 1 = 8!:24 1 p 0i 0 1 35 24 ak 1 1 0 35 Hn\Gamma 1 : ak 2 Fq 9=; = 8!:24 p 0i + ak 1 1 0 35 Hn\Gamma 1 : ak 2 Fq 9=; and, similarly, \Gamma (BH0) \Gamma Hn\Gamma 1 = 8!:24 p 0j + ak 1 1 0 35 Hn\Gamma 1 : ak 2 Fq9=; Since i 6= j, the definition of P0 implies that p0i + ak 6= p0j + ah, for any 0 ^ k; h ! q, and, by Lemma 5, we conclude that (\Gamma (AH0) \Gamma Hn\Gamma 1) " (\Gamma (BH0) \Gamma Hn\Gamma 1) = ;. Therefore,j (\Gamma (AH0) \Gamma Hn\Gamma 1) " (\Gamma (BH0) \Gamma Hn\Gamma 1)j = j\Gamma (AH0) " \Gamma (BH0) \Gamma Hn\Gamma 1j = 0; which contradicts the assumption that \Gamma (AH0) and \Gamma (BH0) share more than one element. 2 43 A H0 B H0 C Hn-1 D Hn-1 Figure 4.2 AH0, BH0, CHn\Gamma 1, and DHn\Gamma 1 In order to determine the expansion property of the graph, we need to use the function \Gamma 2 defined on U2 and similar to the one defined in Chapter 3. For AHn\Gamma 1 2 U2 let \Gamma 2(AHn\Gamma 1) = \Gamma (\Gamma (AHn\Gamma 1)) \Gamma fAHn\Gamma 1g We have Lemma 18 \Gamma 2(AHn\Gamma 1) = 8!:A 24 ff 11 0 35 Hn\Gamma 1 : ff 2 Fqn 9=; : Proof: Similar to the proof of Lemma 8 2 Theorem 8 Let A; B 2 P GL2(qn) with AHn\Gamma 1 6= BHn\Gamma 1. Then j\Gamma 2(AHn\Gamma 1) " \Gamma 2(BHn\Gamma 1)j ^ q \Gamma 1: Proof: Without loss of generality, assume AHn\Gamma 1 = Hn\Gamma 1 (same argument as in the proof of Theorem 7). By Lemma 18, \Gamma 2(Hn\Gamma 1) = 8!:24 ffi 11 0 35 Hn\Gamma 1 : ffi 2 Fqn 9=; : Then, we have three exhaustive cases, depending upon the form of B (refer to Lemma 5). CASE 1: B = 24 fl i 0 0 1 35 , for some i, 1 ^ i ! (qn \Gamma 1)=(q \Gamma 1). By Lemma 18 \Gamma 2(BHn\Gamma 1) = 8!:24 fl i 0 0 1 35 24 ff 1 1 0 35 Hn\Gamma 1 : ff 2 Fqn 9=; = 8!:24 fl iff fli 1 0 35 Hn\Gamma 1 : ff 2 Fqn 9=; 44 Since fli 6= 1, we have j\Gamma 2(Hn\Gamma 1) " \Gamma 2(BHn\Gamma 1)j = 0. CASE 2: B = 24 fi 11 0 35, for some fi 2 Fqn . Then, \Gamma 2(BHn\Gamma 1) = 8!:24 fi 11 0 35 24 ff 11 0 35 Hn\Gamma 1 : ff 2 Fqn 9=; = 8!:24 fiff + 1 fiff 1 35 Hn\Gamma 1 : ff 2 Fqn 9=; Now, if ff = 0 then 24 fiff + 1 fiff 1 35 Hn\Gamma 1 = Hn\Gamma 1 62 \Gamma 2(Hn\Gamma 1) " \Gamma 2(BHn\Gamma 1). Otherwise, arguing as in the proofs of Lemmas 10 and 13, we can show that2 4 fiff + 1 fi ff 1 35 Hn\Gamma 1 = 24 fi + ff\Gamma 1 flk 1 0 35 Hn\Gamma 1: where k, 0 ^ k ! q n\Gamma 1 q\Gamma 1 , is such that \Gamma ff\Gamma 2 = bflk, for some b 2 F*q . If q is even, or both q and n are odd, there are exactly q \Gamma 1 values of ff such that \Gamma ff\Gamma 2 2 F*q , i.e., k = 0. These are the values of ff for which 24 fi + ff\Gamma 1 flk 1 0 35 Hn\Gamma 1 2 \Gamma 2(Hn\Gamma 1). Thus j\Gamma 2(Hn\Gamma 1)"\Gamma 2(BHn\Gamma 1)j = q \Gamma 1. CASE 3: BHn\Gamma 1 = 24 fi fl i 1 0 35 Hn\Gamma 1, for some fi 2 Fqn and i, 1 ^ i ! q n\Gamma 1 q\Gamma 1 . We have j\Gamma 2(Hn\Gamma 1)" \Gamma 2(BHn\Gamma 1)j = q \Gamma 1, and the proof is analogous to that for CASE 2. 2 Theorems 7 and 8 have two important consequences, stated below as corollaries. As in the analysis of the access protocol, we will use the term "live variable" to denote a variable that has at least b(q + 1)=2c + 1 "live copies", and \Gamma l(S) to denote the set of modules containing the live copies of a set of live variables S. Corollary 4 Let u 2 U2 and consider a set of t distinct live variables v1; : : : ; vt such that a live copy of each variable is stored in u. Then j\Gamma l(fv1; : : : ; vtg) \Gamma uj * b(q + 1)=2ct: Proof: Immediate from Theorem 7. 2 45 Corollary 5 Let S ae V be a set of live variables and consider a set of k distinct modules u1; : : : ; uk. Let ti be the number of variables of S that store a live copy in module ui. Then j\Gamma l(S)j * kX i=1b (q + 1)=2cti \Gamma 0@ k2 1A (q \Gamma 1): Proof: For 1 ^ i ^ k, let Ai ae S denote the set of variables that have a live copy stored in ui. By hypothesis, jAij = ti. Clearly, Ski=1 \Gamma l(Ai) ` \Gamma l(S), and, by the inclusion-exclusion principle, we have j\Gamma l(S)j * kX i=1 j \Gamma l(Ai)j \Gamma X 1^i!j^k j \Gamma l(Ai) " \Gamma l(Aj)j by Cor. 4* kX i=1b (q + 1)=2cti \Gamma X 1^i!j^k j \Gamma 2(ui) " \Gamma 2(uj)j by Th. 8* kX i=1b (q + 1)=2cti \Gamma 0@ k2 1A (q \Gamma 1) 2 We are now ready to analyze the expansion capabilities of G2. Theorem 9 G has the ( 13; q25=3 ) expansion property. Proof: We must prove that for any set S ae V of live variables j\Gamma l(S)j ? q25=3 jSj2=3: Let ae = b(q + 1)=2c. We first prove that j\Gamma l(S)j ? pjSjae. There are at least jSj(ae + 1) live copies of the variables of S. Suppose, for a contradiction, that j\Gamma (S)j ^ pjSjae. Then there exists a node in U storing at least jSj(ae + 1)=pjSjae ? pjSj live copies. By Corollary 4 this implies j\Gamma l(S)j ? pjSjae, which contradicts the assumption j\Gamma (S)j ^ pjSjae. Now, let j\Gamma l(S)j = pjSjffl, with ffl ? ae. We claim that each module of \Gamma l(S) stores fewer thanpj Sjffl=ae live copies. Indeed, suppose there is some u 2 \Gamma l(S) storing x * pjSjffl=ae live copies. Using again Corollary 4, we conclude that j\Gamma l(S) \Gamma uj * pjSjffl, that is j\Gamma l(S)j * pjSjffl + 1, a contradiction. Let t be the number of modules in \Gamma l(S) storing at least pjSjae=ffl live copies. We majorize the number of live copies in these t modules to pjSjffl=ae, and the number of live 46 copies in the remaining (pjSjffl \Gamma t) modules to pjSjae=ffl, and obtain the following inequality: tqjSjffl=ae + (qjSjffl \Gamma t)qjSjae=ffl * jSj(ae + 1) This implies t ? pjSj aefflffl2\Gamma ae2 , and the fact ffl ? ae implies t ? pjSjae=ffl. Let k = 12 pjSjaeffl ! t. Consider k nodes of \Gamma l(S) storing at least pjSjae=ffl live copies. By Corollary 5 we have j\Gamma l(S)j * kaeqjSjae=ffl \Gamma 0@ k2 1A (q \Gamma 1) ? kaeqjSjae=ffl \Gamma q \Gamma 12 k2 = ae2 jSj(ae=ffl)2 \Gamma q \Gamma 18 jSj(ae=ffl)2 = ` ae2 \Gamma q \Gamma 18 ' jSj(ae=ffl)2 ? q 3 32ffl2 jSj Combining the hypothesis j\Gamma l(S)j = pjSjffl with the above inequality we obtain j\Gamma l(S)j ? 125=3 jSj2=3q 2 In the next subsection we show how G2 can be effectively implemented so that a processor be able to compute the physical address of any copy in O(log N ) time using constant internal storage (Theorem 11). This result and Theorems 9 and 5 yield Theorem 10 M 2 O(N 1:5) variables can be distributed among N processors of an MPC, with constant redundancy, so that any set of N distinct variables can be accessed, using the access protocol of Section 4.2, in time O(N 1=3). Moreover, each processor can determine the physical address of any copy in O(log N ) time using O(1) internal storage. 4.3.2 Implementation A crucial aspect of the development of a memory organization scheme concerns its implementation, an issue that has been often ignored in the past. In particular, a processor that wants to access a specific copy of a variable must be able to efficiently determine the module 47 storing that copy and the physical address of the copy within the module. We now show how this can be accomplished when the variables are distributed among the modules according to the graph G2. Let v0; : : : ; vM\Gamma 1 denote the variables, and u0; : : :; uN\Gamma 1 the memory modules. We first need to associate variables and modules with the appropriate cosets. That is, we need to establish the following bijections. 1. For 0 ^ i ! M , vi ! AiH0, for some Ai 2 P GL2(qn). 2. For 0 ^ j ! N , uj ! Bj Hn\Gamma 1, for some Bj 2 P GL2(qn). The definition of the Ai's involves a number of technical details, which, for convenience of presentation, are dealt with in Appendix A. As for the Bj's, Lemma 5 already suggests a set of possible candidates, which, however, we need to slightly modify as follows. For nonnegative integers s ! q n\Gamma 1 q\Gamma 1 and t ! q n + 1, we define the integer J(s; t) 4= s(qn + 1) + t; and with j 2 [0; N \Gamma 1] we associate the pair (s; t) if and only if j = J(s; t). Recall from Chapter 2 that npmi : 0 ^ s ! q n\Gamma 1 q\Gamma 1 o denotes the set of monic polynomials in fl of degree less than n, and let Fqn = fff0; : : : ; ffqn\Gamma 1g. For 0 ^ s ! q n\Gamma 1 q\Gamma 1 and 0 ^ t ! qn + 1, define BJ(s;t) = 8???????? ??!??? ???????: 24 pms 0 0 1 35 if t = 0 24 fft\Gamma 1 pms 1 0 35 otherwise (4.1) Claim 2 The BJ(s;t)'s belong to distinct cosets of P GL2(qn)=Hn\Gamma 1, therefore, P GL2(qn)=Hn\Gamma 1 = aeBJ(s;t)Hn\Gamma 1 : 0 ^ s ! q n \Gamma 1 q \Gamma 1 0 ^ t ! q n + 1oe : Proof: Since both npms : 0 ^ s ! q n\Gamma 1 q\Gamma 1 o and nfls 0 : 0 ^ s0 ! qn\Gamma 1 q\Gamma 1 o are sets of representatives for F*qn =Fq , there is a bijection between indices s and s0 such that pms = bsfls 0; 48 for some bs 2 F*q . Since any scalar diagonal matrix belongs to Hn\Gamma 1, it is straightforward that2 4 p ms 0 0 1 35 Hn\Gamma 1 = 24 fl s0 0 0 1 35 24 bs 0 0 1 35 Hn\Gamma 1 = 24 fl s0 0 0 1 35 Hn\Gamma 1 and 24 fft\Gamma 1 pms 1 0 35 Hn\Gamma 1 = 24 fft\Gamma 1 fl s0 1 0 35 24 1 0 0 bs 35 Hn\Gamma 1 = 24 fft\Gamma 1 fl s0 1 0 35 Hn\Gamma 1; so that, by Lemma 5, the claim holds 2 As observed before, the copies of vi = AiH0 are stored in modules AiL0kHn\Gamma 1 ; \Gamma 1 ^ k ! q: And, module uJ(s;t) contains the copies of BJ(s;t)Ln\Gamma 1h H0 ; 0 ^ h ! qn\Gamma 1: When we defined the graph in Chapter 2, we observed that the edges are associated with the cosets of the subgroup H = H0 " Hn\Gamma 1. In particular, the edge (AiH0; AiL0kHn\Gamma 1) is associated with the coset AiL0kH, and, analogously, the edge (BJ(s;t)Hn\Gamma 1; BJ(s;t)Ln\Gamma 1h H0) with the coset BJ(s;t)Ln\Gamma 1h H. Thus, we adopt the following convention: the copy k of vi is stored at the address h in module uJ(s;t) if and only if AiL0kH = BJ(s;t)Ln\Gamma 1h H, that is, if and only if AiL0k 2 BJ(s;t)Ln\Gamma 1h H: We seek a method to compute (s; t; h) from (i; k). To this end, a processor proceeds as follows: STEP 1: From i and k compute Ai and L0k. STEP 2: Find s, t and h such that AiL0k 2 BJ(s;t)Ln\Gamma 1h H. The following lemma identifies the matrices in each coset BJ(s;t)Ln\Gamma 1h H. 49 Lemma 19 BJ(s;t)Ln\Gamma 1h H = 8??????! ??????: 8!:24 apms (p0h + b)pms 0 1 35 : a; b 2 Fq; a 6= 09=; if t = 08! :24 afft\Gamma 1 (p0h + b)fft\Gamma 1 + pms a p0h + b 35 : a; b 2 Fq ; a 6= 09=; if t ? 0 Proof: The lemma follows from the definitions of BJ(s;t) (4.1), Ln\Gamma 1h (2.5) and H (2.1). 2 We assume that each processor has a local work space consisting of a constant number of registers, and that, in addition to the usual arithmetic operations, it is able to perform addition, multiplication, and inverse in the fields Fq and Fqn . We also assume that arithmetic operations and operations in Fq take constant time. Representing the elements of Fqn as polynomials, the operations in Fqn can be implemented using feedback shift registers, each operation taking O(n) = O(log N ) time and space equivalent to the storage of O(1) field elements (see [5, Ch. 2] for details). Each polynomial of P0 can be uniquely associated with its (n \Gamma 1) coefficients. Thus, the indexing is given by the lexicographic order of the qn\Gamma 1 distinct (n \Gamma 1)-tuples of elements of Fq . In Appendix A, we show that, given i, a processor can compute Ai in time O(log N ) using O(1) storage (Theorem 25). Such result will be assumed in what follows. Clearly, in additional O(1) time we obtain L0k, that completes STEP 1. Let us consider STEP 2 and suppose that AiL0k = 24 x yz v 35, where x; y; z and v are elements of Fqn and the usual notation for matrices of P GL2(qn) is adopted, i.e., v = 1 or z v = 1 0. The code in Fig. 4.3, which is entirely based on Lemma 19, computes the indices s; t and h such that AiL0k 2 BJ(s;t)Ln\Gamma 1h H, that is, AiL0kH = BJ(s;t)Ln\Gamma 1h H. In the code, the symbols \Phi ,\Psi , \Omega and INV, respectively, denote addition, subtraction, multiplication, and inverse in Fqn . Also, to improve readability, we use the following macros, which, as it can be easily seen, are all executable in O(log N ) time. Let x denote a generic element of Fqn . ffl INDEX1 (x) = t, where x = fft ffl INDEX2 (x) = h, where x = p0h + b, for some b 2 Fq ffl INDEX3 (x) = s, where x = apms , for some a 2 F*q ffl MONIC (x) = pms , where x = apms . 50 STEP 2 begin if z = 0 then t := 0 ; s := INDEX3(x) ; h := INDEX2(y \Omega INV(MONIC(x))) ; else n \Lambda z 6= 0 \Lambda n t := INDEX1(x \Omega INV(z))+1 ; if v = 0 then s := INDEX3(y) ; h := 0 else n \Lambda v = 1 \Lambda n s := INDEX3((y \Psi fft\Gamma 1) \Omega INV (z)) ; h := INDEX2(INV(y \Psi fft\Gamma 1) \Omega MONIC((y \Psi fft\Gamma 1) \Omega INV(z))) endif endif end. Figure 4.3 Code for STEP 2 The correctness of the code follows immediately from Lemma 19. It is easy to see that in order to carry out all the computations required by the two steps, a processor needs only to store the parameters q and n, the primitive element fl and the addition and multiplication tables for Fq . Since q 2 O(1), all these data occupy a constant number of registers in the processor's local memory. Therefore, Theorem 11 The code for STEP 2 is correct and is executed in O(log N ) time. Therefore, a processor is able to compute the physical address of any copy of any variable in O(log N ) time using O(1) internal storage. 4.4 Memory Organization Scheme for M 2 O(N 2) variables 4.4.1 The graph Consider a bipartite graph G = (X; Y ; E) with the structure of a (qn; q)-BIBD, where q is a prime power and n an integer. By definition, jY j = qn, degree (X) = q (i.e., the degree of any node of X is q), and for any pair of distinct nodes y1; y2 2 Y there exists exactly one x 2 X adjacent to both (see Definition 2). This immediately implies that jXj = qn\Gamma 1 q n\Gamma 1 q\Gamma 1 and that degree (Y ) = q n\Gamma 1 q\Gamma 1 . We use G to distribute M = jXj variables among N = jY j memory modules of an MPC. Thus, each variable is represented by q copies and each module stores 51 qn\Gamma 1 q\Gamma 1 copies of distinct variables. Assume q 2 O(1), so that M 2 O(N 2) and n 2 O(log N ). However, we must have q * 3, otherwise the graph does not exhibit the required property. The following theorem establishes the expansion capabilities of G. As usual, given a set of live variables S, let \Gamma l(S) denote the set of modules containing the live copies of these variables. Theorem 12 For q * 3, G has the ( 12; q\Gamma 22 ) expansion property Proof: We must prove that for any set S of live variables j\Gamma l(S)j * q \Gamma 22 jSj1=2: Without loss of generality, suppose j\Gamma l(S)j = jSj1=2_ for some _ ? 0. By definition, a live variable has at least dq=2e of its copies alive. Define ae = dq=2e and note that, since q * 3, ae * 2. Thus, the set S accounts for at least jSjae live copies and, therefore, there must be a module y 2 \Gamma l(S) storing at least j Sjaej Sj1=2_ = ae _ jSj 1=2 live copies, belonging to distinct variables. These variables cannot share any module other than y because, otherwise, we would have more than one variable connected to the same pair of modules, which violates the property of the BIBD. Since each such variable has at least other ae \Gamma 1 * 1 live copies, beside the one stored in y, we conclude that j\Gamma l(S)j ? jSj1=2 ae_ (ae \Gamma 1): which, combined with the hypothesis j\Gamma l(S)j = jSj1=2_, yields _ * qae(ae \Gamma 1) * q \Gamma 22 : 2 In the next section we show how to construct a (qn; q)-BIBD for any prime power q and integer n, so that a processor is able to compute the physical address of any copy of any variable in O(log N ) time using constant internal storage (Theorem 13). This result and Theorems 12 and 5 yield Corollary 6 M 2 O(N 2) variables can be distributed among N processors of an MPC, with constant redundancy, so that any set of N distinct variables can be accessed, using the access 52 u Yu Xu uE V3 U3 Figure 4.4 Construction of a (qn; q)-BIBD protocol of Section 4.2, in time O(N 1=2). Moreover, each processor can determine the physical address of any copy in O(log N ) time using O(1) internal storage. 4.4.2 Implementation A (qn; q)-BIBD can be obtained as subgraph of the 3-(qn+1; q+1; 1) design G3 = (V3; U3; E3) defined in Chapter 2, using the following standard technique. Let u be an arbitrary node of U3 and define Xu = fx 2 V3 : (x; u) 2 E3g Yu = U3 \Gamma fug Eu = f(x; y) 2 E3 : x 2 Xu; y 2 Yug The construction is shown in Figure 4.4. As proved in [21, Theorem 1.14], Gu = (Xu; Yu; Eu) is a (jU3j \Gamma 1; degree (V3) \Gamma 1)-BIBD, i.e., a (qn; q)-BIBD. Recall that the nodes of V3 are associated with the cosets of P GL2(qn)=H0 and the nodes of U3 with those of P GL2(qn)=Hn. For convenience, let us choose u to be the node corresponding to the coset Hn. The following lemma identifies the cosets associated with the nodes of Xu and Yu. 53 Lemma 20 For u = Hn we have Xu = 8!:24 p ms pms p0t 0 1 35 H0 : 0 ^ s ! q n \Gamma 1 q \Gamma 1 ; 0 ^ t ! q n\Gamma 19=; Yu = 8!:24 ff 11 0 35 Hn : ff 2 Fqn 9=; : Proof: Immediate from the definition of Xu and Yu, and Lemmas 6 and 7. 2 Note that a node AH0 2 V3 " Xu has degree q + 1 in G3, but only q of the edges reach Yu, since the node has degree q in Gu. Similarly, a node BHn 2 U3 " Yu has degree qn\Gamma 1 q n\Gamma 1 q\Gamma 1 in G3, but only q n\Gamma 1 q\Gamma 1 of the edges are incident on Xu. The following lemma identifies, for each node, the set of its neighbors in Gu, denoted by the function \Gamma u. Lemma 21 Let AH0 2 Xu, with A = 24 p ms pms p0t 0 1 35 , for some pms 2 P monic and p0t 2 P0; and let BHn 2 Yu, with B = 24 ff 11 0 35, for some ff 2 Fqn . We have \Gamma u(AH0) = nAL0kHn : 0 ^ k ! qo (4.2) \Gamma u(BHn) = aeBLns;0H0 : 0 ^ s ! q n \Gamma 1 q \Gamma 1 oe : (4.3) Proof: Equality (4.2) follows immediately from Lemma 6 due to the exclusion of Hn = AL0\Gamma 1Hn from Yu. To prove Equality (4.3), we have to show that indeed BLns;0H0 = 24 ff 11 0 35 24 p ms 0 0 1 35 H0 2 Xu; for 0 ^ s ! q n\Gamma 1 q\Gamma 1 . In fact,2 4 ff 1 1 0 35 24 pms 0 0 1 35 = 24 ff (p ms )\Gamma 1 1 0 35 = 24 p ms 0 pms0 p0t 0 1 35 24 a b 1 0 35 ; where the equation bpms0 = (pms )\Gamma 1 determines b and pms0 , and the equation pms0 (p0t + a) = ff determines p0t and a. Since a; b 2 Fq , the matrix 24 a b1 0 35 2 H0 and the lemma is established. 2 54 Recall that the set Xu represents the variables and Yu the modules in the memory organization scheme. Following an approach similar to the one of Section 4.3.2, we now show how the copies of the variables are organized within the modules and how a processor determines the physical address of any copy. Again, let the elements of Fqn be represented as polynomials in fl of degree less than n, so that operations in Fqn take O(n) = O(log N ) time, whereas all the other operations are performed in constant time. Let v0; : : : ; vM\Gamma 1 denote the variables, and u0; : : : ; uN\Gamma 1 the memory modules. We first associate variables and modules with the appropriate cosets, as specified by Lemma 20. It is easy to give an ordering of the matrices8! :24 pms pms p0t 0 1 35 H0 : 0 ^ s ! q n \Gamma 1 q \Gamma 1 and p 0t 2 P09=; so that given an index i, 0 ^ i ! M , a processor can compute the i-indexed such matrix, which we denote as Ai, in O(log N ) time. Similarly, we establish an ordering for the matrices8! :Bj = 24 ffj 1 1 0 35 : ffj 2 Fqn 9=; ; where indexing of the elements of Fqn is given by the lexicographic order of the n-tuples of coefficients. Thus, for 0 ^ i ! M , variable vi is associated in the graph with AiH0, and, for 0 ^ j ! N , module uj with Bj Hn. According to Lemma 21, we store copy h of variable vi in the module AiL0kHn, for 0 ^ k ! q, and organize the copies within each module so that the item stored at the address h of module j is a copy of the variable associated with BjLnh;0H0. Since the edges in the graph are cosets of H = H0 " Hn we have: the copy k of vi is stored at the address h in module uj if and only if AiL0kH = Bj Lnh;0H, that is, if and only if AiL0k 2 Bj Lnh;0H: Suppose a processor wants to compute the address of the copy k of vi. A two-step procedure, identical to the one used in Section 4.3.2, is executed: STEP 1: From i and k compute Ai and L0k. STEP 2: Find j and h such that AiL0k 2 Bj Lnh;0H. 55 It is easy to see that STEP 1 takes O(log N ) time. Consider STEP 2. We have that BjLnh;0H = 8!:24 ffj 11 0 35 24 p mh 0 0 1 35 24 a b 0 1 35 : a; b 2 Fq ; a 6= 09=; = 8!:24 affj p mh bffjpmh + 1 apmh bpmh 35 : a; b 2 Fq ; a 6= 09=; = 8!:24 ffj a\Gamma 1bffj + (apmh )\Gamma 1 1 a\Gamma 1b 35 : a; b 2 Fq; a 6= 09=; Given the particular form of Ai and L0k, we must have AiL0k = 24 x y1 0 35, for some x and y in Fqn . Thus the processor has to determine the indices j and h such that2 4 x y 1 0 35 = 24 ffj a\Gamma 1bffj + (apmh )\Gamma 1 1 a\Gamma 1b 35 ; for some a; b 2 Fq and a 6= 0. It is immediately seen that b = 0, and, therefore ffj = x (apmh )\Gamma 1 = y; which allows us to compute j and h in O(log N ) time. As for the previous memory organization scheme, only a constant number of registers are needed in the processor to store the parameters and carry out all the operations. Therefore, Theorem 13 A processor computes the physical address of any copy in O(log N ) time using O(1) internal storage. 4.5 Memory Organization Scheme for M 2 O(N 3) variables 4.5.1 The graph The graph we use for this memory organization scheme is a 3-(qn + 1; q; q \Gamma 2) design with q ? 3. Let G = (X; Y ; E) be such a graph. By Definition 1, we have that jY j = qn + 1, degree (X) = q, and for any three distinct nodes y1; y2; y3 2 Y there exist exactly q \Gamma 2 nodes of 56 X adjacent to all three of them3. As a consequence, jXj = qn\Gamma 1 q 2n\Gamma 1 q\Gamma 1 and degree (Y ) = qn qn\Gamma 1 q\Gamma 1 . Let X denotes the set of variables and Y the set of modules, and let N = qn + 1 M = qn\Gamma 1 q 2n \Gamma 1 q \Gamma 1 ; where M 2 O(N 3), for q 2 O(1). Thus, each variable is replicated in q copies and each module contains copies of qn q n\Gamma 1 q\Gamma 1 variables. Observe that for q = 3 the graph is trivial because M = 0@ N3 1A and the nodes of X are in one-to-one correspondence with the triplets of nodes of Y . In this case the expansion property of the graph, proved below, does not hold, and this is why we require q ? 3. Theorem 14 For q ? 3, G has the ( 23; q 2=3 3 ) expansion property Proof: We must prove that for any set S of live variables, their live copies are contained in \Gamma l(S) modules, with j\Gamma l(S)j * q 2=3 3 jSj 1=3: Without loss of generality, suppose j\Gamma l(S)j = jSj1=3_ for some _ ? 0. By definition, a live variable has at least bq=2c + 1 of its copies alive. Define ae = bq=2c and note that if q ? 3, then ae * 2. The set S accounts for at least jSj(ae + 1) live copies and, therefore, there must be a module y 2 \Gamma l(S) storing at least jSj(ae + 1)j Sj1=3_ = ae + 1 _ jSj 2=3 live copies, belonging to distinct variables. Let S0 ` S be the set of these variables. Each such variable has at least other ae live copies, beside the one stored in y, and, therefore, accounts for at least 0@ ae2 1A pairs of modules, not including y. By adding y to each pair we obtain 0@ ae2 1A triplets. Let t = j\Gamma l(S0) \Gamma fygj: 3As it will become apparent from the following analysis, for the purposes of the memory organization, we could have used the 3-design G3 obtaining a comparable time performance; however, the implementation and, in particular, the address computation for G3 would have become more complicated. 57 There are 0@ t2 1A triplets formed by two modules in \Gamma l(S0) \Gamma fyg and y. By definition of 3- (qn + 1; q; q \Gamma 2) design, each triplet occurs exactly q \Gamma 2 times, and, therefore we conclude that jS0j 0@ ae2 1A ^ 0@ t2 1A (q \Gamma 2): Recalling that jS0j * ae+1_ jSj2=3, the above relation implies t * jSj1=3 ae(ae 2 \Gamma 1) _(q \Gamma 2) ! 1=2 : Since j\Gamma l(S)j * j\Gamma l(S0)j ? t, combining the inequality for t with the hypothesis j\Gamma l(S)j = jSj1=3_, we obtain _ * ae(ae 2 \Gamma 1) q \Gamma 2 ! 1=3 * q2=3 3 2 The next section shows how to construct G for any prime power q ? 3 and integer n, and how the copies of the variables can be organized within the modules, so that a processor is able to compute the physical address of any copy in O(log N ) time using constant internal storage (Theorem 17). This result, together with Theorem 14 and Theorem 5, yield Theorem 15 M 2 O(N 3) variables can be distributed among N processors of an MPC, with constant redundancy, so that any set of N distinct variables can be accessed, using the access protocol of Section 4.2, in time O(N 2=3). Moreover, each processor can determine the physical address of any copy in O(log N ) time using O(1) internal storage. 4.5.2 Implementation We can construct a 3-(qn + 1; q; q \Gamma 2) design by connecting together qn + 1 (qn; q)-BIBDs, in the following fashion. In the previous section we constructed the (qn; q)-BIBD Gu as a subgraph of G3, by selecting an arbitrary node u 2 U and considering the set U3 \Gamma fug as output-set, the set fv 2 V3 : (v; u) 2 E3g as input-set, and considering only the edges incident to both these sets. Since jU3j = qn + 1, we can construct qn + 1 such graphs by choosing different nodes u. For convenience, let number the nodes of U3 as u\Gamma 1; u0; : : : uqn\Gamma 1, and, consistently with the set 58 of representatives given in Lemma 7, let u\Gamma 1 = Hn uj = 24 ffj 11 0 35 Hn 0 ^ j ! qn where, once again, fffi : 0 ^ j ! qng = Fqn . For \Gamma 1 ^ j ! qn, we define Guj = (Xuj ; Yuj ; Euj ) in the same fashion as Gu was defined in the previous section. That is Xuj = fx 2 V3 : (x; uj) 2 E3g Yuj = U3 \Gamma fujg Euj = f(x; y) 2 E3 : x 2 Xuj ; y 2 Yuj g The following lemma generalizes the result of Lemma 20. Lemma 22 We have Xu\Gamma 1 = 8!:24 p ms pms p0t 0 1 35 H0 : 0 ^ s ! q n \Gamma 1 q \Gamma 1 0 ^ t ! q n\Gamma 19=; (4.4) Yu\Gamma 1 = 8!:24 fi 11 0 35 Hn : fi 2 Fqn 9=; : (4.5) And, for 0 ^ j ! qn, Xuj = 8!:24 ffj 11 0 35 24 p ms pms p0t 0 1 35 H0 : 0 ^ s ! q n \Gamma 1 q \Gamma 1 0 ^ t ! q n\Gamma 19=; (4.6) Yuj = 8!:24 ffj 11 0 35 24 fi 11 0 35 Hn : fi 2 Fqn 9=; : (4.7) Proof: Equalities (4.4) and (4.5) follow from Lemma 20, since Xu\Gamma 1 = Xu and Yu\Gamma 1 = Yu. Equality (4.6) follows from Lemma 6 and the definition of Xuj . As for Yuj , note that8 !:24 ffj 1 1 0 35 Hn9=; [ 8!:24 ffj 11 0 35 24 fi 11 0 35 Hn : fi 2 Fqn 9=; = U3; 59 therefore, 8! :24 ffj 1 1 0 35 24 fi 1 1 0 35 Hn : fi 2 Fqn 9=; = U3 \Gamma fujg: 2 The isotropy of the graph implies that for any j * 0 Guj is isomorphic to Gu\Gamma 1, since the cosets associated with the nodes and edges of Guj are obtained by multiplying those of Gu\Gamma 1 by the same matrix. And, since Gu\Gamma 1 is identical to the graph Gu of the previous section, we conclude that each Guj is a (qn; q)-BIBD. We are now ready to construct the 3-(qn + 1; q; q \Gamma 2)-design G = (X; Y ; E). Recall thatj Y j = qn + 1 and jXj = qn\Gamma 1 q 2n\Gamma 1 q\Gamma 1 . Set Y = U3, and partition the set X into qn + 1 disjoint subsets of qn\Gamma 1 q n\Gamma 1 q\Gamma 1 nodes each, namely Sj. For \Gamma 1 ^ j ! qn, we set Sj = Xuj ; \Gamma 1 ^ j ! qn: Note that the Xuj 's are not disjoint, therefore distinct Sj's may include the same cosets which, however, we will be regard as distinct nodes. Each Sj is connected to U3 by the same edges that connect Xuj to Yuj in Guj (see Fig. 4.5). It is easy to see that, in G, each node of X has degree q and each node of Y has degree qn q n\Gamma 1 q\Gamma 1 . Theorem 16 G is a 3-(qn + 1; q; q \Gamma 2)-design. Proof: We must prove that for any three distinct nodes y1; y2; y3 2 Y , there are exactly q \Gamma 2 nodes in X connected to all three of them. Fix a triplet (y1; y2; y3) and regard these nodes as nodes in G3. Since G3 is a 3-(qn + 1; q + 1; 1)-design, there is exactly one node v 2 V3 connected to y1; y2 and y3. Since the degree of v is q + 1 there are other q \Gamma 2 nodes of U3 adjacent to v in G3. Let us call these nodes *i, for 1 ^ i ^ q \Gamma 2. Thus, for any i we must have that v 2 X*i, y1; y2; y3 2 Y*i and, clearly, (v; y1); (v; y2); (v; y3) 2 E*i. The same edges occur in G and, therefore, we have found q \Gamma 2 nodes of X adjacent to y1, y2 and y3 in G. Since each node of X accounts for 0@ q3 1A triplets, we must have jXj 0@ q3 1A * 0@ jY j3 1A (q \Gamma 2): 60 X Y S-1 = X -1u Sj = Xuj = Xuq-1nS q-1n uj juE = XuS0 0 Figure 4.5 Construction of a 3-(qn + 1; q; q \Gamma 2) design 61 The theorem follows by observing that the above is, in fact, an equality. 2 The implementation of G, for the purposes of address computation is easy, once we regard this graph as composition of the Guj 's. As observed before, each Guj is isomorphic to Gu and can be implemented as explained in Section 4.4.2. Note that module uj 2 Y is included in every Yui with i 6= j. Therefore, uj contains q n\Gamma 1 q\Gamma 1 copies of the variables of Xui = Si, for any i 6= j. Since there are qn such indices i, we subdivide uj into qn blocks of size q n\Gamma 1 q\Gamma 1 , each block reserved for the copies of a distinct Si. The blocks occupy consecutive position in the module, according to the ordering of the indices i. The organization of the copies in block i is identical to the organization of the copies for uj in the graph Gui. The variables are subdivided in groups according to the partition of X into the subsets Si,\Gamma 1 ^ i ! qn. Suppose a processor wants to compute the physical address of the copy k of a variable v, and suppose v belongs to Si. It first computes the address of the copy in Gui, with the same procedure described before for Gu. Suppose the copy resides in module uj. Then, once we have the address within uj with respect to the graph Gui , we just add the appropriate multiple of q n\Gamma 1 q\Gamma 1 to account for the number of blocks in uj preceding the one where the copies of Si are stored. The following theorem easily follows. Theorem 17 A processor computes the physical address of any copy in O(log N ) time using O(1) internal storage. 4.6 Comparison with the lower bound In this section we compare the time performance of the three memory organization schemes with the lower bound proved in Theorem 6. Note that the lower bound is expressed in terms of the number of variables M , the number of modules N and the number of copies per variable r. The following table reports, for each scheme, the value M as a funtion of N , the redundancy r, and lower and upper bounds to the time complexity. Note, that our choices of r are consistent with the hypotheses upon which the schemes are based. More precisely, in the first scheme r = q + 1 where q is any prime power; we chose q = 2, which is also the case we consider in Appendix A when determining the representatives of P GL2(qn)=H0. In the second scheme, r = q, for a prime power q ? 2; we chose q = 3. In the third scheme, r = q for a prime power q ? 3; we chose q = 4. 62 M r Lower bound Upper bound O(N 1:5) 3 \Omega (N 1=6) O(N 1=3) O(N 2) 3 \Omega (N 1=3) O(N 1=2) O(N 3) 4 \Omega (N 1=2) O(N 2=3) Table 4.2 Lower bounds VS upper bounds Note that in all three cases the use of constant redundancy, which, as observed earlier, is desirable from a practical standpoint, makes it impossible to attain a polylogarithmic worst-case time, and, thus, the performance of our schemes is not far from being optimal. 63 CHAPTER 5 A Memory Organization Scheme on the Mesh 5.1 Introduction The memory organization schemes of the previous chapter have been designed for the MPC, where the processors are connected by a complete network. This setting idealizes the communication among the processors, allowing any processor to send directly an access request to every other processor. Thus, the performance of the protocol used to access in parallel a set of variables depends exclusively on memory contention, i.e., the maximum number of requests addressed to a single module (processor), and the purpose of the memory organization scheme is to reduce such contention. However, in any realistic parallel computer, physical constraints limit the number of links abutting to a single processor -- typically a constant independent of the number of processors -- and, therefore, communication among the processors is accomplished by means of a bounded-degree network. Thus, the emulation of a PRAM on a realistic machine has to take into account the latency introduced by the underlying network. In fact, the complete network of the MPC can be simulated on a bounded-degree network by viewing every communication step as an instance of (partial) permutation routing. This allows us to use the memory organization schemes designed for the MPC on any other parallel computer, multiplying the time complexity of the access protocol by an appropriate factor that represents the complexity of routing. This approach, however, may significantly deteriorate the performance, especially if the network has high diameter (e.g., on the mesh it introduces a factor pN ), and limits the memory organization scheme to deal only with the memory contention problem, whereas it could be designed to effectively reduce both memory contention and network congestion. In line with the above arguments, a number of authors have developed memory organization schemes for PRAM emulation directly on bounded-degree networks, without using the MPC as an intermediate stage. We now briefly recall some significant results of this kind. For what concerns randomized schemes, the most relevant is undoubtly the one due to Ranade [44], where M = N k variables are distributed among the N nodes of a butterfly network using a hash function randomly extracted from a universal class, so that any N variables can be accessed in O(log N ) time, with high probability. In this scheme (as in most randomized schemes) the use 64 of multiple copies is not necessary since worst-case scenarios are avoided in the probabilistic sense. In particular, the properties of the hash function, combined with a two-phase routing strategy [49], ensure both a low memory contention and a low network congestion. Ranade's work represent the state of the art for randomized schemes, since it attains optimal time on a bounded-degree network, and has an arguably practical implementation. Among the deterministic memory organization schemes quoted in the introduction to Chapter 4 we find some that have been specifically designed for bounded-degree networks, namely [19, 16, 20, 30, 17, 18]. As mentioned earlier, all of these investigations follow Upfal and Widgerson's approach and base the memory distribution on expanding bipartite graphs for which no explicit constructions are known. In [30] a memory organization scheme is presented with the following features: the N processors/modules are located at the roots of an N \Theta N mesh of trees, the number of PRAM variables is polynomial in N and there are \Theta (log N ) copies per variable. The scheme guarantees access to any set of N variables in O(log2 N= log log N ) time, in the worst case. The only currently possible implementation of this scheme requires that the underlying graph be randomly generated and that each processor store a complete memory map in his local memory, in order to be able to determine the physical address of each copy, a solution which is clearly impractical for large values of M . A solution to this problem, which affects most deterministic schemes, has been attempted by Herley. In [18] (which incorporates and improves a number of previous results [19, 16, 17]), the author presents memory organization schemes for two types of interconnections: the augmented mesh of trees, consisting of a mesh of trees with the roots connected by a binary tree, and an expander-based bounded-degree network. In both cases a polylogarithmic time complexity, the best to date, is attained with logarithmic redundancy. Furthermore, each processor is not required to store a copy of the memory map, which, instead, is viewed as a set of read-only shared data subdivided among the processors, with an ad-hoc protocol governing its access. This avoids the blow up in space at the expenses, however, of an involved implementation. In this chapter, we present a method to emulate a PRAM with N processors and M = N ff shared variables, for 1 ! ff ! 2, on an pN \Theta pN mesh. The core of the emulation is represented by what we call a Hierarchical Memory Organization Scheme (HMOS) that governs the distribution of the variables among the nodes of the mesh, where each node hosts a processor and a memory module. The HMOS consists of k levels of abstract modules for a suitably chosen value k * 1. First, each variable is replicated into q copies assigned to the modules of the first level. The contents of each such module are in turn replicated into q copies 65 assigned to the modules of the second level, and so on for k times. In this fashion qk copies for each variable are eventually generated. With each level of abstract modules is associated a tessellation of the mesh into submeshes of equal size, and each module of that level is physically realized by a distinct submesh. The assignment of the data stored by the modules at level i, to the modules of level i + 1, 1 ^ i ! k, is specified by a balanced incomplete block design, the same type of graph used for the memory organization scheme presented in Section 4.4. It must be pointed out that the idea of a hierarchical memory organization has been adopted by Herley in [18] for the implementation of the memory map. In order to take advantage of the structural properties of the HMOS, we devise a new consistency rule that enables us to select the copies to be accessed, for any given set of N variables, while controlling the congestion in each submesh. As a result, an ad hoc routing strategy is used, which guarantees that the selected copies be accessed in worst-case time T (N ) 2 8???!???: O iN 1 2 +fflj if ff ^ 32 and ffl is a fixed constant; O iN 1 2 + ff\Gamma 1 16 j if 32 ^ ff ^ 53; O iN 1 2 + 2ff\Gamma 3 8 j if 53 ^ ff ! 2; when qk 2 O(1), and T (N ) 2 O `N 1 2 i log Nlog log N j2:38' if ff ^ 32 ; when qk 2 O `i log Nlog log N j 1:59'. In all cases, q 2 O(1) is a fixed prime power, whereas k is a parameter. Note that an \Omega (N 1=2) lower bound applies to the time performance of any PRAM emulation on the mesh, due to the network diameter. The relevance of our result is twofold. (1) It is the first explicit deterministic PRAM emulation on a bounded-degree network, and, for a wide range of memory sizes, 1 ! ff ^ 3=2, its time complexity is nearly optimal, with respect to the network topology . (2) The hierarchical structure of the memory organization scheme and its expansion properties are used to control both memory contention and network congestion, so that the latter is not left exclusively to the routing protocol to be dealt with. A similar approach appears to be promising for any PRAM emulation on bounded-degree networks. The rest of the chapter is structured as follows. In the next section, we review some results concerning a specific routing problem arising in the access protocol. The HMOS and its realization on the mesh are presented in Section 5.3. In Section 5.4 we define the new 66 consistency rule used to guarantee the correctness of the operations, and present the access protocol for a set of N variables, distinguishing two phases: copy selection (Subsection 5.4.1) and routing (Subsection 5.4.2). Finally, in Section 5.5 we present the construction of subgraphs of a balanced incomplete block design with the edges evenly distributed among the nodes. Such subgraphs constitute the building blocks of the HMOS. The results of this chapter are reported in [40, 39]. 5.2 Routing on the Mesh Consider an (l1; l2)-routing problem on an N -node mesh where each processor sends at most l1 packets and receives at most l2 packets. The following theorem is proved in [45]. Theorem 18 Any (l1; l2)-routing can be performed on an N -node mesh in pl1l2N + O(l1pN ) steps. In the general case, this result is optimal [45], however we will show now that under certain conditions a better routing time can be achieved. Subdivide the mesh in N=t submeshes of t nodes each, with t 2 o(N ), and consider a (l1; l2)-routing problem where each submesh receives at most ffit packets, i.e., ffi is an upper bound to the average number of packets that each processor receives in any given submesh. Call this problem an (l1; l2; ffi; t)-routing. An algorithm that first sends each packet to its destination submesh and then to its final destination, within the submesh, turns out to be more efficient that the general (l1; l2)-routing algorithm, for certain values of the parameters. More specifically, the algorithm works as follows. Let the processors in each submesh be indexed from 0 to t \Gamma 1: 1. Sort all packets in the mesh according to their destination submeshes; 2. Label the packets destined to each submesh assigning consecutive numbers to them, in an arbitrary fashion; 3. Route all packets to their destination submeshes so that a packet with label i in its submesh is sent to the processor of index i mod t in the submesh; 4. Route all packets to their final destination. Sorting and labeling can be done in O(l1pN ) steps (see for example [24, 26]), and the two routing stages require, using Theorem 18, pl1ffiN + O(l1pN) and pffil2t + O(ffipt) steps, 67 respectively. If l1 ^ ffi ^ l2 (as will be the case in our scheme) we have that the total time complexity is O(pffi(pl1N + pl2t)): (5.1) Comparing the O(pl1l2N ) complexity of the general (l1; l2)-routing with the above formula, we conclude that the (l1; l2; ffi; t)-routing algorithm is more profitable when both l1 and ffi are o(l2) and pffit 2 o(pl1N). These ideas will be exploited in the access protocol of the HMOS, where routing problems of the kind (l1; l2) have to be solved in order to access the copies of the variables. Several tessellations of the mesh into submeshes are defined, and bounds on the number of packets destined to each submesh, ensured by a careful copy selection, allow us to adopt the more efficient routing strategy explained above, by routing the packets gradually to their destinations through a sequence of increasingly smaller submeshes. 5.3 The HMOS The core of our PRAM emulation is represented by the HMOS, a hierarchical structure that specifies how M = N ff shared variables, with 1 ! ff ! 2, are distributed among N processors arranged in a square mesh1. The HMOS consists of k levels of abstract modules. We call i-modules the abstract modules at level i, 1 ^ i ^ k, and, for homogeneity, we call the variables 0-modules. There are mi 2 \Theta (N ff=2 i) i-modules, 0 ^ i ^ k (the exact value of m i, 1 ^ i ^ k will be given later). First each variable (0-module) is replicated into q copies, assigned to distinct 1-modules. The contents of each 1-module, viewed as an indivisible block, are in turn replicated into q copies, called 1-blocks assigned to distinct 2-modules. Thus, each 2-module consists of a number of 1-blocks. This process is iterated k times. In general, for 0 ^ i ! k, the contents of each i-module are replicated in q copies, called i-blocks, which are assigned to distinct (i + 1)-modules. The contents of k-modules are not replicated and the terms k-module and k-blocks will be used indistinguishably. It is crucial to understand the difference between i-modules and i-blocks. An i-module represents and abstract entity of which several physical replicas, i-blocks, exist. We will often say "an i-block b of i-module u", meaning that b is a replica of u. It is also important to notice that i-modules, and therefore their i-blocks, consist of (i \Gamma 1)-blocks which, in turn, consist of (i \Gamma 2)-blocks, and so on. 1Observe that the range of values for ff ensures memory sizes sufficiently large for most applications. 68 k-module (k-1)-block (k-2)-block Figure 5.1 A k-module It is easy to see that, in this fashion, qk\Gamma i i-blocks are generated for each i-module, for 1 ^ i ^ k, and qk copies are generated for each variable (0-module). The assignment of i-blocks to (i + 1)-modules is done in such a way that every (i + 1)-module receives approximately miq=mi+1 i-blocks. Observe that higher numbered levels consist of fewer and larger modules. Figure 5.1 illustrates the structure of a k-module. The HMOS is conveniently represented by means of a k-stage cascade of bipartite graphs, namely G = (U0; : : : ; Uk; E1; : : : ; Ek), where Ui, 0 ^ i ^ k, denotes the set of i-modules, and Ei, 1 ^ i ^ k, the set of edges between Ui\Gamma 1 and Ui. There are q edges incident to every i-module, reaching the (i + 1)-modules that store its blocks. The structure of G is shown in Figure 5.2. For 0 ! i ^ k, the graph (Ui\Gamma 1; Ui; Ei), which connects level i \Gamma 1 with level i, is chosen as a subgraph of a balanced incomplete block design, as explained below. Let q 2 O(1) be a prime power and assume N ff = qd\Gamma 1 q d \Gamma 1 q \Gamma 1 ; for some integer d. Consider the sequence of integers d1; : : : ; dk, defined as follows: d1 = d; di+1 = ddi=2e + 1; 1 ^ i ! k: Since the 0-modules are the variables, we set m0 = N ff, and, for 1 ^ i ! k, we set mi = qdi. 69 q q qq ( )UiUi-1 iE, ; (variables) 0-modules 1-modules (i-1)-modules i-modules k-modules Figure 5.2 The graph G Claim 3 For 0 ^ i ^ k mi 2 \Theta (N ff=2 i) Proof: For i = 0, the claim follows immediately from the definition. By induction on i * 1, we prove that mi = cN ff=2 i where c 2 [pq(q \Gamma 1); q3]. Simple calculations show thatq q(q \Gamma 1)N ff=2 ^ m1 ^ qN ff=2 ! q3N ff=2; which establishes the basis. Suppose pq(q \Gamma 1)N ff=2 i ^ m i ^ q3N ff=2 i and consider m i+1. Recall that ml = qdl, for any l * 1. We have two cases. If di is odd, then di+1 = di+32 and mi+1 = pq3mi. Otherwise, di+1 = di+22 and then mi+1 = pq2mi. It is easy to see that in both cases the bound holds, extending the inductive hypothesis. 2 Consider a (qdi; q)-BIBD, which, as is well known, has qdi\Gamma 1 q di \Gamma 1 q\Gamma 1 inputs, qd i outputs and input degree q. Simple calculations show that qdi\Gamma 1 q di\Gamma 1 q\Gamma 1 * mi\Gamma 1, for any i ? 0, thus we can choose the graph (Ui\Gamma 1; Ui; Ei) as a subgraph of a (qdi; q)-BIBD, where qdi\Gamma 1 q di\Gamma 1 q\Gamma 1 \Gamma qd i input 70 nodes are removed. This is the smallest BIBD with more than qdi\Gamma 1 inputs. In Section 5.5 we give an explicit construction for a subgraph of a BIBD with fewer inputs and such that each output receives, from these inputs, approximately the same number of edges. In particular, this will provide a construction for (Ui\Gamma 1; Ui; Ei) so that each i-module receives pi (i \Gamma 1)-blocks, where b qmi\Gamma 1 mi c ^ pi ^ d qmi\Gamma 1 mi e (5.2) Furthermore, we will show that the construction allows us to determine in time O(di) = O(log N ) the i-module storing a given (i \Gamma 1)-block, and the location of the block within the module (Theorem 23). This result will be assumed until Section 5.5. The graph G is physically mapped onto the network by defining k tessellations of the mesh into submeshes of equal size, where the processors of each submesh of the ith tessellation store the contents of a distinct i-block. We proceed as follows. Define the outermost tessellation as a subdivision of the mesh into mk submeshes, called k-submeshes, each of size tk = Nm k 2 \Theta (N 1\Gamma ff=2k): Each k-submesh implements a distinct k-module. Consider a k-submesh and let u be the module associated with it. Since u stores pk (k \Gamma 1)-blocks, we subdivide the mesh into pk submeshes, called (k \Gamma 1)-submeshes, each storing a distinct block. The size of each (k \Gamma 1)-submesh is tk\Gamma 1 = tk 1p k : Since a (k \Gamma 1)-block is a replica of a (k \Gamma 1)-module, the process can be iterated by subdividing each (k \Gamma 1)-submesh into pk\Gamma 1 (k \Gamma 2)-submeshes, and so forth. In general, for 1 ^ i ! k, a (i + 1)-submesh is subdivided into pi+1 i-submeshes of size ti = Nm k 1 pk \Delta pk\Gamma 1 \Delta \Delta \Delta pi+1 ; each implementing a distinct i-block. By Claim 3 and Equation (5.2) we obtain ti 2 \Theta ` Nqk\Gamma im i ' = \Theta iq \Gamma (k\Gamma i)N 1\Gamma ff=2ij 1 ^ i ^ k: (5.3) Thus, a 1-block, which contains p1 2 \Theta (qN ff=2) copies of distinct variables, is assigned to a submesh of size t1 and, assuming the p1 copies evenly distributed among the processors of the 71 submesh, we have that each processor receives p1=t1 2 \Theta (qkN ff\Gamma 1) copies, which also implies that the qkN ff copies of all the variables are evenly distributed among the N processors of the mesh. 5.4 Access protocol We have argued before how the redundancy, i.e., the use of multiple copies for each variable, is essential in any deterministic memory organization scheme, in order to avoid a high memory contention (Theorem 6). The crucial idea is that to read or write a variable one needs to perform the operation only on some of the copies, which can be carefully chosen so that memory conflicts are minimized. Clearly, a sufficient number of copies has to be accessed to guarantee consistency. With the exception of the scheme by Mehlhorn and Vishkin [32], where a read needs to reach only one copy and a write has to reach all of the copies, all other schemes known in the literature require that any operation (read or write) access a majority of the copies, that is, br=2c + 1, if r copies per variable are used. This strategy is very general and has been exclusively used to reduce memory contention. In a memory organization scheme where the processors are connected by a bounded degree network, however, it is important to guarantee not only that each module receive a limited number of requests, but also that the requests be routed efficiently through the network. Thus, the selection of the copies to be accessed for each variable should have the double objective of controlling both memory contention and network congestion. For the HMOS we devise a new consistency rule that fits its hierarchical structure and allows the copy selection to achieve both objectives. In the HMOS, a variable v is replicated into qk copies. Such copies can be thought of as being organized in a labeled, complete q-ary tree Tv of k + 1 levels, as follows. The root, which is at level 0, is labeled with the name of the variable v, and its q children with the names of the 1-modules storing the copies of v. For 1 ^ i ! k, given an internal node at level i of label u (u is the name of an i-module), its q children are labeled with the names of the (i + 1)-modules storing the blocks of u. The actual copies of v are represented by qk distinct paths from the root to the leaves of Tv. More specifically, let ss = hvu1u2 : : : uki be such a path, where the ui's are the labels of the internal nodes on the path. The copy associated with ss resides in a blocks of 1-module u1, which resides in a block of u2, and so forth up to k-module uk. Consider a subset S of copies of v, and mark the nodes of Tv on the paths associated with these copies. 72 Definition 8 A leaf of Tv is satisfied by S if it is marked. A node of Tv at level i, 0 ^ i ^ k \Gamma 1 is satisfied by S if it is marked and at least a majority bq=2c + 1 of its children is satisfied. Our new consistency rule prescribes that: a read or write operation on a variable v is successfully completed if it reaches a subset of copies that satisfies the root of Tv, according to the above definition. As in [13, 47, 48], a copy is time-stamped every time it is written. It is easy to see that the rule guarantees that a write operation updates enough copies of v so that any subsequent read will reach at least one updated copy, which can be retrieved by looking at the most recent time-stamp. Any set of copies that satisfies the root of Tv will be called a target set for the variable v. A minimal target set is a target set that does not properly include another target set. Note that the nodes of Tv satisfied by a minimal target set form a complete (bq=2c + 1)-ary subtree. Suppose each of the N processors issues a request (read or write) for a distinct variable2. Let R denote the set of requested variables. The access protocol, which specifies how the variables are accessed in parallel by the processors, consists of two phases: 1. Copy selection 2. Routing. The copy selection phase determines, for each v 2 R, a minimal target set Cv, so that the number of copies in Sv2R Cv stored by the processors of any single submesh of the previously defined tessellations, is conveniently bounded. In the routing phase, for each selected copy, a request packet, specifying the address of the copy and the operation to be performed, is sent to the processor that stores the copy. The processor executes the operation and sends back a return packet with the result (if applicable). The two phase are described in detail in the following subsections. 5.4.1 Copy selection This phase is implemented by the procedure copy-selection executed in parallel by the N processors of the mesh. The idea is to start, for each variable, from a target set, suitably chosen, and successively eliminate some of the copies so that the remaining copies still form a target set but the congestion in the submeshes of the network is reduced. In order to describe 2As for the memory organization schemes of the previous chapter, we consider here only a complete set of N requests. The case of fewer than N requests and/or multiple requests for the same variable can be dealt with in a similar fashion and requires minor modifications. 73 v v Minimal 1-target set Minimal target set 0 1 2 Level Figure 5.3 Minimal 1-target set vs minimal target set the procedure in detail we need a more refined notion of target set and minimal target set, based on the following definition, which is a modification of Definition 8. Let S be a subset of copies of v and mark the nodes of Tv relative to the copies in S. Definition 9 Let 0 ^ i ^ k. A leaf of Tv is i-satisfied by S if it is marked. A node of Tv at level j * i is i-satisfied by S if it is marked and more than a majority (i.e., at least bq=2c + 2) of its children are i-satisfied. A node of Tv at level j ! i is i-satisfied by S if it is marked and at least a majority of its children is i-satisfied. Any set of copies that i-satisfies the root of Tv will be called an i-target set for the variable v. A minimal i-target set is an i-target set that does not properly include another i-target set. Note that, a minimal i-target set includes a minimal j-target set, for any j * i, and, in particular, includes a minimal k-target set which is the same as a minimal target set. In Figure 5.3 the difference between a minimal 1-target set and a minimal target set is shown, for q = 5 and k = 2. copy-selection works as follows. At the beginning an arbitrary minimal 0-target set C(0)v is determined, for any v 2 R. Then, k iterations are executed, indexed from 1 to k. The ith iteration determines, for any v 2 R, a minimal i-target set C(i)v , obtained as subset of C(i\Gamma 1)v , the minimal (i \Gamma 1)-target set left from the previous iteration. The goal of the ith iteration is to reduce the number of selected copies belonging to any single i-block. (Recall that i-blocks are assigned to distinct i-submeshes in the network, therefore this guarantees a bound to the congestion in each submesh, which will be exploited in the routing phase.) First, a subset of all the copies in Sv2R C(i\Gamma 1)v is marked, so that at most 2qkN 1\Gamma 1=2 i marked copies belong to a single i-block. Let M (i)v 2 C(i\Gamma 1)v be the set of marked copies for variable v. If M (i)v contains an i-target set, then a minimal i-target set C(i)v is extracted from it. Otherwise, C(i)v is extracted from C(i\Gamma 1)v which, by construction, is a minimal (i \Gamma 1)-target set and therefore must contain 74 procedure copy-selection; begin foreach variable v 2 R do choose a minimal 0-target set C(0)v ; for i := 1 to k don\Lambda iteration i \Lambda n foreach i-block b do Mark at most 2qkN 1\Gamma 1=2 i arbitrary copies of S v C (i\Gamma 1)v stored in b; foreach variable v 2 R do Let M (i)v ` C(i\Gamma 1)v be the set of marked copies for v; if M (i)v contains an i-target set for v then extract a minimal i-target set C(i)v from M (i)v else extract a minimal i-target set C(i)v from C(i\Gamma 1)v endforeach-v endfor-i; Cv := C(k)v end. Figure 5.4 Procedure copy-selection a minimal i-target set. We will now prove that less than 4qkN 1\Gamma 1=2 i of the copies in S v2R C (i)v belong to a single i-block3. The set C(k)v , obtained at the end of the kth iteration, constitutes the final (minimal) target set Cv for v, i.e., the set of copies that will be actually accessed. The code of the procedure is given in Figure 5.4. In order to show that, indeed, at the end of the ith iteration each i-block contains fewer than 4qkn1\Gamma 1=2 i copies in S v C (i)v , we need a property of the graph (Ui\Gamma 1; Ui; Ei) that specifies how the (i \Gamma 1)-blocks are assigned to the i-modules. Lemma 23 Let u 2 Ui and consider a subset S ae Ui\Gamma 1 such that for any w 2 S, (w; u) 2 Ei. For each w in S fix h ^ q outgoing edges, and let \Gamma h(S) denote the set of nodes of Ui reached by these edges. Then j \Gamma h(S)j * (h \Gamma 1)jSj + 1: Proof: Since (Ui\Gamma 1; Ui; Ei) is a subgraph of a BIBD, the nodes of S have only one common neighbor, namely u. Let l be the number of selected edges incident on u. Clearly l ^ jSj. Thus, if l 6= 0 we have j\Gamma h(S)j * (hjSj \Gamma l) + 1 * (h \Gamma 1)jSj + 1. Otherwise, we have j\Gamma h(S)j = hjSj * (h \Gamma 1)jSj + 1. 2 3The choice of the value 4qkN1\Gamma 1=2i will be made clear by the analysis. 75 Theorem 19 For 1 ^ i ^ k, at the end of the ith iteration of copy-selection, each i-block b contains less than 4qkN 1\Gamma 1=2 i of the copies in S v2R C (i)v . Proof: The proof proceeds by induction on i * 1. For the basis (i = 1) consider a 1-block b and let W be the set of copies stored in b which are in Sv2R C(1)v . For a contradiction, supposej W j * 4qkN 1=2. Observe that b consists of copies of distinct variables, therefore the copies in W belong to distinct variables. The procedure implies that jW " [ v2R M (1)v j ^ 2qkN 1=2: Therefore, at least jW j \Gamma 2qkN 1=2 * 2qkN 1=2 of the copies in W belong to Sv2R[C(1)v \Gamma M (1)v ] aeS v2R C (0)v . Let R1 ae R be the set of variables relative to these copies. Thus, for each v 2 R1, C(1)v \Gamma M (1)v 6= ;. This implies that M (1)v does not contain a 1-target set for v, i.e., M (1)v 1- satisfies at most bq=2c children of the root of Tv. But, since C(0)v is a 0-target set for v, then C(0)v 0-satisfies at least bq=2c + 2 children of the root of Tv. From this fact, it is easy to conclude that there must be at least two copies of v that were in C(0)v but did not make it to M (1)v . Furthermore, these copies must stored into two blocks, say b1 and b2, of two distinct 1-modules, say u1 and u2, which have overflown the threshold capacity, i.e., each block contains more than 2qkN 1=2 of the copies in Sv2R C(0)v . In summary, we have found jR1j * 2qkN 1=2 variables all of which store a copy in b and also store copies in at least two blocks, of distinct 1-modules, which contain more than 2qkN 1=2 of the copies in Sv2R C(0)v . The situation is illustrated in Figure 5.5 on the graph (U0; U1; E1) where ub indicates the 1-module of which b is a replica. By applying the result of Lemma 23 (with h = 2) we conclude that there must be at least jR1j + 1 1-blocks that have overflown. But this accounts for (jR1j + 1) \Delta (2qkN 1=2) ? 4q2kN copies of variables in R, which leads to a contradiction, since there exist only qkN such copies. The inductive step is proved by a similar argument, but it is slightly complicated by the fact that we deal with i-blocks that consists, internally, of (i \Gamma 1)-blocks, whereas 1-blocks simply consists of copies of variables. Assume the theorem holds for i \Gamma 1 * 1 and consider index i. Suppose, for a contradiction, that there is an i-block b that stores at least 4qkN 1\Gamma 1=2 i of the copies in Sv2R C(i)v . As before, at most 2qkN 1\Gamma 1=2 i of these copies come from S v2R M (i)v , therefore the remaining one, at least 2qkN 1\Gamma 1=2 i, are in S v2R[C (i)v \Gamma M (i)v ] ae S v2R C (i\Gamma 1)v . Now, 76 ub R1 u1 u2 v 1U 0U Figure 5.5 For each v 2 R1 there exist two modules u1 and u2 which have blocks that have overflown b consists of (i \Gamma 1)-blocks, each of which, by inductive hypothesis, stores at most 4qkN 1\Gamma 1=2 i\Gamma 1 of the copies in Sv2R C(i\Gamma 1)v . Thus, there are at least 2qkN 1\Gamma 1=2 i 4qkN 1\Gamma 1=2i \Gamma 1 = N 1=2i 2 (i \Gamma 1)-blocks, within b, that store copies of Sv2R[C(i)v \Gamma M (i)v ]. By construction, these (i \Gamma 1)- blocks must be replicas of distinct (i \Gamma 1)-modules. Let Z be the set of such modules and let ub be the i-module relative to b. For any u 2 Z there is at least a variable v 2 R such that some of its copies, which are in C(i)v \Gamma M (i)v ae C(i\Gamma 1)v , are stored in a block of u inside b. Since C(i\Gamma 1)v is an (i \Gamma 1)-target set for v and it is minimal, there is a node of Tv, labeled u, which is (i \Gamma 1)-satisfied by C(i\Gamma 1)v , i.e., at least bq=2c + 2 of its children are (i \Gamma 1)-satisfied. However, the same node is not i-satisfied by M (i)v (because copies that are stored in a block of u have been added to M (i)v to form C(i)v ), i.e., at most bq=2c of its children are i-satisfied. Let u1 and u2 the labels of two children of the node labeled u, which are (i \Gamma 1)-satisfied by C(i\Gamma 1)v but are not i-satisfied by M (i)v . Then, there must be two copies of v that belong to C(i\Gamma 1)v \Gamma M (i)v and are stored in two blocks of u1 and u2, respectively. Since these copies have been excluded from M (i)v , this means that each the two blocks have overflown, i.e., contained more than 2qkN 1\Gamma 1=2 i copies of Sv2R C(i\Gamma 1)v . The situation is thus analogous to the one before, and is illustrated in Figure 5.6 on the graph (Ui\Gamma 1; Ui; Ei). We conclude, applying Lemma 23, that there are at 77 ub u1 u2 u Z Ui-1 Ui Figure 5.6 For each u 2 Z there exist two modules u1 and u2 which have blocks that have overflown least jZj + 1 ? N 1=2i 2 distinct i-blocks with more than 2qkN 1\Gamma 1=2 i copies of S v2R C (i\Gamma 1)v . This accounts for more than qkN copies of variables in R, a contradiction. 2 We now analyze the time complexity of copy-selection. As we said earlier, the procedure is executed in parallel by the N processors of the mesh, each processor being in charge of a distinct variable. It is easy to see that the selection of the copies at the ith iteration can be accomplished by first sorting the copies according to their destination i-block and then ranking the copies destined to the same block. Since there are at most N qk copies, sorting and ranking take O(qkpN ) time [24, 26]. Also, each processor must check whether an i-target set for its variable is included in the selected copies, and then must extract a minimal target set. This can be done in O(qk) time. Since there are k iterations, the time complexity of copy-selection is Tcs 2 O(kqkpN); (5.4) and each processor uses O(qk) internal storage. 5.4.2 Routing In the routing phase, the copies selected for the variables in R (i.e., Sv2R Cv) are accessed in parallel by the processors of the mesh. Each processor, which is in charge of one variable, creates a distinct request packet for every copy of the variable in the selected target set. A 78 packet specifies the address of the processor issuing the request (origin), the address of the processor where the copy resides (destination), and the operation to be performed (read or write). The packets are routed in parallel from the origins to the destinations, where the accesses are completed. Then, the packets relative to read operations are sent back to the origins, carrying the data. Consider the origin-destination part of the journey. Instead of going directly their destinations, the packets are sent, in stages, to progressively smaller submeshes containing the destinations. As explained in Section 5.2, this strategy results more profitable when, in each stage, the number of packets destined to any submesh is conveniently bounded, which, in our case, is ensured by Theorem 19. More specifically, there are k + 1 routing stages, numbered, for convenience, from k + 1 down to 1. Stage i, k + 1 * i * 1, is executed in parallel and independently in every i-submesh (the original mesh is viewed here as the only (k + 1)-submesh). In Stage i the packets are routed to arbitrary positions within the (i \Gamma 1)-submeshes that contain their destinations, in such a way that the processors of each submesh receive, approximately, the same number of packets. This can be achieved by first sorting the packets according to their destination submeshes, and ranking the packets destined to the same submesh so that they can be evenly distributed among the processors of the submesh. In the last stage, Stage 1, each packet is sent to its destination and the operation it specifies is executed. Let us analyze the time complexity of each stage. Let ffii, for k + 1 * i * 1, denote the (maximum) number of packets held by any processor at the beginning of Stage i. Clearly, ffik+1 ^ qk. For i ^ k, ffii can also be seen as the number of packets received by any processor at the end of the Stage i + 1. By Theorem 19, an i-submesh (which realizes an i-block) is destination of less than 4qkN 1\Gamma 1=2 i packets, and since there are t i processors in the submesh, by Equation 5.3 we get ffii ! 4q kN 1\Gamma 1=2i ti 2 \Theta iq 2k\Gamma iN (ff\Gamma 1)=2ij k * i * 1: (5.5) Let tk+1 = N , which represents the size of the entire mesh. For k + 1 * i ? 1 the time complexity of Stage i is Ti 2 O `ffiipti + `qffiiffii\Gamma 1 + ffii' pti' ; 79 where the term ffiipti accounts for the complexity of sorting and ranking [24, 26], and the termip ffiiffii\Gamma 1 + ffiij pti for the complexity of the (ffii; ffii\Gamma 1)-routing problem involved in this stage (Theorem 18). Observing that ffii ^ ffii+1, we obtain Ti 2 O ipffiiffii\Gamma 1tij. Consider now Stage 1. Note that, at the beginning, each processor holds ffi1 packets, and, at the end, it receives at most ffi0 2 O(min(qkN 1=2; qkN ff\Gamma 1)): (5.6) packets, where the first term in the minimum accounts for all the packets received by the 1- submesh containing the processor (less than 4qkN 1=2 by Theorem 19), and the second term for the total number of copies assigned to the processor by the HMOS (\Theta (qkN ff\Gamma 1), as observed at the end of Section 5.3). No sorting or ranking is needed in this stage, which, therefore, consists only of an instance of (ffi1; ffi0)-routing, executed in time T1 2 O iipffi1ffi0 + ffi1j pt1j : As for the second part of the routing, where, for read operations, the accessed data are sent back to the requesting processors, the packets follow, backwards, the same paths that brought them to the destination, going through the k intermediate nodes whose addresses have been recorded along the way. It is easy to see that the complexity of this second part of the routing is dominated by that of the first part. Thus, we can conclude that the entire routing is completed in time Trouting ^ 2 1X i=k+1 Ti: By (5.3), (5.5) and (5.6), we get Tk+1 2 O `qkN 1 2 + ff\Gamma 1 2k+1 ' ; Ti 2 O `q 3k\Gamma i+1 2 N 1 2 + 2ff\Gamma 3 2i+1 ' k * i * 2; T1 2 O iqkN 1 2 j : Therefore, Trouting 2 O qkN 1 2 + ff\Gamma 1 2k+1 + kX i=2 ` q 3k\Gamma i+1 2 N 1 2 + 2ff\Gamma 3 2i+1 '! : (5.7) 80 Finally, by applying (5.4) and (5.7), we obtain the total time complexity of the access protocol, which is given by Tprotocol = Tcs + Trouting = O qkN 1 2 k + N ff\Gamma 1 2k+1 + q k+1 2 kX i=2 ` q\Gamma i 2 N 2ff\Gamma 3 2i+1 '!! : (5.8) We are now ready to state our main theorem. Theorem 20 N ff variables, 1 ! ff ! 2, can be distributed among N processors connected by a square mesh, with redundancy qk, so that any set of N distinct variables can be accessed in worst-case time T (N ) 2 8???!???: O iN 1 2 +fflj if ff ^ 32 and ffl is a fixed constant; O iN 1 2 + ff\Gamma 1 16 j if 32 ^ ff ^ 53; O iN 1 2 + 2ff\Gamma 3 8 j if 53 ^ ff ! 2; when qk 2 O(1), and worst-case time T (N ) 2 O `N 1 2 i log Nlog log N j2:38' if ff ^ 32 ; when qk 2 O `i log Nlog log N j 1:59'. Proof: First note that both Tprotocol and qk are increasing functions of q, therefore it is convenient to use the smallest possible q. The construction of the HMOS (whose details are given in the following section) requires q to be a prime power, and the particular strategy adopted for copy selection requires bq=2c+2 ^ q. These two conditions are satisfied by choosing q = 3. In the rest of the proof, we use such value for q. Also, unless differently specified, the logarithms are taken to the base 2. Let us first consider schemes with constant redundancy. Fix ff ^ 32 and let ffl be a constant, 0 ! ffl ! 1. Then if k = ,log `max `2; ff \Gamma 12ffl ''ss ; (5.8) yields qk 2 \Theta (1); Tprotocol 2 O iN 1 2 +fflj : 81 For ff * 32 , the time complexity is minimized by taking k = 3. In this case we get: Tprotocol 2 8!: O iN 1 2 + ff\Gamma 1 16 j if 32 ^ ff ^ 53 ; O iN 1 2 + 2ff\Gamma 3 8 j if ff * 53 : Note that for values of ff approaching the upper bound 2, the above formulas yield a complexity of O(N 5=8) with redundancy qk = 27. However, the same time complexity can be obtained with smaller redundancy, by taking k = 2, i.e., qk = 9. Consider now the case of nonconstant redundancy. Let ff ^ 32 and let k = log ` log Nlog log N ' : Thus, qk = ` log Nlog log N ' log2 q ' ` log N log log N ' 1:59 : Simple calculations show that N ff\Gamma 1 2k+1 2 O(q k+1 2 ), therefore Tprotocol 2 O iN 1 2 q 3 2 kj ' O N 1 2 ` log Nlog log N ' 2:38! : 2 5.5 Subgraph of a balanced incomplete block design In this section, we show how to construct a bipartite graph G = (V; U ; E) which is a subgraph of a (qd; q)-BIBD with the same number of output nodes, i.e., jU j = qd, fewer input nodes, say jV j = m, with 1 ^ m ^ qd\Gamma 1 q d\Gamma 1 q\Gamma 1 , and such that each input v 2 V has degree q, as in the BIBD, and each output u 2 U has degree ae,_ qm qd * ^ ae ^ , qm qd ss : In other words, we want to select a subset of inputs from the BIBD, such that the edges incident on these inputs are distributed among the outputs as evenly as possible. The construction we present here appears different from the constructions of the previous chapter and, in particular, the one of the BIBD given in Section 4.4.2, in that we do not use quotients of the 82 projective linear group to represent nodes and edges in the graph. However, it can be shown that the two types of constructions are equivalent and, in fact, isomorphic. Let q be a prime power and let the elements of the field Fq be denoted by the integers 0; 1; : : :; q \Gamma 1. Let associate U with the set of d-dimensional vectors over Fq , i.e., U = f(ad\Gamma 1; : : : ; a1; a0) : ai 2 Fq g and consider pairs of vectors of the kind8! : (ad\Gamma 2; : : : ; ah; 0; ah\Gamma 1; : : : ; a1; a0) (0; : : : ; 0; 1; bh\Gamma 1; : : : ; b1; b0) 9=; where h is any value between 0 and d \Gamma 1, and the ai's and bi's are elements of Fq . Let us denote such pair by \Phi (h; A; B), where A is the integer in [0; qd\Gamma 1) whose representation in base q is (ad\Gamma 2 : : : ahah\Gamma 1 : : : a1a0), and B is the integer in [0; qh) whose representation in base q is (bh\Gamma 1 : : : b1b0). It is easy to see that there are d\Gamma 1X h=0 qd\Gamma 1qh = qd\Gamma 1 q d \Gamma 1 q \Gamma 1 distinct pairs. We associate the m inputs of G with m pairs chosen as follows. Let 0 ^ l ! d be the unique integer such that qd\Gamma 1 q l \Gamma 1 q \Gamma 1 ^ m ! q d\Gamma 1 ql+1 \Gamma 1 q \Gamma 1 : Then, there exist unique integers w, 0 ^ w ! ql and z, 0 ^ z ! qd\Gamma 1 such that m = qd\Gamma 1 q l \Gamma 1 q \Gamma 1 + w! + z; (5.9) The set of pairs we select consists of the union of the three sets V1; V2 and V3 defined below: V1 = n\Phi (h; A; B) : 0 ^ h ! l; 0 ^ A ! qd\Gamma 1; 0 ^ B ! qho ; V2 = n\Phi (l; A; B) : 0 ^ A ! qd\Gamma 1; 0 ^ B ! wo ; V3 = f\Phi (l; A; w) : 0 ^ A ! zg : 83 Note that jV1j = qd\Gamma 1 l\Gamma 1X h=0 qh = qd\Gamma 1 q l \Gamma 1 q \Gamma 1 jV2j = qd\Gamma 1w jV3j = z; therefore, jV1j + jV2j + jV3j = m. A node v 2 V , associated with8! : (ad\Gamma 2; : : : ; ah; 0; ah\Gamma 1; : : : ; a1; a0) (0; : : : ; 0; 1; bh\Gamma 1; : : : ; b1; b0); 9=; is connected to the q output nodes (ad\Gamma 2; : : : ; ah; x; ah\Gamma 1 + xbh\Gamma 1; : : : ; a1 + xb1; a0 + xb0) for every x 2 Fq , with addition and multiplication in the field. Clearly, these outputs are distinct. Thus, we have constructed a graph G with m inputs, qd outputs and input degree q. The following two theorems show that G is indeed a subgraph of a (qd; q)-BIBD and that the edges are evenly distributed among the outputs. Theorem 21 G is a subgraph of (qd; q)-BIBD. Proof: It is sufficient to prove that for any u1; u2 2 U , u1 6= u2, there is at most one node of V adjacent to both. Fix u1 and u2 and let v 2 V , associated with the pair8! : (ad\Gamma 2; : : : ; ak; 0; ak\Gamma 1; : : : ; a1; a0) (0; : : : ; 0; 1; bk\Gamma 1; : : : ; b1; b0); 9=; be adjacent to u1 and u2. We must have u1 = (ad\Gamma 2; : : : ; ak; x; ak\Gamma 1 + xbk\Gamma 1; : : : ; a1 + xb1; a0 + xb0) u2 = (ad\Gamma 2; : : : ; ak; y; ak\Gamma 1 + ybk\Gamma 1; : : : ; a1 + yb1; a0 + yb0) 84 for some x; y 2 Fq, x 6= y. Suppose another v0 2 V is adjacent to both u1 and u2 and let v0 = 8!: (a0d\Gamma 2; : : : ; a0h; 0; a0h\Gamma 1; : : : ; a01; a00)(0; : : : ; 0; 1; b0 h\Gamma 1; : : : ; b01; b00): 9=; Then, we must have u1 = (a0d\Gamma 2; : : : ; a0h; x0; a0h\Gamma 1 + xb0h\Gamma 1; : : : ; a01 + x0b01; a00 + x0b00) u2 = (a0d\Gamma 2; : : : ; a0h; y0; a0h\Gamma 1 + y0b0h\Gamma 1; : : : ; a01 + y0b1; a00 + y0b00) for some x0 6= y0. Observing the two representations for u1 and u2, we note that the first component from the left where they differ is the (d \Gamma k)th, in one case, and the (d \Gamma h)th in the other. This obviously implies h = k and, therefore, y0 = y, x0 = x and a0i = ai, for k ^ i ^ d \Gamma 2. Also, for 0 ^ i ^ k \Gamma 1, ai + xbi = a0i + xb0i ai + ybi = a0i + yb0i which, since x 6= y, implies bi = b0i and ai = a0i, 0 ^ i ^ k \Gamma 1. Therefore, v = v0. 2 Theorem 22 Any node u 2 U is adjacent to ae nodes of V , where_ qm qd * ^ ae ^ , qm qd ss : Proof: Let u = (ad\Gamma 1; : : :; a0). We determine the value of ae by counting separately the contributions of the nodes in the three subsets V1; V2 and V3. Consider V1 and fix h ! l. Using the properties of field operations, one can easily show that for any B, 0 ^ B ! qh, there exists exactly one value A such that the node \Phi (h; A; B) is adjacent to u. Therefore, there are exactlyP l\Gamma 1s=0 qh = ql\Gamma 1 q\Gamma 1 nodes of V1 connected to u. A similar arguments shows that exactly w nodes of V2 are connected to u. Finally, it can be seen that the z nodes of V3 are connected to qz distinct output nodes, therefore, according to whether u is one of such nodes or not, we have that either ae = q l\Gamma 1 q\Gamma 1 + w or ae = ql\Gamma 1 q\Gamma 1 + w + 1. By (5.9) we conclude that_ qm qd * ^ ae ^ , qm qd ss : 2 85 Recall that graphs like G are needed in the HMOS to specify how (i \Gamma 1)-blocks are distributed among i-modules. Let V = Ui\Gamma 1 represent the set of (i \Gamma 1)-modules and U = Ui the set of i-modules, so that d = di and m = qdi\Gamma 1 (see Section 5.3). Each (i \Gamma 1)-module is adjacent to q i-modules that contain its blocks, and, accordingly, each i-module is adjacent to ae (i \Gamma 1)-modules, i.e., it consists of blocks of these (i \Gamma 1)-modules. For each (i \Gamma 1)-module, we must be able to efficiently determine the i-modules that store its blocks and the location of each block within its module. As usual, we assume that operations in Fq take constant time. It is easy to establish a bijection between the (i \Gamma 1)-modules and the pairs \Phi (h; A; B) in V so that given and index s, 1 ^ s ^ m, the pair associated with the sth module is determined in O(d) time. Similarly, a bijection between the i-modules and the d-dimensional vectors over Fq is easily established. Consider an the (i \Gamma 1)-module associated with the pair \Phi (h; A; B) = 8!: (ad\Gamma 2; : : : ; ah; 0; ah\Gamma 1; : : : ; a1; a0)(0; : : : ; 0; 1; b h\Gamma 1; : : : ; b1; b0) 9=; We adopt the convention that, for 0 ^ j ! q the j + 1st block of this module is the lth block stored into the i-module u, where u = (ad\Gamma 2; : : : ; ah; j; ah\Gamma 1 + jbh\Gamma 1; : : : ; a1 + jb1; a0 + jb0): and l = q h \Gamma 1 q \Gamma 1 + B: Lemma 24 No two (i \Gamma 1)-blocks are assigned, by the above rule, to the same location of the same i-module. Proof: Suppose that two (i \Gamma 1)-modules, namely \Phi (h; A; B) and \Phi (h0; A0; B0) store their j + 1st and j0 + 1st blocks, respectively into the same location l of i-module u. By construction, we have l = q h \Gamma 1 q \Gamma 1 + B = qh 0 \Gamma 1 q \Gamma 1 + B0 which implies h = h0 and B = B0, since B ! qh and B0 ! qh 0 . But then, arguing as in the proof of Theorem 21, we can easily conclude that j = j0 and A = A0. 2 Theorem 23 For 1 ^ i ^ k the graph (Ui\Gamma 1; Ui; Ei) can be effectively implemented so that a processor is able to determine the physical location of any (i \Gamma 1)-block with O(di) = O(log N ) operations, using only constant storage. 86 CHAPTER 6 Conclusions The focus of this thesis has been the construction of expanding graphs, i.e., bipartite graphs where any subset of inputs, up to a fixed maximum size, is adjacent to a large number of outputs. In particular, we have been seeking graphs that achieve the desired expansion using a limited number of edges (graphs of small density), and that are simple to realize in practice. We have seen how the need for these graphs arises in a variety of contexts, which range from the design of efficient communication networks to the allocation of shared resources in multiprocessor systems. Despite the considerable attention this topic has received in over twenty years, a number of goals are yet to be achieved. There still is an efficiency gap between expanding graphs that can be effectively constructed and those that are known to exist, as shown by counting arguments. Moreover, the (few) known constructions are often involved and, although of great theoretical importance, are unlikely to be utilized in real applications. For this reasons, it is important to develop and analyze new construction techniques aiming at filling the gap but, also, at providing practical implementations. This thesis has studied the construction of expanding graphs using techniques related to the one introduced by Morgenstern in [34], which is based on certain quotients of the projective linear group over a finite field. Specifically, we have considered expanding graphs (bounded concentrators) suitable for the construction of superconcentrators, and expanding graphs suitable for the implementation of shared memory in distributed multiprocessor systems, with particular emphasis on the latter. In Chapter 3 we analyzed a specific construction for bounded concentrators. This construction, originally considered in [34], provides bounded concentrators that, with density as low as q = 5, exhibit expansion capabilities sufficient to make them suitable to build excellent superconcentrators. A rigorous and (possibly) simple proof of this result is still not known and constitutes a challenging open problem. Unfortunately, the only general tool available to analyze the expansion properties of a bounded concentrator is based on the second largest eigenvalue *2 of a certain matrix [46, 2], which in this case, as it usually happens, is difficult to determine. (A bound on *2 was claimed in [34].) We have determined *2 in some special cases, providing evidence that these bounded concentrators are indeed good expanders, and proved a number of structural properties that might be successfully used to solve the general case. More 87 importantly, we believe that these structural properties may be used for conducting an analysis without the recourse to the eigenvalue bound. This represents the only viable approach to study the same bounded concentrators at lower densities (q = 3; 4), which, if proved to exhibit the required expansion, would yield superconcentrators with the lowest density known to date. The rest of the thesis focused on the construction and use of expanding graphs for developing memory organization schemes for the emulation of a PRAM on a multiprocessor system where variables of the PRAM shared memory are distributed among the processors' local memory modules, and the processors communicate through a network. The goal of these schemes is to allow the processors to efficiently access the variables, in parallel. In order to achieve a good worst-case performance, it is necessary to replicate each variable into multiple copies, and have a strategy to select, for any given set of variables, a subset of copies that are not concentrated in few processors (low memory contention), and can be efficiently retrieved through the network (low network congestion). All the memory organization schemes previously known in the literature were based on expanding graphs whose existence was proved by counting arguments, without providing explicit constructions. The major contribution of this thesis has been the development of memory organization schemes with provable worst-case performance, based on expanding graphs explicitly constructible. The three memory organization schemes presented in Chapter 4 required the processors interconnected by a complete network (MPC), and, therefore, the properties of the underlying expanding graphs have been exclusively used to reduce memory contention. These schemes, all of which use constant redundancy, constitute the first explicit memory organizations for the MPC to achieve sublinear time complexity for sets of both read and write operations, and have a practical implementation. However, there still exists a gap between their time performance and the best performance achievable, as given by the lower bound (Theorem 6). In fact, it can be proved that, at least for certain values of the parameters, the complexity of the three schemes is optimal, with respect to the particular graphs utilized. Therefore, in order to fill the gap one has to employ different expanding graphs or sharpen the lower bound. I personally consider the second alternative more promising, since the lower bound involves strong approximations and, therefore, is unlikely to be tight. Another challenging open problem is to develop memory organization schemes that achieve a polylogarithmic time complexity at the expense of an increased (nonconstant) redundancy. Such schemes are known to exist, as proved by many authors in the last ten years, based on expanding graphs that exhibit strong expansion properties (with nonconstant density); however, 88 explicit constructions are yet to be found. An interesting question is whether the techniques studied in this thesis can be applied for the construction of these graphs. In Chapter 5 we devised a memory organization scheme for a realistic interconnection: the mesh. In this case, communication among the processors becomes a crucial factor that cannot be ignored, as in the MPC. In particular, the access to data is accomplished by routing packets through the network between the requesting processors and the processors holding the data. Thus, when, for a set of variables, we select the copies to be accessed, it is necessary to prevent many packets from being destined to regions of small perimeter (submeshes). To this purpose, we devised a scheme (HMOS) where different levels of modules correspond to different tessellations of the mesh into submeshes of appropriate size. A generalization of the multiple-copy approach, where not only the variables, but also the contents of the modules at each level are replicated, and the use of suitable expanding graphs to distribute the data of one level among the modules of the next level, has allowed us to perform copy-selection controlling the congestion in each submesh (i.e., number of copies addressed to the submesh). A number of problems remain open. First of all, our scheme is designed for memories of N ff variables, with 1 ! ff ! 2, where N is the number of processors. It can be argued that most (practical) parallel algorithms have a time complexity usually no more than linear in the number of processors, and, therefore, cannot use more than O(N 2) variables. Thus, the above range of values covers most practical applications. Nevertheless, it is interesting to develop memory organization schemes that perform efficiently even for larger values of ff. More importantly, the time complexity of our scheme is not optimal, with respect to the network diameter (although it is nearly optimal for ff ^ 3=2). An open question is to see whether a refined strategy, or more powerful expanding graphs (maybe both) can improve the time complexity. Finally, our scheme represents the only explicit memory organization scheme on a bounded degree network with nontrivial worst-case performance. There is clearly the need to develop schemes for different interconnections, especially interconnections with higher bandwidth (e.g., hypercubelike), which could achieve a better, typically polylogarithmic, time complexity. 89 References [1] N. Alon, Z. Galil, and V.D. Milman. Better expanders and concentrators. J. of Algorithms, 8:337-347, 1987. [2] N. Alon and V. D. Milman. *1, isoperimetric inequalities for graphs and superconcentrators. Journal of Combinatorial Theory Series B, 38:73-88, 1985. [3] H. Alt, T. Hagerup, K. Mehlhorn, and F.P. Preparata. Deterministic simulation of idealized parallel computers on more realistic ones. SIAM J. on Computing, 16(5):808-835, 1987. [4] Y. Aumann and A. Schuster. Improved memory utilization in deterministic PRAM simulations. J. of Parallel and Distributed Computing, 12:146-151, 1990. [5] E.R. Berlekamp. Algebraic Coding Theory. McGraw-Hill, 1968. [6] N. Biggs. Algebraic Graph Theory. Cambridge University Press, Cambridge MA, 1974. [7] R.A. Brualdi and H.J. Ryser. Combinatorial Matrix Theory. Cambridge University Press, Cambridge MA, 1991. [8] F.R.K. Chung. On concentrators, superconcentrators, generalizers, and nonblocking networks. Bell Sys. Tech. J., 58(8):1765-1777, 1979. [9] D.M. Cvetkovi'c, M. Doob, and H. Sachs. Spectra of Graphs. Academic Press, New York NY, 1980. [10] P.J. Davis. Circulant Matrices. John Wiley & Sons, New York NY, 1979. [11] M. Dietzfelbinger and F. Meyer auf der Heide. Simple, efficient shared memory simulations. Proc. of the 5nd ACM Symp. on Parallel Algorithms and Architectures, pages 110-118, 1993. [12] O. Gabber and Z. Galil. Explicit construction of linear-sized superconcentrators. J. of Computers and System Sci., 22:407-420, 1981. [13] D.K. Gifford. Weighted voting for replicated data. Proc. of the 7th ACM Symp. on Operating System Principles, pages 150-159, 1979. [14] D. Gorenstein. Finite Groups. Harper and Row, New York NY, 1968. 90 [15] M. Hall Jr. Combinatorial Theory. John Wiley & Sons, New York NY, second edition, 1986. [16] K.T. Herley. Efficient simulations of small shared memories on bounded degree networks. Proc. of the 30th IEEE Symp. on Foundations of Comp. Sc., pages 390-395, 1989. [17] K.T. Herley. Space-efficient representations of shared data for parallel computers. Proc. of the 2nd ACM Symp. on Parallel Algorithms and Architectures, pages 407-416, 1990. [18] K.T. Herley. Representing shared data on distributed-memory parallel computers. Mathematical Systems Theory, 1991. (To appear). [19] K.T. Herley and G. Bilardi. Deterministic simulations of PRAMs on bounded degree networks. Proc. of the 26th Annual Allerton Conference on Communication, Control and Computation, pages 1084-1093, 1988. [20] S.W. Hornick and F.P. Preparata. Deterministic PRAM simulation with constant redundancy. Proc. of the 1nd ACM Symp. on Parallel Algorithms and Architectures, pages 103-109, 1989. [21] D.R. Hughes and F.C. Piper. Design Theory. Cambridge University Press, Cambridge MA, 1985. [22] A.R. Karlin and E. Upfal. Parallel hashing: An efficient implementation of shared memory. J. ACM, 35(4):876-892, 1988. [23] R. Karp, M. Luby, and F. Meyer auf der Heide. Efficient PRAM simulation on distributed machines. Proc. of the 24th ACM Symp. on Theory of Comp., pages 318-326, 1992. [24] M. Kaufmann, J.F. Sibeyn, and T. Suel. Derandomizing routing and sorting algorithms for meshes. Proc of the 5th ACM-SIAM Symp. on Discrete Algorithms, 1994. (To appear). [25] D.J. Kuck. A survey of parallel machine organization and programming. ACM Computing Surveys, 21:339-374, 1977. [26] M. Kunde. Block gossiping on grids and tori: Deterministic sorting and routing match the bisection bound. Proc. European Symp. on Algorithms, pages 272-283, 1993. [27] C.E. Leiserson. Fat-trees: Universal networks for hardware-efficient supercomputing. IEEE Trans. on Computers, C-34(10):892-901, 1985. 91 [28] A. Lubotzky, R. Phillips, and F Sarnak. Explicit expanders and the Ramanujan conjectures. Proc. of the 18th ACM Symp. on Theory of Comp., pages 240-246, 1986. [29] F. Luccio, A. Pietracaprina, and G. Pucci. A probabilistic simulation of PRAMs in VLSI. Information Processing Lett., 28(3):141-147, 1988. [30] F. Luccio, A. Pietracaprina, and G. Pucci. A new scheme for the deterministic simulation of PRAMs in VLSI. Algorithmica, 5:529-544, 1990. [31] G.A. Margulis. Explicit constructions of concentrators. Problems Inform. Transmission, 9:325-332, 1973. [32] K. Mehlhorn and U. Vishkin. Randomized and deterministic simulations of PRAMs by parallel machines with restricted granularity of parallel memories. Acta Informatica, 9(1):29- 59, 1984. [33] F. Meyer auf der Heide. Hashing strategies for simulating shared memory on distributed memory machines. Proc. 1st Heinz Nixdorf Symp. on Parallel Architectures and their Efficient Use, 1992. To appear in LNCS. [34] M. Morgenstern. Explicit construction of natural bounded concentrators. Proc. of the 32th IEEE Symp. on Foundations of Comp. Sc., pages 392-397, 1991. [35] M. Morgenstern. Ramanujan diagrams. Manuscript, 1991. [36] A. Pietracaprina and F.P. Preparata. Practical constructive schemes for deterministic shared-memory access. Submitted to Mathematical Systems Theory, (1993). [37] A. Pietracaprina and F.P. Preparata. An O(pn)-worst-case-time solution to the granularity problem. Proc. of the 10th Symp. on Theoretical Aspects of Comp. Sc., LNCS 665:110-119, 1993. [38] A. Pietracaprina and F.P. Preparata. A practical constructive scheme for deterministic shared-memory access. Proc. of the 5th ACM Symp. on Parallel Algorithms and Architectures, pages 100-109, 1993. [39] A. Pietracaprina, G. Pucci, and J.F. Sibeyn. Constructive deterministic PRAM simulation on a mesh. Submitted to the 26th ACM Symp. on Theory of Comp., (1994). 92 [40] A. Pietracaprina, G. Pucci, and J.F. Sibeyn. Constructive deterministic PRAM simulation on a mesh-connected computer. Tech. Rep. TR-93-059, International Computer Science Insitute, Berkeley, 1993. [41] M.S. Pinsker. On the complexity of a concentrator. Proc. 7th International Teletraffic Conference. Stockholm, pages 420-425, Jun 1973. [42] N. Pippenger. Superconcentrators. SIAM J. on Computing, 6(2):298-304, 1977. [43] N. Pippenger. Communication networks. Handbook of Theoretical Computer Science, Vol. A:805-834, 1990. [44] A.G. Ranade. How to emulate shared memory. J. of Computers and System Sci., 42:307- 326, 1991. [45] J.F. Sibeyn and M. Kaufmann. Deterministic 1-k routing on meshes, with application to worm-hole routing. To appear in 11th Symp. on Theoretical Aspects of Comp. Sc., (1994). [46] R.M. Tanner. Explicit concentrators from generalized n-gons. SIAM J. on Algebraic Discrete Methods, 5(3):287-293, 1984. [47] R.H. Thomas. A majority consensus approach to concurrency control for multiple copy databases. ACM Transactions on Databases Systems, 4(2):180-209, 1979. [48] E. Upfal and A. Widgerson. How to share memory in a distributed system. J. ACM, 34(1):116-127, 1987. [49] L. Valiant and G. Brebner. Universal schemes for parallel communication. Proc. of the 13th ACM Symp. on Theory of Comp., pages 263-277, 1981. 93 APPENDIX A Representatives for P GL2(qn)=H0 The purpose of this appendix is to find a suitable set of matrices representatives for the costes of P GL2(qn)=H0, such that, given an integer i, 0 ^ i ! jP GL2(qn)=H0j, the ith matrix is easily retrieved. We only consider the case of q = 2 and n odd which is simpler to explain and, yet, general enough for implementing the memory organization scheme presented in Section 4.3. Let F2 = f0; 1g. The group H0 = P GL2(2) consists of six matrices: H0(1) = 24 1 00 1 35 H0(4) = 24 0 11 0 35 H0(2) = 24 1 11 0 35 H0(5) = 24 1 10 1 35 H0(3) = 24 0 11 1 35 H0(6) = 24 1 01 1 35 By (3.1), jP GL2(2n)j = (22n \Gamma 1)2n, thus jP GL2(2n)=H0j = 2n\Gamma 1 2 2n \Gamma 1 3 The choice of the representatives for P GL2(2n)=H0 is made much simpler if we regard the rows of the matrices of P GL2(2n) as elements of extension field F22n , as explained below. Let * be a generator of the multiplicative group F*22n , and let ae 4= 2 2n \Gamma 1 3 We have F*2 = f*iae : 0 ^ i ! 3g, i.e., *ae generates F*2 . Let us call w 4= *ae: 94 Note that F22 ae F22n but, since n is odd, F22 6ae F2n , as pictured in the diagram below. F22n F2n F2 F22 \Delta \Delta \Delta \Delta \Delta \Delta \Delta HH Therefore, w 2 F22n \Gamma F2n and (w; 1) forms a basis for F22n over F2n ; that is, each element of F22n can be uniquely written as ffw + fi, for some ff; fi 2 F2n . Define the function \Phi : F2n \Theta F2n \Gamma ! F22n as \Phi (ff; fi) = ffw + fi 8 ff; fi 2 F2n We represent a matrix 24 x yz v 35 2 P GL2(2n) by the pair h\Phi (x; y); \Phi (z; v)i where, since the matrix is non-singular, both \Phi (x; y) and \Phi (z; v) are nonzero. From now on, either the usual matrix notation or the pair notation will be used wherever appropriate, interchangeably. Partition the elements of F*22n (i.e., *i, for 0 ^ i ! 22n \Gamma 1) into cosets of F*22n =F*2 . For 0 ^ i ! ae let [*i] = f*iwk : 0 ^ k ! 3g = f*i+kae : 0 ^ k ! 3g We need to identify the cosets that contain the elements of F*2n . Define oe 4= 2n + 1 o/ 4= 2 n + 1 3 and note that F*2n = f*ioe : 0 ^ i ! 2n \Gamma 1g: It is easy to prove that f[*ioe] : 0 ^ i ! 2n \Gamma 1g = f[*io/] : 0 ^ i ! 2n \Gamma 1g (A.1) 95 and that each such coset contains exactly one element of F*2n . We subdivide the cosets of F*22n =F*2 in two sets S1 = f[*io/] : 0 ^ i ! 2n \Gamma 1g S2 = f[*i] : 0 ^ i ! ae such that o/ 6 j ig: Now, given a row vector (x; y) with x; y 2 F*2n and \Phi (x; y) 6= 0, consider the six vectors (x; y) \Delta H0(i), for i = 1; : : :; 6. Using the function \Phi , view these vectors as elements of F*22n , and let ffi 4= \Phi ((x; y) \Delta H0(i)) i = 1; : : : ; 6 The following lemma shows that the partition of F*22n into the cosets of F*22n =F*2 is, in a certain sense, preserved among the ffi's. Suppose ff1 2 [*k], for some k, 0 ^ k ! ae. Lemma 25 1. fffi : 1 ^ i ^ 6g = [*k] [ [*(k2 n)modae]. 2. [*k] = [*(k2 n)modae] if and only if o/ divides k (i.e., [*k] 2 S 1). Proof: Observe that ff1 = \Phi (x; y) ff4 = \Phi (y; x) ff2 = \Phi (x + y; x) ff5 = \Phi (x; x + y) ff3 = \Phi (y; x + y) ff6 = \Phi (x + y; y) Note that F*2 = f1; w; w + 1g and, since w generates F*2 , we must have w2 = w + 1. Easy calculations show that \Phi (x + y; x) = \Phi (x; y)w and \Phi (y; x + y) = \Phi (x; y)w2, therefore [\Phi (x; y)] = f\Phi (x; y); \Phi (x + y; x); \Phi (y; x + y)g = fff1; ff2; ff3g Similarly, [\Phi (y; x)] = f\Phi (y; x); \Phi (x; x + y); \Phi (x + y; y)g = fff4; ff5; ff6g By induction one can easily prove that, when n is odd, w2 n = w + 1, therefore (\Phi (x; y))2 n = (xw + y)2n = x2nw2n + y2n = xw2n + y = xw + (x + y) = \Phi (x; x + y) 96 This shows that ff5 = ff2n1 and, since we assumed ff1 2 [*k], we have fffi : 1 ^ i ^ 6g = [*k] [ [*k2 n] = [*k] [ [*k2nmodae] Now, we wish to identify the values of k for which [*k] = [*(k2 n)modae]. We observe: (k2n) mod ae = k () k2n = k + hae (for some h) () k(2n \Gamma 1) = hae () k = ho/ Hence, [*k] = [*(k2 n)modae] if and only if o/ jk, i.e., [*k] 2 S 1. 2 In other words, the set of ffi's consists of exactly two cosets of F*2n =F*2 , if [*k] 2 S2, and coincides with [*k], with each element occurring twice, if [*k] 2 S1. Before proceeding with the choice of representatives of P GL2(2n)=H0 we need a technical fact. For 1 ^ i ^ 2 n\Gamma 1\Gamma 1 3 and 0 ^ j ! 2n \Gamma 1 define k(i; j) 4= (i + joe) mod ae (A.2) Fact 4 For any 1 ^ i ^ 2 n\Gamma 1\Gamma 1 3 and 0 ^ j ! 2n \Gamma 1 we have 1. [*k(i;j)] 2 S2 2. For any 1 ^ i0 ^ 2 n\Gamma 1\Gamma 1 3 and 0 ^ j0 ! 2n \Gamma 1, (a) k(i0; j0) = k(i; j) () i0 = i and j0 = j (b) k(i0; j0) 6= (2nk(i; j)) mod ae Proof: 1. Since o/ j oe and o/ j ae, then o/ j k(i; j) () o/ j i: But 1 ^ i ^ 2 n\Gamma 1\Gamma 1 3 ! o/ , therefore o/ 6 j i and [* k(i;j)] 2 S2. 2. (a) The `if' part is trivial. Suppose k(i0; j0) = k(i; j). Then (i0 + j0oe) mod ae = (i + joe) mod ae 97 Since i0 ^ ae, the above equation can be rewritten as i0 = (i + (j \Gamma j0)oe) mod ae = (i + (j \Gamma j0)oe mod ae) mod ae Note that *(j 0\Gamma j)oe 2 F 2n , hence, by (A.1), (j \Gamma j0)oe mod ae = ho/ for some h, 0 ^ h ! 2n \Gamma 1. Since i ! o/ , i + ho/ ! (2n \Gamma 1)o/ = ae. Thus we have i0 = i + ho/ The condition i0 ! o/ implies h = 0 and, hence, i = i0. Also, h = 0 implies (j \Gamma j0)oe = dae, for some 0 ^ d ! 2n \Gamma 1. Now, since n is odd, lcm (oe; ae) = 22n \Gamma 1 and, thus, (j0 \Gamma j)oe = dae implies that (j0 \Gamma j) is a multiple of lcm (oe; ae)=oe = 2n \Gamma 1. But by definition, (j0 \Gamma j) ! 2n \Gamma 1, so we must have (j0 \Gamma j) = 0, that is, j0 = j. (b) Suppose for a contradiction that there exist i0 and j0 such that (i0; j0) = (2nk(i; j)) mod ae: Then, (i0 + j0oe) mod ae = (2ni + 2njoe) mod ae; that is, 2ni mod ae = (i0 + (j0 \Gamma 2nj)oe) mod ae Noting that 2ni ! ae and reasoning as before, we conclude that 2ni = i0 + ho/ for some h, 0 ^ h ! 2n \Gamma 1. In other words, i0 = 2ni mod o/ . Since 2n = 3o/ \Gamma 1, then i0 = 2ni mod o/ = (3o/ \Gamma 1)i mod o/ = \Gamma i mod o/; 98 which is impossible since o/ = (2n + 1)=3 and both i and i0 are at most (2n\Gamma 1 \Gamma 1)=3 !b o/ =2c. 2 We are now ready to define the matrices representatives of P GL2(2n)=H0. The matrices are given in the pair notation and, for convenience, are partitioned into four sets, L1, L2, L3 and L4. Definition 10 L1 4= fh1; *hoewi : 0 ^ h ! 2n \Gamma 1g L2 4= fh1; *k(i;j)wsig L3 4= fh*k(i;j)ws; 1ig L4 4= fh*k(i;0); *twsi : 1 ^ t ! ae ; o/ 6 j t and *k(i;0)(*tws)\Gamma 1 62 F*2n g with 1 ^ i ^ 2 n\Gamma 1\Gamma 1 3 , 0 ^ j ! 2n \Gamma 1, and 0 ^ s ! 3, wherever they occur. Lemma 26 jL1j + jL2j + jL3j + jL4j = jP GL2(2n)=H0j Proof: It is immediate that jL1j = 2n \Gamma 1 jL2j = jL3j = (2n \Gamma 1)(2n\Gamma 1 \Gamma 1) As for the cardinality of L4, note that there are (2 n\Gamma 1)(2n\Gamma 2) 3 values of t between 1 and ae not multiples of o/ . Moreover, it is not difficult to show that, for each i, there are exactly 2n \Gamma 1 pairs of indices t and s, with 1 ^ t ! ae, o/ 6 j t and 0 ^ s ! 3, such that *k(i;0)(*tws)\Gamma 1 2 F*2n . Therefore, jL4j = 2 n\Gamma 1 \Gamma 1 3 [3 (2n \Gamma 1)(2n \Gamma 2) 3 \Gamma (2 n \Gamma 1)] = 2 n\Gamma 1 \Gamma 1 3 [(2 n \Gamma 1)(2n \Gamma 2) \Gamma (2n \Gamma 1)] = 2 n\Gamma 1 \Gamma 1 3 (2 n \Gamma 3)(2n \Gamma 1) 99 Simple algebra shows that jL1j + jL2j + jL3j + jL4j = 2n\Gamma 1 2 2n\Gamma 1 3 = jP GL2(2n)=H0j. 2 The next theorem shows that the matrices in the above four sets are indeed a set of representatives for P GL2(2n)=H0. Let L 4= L1 [ L2 [ L3 [ L4 Theorem 24 The matrices in L belong to distinct cosets of P GL2(2n)=H0, thus forming a complete set of representatives. Proof: It is sufficient to prove the following two facts. 1. L ae P GL2(2n). 2. For any distinct A; B 2 L, and for any ffi 2 F2n , A 62 ffiBH0. For the first fact we only have to prove that each A 2 L is non-singular. Let A = hx; yi 2 L. Note that both x and y are non-zero; therefore A is non-singular if and only if x\Gamma 1y 62 F2n (or equivalently, xy\Gamma 1 62 F2n ). We distinguish among four cases, according to the form of A. ffl A = h1; *hoewi 2 L1. Since w 62 F2n and *hoe 2 F2n , *hoew 62 F2n . ffl A = h1; *k(i;j)wsi 2 L2. By Fact 4, [*k(i;j)ws] = [*k(i;j)] 2 S2 and, by (A.1) and the definition of S2, *k(i;j)ws 62 F2n . ffl A = h*k(i;j)ws; 1i 2 L3. Identical to the previous case. ffl A = h*k(i;0); *twsi 2 L4. The condition *k(i;0)(*tws)\Gamma 1 62 F2n in the definition of L4 assures that A is non-singular. We now prove the second fact. Let A; B 2 L, with A 6= B, and let ffi = *aoe, for some a, 0 ^ a ! 2n \Gamma 1. As before, we need to distinguish among various cases according to the form of A and B. ffl A and B belong to distinct Li's. We show only the case of A 2 L1 and B 2 L2. The other cases can be dealt with in a similar fashion. Let A = h1; *hoewi and ffiB = h*aoe; *k(i;j)+aoewsi. Note that [*hoew] 2 S1 and [*k(i;j)+aoews] 2 S2. From Lemma 25, one can argue that for any hx; yi 2 ffiBH0, [y] 2 S2. Therefore, A 62 ffiBH0. ffl A; B 2 L1, with A 6= B. Let A = h1; *hoewi and B = h1; *h 0oewi with h0 6= h. Thus ffiB = h*aoe; *(h 0+a)oewi. Note that [1], [*hoew], [*aoe] and [*(h0+a)oew] are all in S 1. By 100 Lemma 25, for any hx; yi 2 ffiBH0, [x] = [*aoe], so if A 2 ffiBH0 we would have [*aoe] = [1] (i.e., a = 0). For the same reason, [y] = [*(h 0+a)oew]; so if a = 0, A 2 ffiBH 0 would imply [*h 0oe] = [*hoe], that is, h = h0, a contradiction. ffl A; B 2 L2, with A 6= B. Let A = h1; *k(i;j)wsi and B = h1; *k(i 0;j0)ws0 i, where it cannot be (i = i0) ^ (j = j0) ^ (s = s0). Thus, ffiB = h*aoe; *k(i 0;j0)+aoews0 i. As in the previous case, we can show that A 2 ffiBH0 implies a = 0. Since [*k(i 0;j0)ws0 ] = [*k(i0;j0)] 2 S 2, by Lemma 25 for any hx; yi 2 ffiBH0, [y] = [*k(i 0;j0)], or [y] = [*(k(i0;j0)2n)modae]. Therefore, in order to have A 2 ffiBH0, we need [*k(i;j)] = [*k(i 0;j0)] or [*k(i;j)] = [*(k(i0;j0)2n)modae], which, by Fact 4, implies i = i0 ^ j = j0. Thus we have A = h1; *k(i;j)wsi and ffiB = h1; *k(i;j)ws 0 i with s 6= s0. Suppose i = i0, j = j0 and ffi = 1. From the proof of Lemma 25 one can easily see that the only matrix in ffiBH0 other than B itself of the form h1; yi must have [y] = [*(k(i;j)2 n)modae]. Therefore, A cannot belong to BH 0. ffl A; B 2 L3, with A 6= B. Identical to the previous case. ffl A; B 2 L4, with A 6= B. Let A = h*k(i;0); *twsi = h*i; *twsi and B = h*k(i 0;0); *t0ws0 i = h*i 0; *t0ws0 i where it cannot be (i = i0)^(t = t0)^(s = s0). Thus, ffiB = h*i0+aoe; *t0+aoews0i: Note that [*i 0+aoe] = [*k(i0;a)], and, by Lemma 25 and Fact 4, A 2 ffiBH 0 implies k(i; 0) = k(i0; a), and therefore i = i0 and a = 0. Thus, we must have A = h*i; *twsi and ffiB =h *i; *t 0ws0i Now, since [*i] 2 S 2, Lemma 25 implies that ffiB is actually the only matrix in ffiBH0 whose first component is *i. Therefore, in order to have A 2 ffiBH0 it must be A = ffiB, that is t = t0 and s = s0, a contradiction. 2 Let M = jP GL2(2n)=H0j. We show how to bijectively associate the integers 0; 1; : : : ; M \Gamma 1 with the matrices of L. We first explain how, given and integer r, 0 ^ r ! M the rth matrix of L, say Ar, can be computed in the pair notation. Assume that a primitive element * 2 F22n is known. Recall that L = L1 [ L2 [ L3 [ L4 and, as shown in the proof of Lemma 26 jL1j = 2n \Gamma 1 jL2j = jL3j = (2n \Gamma 1)(2n\Gamma 1 \Gamma 1) jL4j = (2n \Gamma 1) 2 n\Gamma 1 \Gamma 1 3 (2 n \Gamma 3) 101 where jL1j + jL2j + jL3j + jL4j = M . We number the matrices so that Ar 2 L1 if 0 ^ r ! 2n \Gamma 1 Ar 2 L2 if 2n \Gamma 1 ^ r ! (2n \Gamma 1) + (2n \Gamma 1)(2n\Gamma 1 \Gamma 1) = (2n \Gamma 1)2n\Gamma 1 Ar 2 L3 if (2n \Gamma 1)2n\Gamma 1 ^ r ! (2n \Gamma 1)2n\Gamma 1 + (2n \Gamma 1)(2n\Gamma 1 \Gamma 1) = (2n \Gamma 1)2 Ar 2 L4 if (2n \Gamma 1)2 ^ r ! (2n \Gamma 1)2 + (2n \Gamma 1) 2 n\Gamma 1\Gamma 1 3 (2n \Gamma 3) = M Thus we must find a bijection between the indices in each range and the matrices of the appropriate set. For the first three ranges, the mapping can be easily established based on the definition L1, L2 and L3, and involves only a constant number of operations. The case of L4 is slightly more complicated. Suppose (2n \Gamma 1)2 ^ r ! M and set r0 = r \Gamma (2n \Gamma 1)2, so that 0 ^ r0 ! (2n \Gamma 1) 2 n\Gamma 1\Gamma 1 3 (2 n \Gamma 3). Ar will be of the form Ar = h*k(i;0); *twsi for some i, t and s such that 1 ^ i ^ 2 n\Gamma 1\Gamma 1 3 , 1 ^ t ! ae, o/ 6 j t, 0 ^ s ! 3 and *k(i;0)(*tws)\Gamma 1 62 F2n . We must associate r0 with the appropriate triplet (i; t; s). The index i can be chosen as i = _ r0(2n \Gamma 1)(2n \Gamma 3)* + 1; which is clearly a value between 1 and 2 n\Gamma 1\Gamma 1 3 . Fixed i, there are (2n \Gamma 1)(2n \Gamma 3) pairs t; s to choose from, and we want to find the lth pair, where l = r0 mod (2n \Gamma 1)(2n \Gamma 3). Note that, since w = *ae, then *tws = *t+sae. It is not difficult to see that ft + sae : 1 ^ t ! ae; o/ 6 j t and 0 ^ s ! 3g = ft0 : 0 ^ t0 ! 22n \Gamma 1; o/ 6 j t0g Therefore, finding the lth pair (t; s) such that *k(i;0)(*tws)\Gamma 1 62 F2n is equivalent to finding the lth index t0, which is not multiple of o/ and such that *k(i;0)\Gamma t 0 = *i\Gamma t0 62 F 2n ; i.e., t0 6= i + joe for any 0 ^ j ! 2n \Gamma 1. Among the integers 0 : : : 22n \Gamma 2, those that are multiples of o/ or are equal to i + joe (i.e., the `forbidden' indices), occupy fixed positions, as shown in Fig. A.1 where the integers 0; : : : ; 22n \Gamma 2 are arranged consecutively into 2n \Gamma 1 rows and oe columns. Note that the multiples of o/ are those in columns 0; o/ and 2o/ , and the values i + joe, with 0 ^ j ! 2n \Gamma 1, are those in column i. It is not hard to see that t0 can be computed with a constant number of operations. 102 0 i o/ 2o/ oe \Gamma 1 6 2n \Gamma 1 ? Figure A.1 Table of the indices 0; : : :; 22n \Gamma 2 Finally, from t0 the indices t and s such that t0 = t + sae are given by t = t0 mod ae s = bt0=aec Once the matrix Ar is known in pair notation, we need to transform it into the usual form. Specifically, let Ar = h*i; *ji, for some i and j. We want to find ffi; fii; ffj; fij 2 F2n such that ffiw + fii = *i ffjw + fij = *j Suppose we know that * = ff1w + fi1 (each processor has to store the two values ff1 and fi1). Then given i and j and using the fact w2 = w + 1, ffi; fii; ffj and fij can be easily computed with O(n) operations over F2n . Recalling that n 2 O(log N ), where N is the number of processors in the memory organization scheme, we have proved Theorem 25 Given an integer r, 0 ^ r ! M , a processor is able to compute the rth matrix ofL in O(log N ) time using O(1) internal storage. 103 Vita Andrea Pietracaprina was born in Sassari, Italy, on September 17, 1963. He received the Laurea cum laude from the University of Pisa in 1987 and the M.S. degree from the University of Illinois at Urbana-Champaign in 1991, both in Computer Science. In 1987 he was awarded, jointly with Geppino Pucci, the IBM-Italia Prize and the UNITEAM Prize for Best Thesis in Computer Science for the year 1987. From July of 1987 until October of 1988 he was an Officer in the Italian Army. In the academic year 1988-1989 he was a research assistant in the Department of Computer Science at the University of Pisa. From the fall of 1989 until the end 1992 he was a research assistant in the Coordinate Science Laboratory at the University of Illinois at Urbana-Champaign. From the fall of 1991 until the end of 1993 he worked with his advisor, Professor Franco P. Preparata, in the Department of Computer Science at Brown University. His current research interests are in the area of parallel computation with particular emphasis on routing, PRAM simulation and construction of expanding graphs. He has coauthored the following papers: F. Luccio, A. Pietracaprina and G. Pucci, "A Probabilistic Simulation of PRAMs on a Bounded Degree Network," Information Processing Letters, 28, 141-147 (1988). F. Luccio, A. Pietracaprina and G. Pucci, "A New Scheme for the Deterministic Simulation of PRAMs in VLSI," Algorithmica, 5 (4), 529-544 (1990). F. Luccio, A. Pietracaprina and G. Pucci, "Analysis of Parallel Uniform Hashing," Information Processing Letters, 37 (2), 67-69 (1991). F. Luccio, A. Pietracaprina and G. Pucci, "Analysis and Implementation of Parallel Uniform Hashing," The International Journal of Foundations of Computer Science, 3 (1), 55-63 (1992). A. Krishna, A. Pietracaprina and B. Hajek, "Sharper Analysis of Packet Routing on a Butterfly," (to appear in Networks). F. Luccio, A. Pietracaprina and G. Pucci, "Analysis and Implementation of Parallel Uniform Hashing," Proc. First Italian Conference on Algorithms and Complexity, (1990), World Scientific, 1-12. 104 A. Krishna, A. Pietracaprina and B. Hajek, "Packet Routing in Optimal Time on a Butterfly," Proc. IEEE INFOCOM 1991, The Conference on Computer Communications, Section 8A, 840- 849. A. Pietracaprina and F. P. Preparata, "An O(pn)-Worst Case time Solution to the Granularity Problem," Proc. 10th STACS (1993), Lecture Notes in Computer Science LNCS 665, 110-119. A. Pietracaprina and F. P. Preparata, "A Practical Constructive Scheme for Deterministic Shared-Memory Access", Proc. 5th ACM SPAA 1993, 100-109. A. Pietracaprina and F. P. Preparata, "Practical Constructive Schemes for Deterministic SharedMemory Access". Submitted to Mathematical Systems Theory. A. Pietracaprina, G. Pucci and J.F. Sibeyn, "Constructive Deterministic PRAM Simulation on a Mesh". Submitted to the 26th ACM STOC 1994. 105