Shortest Path Search Algorithm in Optimal Two-Dimensional Circulant Networks: Implementation for Networks-on-Chip

For a family of optimal two-dimensional circulant networks with an analytical description, two new improved versions of the shortest path search algorithm with a constant complexity estimate are obtained. A simple, based on the geometric model of circulant graphs, proof of the formulas used for the shortest path search algorithm is given. Pair exchange algorithms are presented, and their estimates are given for networks-on-chip (NoCs) with a topology in the form of the considered graphs. New versions of the algorithm improve the previously proposed shortest path search algorithm for optimal generalized Petersen graphs with an analytical description. The new proposed algorithm is a promising solution for the use in NoCs which was confirmed by an experimental study while synthesizing NoC communication subsystems and comparing the consumed hardware resources with those when other previously developed routing algorithms.


I. INTRODUCTION
Along with the wide interest in circulant networks in various fields of computer science and computer engineering [1]- [4], their application as network-on-chip (NoC) topologies [5] is becoming relevant. This is due to their best structural characteristics [6] and high scalability with a large number of nodes compared to standard NoC topologies (mesh, torus). In connection with the need to reduce the hardware cost of resources for NoCs, an important task is the development of effective routing algorithms in networks with circulant topology. This paper discusses efficient pair routing algorithms designed for two-dimensional circulant networks.
Let s 1 , s 2 , . . . , s l , N be integers such that 1 ≤ s 1 < s 2 < . . . < s l < N . An undirected graph C with a set of vertices V = {0, 1, . . . , N − 1} and a set of edges E = (i, j) : i − j ≡ ±s m mod N , m = 1, l is called a The associate editor coordinating the review of this manuscript and approving it for publication was Walter Didimo . circulant network. Parametric description of type (N ; S) defines a circulant of order N and dimension l with a set of generators S = (s 1 , s 2 , . . . , s l ). The symmetry property of circulants allows us to restrict ourselves to considering circulant graphs with generators not exceeding N /2 .
The diameter D of a graph is equal to D = max i,j∈V D(i, j), where D(i, j) is the length of the shortest path between vertices i and j. The average distance D is equal to D = (1/N (N − 1)) i,j D(i, j). The diameter and average distance estimate maximum and average transmission delays in the network. As studies have shown, the best structures of computing systems, according to various criteria of functioning (reliability, connectivity, bisection bandwidth) with the same number of nodes and communication lines, are structures with the minimum diameter and average distance.
In this paper, we consider two-dimensional circulant networks. Such networks are represented by undirected circulant graphs C(N ; s 1 , s 2 ) with N vertices labeled with the integers modulo N , and each vertex i is joined by an edge to the vertices (i ± s 1 ) mod N and (i ± s 2 ) mod N . Fig. 1 shows an example of such graph.
When using circulant graphs as communication networks of massively parallel computers or networks-on-chip, an urgent issue is an effective solution to the problem of organizing routing algorithms in them. In pair (two-terminal) routing, a message is to be routed from its source node to its destination node according to the model applied. Further in the article, we assume the undirected store-and-forward model. The organization of pair exchanges requires determination of the shortest paths in a graph. The known Dijkstra's algorithm of finding the shortest paths in any connected graph of order N has both time and space quadratic complexity O N 2 which is the number of elements in the adjacency matrix. In [7] the authors proved that the shortest path problem is NP-hard if a description (N ; S) of a circulant graph of arbitrary dimension l is used. For fixed l = 2, different pair routing algorithms were obtained for circulant graphs in [5], [8]- [14]. There are several approaches to solve the two-terminal routing problem in circulants of dimension two. The first approach uses a construction of routing tables. Such algorithms take constant time to determine the next node on the shortest path of the packet, but require the extra space for the routing tables of the order O(N 2 ) which is not acceptable for NoCs. The second approach is based on the O(log N )-time preprocessing calculating routing parameters and also requires the extra space to store the additional information. In the third approach, the dynamic algorithms are capable (without routing tables or preprocessing) to route the packet along the shortest path using only the name of the packet destination node. They are more flexible in case of traffic congestions or node/link faults, but the best known time complexity of dynamic algorithms is only O(log N ). According to engineering approach, in [5], [14] the search for the optimal routing algorithm in NoCs with two-dimensional circulant topology is implemented. It is based on the understanding of structural organization of NoCs and desire to offer simple one-hop routing algorithms with a view to reducing hardware costs and at the same time providing an acceptable distance between the nodes.
In this paper, the another approach based on analytical and mathematical methods of graph analysis was chosen; i.e., it is proposed to first solve the routing problem analytically with the time complexity O (1) independent of the network size and then adapt the solution for practical use in NoCs.
For the convenience, Table 1 lists the notations used in this paper.
Theorem 1: For every N > 4, the optimal two-dimensional circulant of order N is (1) here [x] is the nearest integer to x.
In 1991, Beivide et al. [19] obtained the same circulant family (1) written in a different form.
Theorem 2: For every N > 2, the optimal two-dimensional circulant of order N is The two optimal families (1) and (2) are identical both in numerical values of generators and orders, as well as in the ranges to be optimal with these generators. Let us prove it. VOLUME 8, 2020 Lemma 1: For every order N > 4, circulant graphs C(N ; d, d + 1) and C(N ; b − 1, b), described by (1) and (2), respectively, coincide for b − 1 = d.
Research issues of the found family of optimal circulants as communication networks of computer systems have been extensively studied. Liestman et al. [20] studied network features of such circulants in particular optimal graphs of type C(N d ; d, d + 1) and considered the possibility of embedding of lattices into them. Hereinafter, N d = 2d 2 + 2d + 1 is the maximum possible order of a two-dimensional circulant of diameter d ≥ 1. In [21]- [23] the authors considered optimal networks (2) called Midimew networks (mesh-connected networks with wrap-around links) as a technical implementation of communication networks of supercomputer systems. Puente et al. [21] showed that under real loads for Midimew networks, there is an increase in network performance and a decrease in the length of average communication path compared to tori. In [21], [22] a practical solution to the problem of preventing deadlocks (path locks during packet transmission) was presented. Yang et al. [23] used several examples of such graphs as a basis in the design of communication networks of parallel systems. Martinez et al. [13], [24] applied circulant networks, in particular a family of type C(N d ; d, d+ 1), in coding theory when constructing perfect group codes. The implementation of the graphs described by (1) or (2) was proposed as a topology in the design of supercomputers with mass parallelism and NoCs [5], [23], [25]. A number of new hierarchical network designs were also constructed using the Minimum Distance Mesh with Wrap-around links (Midimew networks) as elements [26], [27]; simple use of circulant (Midimew) topologies instead torus topology in TESH [28] topology notably improved network performance parameters [29].
The analytical solution to the problem of finding the shortest paths by a parametric description for optimal two-dimensional circulant graphs described by (1) and (2) was proposed in [30] and by Beivide et al. [19] and Puente et al. [22]. In the present study, the above mentioned analytical solution was improved and corrected, as well as used to develop universal dynamic pair routing algorithm applied for the routing in NoCs with two-dimensional circulant topologies.

III. FINDING THE SHORTEST PATHS IN TWO-DIMENSIONAL CIRCULANTS
Let us consider an effective solution to the problem of finding the shortest paths by a parametric description for optimal circulant graphs having descriptions of type C(N ; d, d + 1), where d is determined by (1).
. Here x 0k sets the number of generators s 1 ; y 0k sets the number of generators s 2 included in the shortest path from 0 to k; sgnx 0k and sgny 0k determine the directions of motion in the shortest path along (+) or against (-) of the corresponding generator. We show that for these graphs, the relationship between the numbers of vertices i and j, and vector of shortest path A ij from i to j can be obtained analytically.
To do this, we need to consider the geometric model of a graph C (N ; d, d + 1) [15]. This graph is constructed on a Z 2 plane as a rhomboid configuration from unit squares of an integer lattice, where each point of the lattice (x, y) is labeled by a number k = xd + y (d + 1) modN , where 0 ≤ k < N is a vertex number of the graph. All vertex marks 0 ≤ k < N are repeated on the plane an infinite number of times forming a dense packing of rhomboid-like configurations of unit squares. Fig. 2 shows how, from a rhombus with the number of vertices N = N d (indicated by a solid line), all optimal configurations with the number of vertices + 1, are located inside the rhombus R D = {(x, y) | |x| + |y| ≤ D}, and the layers from 0 to D − 1 are completely filled, and among the numbers of the vertices located on these layers, there are not the same numbers. By virtue of the indicated features, for vertices 0 ≤ k < N of a graph C(N ; d, d + 1) of diameter D, we have the following: to define the vector of shortest paths from 0 to k, it suffices to calculate the paths in the rhombus R D .
As an example of the geometric representation of graphs of the family C (N ; d, d + 1) , Fig. 3 shows the graph C(50; 4, 5) of diameter D = 5 in the coordinate system (x, y). For simplicity of the image, the wrap-around links (edges) in the graph are not shown. The graph C(50; 4, 5) has the maximum possible order among the graphs of family (1) with generators s 1 = 4, s 2 = 5. Note that the graph C(51; 4, 5) is also optimal.
Theorems 3 and 4 solve the problem of computing the vector of shortest paths from a zero vertex to all vertices of the graphs of family (1). Moreover, in the proof of Theorem 3, division of the vertex number of the graph by generator s 1 is used which corresponds to selected horizontal regions of the graph in Fig. 3a; in the proof of Theorem 4, division by  generator s 2 is used which corresponds to the selected vertical regions of the graph in Fig. 3b.
Theorem 3: Let 0 ≤ k < N be a vertex number in a graph C(N ; d, d + 1). Then the coordinates of vector A 0k = x 0k , y 0k are calculated as follows: where Proof: According to the property of circulants Thus, definition of the shortest path vector A 0k for all N /2 < k < N reduces to definition of the shortest path vector of the vertex with number (N − k) (the vertex lies in the upper part of the rhombus to the right of the lines y = −x for x ≤ 0 and y = −x + 1 for x > 0) and replacing the signs of received coordinates with the opposite ones. Now let 0 ≤ k ≤ N /2 . It is required to find x 0k = x, y 0k = y such coordinates of the vertex with number k that In the proof, we use the fact that for any positive integers k and d, number k is uniquely representable in terms of the integer part and remainder of the division by d: 1) Consider the region of rhombus R D representing a graph C (N ; d, d + 1) and bounded by the following lines: In this region of rhombus, Thus, if we represent number k of the vertex from this region written in the form (4) as k = d (x + y) + y, then, due to the uniqueness of expression (5) for k, we obtain This implies Substituting the found expressions for x and y in the record of lines bounding the region under consideration, we find that the formulas found for x and y hold when 2) Now consider the region of the rhombus bounded by the lines In this region of rhombus, Thus, if we represent number k of the vertex from this region written in the form (4) as then, due to the uniqueness of expression (5) for k, we obtain This implies Similarly to case 1, we find that the formulas found for x and y hold when

3) For vertices with numbers
The coordinates x 0k , y 0k calculated by formula (3) coincide with the data. These formulas hold when The theorem is proved.
Note that in graphs C(N ; d, d + 1) for 2d 2 < N < N d , to calculate the vector of shortest paths from 0 to any vertex, it is sufficient to use only the first two types of formulas from (3). Theorem 3 gives an analytical solution to the problem of determining the shortest paths vector by the number of the vertex of a graph C(N ; d, d + 1) with respect to the zero vertex. Thus, calculation of the shortest paths in the structures of the considered description turns out to be simpler than the similar procedure for two-dimensional circulants with a description different from that mentioned above [8].
Another type of formulas that can be used in calculating the shortest path vectors in circulant graphs C(N ; d, d + 1) is determined by the following theorem.
Theorem 4: Let 0 ≤ k < N be a vertex number in a graph C(N ; d, d + 1). Then the coordinates of vector A 0k = x 0k , y 0k are calculated as follows: for k ≤ N /2 , where β = kmod (d + 1) , α = k/(d + 1) + β; for k > N /2 , Proof: By analogy with the proof of Theorem 3, the definition of vector A 0k for all N /2 < k < N reduces to determining the vector of the shortest paths of the vertex with number (N − k) and replacing the signs of resulting coordinates with the opposite ones. Now let 0 ≤ k ≤ N /2. It is required to find x 0k = x, y 0k = y such coordinates of the vertex with number k that For the proof, we will use the fact that for any positive integers k and d + 1, number k is uniquely representable in terms of the integer part and remainder of the division by d + 1: 1) For vertices with numbers k = i (d + 1) , the coordinates are 2) Consider the region of the rhombus R D representing a graph C(N ; d, d + 1) and bounded by the following lines: In this region of the rhombus, Thus, if we represent number k of the vertex from this region written in the form (7) as k = (x + y) (d + 1) + (−x), then due to the uniqueness of expression (8) for k, we obtain This implies Substituting the found expressions for x and y in the record of lines bounding the rhombus region under consideration, we find that the formulas found for x and y hold when Thus, the kind of formulas found for case 2 also holds for case 1 under the condition 3) Let us now consider the region of the rhombus bounded by lines In this region of the rhombus, Thus, if we represent number k of the vertex from this region written in the form (7) as , then, due to the uniqueness of expression (8) for k, we obtain This implies Similarly to case 2, we find that the formulas found for x and y hold under the condition The theorem is proved.
Note that in circulant topologies, the application of the shortest path vector A 0k = (x 0k , y 0k ) for development of routing algorithms offers a possibility to use a total number of different shortest paths defined by this vector. More precisely, a total number of all the shortest paths for A 0k is x 0k + y 0k !/( x 0k ! y 0k !). Thus, this property makes it possible to construct an adaptive dynamic pair exchange algorithm avoiding potential routing problems (traffic congestions or node/link faults).

IV. PAIR EXCHANGE ALGORITHM IN TWO-DIMENSIONAL CIRCULANTS
Consider the path procedure that implements pair interactions (pair exchange) in a NoC with an optimal two-dimensional circulant topology described by (1). Suppose, it is required to transfer a packet from a source node s to a destination node j. Provided that the shortest path vector A ij (of a destination node j with respect to a node i executing the path procedure) is known in each transit node i, modification of the shortest path vector to determine the output direction belonging to the shortest path to the destination node is reduced to operation If there are no failures of the nodes and communication lines in a network, then the vector of the shortest paths between the nodes will be calculated in the source node by the number of the destination node and written to the packet header.
In each transit node along the path to the destination, any of the directions belonging to the shortest path is selected, and the vector of the shortest paths is modified by operation (9) in order to reduce the absolute value of nonzero coordinates of the vector. The modified vector is written to the packet header which is passed on. The end of the path procedure is the equality to zero of all coordinates of vector of the shortest paths.
The data for the pair exchange algorithm can be described as follows: A ij is a vector of the shortest paths of the destination node with number j relative to a node i executing the path procedure; W is a set of numbers of output directions belonging to the shortest path to the destination node; the entry inp 0 > 0 means that a packet with the sign ''pair exchange'' has arrived at the input port with number 0 (that is, from the source node); the entry inp h > 0 means that from a neighboring node, the packet with the sign ''pair exchange'' has arrived at the input port with number h, (h = 1, 4); the entry ''put the packet in the output port out p '' means that the packet is put in the output port with number p.
Depending on the chosen method of calculating the shortest path vector A ok and using formulas (3) or (6), two versions of the algorithm are obtained: version (1) and version (2), respectively.
We give estimates of this algorithm. NoC with the number of nodes N requires log 2 N + log 2 (N /2) 1/2 bits to store in memory the values of two parameters: N and generator

Algorithm 1 (Pair Exchange Algorithm)
Input: parameters N , d for version (1), or N , d + 1 for version (2); j is the node number of the receiver; i is the number of the node performing the path procedure (in the source node i = s). Output: modified vector of the shortest paths A ij . 1: If inp 0 > 0 then k := |s-j| and go to 5.  (6), A ij :=sgn · A ok . 8: Choose any number p ∈ W , modify A ij by operation (9), write A ij in the packet header, put the packet in the output port out p . 9: End of the algorithm. In order to determine the time complexity of the proposed pair exchange algorithm, we experimentally checked its realization with Python 3 programming language on Intel Core i5-8265 processor. We tested circulant networks with the number of nodes N from 20 to 150000 and obtained a constant time of execution of algorithm which proves our estimate. In Table 2, the overall time of execution of the shortest path algorithm is presented provided that the messages are delivered from node 0 to all the other N − 1 nodes.
The presented algorithm for finding the shortest paths in optimal two-dimensional circulants does not use routing tables and adjacency matrices; it is adapted to node and link failures and load distribution of nodes; it has a constant complexity O(1) that does not depend on the size of the graph, in contrast to the following algorithms: 1) Dijkstra's algorithm with quadratic complexity O(N 2 ) for any connected graph of order N ; 2) the algorithm from [8] with an estimate of O(N 1/2 ) of the time for calculating the shortest paths for circulants of type C(N ; s 1 , s 2 ) and l = O(d) of the routing steps, where l is the distance between the vertices, and d is the diameter of the network; 3) the algorithm from [9] having the overall time complexity of one routing step O(log N ); 4) the algorithm from [10] with O(log N )−time preprocessing; 5) the algorithm from [11] with an estimate of O(log N ) arithmetic operations; 6) the algorithm from [12] having a constant estimate of the time complexity to calculate the shortest path for circulants of type C (N ; s 1 , s 2 ) , but requiring preliminary calculation of the parameters for calculation with time complexity O (2 log N ) ; 7) the algorithm from [13] in circulants of type C(N d ; d, d +1) with an estimate of O(d).
The results of these algorithms comparison on time complexity are presented in Table 3.
Comparison of algorithms for such parameters as auxiliary space usage and intrinsic space usage and others is not required in this study, due to the specific of the required area of application of the developed algorithm for implementation at the register-transfer level (RTL) of routers in NoC.

V. IMPROVING THE SHORTEST PATH SEARCH ALGORITHM FOR GENERALIZED PETERSEN GRAPHS
Theorems 3 and 4 can be also used to improve the shortest path search algorithm developed for optimal generalized Petersen graphs [3]. Generalized Petersen graphs as regular graphs of degree three can increase network reliability, compared to ring networks and trees used in modern infrastructures, and are significantly better than chordal rings of degree three in a number of indicators including the diameter and average distance, while maintaining a low network cost. Thus, generalized Petersen graphs of degree three can also be considered as a promising topology for implementation in NoCs. We give the necessary definitions.
Generalized Petersen graphs P (N , a, b) of order 2N are graphs consisting of outer (vertices V 0 connected by generator 2a) and inner (vertices V 1 connected by generator 2b) rings with an equal number of vertices N connected by edges.
The edges connecting vertices 2i and 2i + 1, i = 0, N − 1 will be considered corresponding to generator c = 1. Graphs P (N , a, b) with the smallest possible diameter for a given order are called the optimal ones.
An univalent mapping of the family of optimal twodimensional circulants described by (1) was found in the class of generalized Petersen graphs with preserving the optimality of the graph, and a parametric description of optimal generalized Petersen graphs for any graphs of order 2N was obtained: Theorem 5: For every N > 9, there exists an optimal generalized Petersen graph P (N , a, a + 1), where a = ((N − 1)/2) 1 / 2 − 1. This makes it possible, on the basis of the shortest paths search algorithm [30] for optimal circulants described by (1), to find an analytical solution to the shortest paths search problem for the class of optimal generalized Petersen graphs.
The use of formulas (3) and (6) makes it possible to improve the shortest path search algorithm for generalized Petersen graphs in terms of required memory and speed, since the main part of the calculations in it is determination of the shortest path vector from 0 to any vertex of an appropriate circulant graph C (N ; d, d + 1).

VI. PAIR EXCHANGE ALGORITHM TESTING
The first version of Algorithm 1 was implemented for NoCs. For its operation on the FPGA, it is necessary that the router receives all the necessary data for calculating the route. Based on the proposed algorithm, the head fleet should contain two fields in which the number of steps along generators s 1 and s 2 (the shortest path vector A ij ) is stored. This is correct when the router sends the calculated path to the next router. But when receiving a packet from the IP-core, the destination node number should be stored in the head fleet. Thus, the load on the package in the general case is calculated by the following formula: where N is the number of nodes in the network.
Since the maximum number of hops does not exceed D (the diameter of a graph), we can assume that values of vector of the shortest paths transmitted in the head fleet will not exceed D either. Thus, the load on the package can be reduced to 2 log 2 D , provided that log 2 N ≤ 2 log 2 D . The number of such circulants does not exceed 54 % of the total number of possible options for N ≤ 256 with the memory gain in 1-2 bits; and for N > 256, such circulants do not occur at all.
The router stores its network number, total number of routers in the network and the value of generator s 1 , since s 2 can be easily calculated. Additionally, the router stores the values calculated during the execution of algorithm. The total size of the stored data can be estimated using the following formula: where N is the number of nodes in the network; log 2 N is the required amount of memory in bits to store the serial number of the router in the network, total number of routers in the network, and values calculated by the algorithm; log 2 (N/2) is the required amount of memory in bits to store generator s 1 ; 1 bit is the required amount of memory to store the flag of generator selection for transmitting the packet to the next node.
Testing the operation of the proposed algorithm for the circulants of type C(N ;d, d+1) was carried out on the FPGA Cyclone V5CGXFC9A6U19I7 [31] by Intel FPGA. The routers are described in Verilog. For testing, the optimal circulants of type C(N ;d, d+1) with number of nodes determined by formula N = n 2 , where N is the number of nodes in the network, n is a natural number, are chosen. Table 4 shows the results of the theoretical calculation of occupied memory in bits, as well as consumed resources REG and ALM obtained after the synthesis of NoC communication subsystem.
The results show that the amount of required memory and ALM blocks occupied by one router changes in steps. This is due to increase in data size for the stored parameters and does not directly depend on the number of nodes in the network. The dependence can also be observed with the use of resources for the entire network -for those circulants, in which the use of registers by one router does not change, the increase in resource use by the entire network is less.
There is also a discrepancy of 20-30 % in a larger direction of REG consumption in comparison with theoretical estimates of memory consumption. This discrepancy between the calculations can be explained by the use of additional logic to test the operation of the network on the FPGA whose modeling also takes logical and memory resources.

VII. COMPARISON AND ANALYSIS OF ROUTING ALGORITHMS
We also made a comparative analysis of the hardware resources consumption for our algorithm and for the Table routing algorithm, Clockwise algorithm, Adaptive algorithm, and Algorithm for circulants of type C(N ; d, d + 1) from [5], [14] previously realized in NoCs with two-dimensional circulant topology.
It should be noted that the Clockwise algorithm does not guarantee the optimal path, and the Adaptive algorithm, in order to be optimal, requires a more complicated computational procedure when paths with more than 2 cycles are available.
Besides, it is difficult to speak about comparison in terms of time complexity here since the algorithms from [5], [14] are one-hop algorithms. Unlike the Pair exchange algorithm, where the path is calculated at first node, and at the intermediate ones, there is only a modification of the vector of the shortest paths A ij , in the algorithms under consideration, each next hop is calculated separately at each intermediate node with time complexity equal to O(1). Therefore, it can be argued that the complexity of all algorithms is comparable, but this gives little information in the context of their implementation in RTL. Much more information is provided by the dependence of occupied memory resources (REG) and logical blocks (ALM) on the number of nodes in the network.
Time-depended parameters could be also measured as the resulting time delay of the combinational circuit which implements the algorithm, but it greatly depends on specific parameters like chip manufacturing technology, floorplaning procedure, etc. and cannot be a universal metric. Moreover, if we assume that the digital automaton implements the algorithm in one clock cycle, then the number of ALM can be considered time-dependent, and REG -space-dependent metric.
The results of implementation on RTL for the proposed algorithm and the algorithms from [5], [14] are given in Tables 5 and 6.
As a result of comparing the algorithms, we can conclude that the proposed pair exchange algorithm takes less logical resources than the adaptive algorithm in [5] and the algorithm for circulants of type C(N ;d, d+1) in [14]. In [5] it has been shown that ALMs are a more critical resource than RAMs which limit the number of possible routers in NoCs. At the same time, the pair exchange algorithm is inferior to the adaptive algorithm in terms of used memory resources and it is slightly better than the algorithm for circulants of type C (N ; d, d +1). When necessary to minimize the use of memory registers, it is preferable to use the adaptive algorithm, but then the consumption of logical resources in comparison with  [5], [14] and pair exchange algorithm in REG on number of nodes in the network (RTL synthesis results).

TABLE 6.
Dependence of logic resources occupied by different algorithms from [5], [14] and pair exchange algorithm in ALM on number of nodes in the network (RTL synthesis results).
the pair exchange algorithm increases by more than 4 times. Note that the clockwise algorithm is better than pair algorithm in terms of the memory used and logical registers, but it increases the path of a packet into several times and does not guarantee its successful delivery to the destination node. Moreover, the proposed algorithm, as opposed to some of the routing algorithms from [5], [14], is optimal, i.e. always uses the shortest paths to the packet destination. The analytical method proposed is an exact and deterministic; by using analytical formulas, it determines a set of the shortest paths between any two nodes of a network in pair routing.
Thus, the use of the analytical method for development of a routing algorithm in NoCs is a sufficient effective solution. But the method is limited to a specialized structure of communication networks. In the present case, we used the best possible family of two-dimensional circulants of maximum connectivity and with minimums of diameter and mean distance under any number of nodes that provides the ability to use it as the basis to construct interconnection networks for NoCs. It would be promising to accept the analytical method of computing the shortest paths for development of routing algorithms in NoCs with a topology of other known families of three-dimensional and of higher dimension circulant graphs [1]- [3], [20], [24].

VIII. CONCLUSIONS
Thus, the problem of finding the shortest paths in optimal two-dimensional circulants was analytically solved in this work. The calculations proposed were mathematically proven. The theorems formulated and proved in the work to improve the shortest path search algorithm, developed for optimal generalized Petersen graphs, were also used. Based on the proposed mathematical apparatus, an effective dynamic pair exchange algorithm in two-dimensional circulants was developed. Since it always uses the shortest paths for routing, it is optimal. The algorithm does not use routing tables and adjacency matrices. Due to calculating a vector of the shortest paths and a possibility to use all the set of the shortest paths to a destination node, it is adapted to node and link failures and to load distribution of nodes. We experimentally showed that the overall time complexity O (1) of the algorithm does not depend on the network size in contrast to other well-known algorithms like Dijkstra's algorithm. Such properties make it a promising solution for the use in NoCs which was confirmed by an experimental study while synthesizing NoC communication subsystems and comparing the consumed hardware resources with those when other previously developed routing algorithms.