Open Access
This article is

- freely available
- re-usable

*Symmetry*
**2018**,
*10*(9),
407;
https://doi.org/10.3390/sym10090407

Article

Vertex Labeling and Routing for Farey-Type Symmetrically-Structured Graphs

^{1}

School of Computer, Guangdong University of Technology, Guangzhou 510006, China

^{2}

School of Information Engineering, Guangdong University of Technology, Guangzhou 510006, China

^{3}

System and Network Engineering Research Group, Informatics Institute, University of Amsterdam, Science Park 904, 1098XH Amsterdam, The Netherlands

^{4}

School of Mathematics and Physics, Anhui Jianzhu University, Hefei 230601, China

^{*}

Author to whom correspondence should be addressed.

Received: 31 July 2018 / Accepted: 15 September 2018 / Published: 17 September 2018

## Abstract

**:**

The generalization of Farey graphs and extended Farey graphs all originate from Farey graphs. They are simultaneously scale-free and small-world. A labeling of the vertices for them are proposed here. All of the shortest paths between any two vertices in these two graphs can be determined only on their labels. The number of shortest paths between any two vertices is the product of two Fibonacci numbers; it is increasing almost linearly with the order or size of the graphs. However, the label-based routing algorithm runs in logarithmic time O(logn). Our efficient routing protocol for Farey-type models should help contribute toward the understanding of several physical dynamic processes.

Keywords:

complex networks; deterministic models; Farey-type graphs; vertex labeling; shortest path routing## 1. Introduction

In comparison with empirical and random graphs, deterministic models have unique advantages in improving our comprehension in complex networks. For instance, we can obtain the solutions for a deterministic model by rigorous derivation, and the computation is only a small quantity of calculations. Deterministic models can be created by simple recursive operation [1,2,3,4], construction of fractal processes [5], plane filling techniques [6], the relationships between natural numbers [7], or perspectives and methods from classical research of physical processes [8,9,10,11]. Recently, Zhang et al. introduced Farey graphs (FG) on the basis of classical Farey sequences. Farey graphs are simultaneously uniquely Hamiltonian, minimally three-colorable, maximally outer-planar, and perfect [12,13]. FG can be used as modules of multiple networks. The networks created by edge iterations [14], or evolving graphs with geographical attachment preference [15], coincide with the combination of three FG, while the merger of six FG generates graphs with multidimensional growth [16]. Moreover, two new kinds of Farey-type graphs, the generalization of Farey graphs (GFG), and the extended Farey graphs (EFG) are deduced by generalizing the construction mechanism of FG, and they all are scale-free and small-world [17,18,19].

Deterministic graphs also provide a new perspective and methodology for classical research of physical processes. For example, some important dynamical processes on the basis of Apollonian models [20], a kind of deterministic matching graph, space-filling, Euclidean, small-world, and scale-free, has been researched extensively. Accurate analytical solutions are derived, including percolation [21], electrical conduction [20], Ising models [20], quantum transport [22], partially connected feedforward neural networks [23], traffic gridlock [24], Bose–Einstein condensation [25], free-electron gas [26], and so on. However, the study of physical processes using FG is still lacking, as the recursive relationships in FG are more complex than for Apollonian networks.

The label-based routing protocol for all shortest paths may also bridge Farey-type graphs with the fields below. The all-pairs shortest paths problem is frequently studied in textbooks and it has remained open to this day, the classical algorithms such as the A*, Bellman–Ford, Floyd–Warshall and Dijkstra algorithms all run in subcubic time $O({\left|V\right|}^{3-\delta})$, where $\delta >0$ [27,28,29,30,31]. The $K$ shortest path routing (KSPR) algorithm is an extension of the shortest path routing algorithm, in which $K$ is the number of shortest paths to find [32]. KSPR finds K paths in order of increasing cost, including the shortest path. KSPR in Farey-type graphs will partly reduce to finding out all the shortest paths. Similar to the minimum spanning problem, the graph Steiner tree problem (GSTR) interconnects a set $V$ of vertices by using a network of shortest length, and the length is the sum of the lengths of all edges [33]. Most versions of GSTR are NP (non-deterministic polynomial) complete. Moreover, the bottleneck of many network analysis algorithms is the exorbitant computational complexity of calculating the shortest paths, so that scientists are forced to use approximation algorithms [34].

Graph labeling is one active subject in graph theory. Graph labeling has a wide range of applications in many fields, such as communication design, circuit design, crystallography, and coding theory [35]. Finding the shortest paths in graphs is an open problem, which has been well studied. Zhang and Camellas pioneered the relationship between the shortest paths and vertex labels [35,36,37,38,39]. They can determine the shortest path just by applying simple rules and a few computations based only on their labels.

We propose an algorithm for labeling nodes—all of the shortest paths between any pair of vertices can be efficiently derived only on the basis of their labels. We found that the number of shortest paths between two vertices is huge, but the routing algorithm runs in logarithmic time O(logn).

Furthermore, the existence of symmetry in real-world graphs have been underlined by analyzing of over 1500 graph datasets [40,41,42,43]. It was found that over 70% of the empirical networks contain symmetries, independent of size and modularity. All the graphs we proposed here are symmetrically-structured on the basis of Farey-type graphs, and therefore our labeling and routing algorithms can provide a new viewpoint on empirical networks which are containing symmetries.

## 2. Generation of Farey-Type Graphs

GFG and EFG are generalized from FG; we present the definitions of the three in turn.

**Definition**

**1.**

(Generation of FG) Farey graph $F(t)=(V(t),E(t))$ is constructed as follows (see Figure 1), in which the iteration step $t\ge 0$, with vertex set$V(t)$and edge set$E(t)$[6]:

- $F(0)$has two vertices and an edge.
- For$t\ge 1$,$F(t)$is obtained from$F(t-1)$by adding a new vertex to every edge which is introduced at step$t-1$in$F(t-1)$, then to linking the new vertex to the two vertices of that edge.

**Remark**

**1.**

The number of vertices added at step$t$is$\Delta {n}_{t}={2}^{t-1}$, so that the order of FG is$\left|V(t)\right|={2}^{t}+1$and the size is$\left|E(t)\right|={2}^{t+1}+1$, respectively. The cumulative degree distribution follows an exponential distribution${P}_{cum}(\delta )={2}^{-\frac{\delta}{2}}$, and the degree correlation${k}_{nn}(\delta )$is approximately a linear function of $\delta $ [6,7].

All the vertices in$F(t)$are divided into three groups by their distances to two initial vertices$X$and$Y$:${V}^{x}(t)$,${V}^{xy}(t)$and${V}^{y}(t)$. The nodes in${V}^{y}(t)$(including$Y$) have shorter distances to$Y$than to $X$, while${V}^{x}(t)$(including$X$) have shorter distances to$X$, and in${V}^{xy}(t)$the distances are equal. That is to say,$V(t)={V}^{x}(t)\cup {V}^{xy}(t)\cup {V}^{y}(t)$. As$X$and$Y$are neighbors, the difference in distances above are 0 or 1. If two copies of$F(t)$are named as${F}_{1}(t)$and${F}_{2}(t)$, the initial vertices are${X}_{1}$,${Y}_{1}$and${X}_{2}$,${Y}_{2}$, then$F(t+1)$is generated as shown in Figure 2.

**Definition**

**2.**

- For$t=0$,$GF(0,k)$is composed of three initial vertices which are linked to each other.
- For$t\ge 1$,$GF(t,k)$is constructed from$GF(t-1,k)$by adding$k$new vertices to every edge introduced at step$t-1$, then linking the$k$new vertices to the two end vertices.

**Remark**

**2.**

$GF(t,1)$is exactly the graphs created by edge iterations [8]. It is just the evolving graphs with geographical attachment preference [9]. GFG can also be treated as a flower, which has$3\times k$identical petals, denoting as${P}_{i}(t)$,$i=1,2,\dots ,3\times k$. All petals are rooted from two initial vertices, as a GFG is made up of three groups, so that each group contains$k$identical petals.

**Definition**

**3.**

(Generation of EFG) The construction of$EF(t,k)$is shown as below:

- For$t=0$, $EF(0,k)$ holds three vertices that are linked to each other.
- For$t\ge 1$,$EF(t,k)$is constructed from$EF(t-1,k)$by adding$k$new vertices to every edge linked at step$t-1$and three initial edges added at$t=0$, then linking the$k$new vertices to the two end vertices (see Figure 4).

**Remark**

**3.**

The generation method of EFG is slightly different from GFG, which lies in the three initial edges, not only the edges merged at step $t-1$, but as active edges that can generate new vertices. EFG has$3\times t\times k$petals, named${P}_{i}({t}_{j})$,$i=1,2,\dots ,3\times k$and${t}_{j}=0,1,\dots ,t$; a GFG is therefore just part of an equivalent EFG.

## 3. Labeling and Routing of $F(t)$

The labeling and routing protocol of GFG and EFG are extended from FG; the label-based routing algorithm was originally derived in [33], but we redefine it here for completeness and clarity. In order to save space, we do not repeat the proofs of these properties in this section.

**Definition**

**4.**

Labeling any vertex in FG as follow (see Figure 5):

- Label two initial vertices as$0.1$and$0.0$when t = 0.
- When$t\ge 1$, the new vertices added at step t are marked with labels from$t.1$to$t{.2}^{t-1}$in a clockwise direction.

Supposing any two vertices are labeled with ${t}_{i}.k$ and ${t}_{j}.l$, and ${t}_{i}\ge {t}_{j}$. Then the mother vertex of ${t}_{i}.k$ added to the graph at step ${t}_{i}-1$. Two vertices with same mother are brothers. The father is added to the graph at step ${t}_{i}-2$ or earlier. The following relationships between different vertices, are extracted with the help of their labels.

**Property**

**1.**

(The family of ${t}_{i}.k$)

Two children of${t}_{i}.k$are$({t}_{i}+1).(2k-1)$and$({t}_{i}+1).2k$when${t}_{i}\ge 1$.

When${t}_{i}\ge 2$,The brother of${t}_{i}.k$is${t}_{i}.(k+1)$(when$k$is odd) or${t}_{i}.(k-1)$(when$k$is even).

When${t}_{i}\ge 2$,${t}_{i}.k$and its parents shapes a triangle. The mother is$({t}_{i}-1).\lfloor \frac{k}{2}\rfloor $and the father is$({t}_{i}-l).\lfloor \frac{k-rem(k,2)}{{2}^{l}}\rfloor $(in which$rem(k,2)$is the remainder of$k$divided by 2,$\lfloor x\rfloor =floor(x)$is a function rounding the real number$x$down towards the nearest integer. The integer$l(\ge 2)$is the number of the continuous zeros from right to left in the binary sequence created by converting the value of$k-rem(k,2)$to base 2, plus one, that is, l = Function(k-rem (k,2)).

If${t}_{i}\ge {t}_{j}$, the$({t}_{i}-{t}_{j})th$generation of maternal ancestor of${t}_{i}.k$is${t}_{j}.\lfloor \frac{k}{{2}^{{t}_{i}-{t}_{j}}}\rfloor $.

**Property**

**2.**

(The neighbors of${t}_{i}.k$)

When${t}_{i}=0$, the neighbors of$0.0$is$\left\{x.1\right\}$,$x\in \{0,1,2,\dots ,t\}$, and the neighbors of$0.1$are$\{0.0,x{.2}^{x-1}\}$,$x\in \{1,2,\dots ,t\}$.

When${t}_{i}=1$, the neighbors of$1.1$are$\{0.0,0.1,(1+x){.2}^{x-1}(2k-1),(1+x).[{2}^{x-1}(2k-1)+1]\}$,$x\in \{0,1,2,\dots ,t\}$.

When${t}_{i}\ge 2$, the neighbors of${t}_{i}.k$are$\{({t}_{i}-l).$$\lfloor \frac{k-rem(k,2)}{{2}^{l}}\rfloor ,({t}_{i}-1).\lfloor \frac{k}{2}\rfloor ,({t}_{i}+x){.2}^{x-1}(2k-1),$$({t}_{i}+x).[{2}^{x-1}(2k-1)+1]\}$,$x\in \{1,2,\dots ,$$t-{t}_{i}\}$.

**Property**

**3.**

When two vertices are located in different subgraphs${F}_{1}(t-1)$and${F}_{2}(t-1)$of$F(t)$, the hub$X$of$F(t)$is on the shortest paths, if

(1)${t}_{i}.k\in {V}_{2}^{x}(t-1)$and${t}_{j}.l\in {V}_{1}^{y}(t-1)/\left\{{Y}_{1}\right\}$,

(2) or${t}_{i}.k\in {V}_{1}^{x}(t-1)$and${t}_{j}.l\in {V}_{2}^{y}(t-1)/\left\{{Y}_{2}\right\}$,

(3) or${t}_{i}.k\in {V}_{2}^{x}(t-1)\cup {V}_{2}^{xy}(t-1)$and${t}_{j}.l\in {V}_{1}^{x}(t-1)\cup {V}_{1}^{xy}(t-1)$,

(4)${t}_{i}.k\in {V}_{1}^{x}(t-1)\cup {V}_{1}^{xy}(t-1)$and${t}_{j}.l\in {V}_{2}^{x}(t-1)\cup {V}_{2}^{xy}(t-1)$. Two initial vertices${Y}_{1}$and${Y}_{2}$of$F(t)$are located on the shortest paths if

(1)${t}_{i}.k\in {V}_{2}^{y}(t-1)$and${t}_{j}.l\in {V}_{1}^{y}(t-1)$,

(2) or${t}_{i}.k\in {V}_{1}^{y}(t-1)$and${t}_{j}.l\in {V}_{2}^{y}(t-1)$.

Vertices$X$,${Y}_{1}$and${Y}_{2}$lie on the shortest paths simultaneously if

(1)${t}_{i}.k\in {V}_{2}^{y}(t-1)$and${t}_{j}.l\in {V}_{1}^{xy}(t-1)$,

(a) or${t}_{i}.k\in {V}_{1}^{y}(t-1)$and${t}_{j}.l\in {V}_{2}^{xy}(t-1)$.

**Property**

**4.**

All the shortest paths between any pair of vertices are located a minimum common subgraph (MCSG) denoted as ${F}_{}^{mcsg}({t}_{\mathrm{min}})$. Moreover, one vertex is an initial vertex or a$(p+1)th$layer vertex in${F}_{3-\eta}^{mcsg}({t}_{\mathrm{min}}-1)$, the other is positioned in the outermost layer of${F}_{\eta}^{mcsg}({t}_{\mathrm{min}}-1)$.

**Property**

**5.**

(The shortest paths routing algorithm of Farey graphs)

- 1.
- Given a pair of vertices labeled with${t}_{i}.k$and${t}_{j}.l$.
- 2.
- Determine whether the two vertices are neighbors or not.

If${t}_{i}-{t}_{j}=1$and$l=\lfloor \frac{k}{2}\rfloor $, or${t}_{i}-{t}_{j}=m$and$l=\lfloor \frac{k-rem(k,2)}{{2}^{m}}\rfloor $, by Property 1, the two vertices are in a mother-child or father-child relationship. Insert the two labels to the labels set of the shortest paths ($LSS{P}_{m}(h)$). Noticing that$LSS{P}_{m}(0)=\varnothing $and$m$is an integer increasing from one, go to step 6.

3. Find out MCSG when $l=\lfloor \frac{k}{{2}^{{t}_{i}-{t}_{j}}}\rfloor $, namely, where ${t}_{j}.l$ is the $({t}_{i}-{t}_{j})th$ generation of maternal ancestor of ${t}_{i}.k$.

If$k\in \{(l-1)\times {2}^{{t}_{i}-{t}_{j}}+{2}^{{t}_{i}-{t}_{j}-1}+2\}$, or$k\in \{(l-1)\times {2}^{{t}_{i}-{t}_{j}}+{2}^{{t}_{i}-{t}_{j}-1}+3,$$(l-1)\times {2}^{{t}_{i}-{t}_{j}}+{2}^{{t}_{i}-{t}_{j}-1}+4\}$, or ..., or$k\in \{(l-1)\times {2}^{{t}_{i}-{t}_{j}}+{2}^{{t}_{i}-{t}_{j}-1}+{2}^{{t}_{i}-{t}_{j}-2}+1,l\times {2}^{{t}_{i}-{t}_{j}}\}$, MCSG is the embedded subgraph from$F(2)$to$F({t}_{i}-{t}_{j})$.${t}_{j}.l$is the initial vertex$0.0$and${t}_{i}.k$is an outermost layer vertex in MCSG.

If$k\in \{(l-1)\times {2}^{{t}_{i}-{t}_{j}}+{2}^{{t}_{i}-{t}_{j}-1}-2\}$, or$k\in \{(l-1)\times {2}^{{t}_{i}-{t}_{j}}+{2}^{{t}_{i}-{t}_{j}-1}-3,(l-1)\times {2}^{{t}_{i}-{t}_{j}}+{2}^{{t}_{i}-{t}_{j}-1}-4\}$, or ..., or$k\in \{(l-1)\times {2}^{{t}_{i}-{t}_{j}}+1,(l-1)\times {2}^{{t}_{i}-{t}_{j}}+{2}^{{t}_{i}-{t}_{j}-1}\}$, MCSG is also the embedded subgraph from$F(2)$to$F({t}_{i}-{t}_{j})$, but${t}_{j}.l$is the other initial vertex$0.1$. Go to step 5.

4. Find out MCSG when $l\ne m=\lfloor \frac{k}{{2}^{{t}_{i}-{t}_{j}}}\rfloor $.

If${t}_{j}.m$is the$({t}_{i}-{t}_{j})th$generation of maternal ancestor of${t}_{i}.k$, then${F}_{}^{mcsg}({t}_{\mathrm{min}})=F({t}_{i}-{t}_{j}+p+1)$, in which${2}^{p-1}\le \left|m-l\right|\le {2}^{p}$. Go to step 5.

5. Determine whether $X$, ${Y}_{1}$ and ${Y}_{2}$ of MCSG are on the shortest paths or not.

Map the labels of${F}_{}^{mcsg}({t}_{\mathrm{min}})$onto labels of$F({t}_{\mathrm{min}})$and divide all the vertices in$F({t}_{\mathrm{min}})$into six sets as above:${V}_{\eta}^{x}({t}_{\mathrm{min}}-1)$,${V}_{\eta}^{xy}({t}_{\mathrm{min}}-1)$and${V}_{\eta}^{y}({t}_{\mathrm{min}}-1)$. Then, decide whether$X$,${Y}_{1}$and${Y}_{2}$are on the shortest paths by Property 3 or not.

If only the node$X$is on the paths, then insert the label of$X$, assuming the label is${t}_{p}.q$, in the middle of${t}_{j}.l$and${t}_{i}.k$in$LSS{P}_{m}(h)$, and$h=h+1$. Thereafter, go back to step 1 with two new pairs of labels:${t}_{i}.k$and${t}_{p}.q$,${t}_{p}.q$and${t}_{j}.l$.

If only${Y}_{1}$and${Y}_{2}$are on the paths, insert the labels of${Y}_{1}$and${Y}_{2}$, being${t}_{p1}.q1$and${t}_{p2}.q2$respectively, in the middle of${t}_{i}.k$and${t}_{j}.l$in$LSS{P}_{m}(h)$, and$h=h+2$. Get two new pairs of labels,${t}_{i}.k$and${t}_{p1}.q1$,${t}_{p2}.q2$and${t}_{j}.l$, and go back to step 1.

If$X$,${Y}_{1}$and${Y}_{2}$are all on the paths at the same time, insert${t}_{p}.q$into$LSS{P}_{m}(h)$and$h=h+1$, then insert${t}_{p1}.q1$and${t}_{p2}.q2$into$LSS{P}_{m+1}(h)$,$h=h+2$. Go back to step 1 with four pairs of labels:${t}_{i}.k$and${t}_{p}.q$,${t}_{p}.q$and${t}_{j}.l$,${t}_{i}.k$and${t}_{p1}.q1$,${t}_{p2}.q2$and${t}_{j}.l$.

6. Ascertain the shortest paths routing.

The shortest paths are traversed over every element in every set of$LSS{P}_{m}(h)$in order, where$m$is the number of the shortest paths and$h$is the distance between${t}_{i}.k$and${t}_{j}.l$.

**Property**

**6.**

The shortest paths routing algorithm in Property 5 between any two vertices of a Farey graph runs in logarithmic time.

**Proof.**

Each algorithm has its time complexity and space complexity.

The space complexity of the shortest paths routing algorithm in Property 5 is decided by the number of shortest paths. The number is exactly the product of two Fibonacci numbers. When ${t}_{i}={t}_{j}=t$, the max number is ${F}_{\lfloor \frac{t}{2}\rfloor +1}\times {F}_{\lfloor \frac{t-3}{2}\rfloor +1}=\frac{1}{5}[{(\frac{1+\sqrt{5}}{2})}^{\lfloor \frac{t}{2}\rfloor +1}-{(\frac{1-\sqrt{5}}{2})}^{\lfloor \frac{t}{2}\rfloor +1}][{(\frac{1+\sqrt{5}}{2})}^{\lfloor \frac{t-3}{2}\rfloor +1}-{(\frac{1-\sqrt{5}}{2})}^{\lfloor \frac{t-3}{2}\rfloor +1}]$, increasing almost exponentially [33]. The order and size of FG is $\left|V(t)\right|={2}^{t}+1$, so the space complexity increases almost linearly with O(n).

However, the time complexity is determined by the maximum number of the vertices, which are located in the shortest paths in two Farey-type graphs. We can obtain that all the vertices on the shortest paths shape rhombuses which are zigzagged adjacent from the construction mechanism. The max number of rhombuses from ${t}_{i}.k$ to $0.\lfloor \frac{k}{{2}^{{t}_{i}-2}}\rfloor $ is $\lfloor \frac{{t}_{i}}{2}\rfloor $. While from ${t}_{j}.l$ to $0.\lfloor \frac{l}{{2}^{{t}_{j}-2}}\rfloor $ is $\lfloor \frac{{t}_{j}-3}{2}\rfloor $. That is to say, only at most $2t+1$ vertices need to be ascertained in the routing algorithm. When determining a vertex of $2t+1$ vertices, several operations of addition and multiplication are needed. For the order of FG is $\left|V(t)\right|={2}^{t}+1$ and $\mathrm{log}\left|V(t)\right|\propto t$, all the shortest paths can be determined in logarithmic time $O(\mathrm{log}n)$. ☐

## 4. Labeling of $GF(t,k)$ and $EF(t,k)$

**Definition**

**5.**

(The labeling of GFG) The labeling of any vertex in $GF(t,k)$ adheres to the following rules:

- The three initial vertices are labeled with 0, 1 and 2.
- At any step$t\ge 1$, a vertex in$GF(t,k)$is marked with$a.b.c.d$according to the group ($a$), the subgroup ($b.c$) and the precise positions ($d$) from down to top in the same subgroup, in which$a\in \{0,1,2\}$,$b=\{1,2,\dots ,t\}$,$c\in \{1,2,\dots ,{2}^{b-1}\}$and$d\in \{1,2,\dots ,{k}^{b}\}$.

**Definition**

**6.**

(The labeling of EFG) Vertices in$EF(t,k)$are labeled as follows:

- Label three initial vertices as 0, 1 and 2.
- At step$t\ge 1$, a vertex is tagged with$a.b.c.d$, in which$a\in \{0,1,2\}$,$b=\{1,2,\dots ,t\}$,$c\in \{1,2,\dots ,$${2}^{b-1}\}$and$d\in \{1,2,\dots ,(t-b+1)\times {k}^{b}\}$.

**Remark**

**4.**

A GFG has more petals than an EFG, such that${d}_{\mathrm{max}}=(t-b+1)\times {k}^{b}$in EFG, while${d}_{\mathrm{max}}={k}^{b}$in GFG.

When $t\ge 2$, any new vertex, added to GFG/EFG at step ${t}_{i}$, links to two vertices: a mother and a father. The vertices added to graphs at the same time are siblings if they have the same parents. Supposing that two arbitrary vertices in GFG/EFG are labeled with ${a}_{1}.{b}_{1}.{c}_{1}.{d}_{1}$ and ${a}_{2}.{b}_{2}.{c}_{2}.{d}_{2}$, in which ${b}_{1}\ge {b}_{2}$, then, we give several properties satisfying GFG and EFG at once.

**Property**

**7.**

(The family of $a.b.c.d$)

When$b\ge 1$,$a.b.c.d$belongs to a set of siblings {$a.b.c.(k\lfloor \frac{d}{k}\rfloor +1),a.b.c.(k\lfloor \frac{d}{k}\rfloor +2)$, $\dots ,a.b.c.(k\lfloor \frac{d}{k}\rfloor +k)$}.

When$b\ge 2$,$a.b.c.d$and its parents define a triangle, the mother is$a.(b-1).\lfloor \frac{c}{2}\rfloor .\lfloor \frac{d}{k}\rfloor $, the father is$a.(b-l).\lfloor \frac{c-rem(c,2)}{{2}^{l}}\rfloor .\lfloor \frac{d}{{k}^{l}}\rfloor $.

If$b\ge {b}_{0}$, the$(b-{b}_{0})th$generation of maternal ancestor of$a.b.c.d$is$a.{b}_{0}.\lfloor \frac{c}{{2}^{b-{b}_{0}}}\rfloor .\lfloor \frac{d}{{k}^{b-{b}_{0}}}\rfloor $.

**Proof.**

The above results are self-evident, with the exception of the formulation of the father’s label, which we shall now prove. If $b\ge 2$, let $l$ denotes the difference $b-{b}_{1}$, thus, $l\in \{2,\dots ,b-2\}$. When $c=1$ and with any $b$, the fathers are all the initial vertexes. When $c$ is odd but excluding one, $l$ is one plus the number of the continuous zeros from right to left in the binary representation of $c-1$, such that the father is labeled as $a.(b-l).\lfloor \frac{c-1}{{2}^{l}}\rfloor .\lfloor \frac{d}{{k}^{l}}\rfloor $. When $c$ is even, the time difference $l$ is one plus the number of the continuous zeros from right to left of the binary representation of $c$, such that the father’s label is $a.(b-l).\lfloor \frac{c}{{2}^{l}}\rfloor .\lfloor \frac{d}{{k}^{l}}\rfloor $. In summary, the father of $a.b.c.d$ is $a.(b-l).\lfloor \frac{c-rem(c,2)}{{2}^{l}}\rfloor .\lfloor \frac{d}{{k}^{l}}\rfloor $ when $b\ge 2$. ☐

**Remark**

**5.**

The vertex$a\mathrm{.1.1.}d$has two mothers$\{0,1,2\}/\left\{a\right\}$and no father. The three initial vertices have no parents or siblings. Therefore, the neighbors of$a.b.c.d$are derived from Property 8.

**Property**

**8.**

(The neighbors of $a.b.c.d$)

When$b\ge 2$, the set of neighbors of$a.b.c.d$is$\{a.(b-l).\lfloor \frac{c-rem(c,2)}{{2}^{l}}\rfloor .\lfloor \frac{d}{{k}^{l}}\rfloor ,a.(b-1).\lfloor \frac{c}{2}\rfloor .\lfloor \frac{d}{k}\rfloor $,$a.(b+x){.2}^{x-1}(2c-1).d$,$a.(b+x).[{2}^{x-1}(2c-1)+1].d\}$, in which$x\in \{1,2,\dots ,t-b\}$,$d\in \{(b+x-1)\times {k}^{x}$$+1,(b+x-1)\times {k}^{x}+2,\dots ,(b+x)\times {k}^{x}\}$.

The neighbors of initial vertex$a$are$\{0,1,2\}/\left\{a\right\}\cup \{a.b\mathrm{.1.}d\}\cup \{a.b{.2}^{b-1}.d\}$, where$b\in \{1,2,\dots ,$$t\}$,$d\in \{1,2,\dots ,{k}^{b}\}$.

The neighbors of$a\mathrm{.1.1.}d$are$\{0,1,2\}/\left\{a\right\}$and$\{a.(1+x){.2}^{x-1}.d,a.(1+x).({2}^{x-1}+1).d\}$, where$x\in \{1,2,\dots ,t-1\}$,$d\in \{(b+x-1)\times {k}^{x}+1,(b+x-1)$$\times {k}^{x}+2,\dots ,(b+x)\times {k}^{x}\}$.

**Property**

**9.**

(The projection of GFG/EFG) By merging vertices$a.b.c.d$, which have the same$a.b.c$but a different$d$, into a vertex labeling with$a.b.c$,$GF(t,k)$/$EF(t,k)$is projected onto a graph which is exactly the combination of three Farey graphs starting from each edge of a triangle.

**Proof.**

From the spatial relationship between vertices in different petals, all the vertices of $a\mathrm{.1.1.}d$ are linked to common vertices up until two initial vertices $\{0,1,2\}/\left\{a\right\}$ are reached, so that all of $a\mathrm{.1.1.}d$ can merged into a vertex of $a\mathrm{.1.1}$. By recursively using the spatial relationship, $GF(t,k)$/$EF(t,k)$ is projected into a combination of three Farey graphs. ☐

**Property**

**10.**

(The slice defined by $a.b.c.d$) For any vertex$a.b.c.d$, the slice is obtained by recursively identifying all triangles, which are shaped by a vertex and its parents, up until two initial vertices are reached.

**Proof.**

Any vertex $a.b.c.d$ has a father $a.(b-l).\lfloor \frac{c-rem(c,2)}{{2}^{l}}\rfloor .\lfloor \frac{d}{{k}^{l}}\rfloor $ and a mother $a.(b-1).$ $\lfloor \frac{c}{2}\rfloor .\lfloor \frac{d}{k}\rfloor $ by Property 7, and the three vertices define a triangle. Then, the father’s mother, or the mother’s father, is obtained by recursively using Property 7. From the spatial relationship of vertices, $a.b.c.d$ and all these parents define a slice. ☐

## 5. Routing of $GF(t,k)$ and $EF(t,k)$

Although the labels of the three initial vertices in GFG and EFG are slightly different from the labels of the two initial vertices in FG, the shortest paths protocol in GFG/EFG also benefit from the routing algorithm in FG. From the generation mechanism, GFG/EFG is divided into three groups by symmetry, and each group is consisted of $k$ or $t\times k$ petals, and furthermore vertices in each group can also be divided into three sets by the differences in distance, similar to the equivalent division for FG: sets ${V}_{}^{x}(t)$, ${V}_{}^{xy}(t)$ and ${V}_{}^{y}(t)$.

**Property**

**11.**

(The characteristic of shortest paths when two vertices are located in different groups)

If${a}_{1}\ne {a}_{2}$, the initial vertex$\{0,1,2\}/\{{a}_{1},{a}_{2}\}$is on the shortest paths between${a}_{1}.{b}_{1}.{c}_{1}.{d}_{1}$and${a}_{2}.{b}_{2}.{c}_{2}.{d}_{2}$of GFG/EFG, if

(a)${a}_{1}.{b}_{1}.{c}_{1}\in {V}_{1}^{x}(t)\cup {V}_{1}^{xy}(t)$and${a}_{2}.{b}_{2}.{c}_{2}\in {V}_{2}^{x}(t)\cup {V}_{2}^{xy}(t)$,

(b) or${a}_{1}.{b}_{1}.{c}_{1}\in {V}_{2}^{x}(t)\cup {V}_{2}^{xy}(t)$and${a}_{2}.{b}_{2}.{c}_{2}\in {V}_{1}^{x}(t)\cup {V}_{1}^{xy}(t)$,

(c) or${a}_{1}.{b}_{1}.{c}_{1}\in {V}_{1}^{x}(t)$and${a}_{2}.{b}_{2}.{c}_{2}\in {V}_{2}^{y}(t)/\left\{{a}_{2}\right\}$,

(d) or${a}_{1}.{b}_{1}.{c}_{1}\in {V}_{2}^{x}(t)$and${a}_{2}.{b}_{2}.{c}_{2}\in {V}_{1}^{y}(t)/\left\{{a}_{1}\right\}$.

The two initial vertices${a}_{1}$and${a}_{2}$are on the shortest paths, if

(a)${a}_{1}.{b}_{1}.{c}_{1}\in {V}_{1}^{y}(t)$and${a}_{2}.{b}_{2}.{c}_{2}\in {V}_{2}^{y}(t)$,

(b) or${a}_{1}.{b}_{1}.{c}_{1}\in {V}_{2}^{y}(t)$and${a}_{2}.{b}_{2}.{c}_{2}\in {V}_{1}^{y}(t)$.

The shortest paths pass$\{0,1,2\}/\{{a}_{1},{a}_{2}\}$,${a}_{1}$and${a}_{2}$simultaneously, if

(a)${a}_{1}.{b}_{1}.{c}_{1}\in {V}_{1}^{y}(t)$and${a}_{2}.{b}_{2}.{c}_{2}\in {V}_{2}^{xy}(t)$,

(b) or${a}_{1}.{b}_{1}.{c}_{1}\in {V}_{2}^{y}(t)$and${a}_{2}.{b}_{2}.{c}_{2}\in {V}_{1}^{xy}(t)$.

**Proof.**

From Property 9, ${a}_{1}.{b}_{1}.{c}_{1}.{d}_{1}$ and ${a}_{2}.{b}_{2}.{c}_{2}.{d}_{2}$ are projected as ${a}_{1}.{b}_{1}.{c}_{1}$ and ${a}_{2}.{b}_{2}.{c}_{2}$, which are located in different subgraphs ${F}_{1}(t)$ and ${F}_{2}(t)$ of Farey graphs $F(t+1)$. Following from the proof of Property 3, the conclusions can easily be deduced. ☐

**Property**

**12.**

(The characteristic of shortest paths when two vertices lie in different slices of same group) If$a.{b}_{1}.{c}_{1}.{d}_{1}$and$a.{b}_{2}.{c}_{2}.{d}_{2}$are located in different petals, the shortest paths between them are positioned in two slices which are connected by two common vertices.

**Proof.**

From the generating algorithm, if $a.{b}_{1}.{c}_{1}.{d}_{1}$ and $a.{b}_{2}.{c}_{2}.{d}_{2}$ are located in different petals or subpetals, then the neighbor sets of $a.{b}_{1}.{c}_{1}.{d}_{1}$ and $a.{b}_{2}.{c}_{2}.{d}_{2}$ are ascertained by Property 8. When two common neighbors are created during the same step, then $a.{b}_{1}.{c}_{1}.{d}_{1}$ and $a.{b}_{2}.{c}_{2}.{d}_{2}$ are positioned in different slices, and the two slices can be determined by Property 10. Supposing that the first two common neighbors are $a.{b}_{3}.{c}_{3}.{d}_{3}$ and $a.({b}_{3}+1).{c}_{4}.{d}_{4}$, the two slices are rooted in them and belong to $F({b}_{1}-{b}_{3})$ and $F({b}_{2}-{b}_{3})$. Compared with the construction schematic diagram in Figure 2, the linking of $F({b}_{1}-{b}_{3})$ and $F({b}_{2}-{b}_{3})$ is slightly different. Name the initial vertices of $F({b}_{1}-{b}_{3})$ and $F({b}_{2}-{b}_{3})$ as ${X}_{1}$, ${X}_{2}$ and ${Y}_{1}$, ${Y}_{2}$, respectively. $F({b}_{1}-{b}_{3})$ and $F({b}_{2}-{b}_{3})$ are linked exactly by merging ${X}_{1}$ and ${Y}_{1}$ into $a.{b}_{3}.{c}_{3}.{d}_{3}$ and linking ${X}_{2}$ and ${Y}_{2}$ into $a.({b}_{3}+1).{c}_{4}.{d}_{4}$. The vertices of $F({b}_{1}-{b}_{3})$ and $F({b}_{2}-{b}_{3})$ can be divided into six parts similarly: ${V}_{\alpha}^{x}(t)$, ${V}_{\alpha}^{xy}(t)$, ${V}_{\alpha}^{y}(t)$ and ${V}_{\beta}^{x}(t)$, ${V}_{\beta}^{xy}(t)$, ${V}_{\beta}^{y}(t)$, by the distance between $a.{b}_{1}.{c}_{1}.{d}_{1}$ or $a.{b}_{2}.{c}_{2}.{d}_{2}$ to initial vertices $X$ (i.e., $a.{b}_{3}.{c}_{3}.{d}_{3}$) and $Y$ (i.e., $a.({b}_{3}+1).{c}_{4}.{d}_{4}$), in which case then the shortest paths between $a.{b}_{1}.{c}_{1}.{d}_{1}$ and $a.{b}_{2}.{c}_{2}.{d}_{2}$ go via $a.{b}_{3}.{c}_{3}.{d}_{3}$, if

(a) $a.{b}_{1}.{c}_{1}\in {V}_{\alpha}^{x}(t)$ and $a.{b}_{2}.{c}_{2}\in {V}_{\beta}^{x}(t)$,

(b) $a.{b}_{1}.{c}_{1}\in {V}_{\alpha}^{x}(t)$ and $a.{b}_{2}.{c}_{2}\in {V}_{\beta}^{xy}(t)$,

(c) or $a.{b}_{1}.{c}_{1}\in {V}_{\alpha}^{xy}(t)$ and $a.{b}_{2}.{c}_{2}\in {V}_{\beta}^{x}(t)$.

The shortest paths go through $a.{b}_{3}.{c}_{3}.{d}_{3}$ and $a.({b}_{3}+1).{c}_{4}.{d}_{4}$, if

(a) $a.{b}_{1}.{c}_{1}\in {V}_{\alpha}^{x}(t)$ and $a.{b}_{2}.{c}_{2}\in {V}_{\beta}^{y}(t)$,

(b) or $a.{b}_{1}.{c}_{1}\in {V}_{\alpha}^{xy}(t)$ and $a.{b}_{2}.{c}_{2}\in {V}_{\beta}^{xy}(t)$,

(c) $a.{b}_{1}.{c}_{1}\in {V}_{\alpha}^{y}(t)$ and $a.{b}_{2}.{c}_{2}\in {V}_{\beta}^{x}(t)$.

The shortest paths pass $a.({b}_{3}+1).{c}_{4}.{d}_{4}$, if

(a) $a.{b}_{1}.{c}_{1}\in {V}_{\alpha}^{xy}(t)$ and $a.{b}_{2}.{c}_{2}\in {V}_{\beta}^{y}(t)$,

(b) $a.{b}_{1}.{c}_{1}\in {V}_{\alpha}^{y}(t)$ and $a.{b}_{2}.{c}_{2}\in {V}_{\beta}^{xy}(t)$,

(c) or $a.{b}_{1}.{c}_{1}\in {V}_{\alpha}^{y}(t)$ and $a.{b}_{2}.{c}_{2}\in {V}_{\beta}^{y}(t)$. ☐

**Property**

**13.**

(The characteristic of shortest paths when two vertices are in same slice) If$a.{b}_{1}.{c}_{1}.{d}_{1}$and$a.{b}_{2}.{c}_{2}.{d}_{2}$are in the same slice of a petal or subpetal of same group, the shortest paths between them are determined by Property 5, as they have been projected onto a Farey graph.

**Proof.**

If we obtained only one common neighbor vertex, labeled with $a.{b}_{3}.{c}_{3}.{d}_{3}$, of vertices $a.{b}_{1}.{c}_{1}.{d}_{1}$ and $a.{b}_{2}.{c}_{2}.{d}_{2}$ at the same step, then $a.{b}_{1}.{c}_{1}.{d}_{1}$ and $a.{b}_{2}.{c}_{2}.{d}_{2}$ are located in same slice. Assuming ${b}_{1}\ge {b}_{2}$, the projected Farey graph is $F({b}_{1}-{b}_{3}-1)$ with a hub vertex $a.{b}_{1}.{c}_{1}.{d}_{1}$, in which case all the shortest paths are located in $F({b}_{1}-{b}_{3}-1)$. So that all the shortest paths can be decided by Property 5. ☐

The detailed shortest routing algorithm in GFG/EFG is described as follows.

**Property**

**14.**

(The shortest paths routing algorithm in GFG/EFG)

1. Given any two vertices${a}_{1}.{b}_{1}.{c}_{1}.{d}_{1}$and${a}_{2}.{b}_{2}.{c}_{2}.{d}_{2}$, insert${a}_{1}.{b}_{1}.{c}_{1}.{d}_{1}$and${a}_{2}.{b}_{2}.{c}_{2}.{d}_{2}$into the labels set of the shortest paths ($LSS{P}_{m}(h)$), $LSS{P}_{m}(0)=\varnothing $.

2. If${a}_{1}\ne {a}_{2}$, and both${a}_{1}.{b}_{1}.{c}_{1}.{d}_{1}$and${a}_{2}.{b}_{2}.{c}_{2}.{d}_{2}$are not initial vertices, then this is exactly the condition of two vertices being in different groups. Three initial vertices$\{0,1,2\}/\{{a}_{1},{a}_{2}\}$,${a}_{1}$and${a}_{2}$are ascertained as being on the shortest paths or not by property 11.

If only$\{0,1,2\}/\{{a}_{1},{a}_{2}\}$is on the paths, insert the label$\{0,1,2\}/\{{a}_{1},{a}_{2}\}$in the middle of${a}_{1}.{b}_{1}.{c}_{1}.{d}_{1}$and${a}_{2}.{b}_{2}.{c}_{2}.{d}_{2}$in$LSS{P}_{m}(h)$,$h=h+1$, and generate two new pairs of labels:${a}_{1}.{b}_{1}.{c}_{1}.{d}_{1}$and$\{0,1,2\}/\{{a}_{1},{a}_{2}\}$,$\{0,1,2\}/\{{a}_{1},{a}_{2}\}$and${a}_{2}.{b}_{2}.{c}_{2}.{d}_{2}$, respectively.

If only${a}_{1}$and${a}_{2}$are on the paths, insert the labels${a}_{1}$and${a}_{2}$in the middle of two labels${a}_{1}.{b}_{1}.{c}_{1}.{d}_{1}$and${a}_{2}.{b}_{2}.{c}_{2}.{d}_{2}$,$h=h+2$, and get two new pairs of labels:${a}_{1}.{b}_{1}.{c}_{1}.{d}_{1}$and${a}_{1}$,${a}_{2}$and${a}_{2}.{b}_{2}.{c}_{2}.{d}_{2}$.

If$\{0,1,2\}/\{{a}_{1},{a}_{2}\}$,${a}_{1}$and${a}_{2}$are all on the paths, combine the two conditions above together.

Go back to step 1 with the new label pairs.

3. If${a}_{1}\ne {a}_{2}$, and${a}_{1}.{b}_{1}.{c}_{1}.{d}_{1}$or${a}_{2}.{b}_{2}.{c}_{2}.{d}_{2}$is an initial vertex, then it is the case of two vertices located in the same slice of a petal or subpetal in the same group. The common Farey graphs$F({b}_{1})$or$F({b}_{2})$are obtained by Property 13, in which case the shortest paths can be deduced by Property 5.

4. If${a}_{1}={a}_{2}=a$and$a.{b}_{1}.{c}_{1}.{d}_{1}$and$a.{b}_{2}.{c}_{2}.{d}_{2}$are not initial vertices, find out the neighbors of$a.{b}_{1}.{c}_{1}.{d}_{1}$and$a.{b}_{2}.{c}_{2}.{d}_{2}$by Property 8.

If two common neighbors are obtained at the same step, then$a.{b}_{1}.{c}_{1}.{d}_{1}$and$a.{b}_{2}.{c}_{2}.{d}_{2}$are located in different slices. Whether the two common neighbors are positioned on the shortest paths or not are determined by Property 3. Assuming two common neighbors are$a.{b}_{3}.{c}_{3}.{d}_{3}$and$a.{b}_{4}.{c}_{4}.{d}_{4}$, if$a.{b}_{3}.{c}_{3}.{d}_{3}$(or$a.{b}_{4}.{c}_{4}.{d}_{4}$) is on the shortest paths, insert the label$a.{b}_{3}.{c}_{3}.{d}_{3}$(or$a.{b}_{4}.{c}_{4}.{d}_{4}$) in the middle of${a}_{1}.{b}_{1}.{c}_{1}.{d}_{1}$and${a}_{2}.{b}_{2}.{c}_{2}.{d}_{2}$,$h=h+1$, and generate two new pair labels of${a}_{1}.{b}_{1}.{c}_{1}.{d}_{1}$and$a.{b}_{3}.{c}_{3}.{d}_{3}$(or$a.{b}_{4}.{c}_{4}.{d}_{4}$), and$a.{b}_{3}.{c}_{3}.{d}_{3}$(or$a.{b}_{4}.{c}_{4}.{d}_{4}$) and${a}_{2}.{b}_{2}.{c}_{2}.{d}_{2}$. If$a.{b}_{3}.{c}_{3}.{d}_{3}$and$a.{b}_{4}.{c}_{4}.{d}_{4}$are both on the shortest paths at the same time, insert the label$a.{b}_{3}.{c}_{3}.{d}_{3}$and$a.{b}_{4}.{c}_{4}.{d}_{4}$in the set$LSS{P}_{m}(h)$,$h=h+1$,$m=m+1$, and make up four new pair labels of${a}_{1}.{b}_{1}.{c}_{1}.{d}_{1}$and$a.{b}_{3}.{c}_{3}.{d}_{3}$,${a}_{1}.{b}_{1}.{c}_{1}.{d}_{1}$and$a.{b}_{4}.{c}_{4}.{d}_{4}$,$a.{b}_{3}.{c}_{3}.{d}_{3}$or${a}_{2}.{b}_{2}.{c}_{2}.{d}_{2}$,$a.{b}_{4}.{c}_{4}.{d}_{4}$and${a}_{2}.{b}_{2}.{c}_{2}.{d}_{2}$. Go back to step 1 with the new label pairs.

If only one common neighbor is obtained at the same time, then$a.{b}_{1}.{c}_{1}.{d}_{1}$and$a.{b}_{2}.{c}_{2}.{d}_{2}$are located in same slice. The shortest paths are projected into a Farey graph, and then all the shortest paths are derived by Property 5.

**Remark**

**6.**

The expanded deterministic Apollonian networks, denoted by$A(d,t)$, are the generalization of Apollonian networks, being simultaneously small-world, scale-free and highly clustered. The label-based routing protocol for it is deduced in [35].$A(d,t)$($d\ge 1$and$t\ge 0$) are constructed as follows.$A(d,0)$is a complete graph${K}_{d+2}$(or$d+1$-clique).$A(d,t)$($t\ge 1$) is obtained from$A(d,t-1)$by adding one new node and connecting it to all the nodes of each existing subgraph of$A(d,t-1)$that is isomorphic to a (d + 1)-clique and created at step$t-1$. Apparently,$A(1,t)$is exactly the same as the special case of the generalization of Farey graphs$GF(t,1)$, however, the algorithm in [35] can only get one of shortest paths in it.

Recursive clique-trees,$K(q,t)$($q\ge 2$,$t\ge 0$), have scale-free and small-world properties and allow a fine tuning of the power-law exponent of their discrete degree distribution and clustering [38].$K(q,t)$is the graph constructed as follows:$K(q,0)$is the complete graph${K}_{q}$(or q-clique).$K(q,t)$is obtained from$K(q,t-1)$by adding to each of its existing subgraphs isomorphic to a q-clique a new vertex and then joining it to all the vertices of the subgraph. From the construction mechanisms used,$K(2,t)$is the same as the extended Farey graphs $EF(t-1,1)$. Same as in Ref. [35], the protocol in [38] can only get one of shortest paths.

## 6. Conclusions

We presented label-based routing algorithms for Farey-type graphs, including standard Farey graphs, generalized Farey graphs and extended Farey graphs. Our results can be extended easily to several Farey-type deterministic models, such as models created by edge iteration, evolving graphs with general geometric growth models for pseudofractal scale-free webs, geographical attachment preference, graphs with multidimensional growth, and so on. In contrast with prior research results, which can only get one shortest path from the labels of any pair of vertices, we can ascertain all the shortest paths using only their labels in all Farey-type graphs.

As all Farey-type graphs are structurally isomorphic, the time complexity of the routing algorithm in generalized Farey graphs (GFG) and extended Farey graphs (EFG) are essentially equivalent to that of standard Farey graphs, and thus the routing algorithms run in logarithmic time O(logn).

## Author Contributions

Conceptualization and methodology, W.J. and J.-B.L.; software, Z.Z. (Zhigang Zhuang); validation, W.J., Z.Z. (Zhigang Zhuang) and Z.Z. (Zhiming Zhao); writing—original draft preparation, Y.Z.; writing—review and editing, P.M.

## Funding

This research was supported by the Natural Science Foundation of Guangdong Province, grant number 2016A030313703, 2018A030313061; the Guangdong Science and Technology Plan, grant number 2017B030305003, 2017B010124001, 2016B030305002 and 2017B090901005; the China Postdoctoral Science Foundation, grant number 2017M621579 and Postdoctoral Science Foundation of Jiangsu Province, grant number 1701081B; the European Union’s Horizon 2020 research and innovation program, grant number 654182 (ENVRIPLUS project), grant number 676247 (VRE4EIC project); Anhui Province Key Laboratory of Intelligent Building & Building Energy Saving.

## Conflicts of Interest

The authors declare no conflict of interest.

## References

- Comellas, F.; Ozon, J.; Peters, J.G. Deterministic small-world communication networks. Inf. Process. Lett.
**2000**, 76, 83–90. [Google Scholar] [CrossRef] - Barabási, A.L.; Ravasz, E.; Vicsek, T. Deterministic scale-free networks. Phys. A Stat. Mech. Appl.
**2001**, 299, 559–564. [Google Scholar] [CrossRef][Green Version] - Perc, M. The Matthew effect in empirical data. J. R. Soc. Interface
**2014**, 11, 20140378. [Google Scholar] [CrossRef] [PubMed] - Jalili, M.; Perc, M. Information cascades in complex networks. J. Complex Netw.
**2017**, 5, 665–693. [Google Scholar] [CrossRef] - Zhang, Z.; Gao, S.; Chen, L.; Zhou, S.; Zhang, H.; Guan, J. Mapping Koch curves into scale-free small-world networks. J. Phys. A Math. Theor.
**2010**, 43, 395101. [Google Scholar] [CrossRef][Green Version] - Zhang, Z.; Rong, L.; Zhou, S. Evolving Apollonian networks with small-world scale-free topologies. Phys. Rev. E
**2006**, 74, 046105. [Google Scholar] [CrossRef] [PubMed] - Zhou, T.; Wang, B.H.; Hui, P.M.; Chan, K.P. Topological properties of integer networks. Phys. A Stat. Mech. Appl.
**2006**, 367, 613–618. [Google Scholar] [CrossRef][Green Version] - Perc, M.; Jordan, J.J.; Rand, D.G.; Wang, Z.; Boccaletti, S.; Szolnoki, A. Statistical physics of human cooperation. Phys. Rep.
**2017**, 687, 1–51. [Google Scholar] [CrossRef][Green Version] - Wang, Z.; Bauch, C.T.; Bhattacharyya, S.; d’Onofrio, A.; Manfredi, P.; Perc, M.; Perra, N.; Salathe, M.; Zhao, D. Statistical physics of vaccination. Phys. Rep.
**2016**, 664, 1–113. [Google Scholar] [CrossRef][Green Version] - D’Orsogna, M.R.; Perc, M. Statistical physics of crime: A review. Phys. Life Rev.
**2015**, 12, 1–21. [Google Scholar] [CrossRef] [PubMed][Green Version] - Helbing, D.; Brockmann, D.; Chadefaux, T.; Donnay, K.; Blanke, U.; Woolley-Meza, O.; Moussaid, M.; Johansson, A.; Krause, J.; Schutte, S.; et al. Saving human lives: What complexity science and information systems can contribute. J. Stat. Phys.
**2015**, 158, 735–781. [Google Scholar] [CrossRef] [PubMed] - Zhang, Z.; Comellas, F. Farey graphs as models for complex networks. Theor. Comput. Sci.
**2011**, 412, 865–875. [Google Scholar] [CrossRef] - Zhang, Z.; Wu, B.; Lin, Y. Counting spanning trees in a small-world Farey graph. Phys. A Stat. Mech. Appl.
**2012**, 391, 3342–3349. [Google Scholar] [CrossRef][Green Version] - Zhang, Z.; Rong, L.; Guo, C. A deterministic small-world network created by edge iterations. Phys. A Stat. Mech. Appl.
**2006**, 363, 567–572. [Google Scholar] [CrossRef][Green Version] - Zhang, Z.Z.; Rong, L.L.; Comellas, F. Evolving small-world networks with geographical attachment preference. J. Phys. A Math. Gen.
**2006**, 39, 3253. [Google Scholar] [CrossRef] - Peng, A.; Zhang, L. Deterministic multidimensional growth model for small-world networks. arXiv, 2011; arXiv:1108.5450. [Google Scholar]
- Zhang, Z.; Rong, L.; Zhou, S. A general geometric growth model for pseudofractal scale-free web. Phys. A Stat. Mech. Appl.
**2007**, 377, 329–339. [Google Scholar] [CrossRef][Green Version] - Havlin, S.; ben-Avraham, D. Fractal and transfractal recursive scale-free nets. New J. Phys.
**2007**, 9, 175. [Google Scholar] - Xiao, Y.; Zhao, H. Counting the number of spanning trees of generalization Farey graph. In Proceedings of the 2013 Ninth International Conference on Natural Computation (ICNC), Shenyang, China, 23–25 July 2013; pp. 1778–1782. [Google Scholar]
- Andrade, J.S., Jr.; Herrmann, H.J.; Andrade, R.F.; Da Silva, L.R. Apollonian networks: Simultaneously scale-free, small world, Euclidean, space filling, and with matching graphs. Phys. Rev. Lett.
**2005**, 94, 018702. [Google Scholar] [CrossRef] [PubMed] - Auto, D.M.; Moreira, A.A.; Herrmann, H.J.; Andrade, J.S., Jr. Finite-size effects for percolation on Apollonian networks. Phys. Rev. E
**2008**, 78, 066112. [Google Scholar] [CrossRef] [PubMed] - Almeida, G.M.; Souza, A.M. Quantum transport with coupled cavities on an Apollonian network. Phys. Rev. A
**2013**, 87, 033804. [Google Scholar] [CrossRef] - Wong, W.K.; Guo, Z.X.; Leung, S.Y.S. Partially connected feedforward neural networks on Apollonian networks. Phys. A Stat. Mech. Appl.
**2010**, 389, 5298–5307. [Google Scholar] [CrossRef] - Mendes, G.A.; Da Silva, L.R.; Herrmann, H.J. Traffic gridlock on complex networks. Phys. A Stat. Mech. Appl.
**2012**, 391, 362–370. [Google Scholar] [CrossRef] - De Oliveira, I.N.; de Moura, F.A.B.F.; Lyra, M.L.; Andrade, J.S., Jr.; Albuquerque, E.L. Bose-Einstein condensation in the Apollonian complex network. Phys. Rev. E
**2012**, 81, 030104. [Google Scholar] [CrossRef] [PubMed] - De Oliveira, I.N.; De Moura, F.A.B.F.; Lyra, M.L.; Andrade, J.S., Jr.; Albuquerque, E.L. Free-electron gas in the Apollonian network: Multifractal energy spectrum and its thermodynamic fingerprints. Phys. Rev. E
**2009**, 79, 016104. [Google Scholar] [CrossRef] [PubMed] - Knuth, D.E. A generalization of Dijkstra’s algorithm. Inf. Process. Lett.
**1977**, 6, 1–5. [Google Scholar] [CrossRef] - Yen, J.Y. An algorithm for finding shortest routes from all source nodes to a given destination in general networks. Q. Appl. Math.
**1970**, 27, 526. [Google Scholar] [CrossRef] - Lerner, J.; Wagner, D.; Zweig, K. Engineering route planning algorithms. In Algorithmics of Large and Complex Networks; Springer: Berlin/Heidelberg, Germany, 2009; pp. 117–139. ISBN 978-3-642-02093-3. [Google Scholar]
- Zwick, U. All pairs shortest paths using bridging sets and rectangular matrix multiplication. J. ACM
**2002**, 49, 289–317. [Google Scholar] [CrossRef][Green Version] - Chan, T.M. More algorithms for all-pairs shortest paths in weighted graphs. SIAM J. Comput.
**2010**, 39, 2075–2089. [Google Scholar] [CrossRef] - Yen, J.Y. Finding the k shortest loopless paths in a network. Manag. Sci.
**1971**, 17, 712–716. [Google Scholar] [CrossRef] - Bern, M.W.; Graham, R.L. The shortest-network problem. Sci. Am.
**1989**, 260, 84–89. [Google Scholar] [CrossRef] - Zwick, U. Exact and approximate distances in graphs—A survey. In Algorithms—ESA 2001; Springer: Berlin/Heidelberg, Germany, 2001; pp. 33–48. [Google Scholar]
- Jiang, W.; Zhai, Y.; Martin, P.; Zhao, Z. Structure Properties of Generalized Farey graphs based on Dynamical Systems for Networks. Sci. Rep.
**2018**, 8, 12194. [Google Scholar] [CrossRef] [PubMed] - Comellas, F.; Miralles, A. Vertex labeling and routing in self-similar outerplanar unclustered graphs modeling complex networks. J. Phys. A Math. Theor.
**2009**, 42, 425001. [Google Scholar] [CrossRef][Green Version] - Comellas, F.; Miralles, A. Label-based routing for a family of scale-free, modular, planar and unclustered graphs. J. Phys. A Math. Theor.
**2011**, 44, 205102. [Google Scholar] [CrossRef] - Comellas, F.; Fertin, G.; Raspaud, A. Vertex Labeling and Routing in Recursive Clique-Trees, a New Family of Small-World Scale-Free Graphs. In Proceedings of the SIROCCO 2003, Umeå, Sweden, 18–20 June 2003; pp. 73–87. [Google Scholar]
- Zhai, Y.; Wang, Y. Label-based routing for a family of small-world Farey graphs. Sci. Rep.
**2016**, 6, 25621. [Google Scholar] [CrossRef] [PubMed][Green Version] - Ball, F.; Geyer-Schulz, A. How symmetric are real-world graphs? A large-scale study. Symmetry
**2018**, 10, 29. [Google Scholar] [CrossRef] - Parada, R.; Cárdenes-Tacoronte, D.; Monzo, C.; Melià-Seguí, J. Internet of THings Area Coverage Analyzer (ITHACA) for complex topographical scenarios. Symmetry
**2017**, 9, 237. [Google Scholar] [CrossRef] - Garrido, A. Symmetry in complex networks. Symmetry
**2011**, 3, 1–15. [Google Scholar] [CrossRef] - Garlaschelli, D.; Ruzzenenti, F.; Basosi, R. Complex networks and symmetry I: A review. Symmetry
**2010**, 2, 1683–1709. [Google Scholar] [CrossRef] - Zhang, Y.; Zhang, Z.; Zhou, S.; Guan, J. Deterministic weighted scale-free small-world networks. Phys. A Stat. Mech. Appl.
**2010**, 389, 3316–3324. [Google Scholar] [CrossRef][Green Version] - Sun, W.; Wu, Y.; Chen, G.; Wang, Q. Deterministically delayed pseudofractal networks. J. Stat. Mech. Theory Exp.
**2011**, 10, P10032. [Google Scholar] [CrossRef]

**Figure 3.**The generalization of Farey graphs. (

**a**) $GF(t,k)$ at steps t = 0, 1 and 2 when $k=1$; (

**b**) $GF(t,k)$ at steps t = 0, 1 and 2 when $k=2$.

**Figure 4.**The extended Farey graphs. (

**a**) $EF(t,k)$ at steps t = 0, 1 and 2 when $k=1$; (

**b**) $EF(t,k)$ at steps t = 0, 1 and 2 when $k=2$.

**Figure 6.**The labeling of $GF(t,k)$ and $EF(t,k)$ at step t = 2 for $k=2$. (

**a**) $GF(2,2)$; (

**b**) $EF(2,2)$.

© 2018 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).