{'fraction_non_alphanumeric': 0.050971058162205964, 'fraction_numerical': 0.015724305573139544, 'mean_word_length': 3.8854527461652646, 'pattern_counts': {'":': 0, '<': 2, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 32, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Graphs, friends and acquaintances

As is well known, a graph is a mathematical object modeling the existence of a certain relation between pairs of elements of a given set. Therefore, it is not surprising that many of the first results concerning graphs made reference to relationships between people or groups of people. In this article, we comment on four results of this kind, which are related to various general theories on graphs and their applications: the Handshake lemma (related to graph colorings and Boolean algebra), a lemma on known and unknown people at a cocktail party (to Ramsey theory), a theorem on friends in common (to distance-regularity and coding theory), and Hall's Marriage theorem (to the theory of networks). These four areas of graph theory, often with problems which are easy to state but difficult to solve, are extensively developed and currently give rise to much research work. As examples of representative problems and results of these areas, which are discussed in this paper, we may cite the following: the Four Colors Theorem (4CTC), the Ramsey numbers, problems of the existence of distance-regular graphs and completely regular codes, and finally the study of topological proprieties of interconnection networks.


Introduction
A graph G = (V, E) is a mathematical structure consisting of a vertex set V and a set of edges E (or nonordered pairs of vertices). Normally, each vertex v ∈ V is represented by a point and each edge e = {u, v} ∈ E by a line joining vertices u and v. Graph theory belongs to combinatorics, which is the part of mathematics that studies the structure and enumeration of discrete objects, in contrast to the continuous objects studied in mathematical analysis. In particular, graph theory is useful for studying any system with a certain relationship between pairs of elements, which give a binary relation. It is therefore not surprising that many of the problems and results were originally stated in terms of personal relationships. For example, one of the most simple results is the Handshake lemma: At a cocktail party, an even number of people shake an odd number of hands. There is also the so-called Friendship theorem: At a party, if each pair of people has exactly one friend in common, then there is somebody who is friend of everybody. The first and most appealing proof of this theorem is due to Paul Erdős (with Alfred Rényi and Vera Sós), a Hungarian mathematician, probably the most prolific of the 20th century, who like Euler enjoyed coining sentences such as "A mathematician is a device for turning coffee into theorems" or "Another roof, another proof". The latter phrase shows his great capacity and predisposition for collaborating with other authors from all over the world (he had 509 coauthors). From Erdős we have the Erdős number: the co-authors of Erdős have Erdős number 1, the co-authors of the co-authors of Erdős have Erdős number 2, etc. For more information on Erdős, see Hoffman [31].
It is considered that the first paper on graph theory was published in 1736. Its author was the great Swiss mathematician Leonhard Euler, about who it is said that he wrote papers in the half an hour between the first and the second calls for lunch. This first paper is about the existence of a possible walk across the Königsberg bridges; see Euler [13]. This city was the capital of Oriental Prussia, the birthplace of Immanuel Kant. Nowadays it corresponds to the Russian city of Kaliningrad. The problem of the Königsberg bridges is related to the puzzle of drawing a figure without raising the pencil from the paper and without passing twice through the same place. In

Shaking hands: Colorings and Boolean algebra
In a graph G = (V, E), the degree δ(u) is the number of adjacent vertices to vertex u, namely, the number of incident edges to u. We denote by ∆(G) the maximum degree of all the vertices of G and by δ(G) the minimum degree.
We begin with one of the most simple results about graphs, which states that the sum of the degrees of the vertices in V equals twice the number of edges in E: since in the degree sum, we count each edge twice because each edge is incident to two vertices. From here, we obtain the inequalities: Although these results are apparently trivial, they have some interesting corollaries, such as the following: (a) Every graph has an even number of vertices with odd degree.
This is the so-called Handshake lemma, because it can be stated as follows: At a cocktail party, the number of people who shake an odd number of other people's hands is always even.
(b) Every δ-regular graph (a graph is δ-regular if all its vertices have degree δ), with δ odd, has an even number of vertices.
(c) Every planar graph (that is, it can be drawn on the plane without edge crossings) with girth g (the girth is the length of the shortest cycle) and number of edges |E| satisfies To prove (c), we need the well-known Euler formula [14] published between 1752 and 1753, and already observed by Descartes in 1640, which can be proved by induction and states that every planar graph with n = |V | vertices, m = |E| edges and r = |R| regions satisfies r + n = m + 2.
(4) Figure 1. The graphs of the five Platonic solids.
In this formula, the number of regions includes the exterior one (that is, the 'sea', if we have a map or if the graph is imbedded on a sphere). For example, the Euler formula is satisfied by the graphs of the Platonic solids shown in Figure 1. In fact, this formula gives necessary conditions for the existence of these regular polyhedra; see Rademacher and Toeplitz [37]. In proving (4), the key fact is that the removing of a vertex with degree δ (and its incident edges) leaves a new planar graph whose number of regions, vertices and edges have been reduced, respectively, by δ − 1, 1 and δ units.
Returning again to the Euler formula, the number r of regions can also be interpreted as the cardinality of the vertex set of the dual graph G * . Given a planar graph G with n = |V | vertices and m = |E| edges forming regions, its dual graph G * = (V * , E * ) has vertices representing the regions of G, and there is an edge between two vertices if the corresponding regions are neighbors. Then, r = |V * | and m = |E| = |E * |. This interpretation provides a more symmetric Euler formula: which allows us to prove it without using induction, but rather by identifying both parenthesis in Equation (5) as the number of edges of two spanning trees T * and T belonging to G * and G, respectively. A spanning tree T of a connected graph G = (V, E) (that is, there is a path between any pair of vertices) is composed of the vertex set V and |V | − 1 edges without forming cycles. An example of this is shown in Figure 2, where each black continuous edge of G (the graph of a cube Q) belongs to T , but where each black dashed edge corresponds to an edge of T * in G * (the graph of an octahedron). For more details, see Aigner and Ziegler [1]. In our case, the proof of (c) is as follows: As each edge is the border of two regions and each region has at least g edges, we have r ≤ 2m/g. Note that this inequality is obtained from (2), considering the dual graph, since r = |V * |, m = |E * | and g = δ(G * ). Using this inequality and Equation (4), we obtain (3).
As a particular case of (c), we have the following result: (d) In any planar graph (g ≥ 3) the number of edges satisfies m ≤ 3n − 6; if it does not contain triangles (g ≥ 4), then m ≤ 2n − 4; and if it contains neither triangles nor squares (g ≥ 5), then m ≤ 5 3 (n − 2). From the first inequality, we can see that the complete graph K 5 (n = 5, m = 10) is not planar. A graph is complete if there is an edge between every pair of vertices. Similarly, from the second  inequality, we also obtain that the complete bipartite graph K 3,3 (n = 6, m = 9) is not planar. A bipartite graph (that is, the vertex set can be decomposed into two independent subsets such that vertices in every subset are not adjacent) is complete if each pair of vertices in different subsets are adjacent. See both graphs in Figure 3. Notice that, for instance, the third inequality turns out to be an equality in the case of the dodecahedron graph (see again Figure 1, n = 20 and m = 30).
In this context, we have the famous Kuratowski theorem [34], which characterizes planar graphs (see also the book by West [43, pp. 246-251] and the paper by Thomassen [41], where the relation between the planarity criterion and the Jordan Curve Theorem is explained): • A graph is planar if and only if it contains no homeomorphic subgraph to K 5 or K 3,3 .
Recall that a graph H is homeomorphic to a graph G if the edges of G correspond to (independent) paths in H.
From Equation (1) and again the inequalities in (d), we can prove the following: • Every planar graph G contains a vertex u of degree δ(u) ≤ 5. Moreover, if G does not contain triangles, then it has a vertex u of degree δ(u) ≤ 3.
Recall that in a vertex-coloring, adjacent vertices have different colors.
First note that the result is trivially true for graphs with at most 5 vertices. Then, assume that it is also true for graphs with n − 1 > 5 vertices, and let G be a graph with n vertices. We know that G contains a vertex u ∈ V with degree δ ≤ 5. Let v i , 1 ≤ i ≤ δ, denote the adjacent vertices to u. From the induction hypothesis, the graph G = G − u (obtained from G by removing vertex u and all its incident edges) has a vertex-coloring with r ≤ 5 colors. Therefore, if r ≤ 4 (which is always the case when δ ≤ 4), we can restore vertex u and give it a color different from the colors of the adjacent vertices v i . Thus, we obtain a coloring of G using at most 5 colors. Otherwise, if r = δ = 5 we can assume, without lost of generality, that we have a situation as shown in Figure 4 (where vertex v i has color i, 1 ≤ i ≤ δ). Now consider the paths with vertices alternatively colored 1-3 (with final vertices v 1 and/or v 3 ) and 2-4 (with final vertices v 2 and/or v 4 ). As G is planar, these possible paths cannot cross each other (that is, they have neither crossed edges nor common vertices). Then if, for example, there exists the path 1-3 with initial-final vertices v 1 -v 3 , the path 2-4 with initial vertex v 2 cannot have v 4 as final vertex, but another vertex denoted by v 2 (see again Figure 4). Therefore, we can interchange the colors 2-4 in this path, so that v 2 gets color 4. We can then restore vertex u and assign it color 2, obtaining a coloring of G with 5 colors.
We now consider the case of giving one of three colors to each edge of a graph G with maximum degree 3. This is called a free edge-coloring of G. In particular, the ('not-free') edge-coloring of a cubic (3-regular) graph, also called Tait-coloring, corresponds to the case where adjacent edges receive different colors. As we will see later, if G is a planar graph, the problem of the existence of Tait-colorings is closely related to the Four Color theorem (4CT). Moreover, we will also see that the construction of cubic graphs which cannot be Tait-colored leads to Boolean algebra, which is commonly used in the study of logic circuits. To this end, we introduce a natural generalization of the concept of 'color', which describes in a simple way the coloring ("0" or "1") of any set of edges or, more abstractly, of any family F of m colors chosen between three different colors, say C = {1, 2, 3}, such that color i ∈ C appears m i times. This situation can be represented by the coloring-vector m = (m 1 , m 2 , m 3 ), where m = m 1 + m 2 + m 3 . Then, we say that F has Boole-coloring 0, denoted by . See Fiol and Fiol [20] for more information.
Recalling these definitions, the Boole-coloring of an edge e ∈ E with color a ∈ C is Ψ(e) = Ψ({a}) = 1 a , and the Boole-coloring of a vertex v ∈ V , denoted by Ψ(v), is defined as the Boolecoloring of its incident edges, which can have either different or the same colors. In this context, it is curious to note the following facts:  Moreover, a natural sum operation can be defined in the set B = {0, 1 1 , 1 2 , 1 3 } of Boolecolorings in the following way: Given the colorings X 1 and X 2 represented, respectively, by the coloring-vectors m 1 = (m 11 , m 12 , m 13 ) and m 2 = (m 21 , m 22 , m 23 ), we define the sum X = X 1 + X 2 as the coloring represented by the coloring vector m = m 1 + m 2 . Then, (B, +) is isomorphic to the Klein group, with 0 as identity, 1 a + 1 a = 0, and 1 a Table . Notice that, since every element coincides with its inverse, m1 a = 1 a + 1 a + m · · · +1 a is 0 if m is even and 1 a if m is odd. From this simple fact, we can imply the following result (see Fiol [18]), which is very useful in the further development of the theory and can be regarded as a generalization of the so-called Parity lemma (see Isaacs [32]): • Let G be a graph with n vertices, maximum degree 3, and having a free edge-coloring, such that n i vertices have Boole-coloring 1 i , for i ∈ C, with n = n 1 + n 2 + n 3 ≤ n. Then,  Indeed, since the Boole-coloring of each vertex is the sum of the Boole-colorings of its incident edges, and recalling again Equation (1) but this equality is only satisfied if n i 1 i = 0 or n i 1 i = 1 i , for every i ∈ C. Then, from n 1 +n 2 +n 3 = n , we get the result.
Note that, as a direct consequence, we also get the following: • There is no edge-coloring of a graph G having only one vertex with Boole-coloring 1 (and the other vertices with Boole-coloring 0).
Another consequence is the following result by Tait [40]: • A cubic planar graph is Tait-colorable if and only if its corresponding map is 4-colorable.
Using the Boole-colorings, the proof of this last result is as follows: First, recall that every map has a 3-graph associated, because a vertex with degree greater than 3 can be replaced by a polygon, in such a way that the map obtained can be colored with 4 colors, and so can the original map; see an example in Figure 5. Now assume that we have the regions of the map with the colorings 0, 1 1 , 1 2 , 1 3 . Then, to obtain a Tait-coloring of a cubic planar graph, we only need to assign to each edge the sum of the colorings of both regions separated by this edge. To see that this gives a Taitcoloring, we only have to study one vertex, as shown in Figure 6. Since we have a 4-colored map, each two neighboring regions have different colors. Thus, no sum can give 0. Moreover, since the Figure 6. Obtaining a Tait-coloring of a 3-graph. three regions with a common vertex have different colorings X 1 , X 2 and X 3 and (B, +) is a group, the colorings X 1 + X 2 , X 1 + X 3 and X 2 + X 3 must also be different. Figure 7 provides an example of a 4-coloring of a map and its Tait-coloring (obtained from Table 1), where the colorings 0, 1 1 , 1 2 and 1 3 are denoted by 0, 1, 2 and 3, respectively. Conversely, if we want to obtain a 4-colored map from a Tait-coloring of the edges of the corresponding graph, we begin by giving the coloring 0 to any region considered as initial. Then, starting from this region, we follow an arbitrary path crossing some edges and visiting all the regions. We give each newly visited region the coloring obtained by adding the coloring of the 'previous' region plus the coloring of the last edge crossed. As no edge has the coloring 0, it is obvious that the coloring obtained for each region is different from that of its 'previous' region in the path followed; for an example of this process, see Figure 8 (left and center). Now, to finish the proof, we need to show that the coloring of each region is independent of the path followed. With this aim, let p 1 and p 2 be two paths with the same initial and final regions. We want to prove that the coloring obtained for the final region is the same following both paths; there is an example of this fact in Figure 8 (center and right). The colorings X and Y obtained by following both paths are equal if and only if the sum of the colorings of all edges crossed, respectively, by p 1 and p 2 is 0. Indeed, let X 1 , X 2 , . . . , X s and Y 1 , Y 2 , . . . , Y t be the colorings of the edges crossed respectively by p 1 and p 2 , then X 1 + X 2 + · · · + X s = X and Y 1 + Y 2 + · · · + Y t = Y . If (X 1 + X 2 + · · · + X s ) + (Y 1 + Y 2 + · · · + Y t ) = 0, the sums in both parenthesis are equal, so X = Y . To prove this equality, we can assume that p 1 + p 2 is a simple curve (see Figure 9)  Figure 1) and two paths with the same initial and final regions. because, otherwise, we could decompose it into some simple curves. If we imagine that we cut the graph with this curve, we obtain two graphs, such that the colorings of the edges crossed by the curve must satisfy m 1 ≡ m 2 ≡ m 3 (mod 2), where m i is the number of edges crossed with coloring 1 i . (Just imagine that in every cut we have two vertices of degree 1 and apply (6).) Then, As previously mentioned, the concept of colorings allows us to use the theory of Boolean algebra for the construction and characterization of snarks, that is, cubic graphs that are not Taitcolorable, also known as class two. The name 'snark' was proposed by Gardner [25], who borrowed it from a nonsense poem by the famous English author Lewis Carroll [10]. The most simple example of snark is the Petersen graph [36] (see Figure 10). With the colorings we can obtain infinite families of snarks. An example is the family obtained by joining adequately an odd number of copies of the multipole (cubic graph with edges and semi-edges-or 'dangling edges'-which are edges with only one final vertex), shown in Figure 11 (left). This structure behaves as a NOT gate of logic circuits in the sense that, its edges and semi-edges having been Tait-colored, the colorings X 1 and X 2 are conjugated one to each other, namely X 2 = 0 (respectively, X 2 = 1) if and only if X 1 = 1 (respectively, X 1 = 0). This is satisfied for any coloring of semi-edge e. Two examples of this fact are shown in Figure 11 (center and right). If, as previously stated, we join an odd number of these multipoles in a circular configuration, adding some vertices to connect semi-edges e, any attempt at Tait-coloring will lead to a conflict, and hence the graph is a snark. An example with five multipoles can be seen in Figure 12. This family of snarks, called flower snarks, was proposed  by Loupekhine (see Isaacs [33]). The first infinite families of snarks were given by Isaacs [32], but they can also be obtained by using Boole-colorings. More details on this technique can be found in Fiol [16].

Known and unknown: Ramsey theory
Let us consider the following result: • At a cocktail party with six o more people, there are always three people who are known or unknown to each other.
In other words, if the complete graph K n on n ≥ 6 vertices can be (free) edge-colored with two colors, say blue and red, then it always contains a monochromatic triangle, namely, a subgraph K 3 with its three edges blue or red. Indeed, as each vertex u has degree 5, at least 3 of its incident edges {u, v i }, 1 ≤ i ≤ 3, must have the same color, for example, blue. Then, if any of the 3 edges {v i , v j } (1 ≤ i < j ≤ 3) is blue, we obtain a blue triangle. Otherwise, we have a red triangle. Although this is an easy proof, it can be extremely difficult to prove similar results having more colors and/or imposing other monochromatic subgraphs. In this context, recall that, given m graphs G 1 , G 2 , . . . , G m , the Ramsey number R(G 1 , G 2 , . . . , G m ) is defined as the smallest number n, such that, in any edge-coloring of K n using m colors, there always exists a monochromatic subgraph (with color i) isomorphic to G i for some 1 ≤ i ≤ m. If G i is a complete graph K r , the Ramsey number is expressed by writing r instead of K r , for sake of simplicity. Some known So, the result at the beginning of this section can be expressed as R(3, 3) ≤ 6. Moreover, since R(3, 3) ≥ 6 (it is easy to color with two colors the edges of the complete graph K 5 without monochromatic triangles: the 'outer cycle' with one color and the 'inner' cycle with the other) we conclude that R(3, 3) = 6. A good updated summary on this subject can be found in Radziszowski [38].
We first see that R(3, 3, 3) ≤ 17. We make an edge-coloring of a complete graph using three colors; say blue, red and green. Let us assume that the edge-coloring has no monochromatic triangles. The green neighborhood of a vertex v is the set of vertices that have a green edge to v. The green neighborhood of v cannot contain any green edge in order to avoid monochromatic triangles. Then, the edge-coloring of the green neighborhood of v has only two colors: blue and red. Since R(3, 3) = 6, the green neighborhood of v can contain at most 5 vertices. With the same reasoning, the blue and the red neighborhoods of v can have at most 5 vertices each. As every vertex different from v is in the green, blue or red neighborhoods of v, then the complete graph can have at most 1 + 5 + 5 + 5 = 16 vertices. Thus, R(3, 3, 3) ≤ 17. Now, to prove that R(3, 3, 3) ≥ 17, we use algebraic graph theory based on the properties of eigenvalues and eigenvectors of the adjacency matrix, that is, a matrix with rows and columns indexed by the vertices of the graph, and whose entries are either 1 or 0, according to whether the corresponding vertices are adjacent or not.
A δ-regular graph with n vertices is said to be (n, δ; a, c)-strongly regular if each pair of adjacent vertices has a common neighbors and each pair of nonadjacent vertices has c common neighbors. If R(3, 3, 3) ≥ 17, then we can color the edges of the complete graph K 16 with three colors, namely, we can make an edge-coloring of K 16 without monochromatic triangles. The required edge-coloring is equivalent to a decomposition of K 16 into three graphs G 1 , G 2 and G 3 , each one corresponding to one color. It follows that each G i , i = 1, 2, 3, must be a graph on 16 vertices, regular of degree 5 (because each vertex has degree 15 and the neighborhood with one color has at most 5 vertices) and without triangles. Moreover, each vertex u ∈ V i has 10 vertices at distance 2, which can be reached by 5 · 4 = 20 paths of length 2. Then, we can consider a graph in which any two nonadjacent vertices have 2 common neighbors and any two adjacent vertices have no common neighbors. In other words, a (16, 5; 0, 2)-strongly regular graph. It is known that there is just one such graph, the Clebsch graph, which is illustrated in two different ways in Figure 13. On the left, there is the Clesbch graph, as the graph whose vertices are labeled with the numbers 0 to 15 in base 2, and where two vertices are adjacent whenever the corresponding labels differ either by one or by all four digits. On the right, there is the Clebsch graph, as the rooted graph with vertices labeled 0, i, and the unordered pairs ij, with i, j ∈ {1, 2, 3, 4, 5}, for i = j. In this representation, the adjacencies are 0 ∼ i, ij ∼ i, ij ∼ j, and ij ∼ kl if i, j, k, l are all different and i, j, k, l ∈ {1, 2, 3, 4, 5}. In fact, the Clebsch graph is vertex-transitive (informally speaking, we see the same structure from any vertex), so that any vertex can be chosen as vertex 0. Notice that, from this view of the Clebsch graph, it is apparent that the induced subgraph on ten vertices at distance 2 (from the vertex chosen as 0) is the Petersen graph [36]; compare Figure 13 (on the right) and Figure 10.
Therefore, our problem is to find three edge-disjoint copies of the Clebsch graph in K 16 . To this end, let us introduce the following terminology: Let G i = (V, E i ) be a family of graphs on the same vertex set V and such that E i ∩ E j = ∅, for i, j = 1, 2, . . . , m. We define the graph Notice that the corresponding adjacency matrices satisfy A(G) = m i=1 A(G i ). With Cl i denoting a graph isomorphic to the Clebsch graph, our problem now reads: Is it true that K 16 = Cl 1 ∪ Cl 2 ∪ Cl 3 ? In terms of their adjacency matrices A i = A(Cl i ), we have since the adjacency matrix of K 16 is equal to J − I, where J denotes the matrix whose entries are all 1 and I is the identity matrix.
We now use eigenvalue techniques to address Equation (7). Recall that the spectrum of an adjacency matrix gives the eigenvalues of this matrix (which are real because the matrix is symmetric), and that each eigenvalue has at least one eigenvector associated. To find the spectra of the Clebsch graph and the matrix J − I, we can either compute them or simply find them in some standard reference, such as Godsil and Royle [27]. We then have that sp A i = {5 1 , 1 10 , −3 5 } and sp(J − I) = {15 1 , −1 15 }, where the superscripts denote the multiplicity of each eigenvalue. In both cases, the largest eigenvalue has the all-1 vector j as eigenvector. It follows that the eigenvectors of the other eigenvalues are in the subspace H = j ⊥ (with vectors the addition of whose components are zero). Denote by E i the eigenspace of A i corresponding to the eigenvalue 1, namely, E i = ker(A i − I), and consider the subspace F = E 1 ∩ E 2 ⊂ H. As dim E 1 = dim E 2 = 10 and dim H = 15, we infer that dim F ≥ 5. From Equation (7), with where v ∈ F, we obtain that A 3 v = −3v and, then, dim F = 5 and F = ker(A 3 + 3I). This implies that This indicates that the required spectral condition necessary to the existence of the decomposition K 16 = Cl 1 ∪ Cl 2 ∪ Cl 3 is satisfied. In this case, this condition is also sufficient, and it is known that there are only two nonisomorphic decompositions. One of these is illustrated in Figure 14, which shows how to color one third of the edges of K 16 with one color using the Clebsch graph. By rotating this graph 2π 15 and 4π 15 radians, we obtain the edges to be colored with the two other colors; with this, we get R(3, 3, 3) = 17.

Common friends: Distance-regularity and coding theory
As commented by Aigner and Ziegler [1], nobody knows who was the first to state the following result and to give it the human touch: • At a cocktail party with three or more people, if each two people have exactly one friend in common, then there is a person (the 'politician') who is a friend of everybody.
Nowadays, this result is known as the Friendship theorem. As mentioned in the introduction, the first proof (by contradiction) was given by Erdős, Rényi and Sós [12] in 1966, and is considered to be the most successful. Basically, it has two parts: First, it is proved that if the graph G which models such a cocktail party (where people correspond to vertices and friendships are represented by edges) is a counterexample with more than three vertices, then it has to be regular, say with degree k. As a consequence, G has to be strongly regular with parameters (n, k; 1, 1), that is, every two adjacent vertices has exactly one common neighbor, and the same holds for every two nonadjacent vertices. Second, spectral graph theory is used to prove that G cannot exist. In fact, the hypothetic graph G would be an example of a distance-regular graph, in this case with diameter 2 (the concepts of strongly-regularity and distance-regularity coincide for connected graphs with diameter 2). Generally speaking, we say that a graph is distance-regular if, when it is observed or 'hung' from any of its vertices (called root), we obtain a partition of the vertex set into layers, where the layer i contains the vertices at distance i from the root, and the vertices in a layer are indistinguishable from each other with respect to their adjacencies. A more precise definition of distance-regularity is the following: A graph G with diameter D is distance-regular if, for every pair of vertices u, v and integers 0 ≤ i, j ≤ D, the number p ij (u, v) of vertices at distance i from u and at distance j from v only depends on the distance between u and v, dist(u, v) = k. Then, we write p ij (u, v) = p k ij , where the constants p k ij are called the intersection numbers. Indeed, because of the many relations between these numbers, it is possible to give a much more simple definition, since for each distance k we only need the pairs of distances (i, j) = (k−1, 1), (k, 1) and (k+1, 1). The corresponding intersection numbers are enough to determine all the others; see, for example, Biggs [4]. Therefore, the most common definition of distance-regularity is: A graph G is distanceregular if, for every pair of vertices u, v at distance dist(u, v) = k, the numbers c k , a k , and b k of vertices adjacent to v, and at distance k − 1, k, and k + 1, respectively, from u only depends on k, such that c k = p k k−1,1 , a k = p k k,1 , and b k = p k k+1,1 .
As simple examples of distance-regular graphs, we have the 1-skeleton of regular polyhedrons; see again Figure 1. In Figure 15, we show the layer partition of the cube graph Q with the so-called intersection diagram of the corresponding intersection numbers. Notice that each layer is represented by a circle containing its number of vertices.
Since their introduction by Biggs in the early 70's, distance-regular graphs, and their principal generalization called association schemes (see, for example, Brouwer and Haemers [9]), have been key concepts in algebraic combinatorics. These graphs have connections with other areas of mathematics, such as geometry, coding theory, group theory, design theory, and with other parts of graph theory. As pointed out by Brouwer, Cohen and Neumaier in their monumental book on this subject [8], this is because most of the finite objects with 'enough' regularity are closely related to distance-regular graphs.
In 1997 Fiol and Garriga [21,19] gave the following quasi-spectral characterization of distanceregular graphs: • A regular graph G with adjacency matrix A and d+1 distinct eigenvalues is distance-regular if and only if the number |Γ d (u)| of vertices at distance d from each vertex u is a constant and only depends on the spectrum of the matrix A.
As previously mentioned, the theory on distance-regular graphs has many applications in coding theory. Recall that a code C, with a set of allowed words or code-words, can be simply represented as a vertex subset of a distance-regular graph G; see Godsil [26] and van Lint [42]. The vertex subset represents the 'universe' of words, with or without meaning, which can be received. There is an edge between two words if, with a certain probability, one can be transformed into the other in the process of transmission. Then, the shorter the distance between two words in G, the more similar the words. If a code-word has not suffered too many changes, the resulting word is not far from the original one and it is possible to retrieve it (decision criterion by proximity). Therefore, a code is better if the words that constitute it are far away from each other. In the study and design of good codes, some algebraic techniques are used to obtain information about the structure of the graph G and, in particular, about the vertex subset C that represents the code. In the applications of special relevance, there are the so-called completely regular codes, whose graphs are structured in a kind of distance-regularity around the set that constitutes the code. Thus, these codes can be algebraically characterized in a similar way to the characterization of the distance-regular graphs through their spectra; see Fiol and Garriga [22] for more information.

Weddings: Hall's and Menger's theorems. Multibus networks
Let us imagine two groups of heterosexual people available for marriage, one of women and another of men, the latter at least as large as the former. Also imagine that every woman knows a certain number of men. The Hall Marriage theorem gives necessary and sufficient conditions for every woman to be able to marry a man who she knows: • A complete matching is possible if and only if each group of women, whatever their number, knows altogether at least an equal number of men.
If the sets of women and men are denoted by U and V , respectively, we can represent the above situation as a bipartite graph G = G(U ∪ V, E), with stable vertex sets U and V and where edges stand for acquaintances. Then, we can state Hall's theorem in a more mathematical form: • In a bipartite graph G = G(U ⊂ V, E) with |U | ≤ |V |, a complete matching is possible if and only if, for every U * ⊂ U , where Γ(U * ) = ∪ u∈U * Γ(u).
(Recall that Γ(u) ⊂ V is the set of vertices adjacent to vertex u ∈ U .) There are several proofs of Hall's theorem. The proof we present here is by Rado, although our reasoning is a little different from that in Bollobás [6] or Harary [29]. As necessity is trivial, we are going to prove sufficiency. If graph G satisfies Eq. (10), for any u i , u j ∈ U with i = j and Γ(u i ) ∩ Γ(u j ) = ∅, it is immediate that G contains a complete matching. If Γ(u i ) ∩ Γ(u j ) = ∅, then there exist at least two edges u i v and u j v, with v ∈ V . Now we claim that, after removing one of these edges, the resulting graph still satisfies Eq. (10). Indeed, if this were not the case, there would be two subsets U 1 , U 2 ⊂ U , with u i ∈ U 1 and u j ∈ U 2 , such that |Γ(U 1 )| = |U 1 | and |Γ(U 2 )| = |U 2 |. Moreover, u i would be the only vertex of U 1 adjacent to (some vertex of) V , and u j would be the only vertex of U 2 adjacent to V . See this situation in Figure 16. Then, we would have that the common number of adjacent vertices to U 1 and U 2 would satisfy the inequality: Moreover, we would also have: Figure 16. The situation of the proof of Hall's theorem.
a contradiction since, according to Eq. (10), Consequently, every vertex v ∈ V with degree δ(v) ≥ 2 can be converted to a vertex with degree 1, and the resulting graph still satisfies Eq. (10). This completes the proof. Curiously, Hall's theorem is closely linked to another classical result in graph theory: Menger's theorem; see, for example, Bollobás [7]. As in the case of Hall's theorem, Menger's theorem states that a certain condition, which is trivially necessary for a result to be true, is also sufficient. In Menger's case, the result is not on matchings, but on the vertex-connectivity κ (or edgeconnectivity λ) of a graph, which is defined as the minimum cardinality of a vertex (or edge) set whose deletion disconnects the graph or, in particular, two given vertices u, v. This set is called a cutting set or separating set of G or, in particular, of u, v. Then, Menger's theorem states that for every pair of vertices u, v (nonadjacent, in the case of computing κ): • The minimum size κ(u, v) of a separating set of vertices equals the maximum number of independent paths in vertices from u to v.
• The minimum size λ(u, v) of a separating set of edges equals the maximum number of independent paths in edges from u to v.
It has been shown that the vertex-connectivity κ = min u,v∈V κ(u, v) (or edge-connectivity λ = min u,v∈V λ(u, v)) of a graph or digraph G (a digraph is a graph whose edges are associated to one of the two possible directions) reaches its maximum value, which equals the minimum degree of G, if in G the diameter is small enough with respect to the girth (see Fàbrega and Fiol [15]) or if the number of vertices is large enough with respect to the diameter (see Fiol [17]).
Both the theorems mentioned, Hall's and Menger's, have many applications in the study and design of interconnection networks (for example, between processors) and in communication networks. Here we explain an application of Hall's theorem to the study of multibus interconnection networks: A multiprocessor system with shared memory and multibus interconnection network consists of P processors, B buses and M memory modules with B ≤ min{P, M }. The processors have access to the memory modules through the buses, so we can establish processor-bus and bus-memory connections. Let us assume that there are m requirements (with m ≤ M ) by the processors for accessing to different memory modules. As each processor-memory connection requires a bus, if m ≤ B, then m memories will be assigned; instead, if m > B, then only B memories will be assigned. In the complete scheme (see Figure 17), each bus is connected to all the memories and all the processors. This represents B(P + M ) connections, and generally this provides an important saving with respect to the crossbar network with P M connections, one connection between each pair processor-memory, because the number of buses is normally much smaller than the number of processors and memories. For example, if M = P (an usual situation), the saving is obtained if B < M/2. Because the cost of the network basically depends on the number of connections, it is useful to consider the redundancy of this scheme. Namely, what is the maximum number of connections (processor-bus or bus-memory) that can be removed without having system degradation? In other words, how many connections, from all of B(P + M ), can be removed such that any of the m ≤ B processors asking for access to any of the m different memory modules do not lose access? The answer is a direct consequence of the following result: • In a multiprocessor system with multibus network without having degradation, each bus can be disconnected from at most B − 1 altogether processors or memory modules.
The proof is as follows: For each bus i, 0 ≤ i ≤ B −1, let p i and m i be, respectively, the number of processors and memories connected to it. Analogously, let p i and m i be the numbers of processors and memories disconnected from bus i. Obviously, p i +p i = P and m i +m i = M . The result states that, in a non-degrading system, each bus i can be disconnected from, at most, B − 1 processors or memories, namely, p i + m i ≤ B − 1 for 0 ≤ i ≤ B − 1. But we can also state that each bus must have more than P +M −B connections, such that p i +m i > P +M −B for 0 ≤ i ≤ B−1. Assume that, on the contrary, for some bus i, we have p i + m i ≥ B. Let k 1 , k 2 , . . . , k y with y ≤ p i ≤ P and j 1 , j 2 , . . . , j x with x ≤ m i ≤ M be, respectively, the processors and memories disconnected to the bus i. Note that x + y = B. Now consider x other processors k y+1 , k y+2 , . . . , k y+x and y other memories j x+1 , j x+2 , . . . , j x+y , as in Figure 18. Let (k, j) be the requirement of processor k to access to memory j. None of the B requirements (k 1 , j x+1 ), (k 2 , j x+2 ), . . . , (k y , j x+y ), (k y+1 , j 1 ), (k y+2 , j 2 ), . . . , (k y+x , j x ) j 1 j 2 j x j x+1 j x+2 j x+y Bus i k y+1 k y+2 k y+x k 1 k 2 k y Figure 18. Part of a system that suffers degradation.
So, as stated before, the conclusion is that the maximum number of redundant connections is B(B − 1). In fact, this value is obtained with the so-called minimum topologies, such as the rhombic and the staircase topologies; see Tables 2 and 3, respectively. More details can be found in Fiol, Valero, Yebra and Land [24] and in Lang, Valero and Fiol [35].
Notice that the result only gives us necessary conditions for suffering degradation. In this context, Hall's theorem is used to give a characterization for the interconnection topologies to prevent degradation of the system, as in the aforementioned cases of the complete and the minimum topologies: • A multibus system does not suffer degradation if and only if any of the p ≤ B disjoint pairs processor-memory are connected to a set of, at least, p buses.
As previously stated, this result gives necessary and sufficient conditions for a non-degrading multibus system.