A note on a new general family of deterministic hierarchical networks ∗

It is known that many networks modeling real-life complex systems are small-word (large local clustering and small diameter) and scale-free (power law of the degree distribution), and very often they are also hierarchical. Although most of the models are based on stochastic methods, some deterministic constructions have been recently proposed, because this allows a better computation of their properties. Here a new deterministic family of hierarchical networks is presented, which generalizes most of the previous proposals, such as the so-called binomial tree. The obtained graphs can be seen as graphs on alphabets (where vertices are labeled with words of a given alphabet, and the edges are deﬁned by a speciﬁc rule relating diﬀerent words). This allows


Models for complex networks
Since the papers of Watts and Strogatz [17] on small-world networks and by Barabási and Albert [3] on scale-free networks, there has been a special interest in the theoretical study of complex networks, such as the World Wide Web [2], some kind of social networks [13,11,14], communication networks [10], protein networks [9,18], etc. Two main characteristics of such networks are the presence of a strong local clustering (that is, groups of nodes with mutual interconnections), high modularity, certain distribution of the degrees, and self-similarity. The subject continues to attract the interest of researchers. For some recent papers, see [16,1,12,15].
In this paper, we propose a new deterministic family, which generalizes some previous proposals of hierarchical networks [14,13,11,6,7]. As a first approach, our family of hierarchical networks is defined recursively from an initial complete graph on n k vertices. Also, it is shown that the obtained graphs can also be seen as graphs on alphabets [8]. The vertices of such graphs are labeled with words of a given alphabet, and their edges are defined by some specific rules relating different words. This allows us the characterization of their main distance-related parameters, such as the vertex eccentricities, the radius, and the diameter. Moreover, as a by-product, an efficient shortest-path local algorithm is proposed.

Some basic notation
Here we present the basic notation used throughout the paper. Let G = (V, E) be a finite, simple, and connected graph with vertex set V , order N = |V |, edge set E, and size M = |E|. If the vertices u and v are adjacent, uv ∈ E, we represent it by u ∼ v. The distance between vertices u and v is denoted by dist(u, v). The eccentricity of a vertex u is ε(u) = min{dist(u, v) : v ∈ V }. Hence, the radius and diameter of G are, respectively, R = min u∈V ecc(u), and D = max u∈V ecc(u). The Figure 1: The graph H k n from n k copies of H k−1 n .
set of vertices at distance i from a given vertex 2 The hierarchical graph H k n In this section, we generalize the constructions of deterministic hierarchical graphs introduced by Ravasz and Barabási [13], Ravasz, Somera, Mongru, Oltvai, and Barabási [14], Noh [11], and Barrière, Comellas, Dalfó and Fiol [7]. Roughly speaking, our graphs are constructed in the following way: Given k integers n 1 , n 2 , . . . , n k , we first connect a selected root vertex of the complete graph K n 1 to some vertices of n 2 − 1 copies of K n 1 , and then we add some new edges between such copies. This gives a graph with n 1 n 2 vertices. Next, n 3 − 1 replicas of the new whole structure are added, again with some edges between them and to the same root vertex. At this step, the graph has n 1 n 2 n 3 vertices. Then we iterate the process until the desired graph, with order N = n 1 n 2 · · · n k , is obtained. We give below two formal definitions.

A recursive definition
A recursive definition of the considered networks is as follows.
Definition 2.1. Let n 1 , n 2 , . . . a sequence of positive integers, n i ≥ 2, whose finite k-subsequences n 1 , . . . , n k are abbreviated by the symbols k n , k = 1, 2, . . .. The hierarchical graph H n 1 ,...,n k , also denoted by H k n , has vertex set V k n , with N = n 1 n 2 · · · n k vertices, each denoted by a k-string x 1 x 2 x 3 . . . x k , where x i ∈ Z n i for i = 1, . . . , k, and edge set E k n defined recursively as follows: • H 1 n ≡ H n 1 is the complete graph K n 1 .
To illustrate the recursive procedure, Fig. 1 shows the hierarchical graph H k n obtained by joining n k copies of H k−1 n . Notice that vertex r := 00 . . . 0, which we distinguish and call the root, is adjacent by (1) to vertices x 1 x 2 . . . x k , for x i = 0 and i = 1, . . . , k, which we call peripheral vertices.
In particular, if all the numbers n i , i = 1, . . . , k, are equal to, say n, we will denote the corresponding graph as H n k .

A definition as a graph on an alphabet
To give a more direct definition of H k n , it is convenient to introduce the following notation. The length (number of elements) of a given string x = x 1 . . . x will be denoted by |x|. If all its elements are nonzero, we represent it by x * = x * 1 . . . x * . A string with all its elements 0 is denoted by 0. Then, the edge set E k n is characterized by the following adjacency rules (the substrings of each vertex have appropriate lengths and, hence, they sum up to k): As a concrete example, Fig. 2 shows two different drawings of the graph H 2,3,4 .

Some particular cases 2.3.1 The hierarchical network H n,k
The hierarchical network introduced by Barrière, Comellas, and the authors (see [7]), which was denoted by H n,k is just H n k (that is, n 1 = · · · = n k = n). In turn, H n k generalizes the deterministic hierarchical network introduced by Ravasz, Somera, Mongru, Oltvai, and Barabási [14], see also Barabási and Oltvai, [4] (which corresponds to H 4 k ). Moreover, the deterministic hierarchical networks introduced by Ravasz and Barabási [13] and generalized by Noh [11], constitute a subgraph of H 5 k (some edges are not present).

The binomial tree B k
As it is well-known, a binomial tree is used in Computer Science to model a recursive data structure. A tree of degree zero B 0 is a singleton, in our context, allowing sequences of length zero, we could denote it as B 0 = H 2 0 . A tree of degree k, B k , is constructed from two trees of degree k − 1, by joining their two roots. Then, within our notation, B k = H 2 k . Figure 3 shows the binomial trees of order k = 0, . . . , 4. Notice that B k can also recursively defined by saying that its root node has as children the roots of binomial trees of orders k − 1, k − 2, ..., 2, 1, 0.
The binomial tree can also be seen as the hierarchical product of k copies of the complete graph on 2 vertices K 2 , denoted B k = K 2 k · · · K 2 (see Barrière,Comellas,Dalfó,and Fiol [5]).
In due course, we will show that the number of vertices x of H 2 k at distance i from the root r = 0 is the binomial coefficient k i (see Fig. 3). Of course, this property is the reason for the name of such a structure.

Hierarchical properties
The main structural properties of the graphs H k n are the following:

Order and size
We have already seen that the order of H k n is N = |V k n | = k i=1 n i . Concerning its size, we have the following result: Lemma 3.1. Let n ≡ n 1 , n 2 , . . . , n k . Then, the number of edges of H k n is Proof. Let M h be the size of H h n . Then, by using the recursive Definition 2.1, we have M 1 = n 1 and Note that the first term corresponds to the number of edges of the n h copies of H h−1 n , whereas the second and third terms account for the edges joining such copies, according to the conditions (1) and (2), respectively. Using this, the computation of (6) is immediate.

Subgraphs
The following lemma, whose proof follows easily by seeing H k n as a graph on an alphabet, shows the hierarchical nature of our networks.
(ii) Let n ≡ n 1 , . . . , n k . For every i, 1 ≤ i ≤ k − 1, H k n can be decomposed into n i vertex-disjoint subgraphs isomorphic to H x 1 ,...,x k−i . Each of such subgraphs is denoted by H k−i nα , and has vertex labels (iv) By collapsing in H k n each of the n k−i+1 · · · n k subgraphs H i nα , with a fixed α ∈ Z k−i+1 ×· · ·×Z k , into a single vertex and all multiple edges into one, we obtain a graph isomorphic to H n k−i+1 ,...,n k .
(v) For every fixed i, 1 ≤ i ≤ k, and a given sequence α ∈ Z i+1 × · · · × Z k , the n i − 1 vertices labeled 0x * i α with x * i ∈ Z * n i (that is, the root vertices of H i−1 nx * i α ) induce a complete graph isomorphic to K n i −1 .

Distance parameters
First, we introduce some notation concerning H k n . Let dist k (x, y) denote the distance between vertices x, y ∈ V k n in H k n ; and dist k (x, U ) := min u∈U {dist k (x, u)}. Let r α = 00 . . . 0 be the root vertex of H k−1 nα , α ∈ Z n (as stated before, r stands for the root vertex of H k n ). Let P and P α for α ∈ Z n k , denote the set of peripheral vertices of H k n and H k−1 nα , respectively.

The distance function
In [7] Barrière, Comellas, and the authors proved that the radius R k of H n,k , the eccentricity ecc k (r) of its root r, and its diameter D k are R k = ecc(r) = k, and D k = 2k − 1. Here we will be more precise and will give both a formula for the distance between vertices, and a proof that the routing algorithm of the next section always gives the shortest path.
Given a k-sequence x = x 1 . . . x k ∈ V k n , consider the 'expanded' (k + 1)-sequence x + = x0 (that is, with x k+1 = 0). Then, the alternating number of x, denoted by alt(x), is the number of changes in x + from a zero element, say x i , to a nonzero element x * i+1 (or vice versa). For instance, if x = x * 1 0 2 x * 3 0 4 x * 5 , then alt(x) = 5 (here the 0 i 's denote zero strings of some length), and if x = x * 1 0 2 x * 3 0 4 , then alt(x) = 3. Moreover, given two k-sequences x, y, we denote its maximum common suffix as x ∩ y, with length = |x ∩ y|, for 0 ≤ ≤ k.
By looking at the structure of adjacent vertices given by the adjacency conditions (3)-(5), the following result is clear. • If condition (4) holds, then, alt(x) = alt(y) ± 1.
Proof. By Corollary 4.2, it is clear that, if x k = 0 there is a shortest path from x to r = 0 of length alt(x). Otherwise, if x k = x * k = 0, there is a shortest path from x to x * = x * 1 . . . x * k of length alt(x) − 1, but x * is adjacent to 0.
As an example, note that in the binomial tree B k = H 2 k , the vertices at distance i from the root r = 0 are the binary sequences x satisfying alt(x) = i. Thus, its number is the binomial coefficient k i , as was commented before.
The following result gives the distance between two generic vertices x, y of H k n . To avoid the trivial case of the complete graph, we will suppose that k ≥ 2. Moreover, without loss of generality, we can assume that x and y have no common suffix (so that x k = y k ). Otherwise, if x = x 1 x 2 . . . x k−i α and y = y 1 y 2 . . . y k−i α, that is, α = x∩y and i = |α| > 0, we are in the subgraph H k−i nα (by Lemma 3.2(iii)) and, hence, we can apply the routing algorithm to the vertices x = x 1 x 2 . . . x k−i and y = y 1 y 2 . . . y k−i of H k−i n .
Proposition 4.4. Let x = x 1 . . . u and y = y 1 . . . v be two vertices of H k n , with no common suffix, and where all elements of u are either zero or nonzero, and all elements of v are either nonzero or zero, respectively. Let x be the sequence obtained from x by deleting its rightmost element x k , and similarly for y = y \ y k . Then, (i) If either x k = 0 or y k = 0, then dist(x, y) = alt(x) + alt(y).
Proof. First, notice that, as |x ∩ y| = 0, we always have x k = y k . Then the key idea is that we cannot reach y from x without going through vertices with most of their elements being null (roots). Thus, using Corollary 4.3, we have: (i)-(ii) In these cases, the shortest path must go through the root r = 0 and, hence, dist(x, y) = dist(x, r) + dist(r, y) = alt(x) + alt(y).

Eccentricity, radius and diameter
As a consequence of the above results, we have the following lemma: Lemma 4.5. Let x be a vertex of H k n , as in Proposition 4.4. Then, its eccentricity ecc k (x), the radius R k of H k n , and its diameter D k are: (i) For the eccentricity, we must distinguish two cases: (i.1) If n = 2, 2, . . . , 2 (that is, H k n is the binomial tree B k ), let x denote the sequence obtained from x by interchanging 0's and 1's. Then, (ii) The radius of H k n coincides with the eccentricity of its root: (iii) The diameter of H k n is the same as that of H n k : Proof. (i) If x k = 0, by Proposition 4.4(i), dist(x, y) = alt(x)+alt(y), but max{alt(y)} = k. This proves que first case in (i.1), and the second one in (i.2) (since the same is true when |u| > 1, by Proposition 4.4(ii)). The second equality in (i.1) follows from the fact that the mapping x → x is an isomorphism on the binomial tree. Finally, the first equality in (i.2) is proved similarly by using Proposition 4.4(iii).
(ii) Take x = r in (i).
(iii) Take x with alt(x) = k in (i).

A shortest path routing algorithm
The reasoning that support Proposition 4.4, leads us to a routing algorithm between two generic vertices x, y of H k n , which follows a shortest path.
algorithm: Routing input: Sequence n 1 , . . . , n k , Vertices x = x 1 . . . u, y = y 1 . . . v (with u and v maximal being uniform subsequences) output: A shortest path between x and y If x k = 0 or y k = 0 or |u|, |v| > 1 then while alt(x) > 0 do go to x := swap(x) r := 0 while r = y do go to r := swap(r → y) Else while alt(x ) > 0 do go to x := swap(x ) x := x ∪ x k r := 0y k while r = y do go to r := swap(r → y) end Table 1: A shortest path routing algorithm.

Routing
Let us consider two vertices in H k n , say x = x 1 x 2 . . . x k and y = y 1 y 2 . . . y k . In Table  1, we show a possible version of the routing algorithm. As commented above, the key idea is to go through, either, the root r = 0 of H k n , or the roots r = 0k − 1x k and r = 0k − 1y k of the respective subgraphs. To describe the algorithm it is useful to introduce some further notation. Given a sequence x = x 1 x 2 . . ., we denote by x = x 1 x 2 . . . the sequence obtained from x by changing each zero term x i by an (arbitrary) nonzero term x i ∈ Z n i and vice versa. Of course, if n i = 2, x i is just the already defined (and determined) conjugate of x i . Moreover, we say that x is uniform if all its terms are either zero or nonzero. If x has maximum uniform prefix u, we denote by swap(x) the sequence obtained from x by changing u to u. Similarly, given two sequences of the form x = u 1 u 2 w, and y = v 1 v 2 w, where both u = u 1 u 2 and v 2 are maximal uniform subsequences, one of them being 0, and |u 2 | = |v 2 |, we denote by swap(x → y) the sequence u 1 v 2 w. (For a better understanding, see the examples in the next subsection.)

Examples
Let us now see three examples of the outputs of our routing algorithm. Each example corresponds to one of the cases of Proposition 4.4. According to this result, in each case we have taken vertices x and y with no common suffix, so that x k = y k .