Compact Routing Schemes in Undirected and Directed Graphs
Abstract
In this paper, we study the problem of compact routing schemes in weighted undirected and directed graphs.
For weighted undirected graphs, more than a decade ago, Chechik [PODC’13] presented a -stretch compact routing scheme that uses local storage, where is the normalized diameter, for every . We present a -stretch compact routing scheme that uses local storage on average in each vertex. This is the first compact routing scheme that uses total local storage of while achieving a stretch, for a constant .
In real-world network protocols, messages are usually transmitted as part of a communication session between two parties. Therefore, more than two decades ago, Thorup and Zwick [SPAA’01] considered compact routing schemes that establish a communication session using a handshake. In their handshake-based compact routing scheme, the handshake is routed along a -stretch path, and the rest of the communication session is routed along an optimal -stretch path. It is straightforward to improve the -stretch of the handshake to -stretch using the compact routing scheme of Chechik [PODC’13]. We improve the handshake stretch to the optimal , by borrowing the concept of roundtrip routing from directed graphs to undirected graphs.
For weighted directed graphs, more than two decades ago, Roditty, Thorup, and Zwick [SODA’02 and TALG’08] presented a -stretch compact roundtrip routing scheme that uses local storage for every . For , this gives a -roundtrip stretch using local storage. We improve the stretch by developing a -roundtrip stretch routing scheme with local storage. In addition, we consider graphs with bounded hop diameter and present an optimal -roundtrip stretch routing scheme that uses , where is the hop diameter of the graph.
Keywords and phrases:
Routing schemes, Compact routing schemes, Distance oracles, Computer networks, Graph algorithmsFunding:
Liam Roditty: Supported in part by BSF grants 2016365 and 2020356.Copyright and License:
2012 ACM Subject Classification:
Theory of computation Routing and network design problemsEditor:
Dariusz R. KowalskiSeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
1 Introduction
Routing is a fundamental task in computer networks. A routing scheme is a mechanism designed to deliver messages efficiently from a source vertex to a destination vertex within the network. In this paper, we study both undirected and directed weighted graphs, aiming to route along short paths.
More specifically, a routing scheme is composed of a preprocessing phase and a routing phase. In the preprocessing phase, the entire graph is accessible, allowing the preprocessing algorithm to compute a routing table and a label for each vertex111In this paper, we study labeled routing schemes, where the preprocessing algorithm can assign labels to the vertices. When the vertex labels are fixed and cannot be changed, the routing scheme is called an name-independent routing scheme (see, for example, [1, 16, 17, 2, 13]), which is then stored in the local storage of each vertex. In the routing phase, the routing algorithm at each vertex on the routing path can only access the local storage of the vertex. The routing algorithm gets as input a message, a destination label, and possibly a header, and decides which of the vertex neighbors is the next vertex on the routing path. The routing continues until the message reaches the destination.
A compact routing scheme is a routing scheme that uses space in the local storage on average at each vertex, where is the number of vertices in the graph. Let be a source vertex and let be a destination vertex. We denote by the length of the path used by the routing algorithm to route a message from to . The stretch of the routing scheme is defined as , where is the distance from to . The roundtrip stretch is defined as .
The design of efficient compact routing schemes in undirected graphs has been a well-studied subject in the last few decades, see for example [19, 3, 4, 8, 11, 24, 22, 7]. In Table 1 we summarize the previous results.
From the Erdős girth conjecture, it follows that every routing scheme with stretch must use a total storage of bits. The approximate distance oracle data structure of Thorup and Zwick [25], which is implemented in the centralized model, where all the information is available upon a distance query to the data structure, has an optimal -stretch with total storage. In light of the gap between routing schemes and approximate distance oracles, the following problem is natural.
Problem 1.
For every , given a weighted undirected graph, what is the best stretch of a routing scheme that uses total storage?
The -stretch compact routing scheme of Chechik [7], from more than a decade ago, is the current best stretch with worst-case local storage. In this paper, we improve the stretch to by allowing an average local storage of , as presented in the following theorem.
Theorem 1.
Let be a weighted undirected graph. For every , there is an -stretch compact routing scheme that uses local routing tables of an average size of , vertex labels of size and packet headers of size .
All the compact routing schemes mentioned so far solve the problem of sending a single message from the source to the destination, while in most real-world network applications, two parties communicate over the network for a session. A communication session is composed of two phases. In the first phase, a connection is established between the source and the destination, and in the second phase, a stream of messages is exchanged between the parties. Many real-world protocols, such as TLS, QUIC, TCP, SSH, Wi-Fi, and Bluetooth, adhere to this framework.
We consider the handshake mechanism for the establishment phase, as presented by Thorup and Zwick [24]. The handshake is composed of two messages of size , that are exchanged between the parties to establish the connection. The first message is sent from the source to the destination, and the second message is sent from the destination back to the source. Since the handshake is composed of a message sent from the source to the destination and back, the stretch of the handshake is the roundtrip stretch defined earlier.
Thorup and Zwick [24] presented a compact routing scheme that uses a handshake, in which two messages are routed along a -stretch path, to establish a connection. Then, a stream of messages is routed along an optimal -stretch path. While the compact routing scheme of Chechik [7] achieves an -roundtrip stretch for the handshake, there is still a significant gap from the optimal -stretch followed by the Erdős girth conjecture. Therefore, the main open problem for routing in a communication session is to reduce the stretch of the handshake phase and obtain a compact roundtrip routing scheme with improved stretch.
Problem 2.
For every , given a weighted undirected graph, what is the best roundtrip stretch of a routing scheme that uses local storage?
In this paper we solve Problem 2 by presenting an optimal -roundtrip stretch for the handshake phase, that matches the lower bound that follows from the Erdős girth conjecture, as presented in the following theorem.
Theorem 2.
Let be a weighted undirected graph. Let be an integer. There is a -stretch compact roundtrip routing scheme that uses local routing tables of size , vertex labels of size and packet headers of size .
Using this result with the handshake-based routing scheme of Thorup and Zwick [24], one obtains an optimal -stretch compact routing scheme for any communication session. We summarize our new results for undirected graphs and compare them to the previous work in Table 1.
| Stretch | Local storage |
|
Ref. | Comments | ||
| yes | [19] | unweighted graphs | ||||
| yes | [3] | |||||
| no | [4] | |||||
| no | [24] | |||||
| no | [7] | |||||
| no | [22] | |||||
| yes | Theorem 1 | |||||
| no | Theorem 2 | roundtrip stretch |
Next, we turn our attention to weighted directed graphs. Since preserving the asymmetric reachability structure of directed graphs requires space222In a bipartite graph in which all the edges are from one side to the other, there are edges and removing each of them makes the destination not reachable from the source. Thus, storing reachability requires space., no spanner, emulator, or compact routing scheme can exist for directed graphs. Cowen and Wagner [9] circumvented the space lower bound by introducing roundtrip distances in directed graphs, defined as .
In the last few decades, a few compact roundtrip routing schemes were presented, see for example [9, 10, 21]. The state-of-the-art result was obtained by Roditty, Thorup, and Zwick [21]. They presented a -stretch compact roundtrip routing scheme that uses local storage and also a -stretch compact roundtrip routing scheme that uses local storage for every .
From the Erdős girth conjecture, it follows that every compact roundtrip routing scheme with stretch must use total storage of bits. Closing the gap between the upper and the lower bound is the main open problem regarding compact roundtrip routing schemes.
Problem 3.
For every , given a directed weighted graph, what is the best stretch of a roundtrip routing scheme that uses local storage?
In recent years, roundtrip distances have been extensively studied but only in the context of roundtrip spanners and roundtrip emulators (see, for example [14, 6, 21, 23, 5, 18]). Despite all the recent progress, no improvements were obtained for compact roundtrip routing schemes since the -stretch roundtrip routing scheme of [21] from more than two decades ago.
In this paper, we improve upon [21] for the case that . More specifically, using local storage, Roditty, Thorup, and Zwick [21] obtained a -stretch roundtrip routing scheme. We present a -stretch roundtrip routing scheme that uses local storage, as presented in the following theorem.
Theorem 3.
Let be a weighted directed graph. There is a -stretch compact roundtrip routing scheme that uses local routing tables of size , vertex labels of size and packet headers of size .
In addition, in the following theorem, we present an optimal333Assuming the Erdős conjecture, it is easy to create a graph with edges such that the girth of is , and the diameter of is at most . Given a graph with edges and girth, if there is a pair of vertices such that , we can add an edge between and to the graph without reducing the girth. By repeating this process until there are no pairs such that , we get that the diameter is at most . , up to polylogarithmic factors, compact roundtrip routing scheme in graphs with , where is the hop diameter of the graph.
Theorem 4.
Let be a weighted directed graph. Let be an integer. There is a -stretch compact roundtrip routing scheme that uses local routing tables of size , vertex labels of size and packet headers of size .
We summarize our new results for directed graphs and compare them to the previous work in footnote 5.
| Stretch | local storage |
|
Ref. | Comments | ||
| yes | [9] | |||||
| no | [9] | |||||
| yes | [10] | |||||
| no | [21] | |||||
| no | [21] | |||||
| no | [21] | |||||
| no | Theorem 3 | |||||
| no | Theorem 4 | is the hop diameter of . |
The rest of this paper is organized as follows. In Section 2 we present some necessary preliminaries. In Section 3 we present an overview of our technical contributions and our new compact routing schemes. In Section 4 we present our optimal compact roundtrip routing scheme for weighted undirected graphs. In Section 5 we extend Section 4 to directed graphs with small hop diameter. In Appendix A we present our -stretch compact roundtrip routing scheme for weighted directed graphs. Finally, in Section 6 in the full version of this paper [15], we present our single message compact routing scheme for weighted undirected graphs that use average local storage.
2 Preliminaries
Let be a weighted graph with vertices and edges, where . We consider both connected undirected graphs and strongly connected directed graphs666If the graph is not connected (or not strongly connected), we add a dummy vertex and connect it with bi-directional edges of weight to every vertex of the graph..
Let the distance from to be the length of the shortest path from to in , where the length of a path is the sum of its edge weights, and let be the shortest path from to , is omitted when it is clear from context. The roundtrip distance is defined as . Throughout this paper, we assume that for any two vertices and , there exists a unique shortest path between them. In the case of multiple shortest paths of the same length, we break ties by selecting the path with the lexicographically smallest sequence of vertex identifiers.
Let . The distance from to is the distance between and the closest vertex to from , that is, . Similarly, the roundtrip distance from to is defined as . Let (ties are broken in favor of the vertex with a smaller identifier).
Next, following the ideas of Thorup and Zwick [25], we define bunches and clusters. Let and let . The bunch of with respect to and is defined as . The ball of with respect to is defined as (notice that ). The cluster of with respect to is defined as .
The starting point in many algorithms, distance oracles, and compact routing schemes, and in particular in Thorup and Zwick [24] routing scheme, is a hierarchy of vertex sets , where , , and for .
For every , the -th pivot of is defined as , and is defined as . The -th bunch of is defined as . The bunch of is defined as the union of its individual bunches, that is, . The cluster of a vertex is defined as the cluster of with respect to the set , that is, . We denote by the set .
In the following lemma, we provide an upper bound for the size of , which is , as demonstrated by Thorup and Zwick [25].
Lemma 5 ([25, 20]).
Given an integer parameter , we can compute sets , such that , for every . For every the size of is .
In the following lemma, we provide an upper bound for the size of , which is , as demonstrated by Thorup and Zwick [24].
Lemma 6 ([24]).
Given a parameter , we can compute a set of size such that, , for every vertex , and for every .
Let . We define as a tree containing the directed shortest paths from to all the vertices in , and as a tree containing the directed shortest paths from all the vertices in to . When is clear from context, we omit it, for example, we use , and . Note that it is possible for to be bigger than in cases where the shortest path from to a vertex in passes through a vertex not in . 777We denote with the number of edges in , i.e. . Let , as defined in [21], when is clear from context we omit it and write . Notice that in undirected graphs, since , we have that . Next, we show that if is a ball, i.e. for some set , then and , and therefore .
Lemma 7 ([21]).
and .
Proof.
Let , , and let . We will show that . Since all the vertices in are on the shortest path from to a vertex in , we obtain that , as required. The proof for the in-ball is identical for reversed paths. From the triangle inequality, we know that
where the last inequality follows from the fact that .888 denotes an inequality that follows from the triangle inequality. Since we get that , as required.
The following lemma was originally proven in [25] for any metric space and therefore holds also for roundtrip distances. For completeness, we prove the lemma for roundtrip distances.
Lemma 8.
Let and let . If and for every , then
Proof.
We prove the claim by induction for every . For , the lemma holds since and . Next, we prove the induction step. We assume the correctness of the claim for and show its correctness for . Therefore, and . Without loss of generality, we show that . The proof for is identical.
Since , it follows that . Therefore, from the lemma’s assumptions, we know that . From the definition of , it follows that . From the triangle inequality, it follows that . Recall that from the induction assumption we know that . Therefore, we get that:
as required.
Next, we show that if , then .
Lemma 9.
Let , if then
Proof.
From the definition of , we know that it is the closest vertex to in , and since we get that . From the triangle inequality, it follows that . From the lemma assumption, we know that . Therefore, . From the triangle inequality, it follows that . Overall, we get that:
as required.
The following lemma holds only for undirected graphs and is presented in [25].
Lemma 10 ([25]).
Let be a weighted undirected graph. Let , let , and let then .
Proof.
For the sake of contradiction, assume that . From the definition of , we have that .
By the triangle inequality, we have: Since , we get . Since , and the graph is undirected, it follows that . Thus, a contradiction to the fact that .
2.1 General framework
A routing scheme comprises two phases: a preprocessing phase and a routing phase. In the preprocessing phase, the entire graph is accessible to the algorithm. The preprocessing algorithm computes for every a routing table and a label . Each vertex saves and in its local storage. A routing scheme is considered compact if the size of the routing tables is sub-linear in the number of vertices, i.e., .
In the routing phase, the goal is to route a message from a source vertex to a destination vertex . Specifically, the routing algorithm at the source vertex gets as input the routing table , and the labels and . Based on this input, the routing algorithm determines a neighboring vertex of to which the message should be forwarded. The routing algorithm can also attach a header to the message. When a vertex receives a message, the routing algorithm at gets as input the routing table , and the labels and (and possibly a header). Based on this input, the routing algorithm determines a neighboring vertex of to which the message should be forwarded. The message is routed from a vertex to one of its neighbors until the message reaches its destination vertex .
We denote by the distance that a message whose source vertex is and whose destination vertex is traverses from to . The stretch of the routing scheme is defined as .
Several variants of compact routing schemes exist. In a labeled routing scheme, the preprocessing algorithm can assign labels to the vertices. In a fixed-port routing scheme, the order of the neighbors of each vertex is fixed and cannot be changed by the preprocessing algorithm. In this work, we focus on labeled, fixed-port compact routing schemes.
2.2 Routing in trees
An essential ingredient in our compact routing schemes for general graphs is the following compact routing scheme for trees. Given a tree , the preprocessing algorithm assigns a label to every vertex in . The routing algorithm then routes a message from a source vertex to a destination vertex on the shortest path from to in . Thorup and Zwick [24] presented a tree routing scheme that uses only vertex labels of size and no routing tables. In the fixed-port model, however, the label size increases to . A similar scheme was presented by Fraigniaud and Gavoille [12]. The following lemma outlines the known results for tree compact routing schemes.
Lemma 11 ([12, 24]).
Let be an undirected tree on vertices with each edge assigned a unique -bit port number. Then, it is possible to efficiently assign each vertex an -bit label, denoted , such that if , then given and , and nothing else, it is possible to find in constant time, the port number assigned to the first edge on the path in from to .
2.3 Routing in directed graphs
Roditty, Thorup, and Zwick [21] extended the compact routing scheme from trees to double trees to handle directed graphs. In our work on directed graphs (Section 5 and Appendix A), we employ this double-tree adaptation when routing within double-trees. Moreover, for the routing in clusters to work in directed graphs, they adjusted the definition of cluster adaptation using the following definition of roundtrip ordering.
Definition 12.
We assume that . Let . We say that if one of the following holds:
-
-
and
-
and and
Using this definition, the cluster of with respect to is defined as , where satisfies that for every .
Using this definition, they proved the following lemma:
Lemma 13 ([21]).
If and , then
3 Overview
In this section, we present an overview of our new compact routing schemes and their main technical contributions. Throughout the overview, let be a hierarchy such that, and , for every , created using Section 2. We denote with routing from to on .
Roundtrip routing scheme in undirected graphs.
Notice that any -stretch compact routing scheme is also a -roundtrip stretch compact routing scheme. In undirected graphs, where , we have . This might lead one to question the potential benefits of considering roundtrip routing in undirected graphs. In other words, why might the problem of roundtrip routing be easier than the problem of single message routing, even though ?
During the routing process, the information available to the routing algorithm at may differ from the information available at . Therefore, the routing path from to may differ from the routing path from to , which might lead to the case that . Consider for example the case that and . In this case, the roundtrip stretch is while the single message stretch is , and even though , the roundtrip stretch is much smaller than the single message stretch.
Next, we provide an overview of our optimal -roundtrip stretch compact routing scheme (for the complete description, see Section 4). The preprocessing algorithm sets and , for every . Let , and let , and let . The roundtrip routing path is (see Figure 1).
Our main technical contribution is in Lemma 4, where we show that while the path might be of length at most , the entire path is of length of at most , and therefore the roundtrip stretch is the optimal -stretch.
Next, we provide some intuition why . From the triangle inequality, we have that . From the definition of and , for every we have and , and for every we have . This allows us to prove that and . Overall:
and therefore .
Directed roundtrip routing schemes.
One might wonder why the general compact roundtrip routing scheme presented above for undirected graphs can not be extended to directed graphs. The problem lies in the structure of clusters. In undirected graphs, if then (see Section 2), and therefore we can route from to every , such that . Unfortunately, in directed graphs, this nice property of clusters does not necessarily hold. More specifically, it might be that even when and as a result, we cannot route from to while using only the cluster as in undirected graphs. A simple approach to overcome this problem is to store , for every , in . Using this approach, we can extend the roundtrip routing scheme from undirected graphs to directed graphs with small hop diameter (see Theorem 4).
For routing tables of size , we overcome the problem that using a more sophisticated solution. For an hierarchy with we have and three bunches, and , for every . Let . To follow the compact roundtrip of undirected graphs we need to be able to route from to , if , from to , if , and from to , otherwise. Since is a ball , for every (see Section 2). Therefore, we can route from to every vertex in . Moreover, since , we can route from to . This leaves us with the challenge of routing from to when .
To handle this challenge, we divide the routing from to into two cases. If , we simply route on the path . Otherwise, if , we let be the first vertex such that . In this case, we route along the path . Using the fact that we show that , and that (see Appendix A).
Average single message routing schemes in undirected graphs.
Recall that . In the preprocessing algorithm, we set , and , for every .
For the sake of simplicity, we assume that when routing from the source vertex to the destination vertex , the value is known to the routing algorithm. In this case, we present an optimal -stretch routing scheme in Section 6 of the full version of this paper [15]. The algorithm at the source works as follows. For each , if , it routes from to in . Otherwise, if the inequality holds, then we have that and therefore the algorithm routes from to in . If neither condition is satisfied, the algorithm proceeds to the next iteration. The -stretch of the routing scheme follows by induction using standard tools (see the full version[15] for the complete proof).
In Section 6 of the full version[15], we present a routing algorithm that routes from to without knowing the value of . To achieve this, we introduce an estimate satisfying , which serves as our current best lower bound for . Note that since is only an estimate and may be strictly smaller than , it is possible that and .999We alternate between bounding and , but by the definition of , we have that for every . Therefore, it suffices to only bound the for . Therefore, we introduce a condition that, if satisfied, means that . If the condition is satisfied, the routing algorithm routes to and checks in whether . If the algorithm simply routes from to . Otherwise, if , then we know that , and we can safely update to . We proceed by routing back from to and then continuing to the next iteration of the algorithm.
The routing algorithm is simple and works as follows. Let , and let . For each , let be a constant:
-
1.
If , then the algorithm continues to the next iteration.
-
2.
Otherwise, if , then the algorithm routes to and accesses :
-
(a)
If then the algorithm routes directly from to in .
-
(b)
Otherwise, if , the algorithm sets to and routes back to from . The algorithm then continues to the next iteration.
-
(a)
In contrast to the simplicity of the routing algorithm, analyzing its stretch is rather involved. For a complete proof, see Section 6 of the full version[15].
4 Optimal roundtrip routing in undirected graphs
In this section, we consider roundtrip routing in weighted undirected graphs. In undirected graphs , the roundtrip distance is simply .
This observation naturally leads to the question: what are the potential advantages of studying roundtrip routing in undirected graphs? In particular, why might roundtrip routing be easier to approximate than single-message routing, despite the fact that the roundtrip distance is always twice the one-way distance, i.e., ?
The key distinction lies in the asymmetry of available information during the routing process. When routing from a source vertex to a destination vertex , the algorithm has access only to the routing table and the label . However, routing from to is based solely on and . Since these inputs may differ significantly, the resulting routing paths may differ significantly, and we may have that .
In single-message routing, the stretch must hold for the worst-case direction. Therefore, is bounded. However, roundtrip routing requires only that the average of the two directions be bounded. Therefore, is bounded.
This relaxation in the approximation requirement allows us to achieve an optimal stretch compact roundtrip routing scheme, as presented in the following theorem.
Reminder of Theorem 2. Let be a weighted undirected graph. Let be an integer. There is a -stretch compact roundtrip routing scheme that uses local routing tables of size , vertex labels of size and packet headers of size .
First, we describe the preprocessing algorithm, which computes the routing tables and assigns vertex labels. The input to the algorithm is a graph and an integer parameter . The algorithm uses Section 2 to build a hierarchy of vertex sets , where , , , and , for every . Next, for every , the preprocessing algorithm computes and . Then, for every , the algorithm sets the routing table to:
and the label to:
We now turn to bound the size of the routing tables and the vertex labels.
Lemma 14.
, and , for every .
Proof.
From Section 2 it follows that . From Subsection 2.2 it follows that for every tree it holds that . Therefore, , as required. The label of each vertex is composed of tree labels for every . From Subsection 2.2 we know that . Therefore, , as required.
The routing algorithm routes a message from to as follows. Let and let . We route from to on the shortest path between and in . In figure 1 we show the roundtrip route between and according to this routing algorithm.
Next, we show that for every on the shortest path from to in we have that and therefore can route to in .
Lemma 15.
For every it holds that
Proof.
If , then by Section 2, we know that . Similarly, if , then from Section 2, we know that . Since it follows from the definition of that . By the definition of since it follows that , as required.
We now turn to the main technical contribution of this section and prove that the stretch of the compact roundtrip routing scheme is .
Lemma 16.
Proof.
Let , let , and let . Assume, without loss of generality, that . See Figure 1 for an illustration.
In the routing phase, we route from to on the shortest path between and in . Similarly, we route from to on the shortest path between and in . Therefore,
From the triangle inequality, we have , therefore we get that:
By symmetry, we also get that . By definition . Therefore, we get:
To get that , we show that in the following claim.
Claim 16.1.
Proof.
Let , for every .
Notice that for every , it holds that:
Since we assume (wlog) that , we have:
| (1) |
From the definition of and , for every , we have that both and . Therefore, by applying Section 2 we get:
| (2) |
For every , since , we can apply Section 2 to get that . Therefore, we get:
| (3) |
Using the above three inequalities, we get:
where the last inequality follows from the fact that .
Finally, since we know that , and from Claim 16.1 we have that we get:
As required. Theorem 2 follows from Section 4, Section 4 and Section 4.
5 Extending Section 4 to directed graphs
In this section, we consider roundtrip routing in weighted directed graphs. One might wonder why the routing scheme of Theorem 2 does not apply to or cannot be adapted to directed graphs. The key issue lies in the fact that Section 2 holds only for undirected graphs. Without this lemma, the routing process fails in directed graphs. Specifically, in directed graphs, there exist cases where and , but . Consequently, even if we store the set , for every vertex , we may not be able to route correctly from to when .
To overcome this issue, we consider bounded hop diameter graphs, where the hop diameter is the maximum number of edges on a shortest path between any two vertices in the graph, i.e. . In such a case, we can achieve the following theorem.
Reminder of Theorem 4. Let be a weighted directed graph. Let be an integer. There is a -stretch compact roundtrip routing scheme that uses local routing tables of size , vertex labels of size and packet headers of size .
Proof.
The preprocessing algorithm is identical to that of Theorem 2, with one key modification: instead of setting we store where is the entire path from to , and similarly instead of setting we store .
In the routing algorithm at the source vertex to a destination vertex , after determining . The entire path is attached to the header to ensure that intermediate vertices can route correctly. The remainder of the proof follows the same steps as in Section 4.
References
- [1] Ittai Abraham, Cyril Gavoille, Dahlia Malkhi, Noam Nisan, and Mikkel Thorup. Compact name-independent routing with minimum stretch. In Phillip B. Gibbons and Micah Adler, editors, SPAA 2004: Proceedings of the Sixteenth Annual ACM Symposium on Parallelism in Algorithms and Architectures, June 27-30, 2004, Barcelona, Spain, pages 20–24. ACM, 2004. doi:10.1145/1007912.1007916.
- [2] Ittai Abraham, Cyril Gavoille, Dahlia Malkhi, Noam Nisan, and Mikkel Thorup. Compact name-independent routing with minimum stretch. ACM Trans. Algorithms, 4(3):37:1–37:12, 2008. doi:10.1145/1367064.1367077.
- [3] Baruch Awerbuch, Amotz Bar-Noy, Nathan Linial, and David Peleg. Improved routing strategies with succinct tables. J. Algorithms, 11(3):307–341, 1990. doi:10.1016/0196-6774(90)90017-9.
- [4] Baruch Awerbuch and David Peleg. Routing with polynomial communication-space trade-off. SIAM J. Discret. Math., 5(2):151–162, 1992. doi:10.1137/0405013.
- [5] Ruoxu Cen and Ran Duan. Roundtrip spanners with stretch. CoRR, abs/1911.12411, 2019. arXiv:1911.12411.
- [6] Ruoxu Cen, Ran Duan, and Yong Gu. Roundtrip spanners with (2k-1) stretch. In Artur Czumaj, Anuj Dawar, and Emanuela Merelli, editors, 47th International Colloquium on Automata, Languages, and Programming, ICALP 2020, July 8-11, 2020, Saarbrücken, Germany (Virtual Conference), volume 168 of LIPIcs, pages 24:1–24:11. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2020. doi:10.4230/LIPICS.ICALP.2020.24.
- [7] Shiri Chechik. Compact routing schemes with improved stretch. In Panagiota Fatourou and Gadi Taubenfeld, editors, ACM Symposium on Principles of Distributed Computing, PODC ’13, Montreal, QC, Canada, July 22-24, 2013, pages 33–41. ACM, 2013. doi:10.1145/2484239.2484268.
- [8] Lenore Cowen. Compact routing with minimum stretch. J. Algorithms, 38(1):170–183, 2001. doi:10.1006/JAGM.2000.1134.
- [9] Lenore Cowen and Christopher G. Wagner. Compact roundtrip routing for digraphs. In Robert Endre Tarjan and Tandy J. Warnow, editors, Proceedings of the Tenth Annual ACM-SIAM Symposium on Discrete Algorithms, 17-19 January 1999, Baltimore, Maryland, USA, pages 885–886. ACM/SIAM, 1999. URL: http://dl.acm.org/citation.cfm?id=314500.315068.
- [10] Lenore Cowen and Christopher G. Wagner. Compact roundtrip routing in directed networks. J. Algorithms, 50(1):79–95, 2004. doi:10.1016/J.JALGOR.2003.08.001.
- [11] Tamar Eilam, Cyril Gavoille, and David Peleg. Compact routing schemes with low stretch factor. J. Algorithms, 46(2):97–114, 2003. doi:10.1016/S0196-6774(03)00002-6.
- [12] Pierre Fraigniaud and Cyril Gavoille. A space lower bound for routing in trees. In Helmut Alt and Afonso Ferreira, editors, STACS 2002, 19th Annual Symposium on Theoretical Aspects of Computer Science, Antibes - Juan les Pins, France, March 14-16, 2002, Proceedings, volume 2285 of Lecture Notes in Computer Science, pages 65–75. Springer, 2002. doi:10.1007/3-540-45841-7_4.
- [13] Cyril Gavoille, Christian Glacet, Nicolas Hanusse, and David Ilcinkas. On the communication complexity of distributed name-independent routing schemes. In Yehuda Afek, editor, Distributed Computing - 27th International Symposium, DISC 2013, Jerusalem, Israel, October 14-18, 2013. Proceedings, volume 8205 of Lecture Notes in Computer Science, pages 418–432. Springer, 2013. doi:10.1007/978-3-642-41527-2_29.
- [14] Alina Harbuzova, Ce Jin, Virginia Vassilevska Williams, and Zixuan Xu. Improved roundtrip spanners, emulators, and directed girth approximation. In David P. Woodruff, editor, Proceedings of the 2024 ACM-SIAM Symposium on Discrete Algorithms, SODA 2024, Alexandria, VA, USA, January 7-10, 2024, pages 4641–4669. SIAM, 2024. doi:10.1137/1.9781611977912.166.
- [15] Avi Kadria and Liam Roditty. Compact routing schemes in undirected and directed graphs. arXiv preprint arXiv:2503.13753, 2025. doi:10.48550/arXiv.2503.13753.
- [16] Goran Konjevod, Andréa W. Richa, and Donglin Xia. Optimal-stretch name-independent compact routing in doubling metrics. In Eric Ruppert and Dahlia Malkhi, editors, Proceedings of the Twenty-Fifth Annual ACM Symposium on Principles of Distributed Computing, PODC 2006, Denver, CO, USA, July 23-26, 2006, pages 198–207. ACM, 2006. doi:10.1145/1146381.1146412.
- [17] Kofi A. Laing. Name-independent compact routing in trees. Inf. Process. Lett., 103(2):57–60, 2007. doi:10.1016/J.IPL.2007.02.015.
- [18] Jakub Pachocki, Liam Roditty, Aaron Sidford, Roei Tov, and Virginia Vassilevska Williams. Approximating cycles in directed graphs: Fast algorithms for girth and roundtrip spanners. In Artur Czumaj, editor, Proceedings of the Twenty-Ninth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2018, New Orleans, LA, USA, January 7-10, 2018, pages 1374–1392. SIAM, 2018. doi:10.1137/1.9781611975031.91.
- [19] David Peleg and Eli Upfal. A trade-off between space and efficiency for routing tables. J. ACM, 36(3):510–530, 1989. doi:10.1145/65950.65953.
- [20] Liam Roditty, Mikkel Thorup, and Uri Zwick. Deterministic constructions of approximate distance oracles and spanners. In Luís Caires, Giuseppe F. Italiano, Luís Monteiro, Catuscia Palamidessi, and Moti Yung, editors, Automata, Languages and Programming, 32nd International Colloquium, ICALP 2005, Lisbon, Portugal, July 11-15, 2005, Proceedings, volume 3580 of Lecture Notes in Computer Science, pages 261–272. Springer, 2005. doi:10.1007/11523468_22.
- [21] Liam Roditty, Mikkel Thorup, and Uri Zwick. Roundtrip spanners and roundtrip routing in directed graphs. ACM Trans. Algorithms, 4(3):29:1–29:17, 2008. doi:10.1145/1367064.1367069.
- [22] Liam Roditty and Roei Tov. New routing techniques and their applications. In Chryssis Georgiou and Paul G. Spirakis, editors, Proceedings of the 2015 ACM Symposium on Principles of Distributed Computing, PODC 2015, Donostia-San Sebastián, Spain, July 21 - 23, 2015, pages 23–32. ACM, 2015. doi:10.1145/2767386.2767409.
- [23] Eli Stafford and Chunjiang Zhu. Improved sourcewise roundtrip spanners with constant stretch. In Weili Wu and Guangmo Tong, editors, Computing and Combinatorics - 29th International Conference, COCOON 2023, Hawaii, HI, USA, December 15-17, 2023, Proceedings, Part I, volume 14422 of Lecture Notes in Computer Science, pages 297–309. Springer, 2023. doi:10.1007/978-3-031-49190-0_21.
- [24] Mikkel Thorup and Uri Zwick. Compact routing schemes. In Arnold L. Rosenberg, editor, Proceedings of the Thirteenth Annual ACM Symposium on Parallel Algorithms and Architectures, SPAA 2001, Heraklion, Crete Island, Greece, July 4-6, 2001, pages 1–10. ACM, 2001. doi:10.1145/378580.378581.
- [25] Mikkel Thorup and Uri Zwick. Approximate distance oracles. J. ACM, 52(1):1–24, 2005. doi:10.1145/1044731.1044732.
Appendix A -stretch directed roundtrip routing with
In this section, we consider roundtrip routing in general weighted directed graphs. Roditty et. al [21] obtained a roundtrip routing scheme with -stretch and routing tables of size . If we set we get a -stretch roundtrip routing scheme with routing tables of size . In this section, we present a -stretch roundtrip routing scheme with routing tables of size . We prove:
Reminder of Theorem 3. Let be a weighted directed graph. There is a -stretch compact roundtrip routing scheme that uses local routing tables of size , vertex labels of size and packet headers of size .
First, we describe the preprocessing algorithm, which computes the routing tables and assigns vertex labels. The input to the algorithm is a graph . The algorithm uses Section 2 and Section 2 to build a hierarchy of vertex sets , where . For every it holds that and , where . Next, for every , the preprocessing algorithm computes and . Then, for every , the algorithm sets the routing table to:
and the label to:
We now bound the size of the routing tables and the vertex labels.
Lemma 17.
and
Proof.
From Section 2 it follows that , for every . In addition we get that . From Section 2 it follows that and . From Subsection 2.2 it follows that for every tree it holds that . Therefore, , as required.
The label of each vertex is composed of three tree labels. From Subsection 2.2 it follows that each tree label is of size . Therefore, , as required. The routing algorithm routes a message from to as follows. If , then the algorithm routes the message using the tree . Otherwise, if then the algorithm routes the message using the tree . If and , then the algorithm checks if . In this case, if then the algorithm routes on from to , and then from to on the tree (see Figure 2 (a)). Otherwise, if , then the algorithm routes from to on the tree , where , and then the algorithm routes from to on the tree (see Figure 2 (b)).
Finally, if , then the algorithm routes from to on the tree (see Figure 2 (c)). A pseudo-code for the routing algorithm is given in Algorithm 1.
In the next lemma, we show that all intermediate vertices have the necessary information to complete the routing process once the routing tree is determined.
Lemma 18.
The following properties hold:
-
1.
If , then for every , we have .
-
2.
If , then for every , we have .
-
3.
If and , then for every , we have .
-
4.
If , then for every , we have .
-
5.
For every , we have .
Proof.
For property 3, we have that the entire path is contained in . Hence, any sub-path of is also in , and we have for every .
For property 4, since , we know that . Therefore, all vertices in the graph (and specifically ) hold .
For property 5, for , we have . For every other , we have from Subsection 2.3 that and therefore , and we have in , as required.
We now turn to prove that the stretch of the compact roundtrip routing scheme is .
Lemma 19.
Proof.
First, consider the case that . In this case, the routing algorithm routes from to along , so . Since , by the definition of , we know that . Therefore, the routing algorithm from to follows . Thus,
as required. Similarly, if , using symmetrical arguments, we get that , as required.
Next, consider the case that and . In the following claim, we show that in this case, . Using this claim, we obtain:
as required.
Claim 19.2.
If and , then:
Proof.
Since and , we know from the definitions of and that:
| (1) |
We divide the proof into two cases: the case that and the case that . If we can apply Section 2 and get:
| (2) |
Since , the routing algorithm routes from to on the tree . Therefore, we have:
as required.
Next, consider the case that . If , then the routing algorithm routes along the shortest path from to . Therefore, we have:
as required.
Otherwise, if , let be the first vertex in such that . From the definition of , it follows that . From the definition of we get that Since , it follows that Combining these inequalities, we get that:
In this case, the routing algorithm routes from to on the tree , and then from to . We get that:
Since , we know that . Recall that . Therefore:
as required.
Theorem 3 follows from Appendix A, Appendix A and Appendix A.
