Competitive Local Routing with Constraints Research supported by NSERC, the Ontario Ministry of Research and Innovation, Carleton University’s President’s 2010 Doctoral Fellowship, the Carleton-Fields Postdoctoral Award, the Danish Council for Independent Research, Natural Sciences, grant DFF-1323-00247, and JST ERATO Grant Number JPMJER1305, Japan. An extended abstract containing some of the results in this paper appeared in the 26th International Symposium on Algorithms and Computation (ISAAC 2015) [5].

Competitive Local Routing with Constraints thanks: Research supported by NSERC, the Ontario Ministry of Research and Innovation, Carleton University’s President’s 2010 Doctoral Fellowship, the Carleton-Fields Postdoctoral Award, the Danish Council for Independent Research, Natural Sciences, grant DFF-1323-00247, and JST ERATO Grant Number JPMJER1305, Japan. thanks: An extended abstract containing some of the results in this paper appeared in the 26th International Symposium on Algorithms and Computation (ISAAC 2015) [5].

Prosenjit Bose,  Rolf Fagerberg,  André van Renssen,    and Sander Verdonschot33footnotemark: 3 School of Computer Science, Carleton University, Ottawa, Canada, jit@scs.carleton.ca, sander@cg.scs.carleton.caDepartment of Mathematics and Computer Science, University of Southern Denmark, Odense, Denmark, rolf@imada.sdu.dkNational Institute of Informatics, Tokyo, Japan, andre@nii.ac.jpJST, ERATO, Kawarabayashi Large Graph Project
Abstract

Let be a set of vertices in the plane and a set of non-crossing line segments between vertices in , called constraints. Two vertices are visible if the straight line segment connecting them does not properly intersect any constraints. The constrained -graph is constructed by partitioning the plane around each vertex into disjoint cones, each with aperture , and adding an edge to the ‘closest’ visible vertex in each cone. We consider how to route on the constrained -graph. We first show that no deterministic 1-local routing algorithm is -competitive on all pairs of vertices of the constrained -graph. After that, we show how to route between any two visible vertices of the constrained -graph using only 1-local information. Our routing algorithm guarantees that the returned path is 2-competitive. Additionally, we provide a 1-local 18-competitive routing algorithm for visible vertices in the constrained half--graph, a subgraph of the constrained -graph that is equivalent to the Delaunay graph where the empty region is an equilateral triangle. To the best of our knowledge, these are the first local routing algorithms in the constrained setting with guarantees on the length of the returned path.

1 Introduction

A fundamental problem in any graph is the question of how to route a message from one vertex to another. What makes this more challenging is that often in a network the routing strategy must be local. Informally, a routing strategy is local when the routing algorithm must decide which vertex to forward a message to based solely on knowledge of the source and destination vertex, the current vertex and all vertices directly connected to the current vertex. Routing algorithms are considered geometric when the graph that is routed on is embedded in the plane, with edges being straight line segments connecting pairs of vertices and weighted by the Euclidean distance between their endpoints. Geometric routing algorithms are important in wireless sensor networks (see [11] and [12] for surveys of the area) since they offer routing strategies that use the coordinates of the vertices to guide the search, instead of the more traditional routing tables.

Most of the research has focused on the situation where the network is constructed by taking a subgraph of the complete Euclidean graph, i.e. the graph that contains an edge between every pair of vertices and the length of this edge is the Euclidean distance between the two vertices. We study this problem in a more general setting with the introduction of line segment constraints. Specifically, let be a set of vertices in the plane and let be a set of line segments between vertices in , with no two line segments intersecting properly. The line segments of are called constraints. Two vertices and can see each other if and only if either the line segment does not properly intersect any constraint or is itself a constraint. If two vertices and can see each other, the line segment is a visibility edge. The visibility graph of with respect to a set of constraints , denoted , has as vertex set and all visibility edges as edge set. In other words, it is the complete graph on minus all non-constraint edges that properly intersect one or more constraints in .

This natural extension allows for more realistic network modeling by excluding edges that cannot be used, such as ones crossing mountain ranges or areas of high interference which would scramble the message if used. As such, this setting has been studied extensively within the context of motion planning amid obstacles. Clarkson [9] was one of the first who studied this problem and showed how to construct a -spanner of with a linear number of edges. A subgraph of is called a -spanner of (for ) if for each pair of vertices and , the shortest path in between and has length at most times the shortest path in between and . The smallest value for which is a -spanner is the spanning ratio or stretch factor of . Following Clarkson’s result, Das [10] showed how to construct a spanner of with constant spanning ratio and constant degree. Bose and Keil [7] showed that the Constrained Delaunay Triangulation (which contains an edge between two visible vertices and if and only if is a constraint or there exists a circle with and on its boundary that contains no vertices visible to and in its interior) is a 2.42-spanner of . Recently, the constrained half--graph (which is identical to the constrained Delaunay graph whose empty visible region is an equilateral triangle, a formal definition follows in Section 2) was shown to be a plane 2-spanner of  [4] and all constrained -graphs with at least 6 cones were shown to be spanners as well [8].

However, though it is known that these graphs contain short paths, it is not known how to route in a local fashion. In other words, other than by running some global shortest path algorithm or flooding the network with messages, the vertices are still unable to communicate with each other. To address this issue, we look at -local routing algorithms in the constrained setting, i.e. routing algorithms that must decide which vertex to forward a message to based solely on knowledge of the source and destination vertex, the current vertex and all vertices that can be reached from the current vertex by following at most edges. Furthermore, we require our algorithms to be competitive, i.e. the length of the returned path needs to be related to the length of the shortest path in the graph.

In the unconstrained setting, there exists a 1-local 0-memory routing algorithm that is 2-competitive on the -graph and -competitive on the half--graph (the -graph consists of the union of two half--graphs) [6]. In the same paper, the authors also show that these ratios are the best possible, i.e. there are matching lower bounds.

In this paper, we show that the situation in the constrained setting is quite different: no deterministic 1-local routing algorithm is -competitive on all pairs of vertices of the constrained -graph, regardless of the amount of memory (defined in Section 2) it is allowed to use. This shows that routing in the constrained setting is considerably harder than in the unconstrained setting.

Despite this lower bound, we describe a 1-local 0-memory routing algorithm between any two visible vertices of the constrained -graph that guarantees that the length of the path traveled is at most 2 times the Euclidean distance between the source and destination. Additionally, we provide a 1-local -memory 18-competitive routing algorithm between any two visible vertices in the constrained half--graph. To the best of our knowledge, these are the first local routing algorithms in the constrained setting with guarantees on the path length.

2 Preliminaries

We define a cone to be the region in the plane between two rays originating from a single vertex. This vertex is referred to as the apex of the cone. We let six rays originate from each vertex, with angles to the positive -axis being multiples of (see Figure 2). Each pair of consecutive rays defines a cone. We write to indicate the -th cone of a vertex , or if the apex is clear from the context. For ease of exposition, we only consider point sets in general position: no two vertices define a line parallel to one of the rays that define the cones and no three vertices are collinear.

Figure 1: The cones having apex in the -graph.
Figure 2: The subcones having apex in the constrained -graph. Constraints are shown as thick red line segments.

Let vertex be an endpoint of a constraint and let the other endpoint lie in cone . The lines through all such constraints split into several subcones (see Figure 2). We use to denote the -th subcone, in clockwise order, of . When a constraint splits a cone of into two subcones, we define to lie in both of these subcones. We consider a cone that is not split to be a single subcone.

The constrained -graph is constructed as follows: for each subcone of each vertex , add an edge from  to the closest visible vertex in that subcone, where distance is measured along the bisector of the original cone, not the subcone (see Figure 3). More formally, we add an edge between two vertices and if can see , , and for all vertices that can see , , where and denote the orthogonal projection of and on the bisector of . Note that our general position assumptions imply that each vertex adds at most one edge per subcone to the graph.

Figure 3: Three vertices are projected onto the bisector of a cone of . Vertex is the closest vertex in the left subcone and is the closest vertex in the right subcone.

Next, we define the constrained half--graph. This is a generalized version of the half--graph as described by Bonichon et al. [2]. The constrained half--graph is similar to the constrained -graph with one major difference: edges are only added in every second cone. More formally, its cones are categorized as positive and negative. Let be the sequence of cones in counterclockwise order starting from the positive -axis (see Figure 5). The cones , , and are called positive cones and , , and are called negative cones. We add edges only in the positive cones (and their subcones). Note that by using addition and subtraction modulo 3 on the indices, the positive cone has negative cone as clockwise next cone and negative cone as counterclockwise next cone. A similar statement holds for negative cones. We use and to denote cones and with apex . For any two vertices and , we have if and only if (see Figure 5). Analogous to the subcones defined for the -graph, constraints can split cones into subcones. We call a subcone of a positive cone a positive subcone and a subcone of a negative cone a negative subcone (see Figure 5). We look at the undirected version of these graphs, i.e. when an edge is added, both vertices are allowed to use it. This is consistent with previous work on -graphs.

Figure 4: The cones having apex in the half--graph.
Figure 5: The subcones having apex in the constrained half--graph. Constraints are shown as thick red line segments.

Given a vertex in a positive cone of vertex , we define the canonical triangle to be the triangle defined by the borders of (not the borders of the subcone of that contains ) and the line through perpendicular to the bisector of (see Fig. 6). Note that for each pair of vertices there exists a unique canonical triangle.

Figure 6: The canonical triangle .

Next, we define our routing model. A deterministic routing algorithm is -local and uses -memory, if the vertex to which a message is forwarded from the current vertex is a function of , , , and , where and are the source and destination vertex, is the -neighborhood of and is a memory of size , stored with the message. The -neighborhood of a vertex is the set of vertices in the graph that can be reached from by following at most edges. For our purposes, we consider a unit of memory to consist of bits or a point in . Our model also assumes that the only information stored at each vertex of the graph is . Since our graphs are geometric, we identify each vertex by its coordinates in the plane. Unless otherwise noted, all routing algorithms we consider in this paper are deterministic -memory algorithms.

There are essentially two notions of competitiveness of a routing algorithm on a subgraph of the visibility graph. One is to look at the Euclidean shortest path between the two vertices, i.e. the shortest path in the visibility graph, and the other is to compare the routing path to the shortest path in the subgraph. A routing algorithm is -competitive with respect to the Euclidean shortest path (resp. shortest path in the subgraph) provided that the total distance traveled by the message is not more than times the Euclidean shortest path length (resp. shortest path length) between source and destination. The routing ratio of an algorithm is the smallest for which it is -competitive.

Since the shortest path in the subgraph between two vertices is at least as long as the Euclidean shortest path between them, an algorithm that is -competitive with respect to the Euclidean shortest path is also -competitive with respect to the shortest path in the subgraph. We use competitiveness with respect to the Euclidean shortest path when proving upper bounds and with respect to the shortest path in the subgraph when proving lower bounds.

Furthermore, we want to be able to talk about points at intersections of lines, thus we distinguish between vertices and points. A point is any point in , while a vertex is part of the input.

3 Lower Bound on Local Routing

We modify the proof by Bose et al. [3] (that shows that no deterministic routing algorithm is -competitive for all triangulations) to show the following lower bound.

Theorem 1.

No deterministic 1-local routing algorithm is -competitive with respect to the shortest path on all pairs of vertices of the -graph of size , regardless of the amount of memory it is allowed to use.

Proof..

The following construction is illustrated in Figure 7a-e. Consider a grid of vertices for an integer and shift every second row to the right by half a unit. We stretch the grid, such that each horizontal line segment has length . Next, we replace each horizontal line segment by a constraint to prevent vertical visibility edges and we remove all other line segments. After that, we add two additional vertices, source and destination , centered horizontally at one unit below the bottom row and one unit above the top row, respectively.

Figure 7: Constructing the lower bound: (a) the gird, (b) after shifting, (c) after stretching (d) adding the constraints, (e) adding and , (f) conforming to general position.

To conform to our general position assumption, we move all vertices by at most some arbitrarily small amount , such that no two vertices define a line parallel to one of the rays that define the cones and no three vertices are collinear (see Figure 7f). As part of this move, we ensure that each vertex on the bottom row has as its closest vertex in cone or (depending on whether it lies to the right or left of ), and that each vertex on the top row has as its closest vertex in cone or (again depending on whether it lies to the left or right of ). This can be done e.g. by placing the bottom row on the upper hull of an ellipse and placing the top row on the lower hull of an ellipse. On this point set and these constraints, we build the constrained -graph (see Figure 8). Note that vertical edges only appear at the left and right grid boundaries.

Figure 8: The constrained -graph starting from a grid, using horizontal constraints to block vertical edges, and the orange path of the routing algorithm.

Consider any deterministic 1-local -memory routing algorithm and let be the path this algorithm takes when routing from to . We note that by construction, consists of at least steps. If consists of more than non-vertical steps, we truncate it after the first non-vertical steps. Thus, in the remainder of this proof, we consider only paths having at most non-vertical steps for . The overall idea of the proof is to reduce to a -graph of size in a way which does not change the path (up to its truncation point, if present) taken by the algorithm, and then to show that is not -competitive with respect to the shortest path in . This proves that no deterministic 1-local -memory routing algorithm can be -competitive with respect to the shortest path on all -graphs.

To construct , we define the surroundings of a vertex  on to be itself, the vertices connected to it by either an edge or a constraint in , and the constraints in  between these vertices. Thus, for in the interior of , its surroundings are hexagonal in shape and contain seven vertices and four constraints (see Figure 8). Informally, the union of the surroundings of vertices of  can be seen as sweeping this hexagonal shape along . For on the border of , its surroundings are slightly smaller. For and , their surroundings constitute the bottom and top row, including the constraints in these rows. We let  be the -graph constructed on the union of the surroundings of all vertices of  (the inclusion of  is only relevant if was truncated). This construction is illustrated in Figure 9. Clearly, the graph  has vertices and constraints. It is easy to check that the 1-neighborhood of any vertex  on is the same in  as in , hence the routing algorithm must follow  also in .

Figure 9: The constrained -graph that looks the same from the orange path of the routing algorithm, but has an mostly vertical dashed blue path.

The bottom row contains  vertices. We now consider the horizontally most central of these, that is, the first vertices to the left of  and the first vertices to the right of . Setting , the bottom row does contain at least these vertices, by . Setting a bit higher, we can assume that it contains more vertices at each end. Next, consider a vertical line through each of these vertices. Let be minus the vertices  and . We say that a vertex of touches such a vertical line if its surroundings contain a point on that line. Hence, any vertex along touches vertical lines (see Figure 8). Since the vertical lines are grid positions away from the left and right sides of the grid, no vertical step of  can touch any of these lines. Hence, the total number of line touches by the vertices along is at most . Hence, on average, a line is touched times. This implies that there exists a vertical line that is touched times. Let be vertex on the bottom row whose vertical line is touched the fewest number of times.

We now prove that a ‘mostly vertical’ path from to the top row is contained in , which will provide a path between and much shorter than the path which the algorithm must follow. Assume first that the line of  is touched zero times. In the remainder of the proof, we set to be odd, such that vertices on the top and bottom row align horizontally. Since the minimal horizontal distance between vertices in the grid is , while the maximal vertical distance is , can see exactly one vertex in , namely the vertex it aligns horizontally with in the top row. Thus, there is a vertical edge between these two vertices in . If the line of  is touched more than zero times, each touch covers a part of the line with some parts of the hexagonal shape. The coverings may overlap, and they give rise to a natural decomposition of the line into maximal covered segments with non-covered segments in between. A core observation is that a covered segment vertically extending grid levels can be traversed by zig-zag edges in , of total length . Some examples of this are shown in Figure 10.

Figure 10: Two examples of covered segments and their zig-zag detours: (a) when gets close but does not meet the vertical line through , (b) when crosses the vertical line through once.

Another core observation is that for each uncovered segment of the line, there will be a vertical edge in  from the top vertex of the covered segment below to the bottom vertex of the covered segment above (again due to the vertex distances in the grid). Thus, the vertical edge from the case of zero touches is broken up by zig-zag shaped detours (one detour for each covered segment). The resulting path has length , since the line through is touched by at most vertices of , each of which can cover only grid levels of the line. Recalling that the edge from to has length at most , we conclude that contains a path from to of length : Follow the edge from to , follow the above path from to the top row of , and follow the edge to .

To complete the proof, we look at the number of non-vertical edges of , i.e. . If , the routing path follows at least one vertical edge along the boundary of . It follows that has length at least , as the left and right boundary of are at distance from . Since the length of the mostly vertical path is , is not -competitive on a graph of size , which for implies that is not -competitive on a graph of size . Hence, when we take , the theorem is proven for this case.

If , the length of is dominated by the non-vertical edges of length , leading to a path length of . Since the length of the mostly vertical path is , this implies that is not -competitive on a graph of size . Hence, when we take , the theorem is proven for this case.

Thus, since can be constructed for any deterministic 1-local routing algorithm, we have shown that no deterministic 1-local routing algorithm is -competitive on all pairs of vertices in a graph of size . ∎

4 Routing on the Constrained -Graph

In this section, we provide a 1-local routing algorithm on the constrained -graph for any pair of visible vertices. Since the constrained -graph is the union of two constrained half--graphs, we describe a routing algorithm for the constrained half--graph for the case where the destination lies in a positive subcone of the source . After describing this algorithm and proving that it is 2-competitive, we describe how to use it to route 1-locally on the constrained -graph. Throughout this section, we use the following auxiliary lemma proven by Bose et al. [4]. We say that a region is empty if it does not contain any vertices of .

Lemma 1.

Let , , and be three arbitrary points in the plane such that and are visibility edges and is not the endpoint of a constraint intersecting the interior of triangle . Then there exists a convex chain of visibility edges from to in triangle , such that the polygon defined by , and the convex chain is empty and does not contain any constraints (see Fig 11).

Figure 11: A convex chain from to via and .

Recall that when working on upper bounds, we use the notion of competitiveness with respect to the Euclidean shortest path: A routing algorithm is -competitive with respect to the Euclidean shortest path provided that the total distance traveled by the message is not more than times the Euclidean shortest path length between source and destination. The routing ratio of an algorithm with respect to the Euclidean shortest path is the smallest for which it is -competitive with respect to the Euclidean shortest path.

4.1 Positive Routing on the Constrained Half--Graph

Before describing how to route on the constrained half--graph when lies in a positive subcone of , we first show that there exists a path in canonical triangle .

Lemma 2.

Given two vertices and such that and see each other and lies in a positive subcone , there exists a path between and in the triangle in the constrained half--graph.

Proof..

We assume without loss of generality that lies in . We prove the lemma by induction on the area of the canonical triangle . Formally, we perform induction on the rank of the triangle in the ordering, according to their area, of the canonical triangles of all pairs of visible vertices and .

Base case: If is the smallest canonical triangle, then is the closest visible vertex to in a positive subcone of . Hence there is an edge between and and this edge lies entirely inside .

Induction step: We assume that the induction hypothesis holds for all pairs of vertices that can see each other and have a canonical triangle whose area is smaller than the area of . If is an edge in the constrained half--graph, the induction hypothesis follows by the same argument as in the base case. If there is no edge between and , let be the vertex closest to in the positive subcone that contains , and let and be the upper left and right corner of (see Figure 12). We assume without loss of generality that lies to the left of .

Figure 12: An example of a convex chain from to .

Let be the intersection of and . By definition can see and . Since is the closest visible vertex to , can see as well. Otherwise Lemma 1 would give us a convex chain of vertices connecting to , all of which would be closer and able to see , contradicting that is the closest visible vertex to . By applying Lemma 1 to triangle , a convex chain of visibility edges connecting and exists and the region bounded by is empty (see Figure 12).

Since every vertex is visible to vertex , we can apply induction to each pair of consecutive vertices along the convex chain. Depending on whether or , there exists a path between and in or . Since each of these triangles is contained in , this gives us a path between and that lies inside . ∎

Positive Routing Algorithm for the Constrained Half--Graph
Next, we describe how to route from to , when can see and lies in a positive subcone (see Figure 13): When we are at , we follow the edge to the closest vertex in the subcone that contains . When we are at any other vertex , we look at all edges in the subcones of and all edges in the subcones of the adjacent negative cone that is intersected by . An edge in a subcone of is considered only if it does not cross . For example, in Figure 13, we do not consider the edge to since it lies in and crosses . It follows that we can cross only when we follow an edge in .

Figure 13: An example of routing from to . The dashed line represents the visibility line between and .

Let be the intersection of and the boundary of that is not a boundary of . We follow the edge that minimizes the unsigned angle . For example, in Figure 13, when we are at vertex we follow the edge to since, out of the two remaining edges and , is smaller than . We note that edges in are added by the vertices in that cone, since lies in their positive cone . We also note that during the routing process, does not necessarily lie in . Finally, since the algorithm uses only information about the location of and and the neighbors of the current vertex, it is a 1-local routing algorithm.

We proceed by proving that the above routing algorithm can always perform a step, i.e. at every vertex reached by the algorithm there exists an edge that is considered by the algorithm.

Lemma 3.

The routing algorithm can always perform a step in the constrained half--graph.

Proof..

Given two vertices and such that and can see each other, we assume without loss of generality that . We maintain the following invariant (see Figure 14):

Invariant Let be the last intersection of an edge of the routing path with (initially is ), let denote the endpoints of the edges following as selected by the algorithm, and let be the intersection of and the horizontal line through . The simple polygon defined by is empty and does not contain any constraints.

Figure 14: By the invariant, the gray region is empty and does not contain any constraints.

When the routing algorithm starts at , it looks at the subcone that contains . Since is visible from , this subcone contains at least one visible vertex. Hence, it also contains a closest visible vertex and by construction, has an edge to . Therefore, when the routing algorithm starts at , it can follow an edge.

To see that the invariant is satisfied, we need to show that triangle is empty and does not contain any constraints in its interior. By construction cannot be the endpoint of any constraints in the interior of , hence since and are visibility edges, any constraint has at least one endpoint in . Thus, it suffices to show that is empty. We prove this by contradiction, so assume that it is not empty. Since and are visibility edges and by construction is not the endpoint of a constraint intersecting the interior of , Lemma 1 gives us a convex chain of visibility edges between and . Since the region bounded by , , and this chain is empty and does not contain any constraints, the vertex along this chain that is closest to is visible to . However since every vertex in is closer to than , this contradicts the fact that is the closest visible vertex to . Hence, triangle must be empty and the invariant is satisfied.

When the routing algorithm is at vertex (), we assume without loss of generality that lies to the left of . Let be the halfplane below the horizontal line through and let be the halfplane to the left of . We need to show that has at least one edge in the union of and . We first show that there exists a vertex that is visible to in the union of and , by showing that such a vertex exists in the union of and . Since lies in this region, we know that it is not empty. Consider all vertices in this region and let be the vertex in this region that minimizes . Note that we did not require there to be an edge between and . Since minimizes and no constraint can cross or , is visible from . We consider two cases: lies in a subcone of and lies in a subcone of .

If lies in , it follows from Lemma 2 and the fact that is visible from that there exists a path between and that lies inside . Since is contained in , there exists an edge in and the routing algorithm can perform a step.

If lies in , it follows from Lemma 2 and the fact that is visible from that there exists a path between and that lies inside . Canonical triangle intersects three cones of (see Figure 15): , , and . Since the routing algorithm follows edges in or , the routing path reaches by following edge that lies in either or . This implies that is contained in the region of the invariant and is therefore empty. Hence, the first edge on the path from to lies in either or and the algorithm can perform a step.

Figure 15: By the invariant, the gray region is empty, so the path between and lies inside .

It remains to show that after the algorithm takes a step, the invariant is satisfied at the new vertex . Let be the edge that the algorithm followed and let be the intersection of and the horizontal line through . We consider three cases (see Figure 16): (a) lies in a subcone of , (b) lies in a subcone of and does not cross , and (c) lies in a subcone of and crosses .

Figure 16: The three types of steps the algorithm can take: (a) lies in a subcone of , (b) lies in a subcone of and does not cross , and (c) lies in a subcone of and crosses .

Case (a): If lies in a subcone of , we need to show that the quadrilateral is empty and does not contain any constraints (see Figure 16a). We first show that cannot be the endpoint of a constraint intersecting the interior of . We prove this by contradiction, so assume it is and let be the other endpoint of the constraint. We first note that . We look at , the subcone of that lies below , and let be the lowest vertex in this subcone. If is the closest visible vertex in this subcone, would be an edge, which contradicts that minimizes . Otherwise, since is the lowest vertex in , the visible region of is empty and is an edge. However, since , we have a contradiction. Thus cannot be the endpoint of a constraint intersecting the interior of .

Since is not the endpoint of a constraint intersecting the interior of , and , , and are visibility edges, any constraint intersecting the interior of has at least one endpoint in . Thus it suffices to show that is empty. We prove this by contradiction, so assume that is not empty and let be the lowest vertex in . Let be the subcone of that contains . Vertex is visible to , since any constraint crossing has an endpoint in below , contradicting that is the lowest vertex, or in the region bounded by which contradicts the invariant. Hence has an edge in . This edge cannot be to since . Since is the lowest vertex in , it cannot have an edge to a vertex in . Since by the invariant the region bounded by is empty, the edge of in must cross . However, this contradicts the fact that the constrained half--graph is plane. Thus, is empty of both vertices and constraints.

Case (b): If lies in a subcone of and does not cross , we again need to show that the quadrilateral is empty and does not contain any constraints (see Figure 16b). We first show that is empty. We prove this by contradiction, so assume that is not empty and let be the lowest vertex in . We consider two cases: lies in and lies in . Since the case where lies in is analogous to the Case (a), we focus on the case where lies in a subcone of .

If lies in a subcone of and is visible to , would be an edge and . So, assume that is not visible from . This means that there is a constraint that crosses . Since the line and the edges of the region bounded by are visibility edges, the lower endpoint of this constraint must lie in . By the invariant, it cannot lie in , so it must lie in and below . However, this contradicts that is the lowest vertex in . Since we arrived at a contradiction in both cases, we conclude that quadrilateral is empty.

Next, we show that does not contain any constraints. Since is empty, a the only way a constraint can intersect it, is when is one of its endpoints. Hence, it remains to show that cannot be the endpoint of a constraint intersecting the interior of . We prove this by contradiction, so assume it is and let be the other endpoint of the constraint. Since is empty, crosses . Since is a visibility edge, cannot cross it. Vertex cannot lie in , since this would imply that either is an edge or there exists a vertex in the subcone of below that contains , which in combination with Lemma 2 implies that there exists a path between and that lies below . Since both alternatives contradict that minimizes , cannot lie in . Hence, it remains to consider the case where lies in a subcone of . Let be the subcone of to the right of .

If lies below , contains a closest visible vertex whose angle with is less than , contradicting that the routing algorithm routes to .

If lies above , let be the lowest vertex in the union of and . Since this region contains , it is not empty and such a vertex exists. If , it is the closest vertex in . If , is the closest vertex to . We note that in both cases is visible to , since any constraint blocking it would have an endpoint below . Hence, both cases result in an edge . However, since , this contradicts that the routing algorithm routed to . Thus, cannot be the endpoint of a constraint intersecting the interior of .

Case (c): If lies in a subcone of and crosses , let be the intersection of and . We need to show that the triangles and are empty and do not contain any constraints (see Figure 16c). The proof that is empty and does not contain any constraints is analogous to the previous case.

We prove that is empty by contradiction, so assume that is not empty. Since and are visibility edges, we can apply Lemma 1 and we obtain a vertex in that is visible from . If is visible from , is not the closest vertex and edge would not exist. If is not visible from , we note that is visible and apply Lemma 1 on triangle . This gives us a vertex that is visible to and closer to than , again contradicting the existence of edge . Hence, triangle is empty.

Finally, we show that does not contain any constraints. Since and are visibility edges and is empty, any constraint intersecting the interior of must have as an endpoint. However, since is not a vertex, it cannot be the endpoint of a constraint. ∎

Finally, we show that the path followed by the routing algorithm is 2-competitive, with respect to the Euclidean shortest path.

Theorem 2.

Given two vertices and in the half--graph such that and can see each other and lies in a positive subcone of , there exists a 1-local routing algorithm that routes from to and is 2-competitive with respect to the Euclidean distance.

Proof..

We assume without loss of generality that . The routing algorithm will thus only take steps in , , and , where is an arbitrary vertex along the routing path. Let and be the upper left and right corner of . To bound the length of the routing path, we first bound the length of each edge. We consider three cases: (a) edges in subcones of or , (b) edges in subcones of that do not cross , (c) edges in subcones of that cross . For ease of notation we use and to denote and .

Figure 17: Bounding the edge lengths: (a) an edge in a subcone of , (b) an edge in a subcone of that does not cross , and (c) an edge in a subcone of that crosses .

Case (a): If edge lies in a subcone of , let be the upper corner of (see Figure 17a). By the triangle inequality, we have that . The case where lies in is analogous.

Case (b): If edge lies in a subcone of and does not cross , let and be the upper left and right corner of (see Figure 17b). If lies to the left of , we use that . If lies to the right of , we use that .

Case (c): If edge lies in a subcone of and crosses , we split it into two parts, one for each side of (see Figure 17c). Let be the intersection of and . If lies to the left of , let be the upper left corner of and let be the upper right corner of . By the triangle inequality, we have that . If lies to the right of , let be the upper left corner of and let be the upper right corner of . By triangle inequality, we have that .

To bound the length of the full path, let and be two consecutive points where the routing path crosses and let be the edge that crosses at and let be the edge that crosses at . Let and be the upper left and right corner of . If the path between and lies to the left of , this part of the path is bounded by:

Since and all are parallel to and all are horizontal, we have that:

Similarly, since and all are parallel and have disjoint projections onto , we have that:

Thus, the length of a path to the left of is at most:

If the path between and lies to the right of , this part of the path is bounded by (see Figure 18a):

Figure 18: Bounding the total length: (a) the bounds (solid lines) are unfolded (dotted lines) and (b) the unfolded bounds (solid lines) are flipped to the longer of the two sides (dotted lines) and unfolded again (dashed lines).

Next, we flip all unfolded bounds to the longer of the two sides and : if , we replace all bounds of the form by and if , we replace all bounds of the form by (see Figure 18b). Note that this can only increase the length of the bounds. Finally, we sum these bounds and get that the sum is equal to , which is at most . ∎

4.2 Routing on the Constrained -Graph

To route on the constrained -graph, we split it into two constrained half--graphs: the constrained half--graph oriented as in Figure 5 and the constrained half--graph where positive and negative cones are inverted. When we want to route from to , we pick the constrained half--graph in which lies in a positive subcone of , referred to as in the remainder of this section, and apply the routing algorithm described in the previous section. Since this routing algorithm is 1-local and 2-competitive, we obtain a 1-local and 2-competitive routing algorithm for the constrained -graph, provided that we can determine locally, while routing, whether an edge is part of . When at a vertex , we consider the edges in order of increasing angle with the horizontal halfline through that intersects .

Lemma 4.

While executing the positive routing algorithm for two visible vertices and , we can determine locally at a vertex for any edge in the constrained -graph whether it is part of .

Proof..

Suppose we color the edges of the constrained -graph red and blue such that red edges form and blue edges form the constrained half--graph, where lies in a negative subcone of . At a vertex , we need to determine locally whether is red. Since an edge can be part of both constrained half--graphs, it can be red and blue at the same time. This makes it harder to determine whether an edge is red, since determining that it is blue does not imply that it is not red.

If lies in a positive subcone of , we need to determine if it is the closest vertex in that subcone. Since by construction of the constrained half--graph, is connected to the closest vertex in this subcone, it suffices to check whether this vertex is . Note that if is a constraint, lies in two subcones of and hence we need to check if it is the closest vertex in at least one of these subcones.

If lies in a negative subcone of , we know that if it is not the closest visible vertex in that subcone, is red. Hence, it remains to determine whether the edge to the closest vertex is red: If it is the closest visible vertex, it is blue, but it may be red as well if is also the closest visible vertex to . Hence, we need to determine whether is the closest vertex in , a subcone of that contains . We consider two cases: (a) is a constraint, (b) is not a constraint.

Case (a): Since is a constraint, we know that it cannot cross . Since we are considering , we also know that all edges that make a smaller angle with the horizontal halfline through that intersect are not red. Hence, is either part of the boundary of the routing path or the constraint is contained in the interior of the region bounded by the routing path and . However, by the invariant of Lemma 3, the region bounded by the routing path and does not contain any constraints in its interior. Thus, is part of the boundary of the routing path and is red.

Case (b): If is not a constraint, let regions and be the intersection of and the two subcones of adjacent to and let be the intersection of and the negative subcone of that contains (see Figure 19). We first note that since lies in a negative subcone of , the invariant of Lemma 3 implies that is empty. Furthermore, since is the closest visible vertex to , does not contain any vertices that can see or .

Figure 19: The three regions , , and when determining whether an edge is part of the constrained half--graph.

Since does not contain any vertices that can see or , any constraint in that has as an endpoint and lies above , ensures that cannot see , i.e. it cannot block visibility of this region only partially. Hence, if such a constraint exists, is the closest visible vertex to in , since neither nor contain any vertices visible to . Therefore, is red.

If can see , we show that is red if and only if the closest visible vertex in the subcone of that contains does not lie in . We first show that if the closest visible vertex in the subcone of that contains lies in , then is not red. Since is visible to , is not the endpoint of a constraint in above . Hence, we have two visibility edges and and is not the endpoint of a constraint intersecting the interior of triangle . Therefore, by Lemma 1, we have a convex chain of visibility vertices between and . Let be the vertex adjacent to along this chain. Since the polygon defined by , , and the convex chain is empty and does not contain any constraints, lies in . Thus, is not the closest visible vertex in and is not red.

Next, we show that if the closest visible vertex in the subcone of that contains does not lie in , then is red. We prove this by contradiction, so assume that is not red. This implies that there exists a vertex that is visible to and closer than . Since is empty and does not contain any vertices that can see , lies in . Since and are visibility edges and is not the endpoint of a constraint intersecting the interior of triangle , by Lemma 1 there exists a convex chain of visibility edges between and . Furthermore, since does not contain any vertices that can see , the vertex adjacent to along this chain lies in . Since any vertex in is closer to than , this leads to a contradiction, completing the proof. ∎

Routing Algorithm for the Constrained -Graph
Hence, to route on the constrained -graph, we apply the positive routing algorithm on , while determining which edges are part of this constrained half--graph. The latter can be determined as follows: If lies in a positive subcone, we need to check whether it is the closest vertex in that subcone. If lies in a negative subcone and it is not the closest vertex, it is part of the constrained half--graph. Finally, if is the closest vertex in a negative subcone, it is part of the constrained half--graph if it is a constraint or the intersection of the cone of that contains and the subcone of adjacent to is empty.

4.3 Negative Routing on the Constrained Half--Graph

We note that the routing algorithm provided in the previous section does not suffice to also route on the constrained half--graph, since it assumes that the destination lies in a positive subcone of the source. Therefore, in this section, we provide an -memory 1-local routing algorithm for the case where the destination lies in a negative subcone of the source .

For ease of exposition, we assume that lies in a subcone of . The -memory 1-local routing algorithm finds a path from to of length at most and travels a total distance of at most to do so. We note that negative routing is harder than positive routing, since there need not be an edge to a vertex in the cone of that contains . This phenomenon also caused the separation between spanning ratio and routing ratio in the unconstrained setting [6].

The remainder of this section is structured as follows: First, we identify a set of conditions that edges need to meet in order to be considered by the routing algorithm. Unfortunately, one of these conditions cannot be checked 1-locally. Therefore, we replace it with a set of conditions that exclude edges that are guaranteed not to satisfy the original condition and can be checked 1-locally.

We proceed to describe the edges considered by the negative routing algorithm. Given a vertex and all neighbors of whose projection along the bisector of is closer to than the projection of , we number the neighbors of in counterclockwise order, starting from the horizontal half-line to the left of (see Figure 20). We create regions around :

  • We create triangular regions for .

  • We create one unbounded region using edge and the two horizontal half-lines starting at and directed towards the left.

  • We create one unbounded region using edge and the two horizontal half-lines starting at and directed towards the right.

Figure 20: Triangle is the last region of intersected by .

The last region of intersected by is defined as the last of these regions that is encountered when following from to . In Figure 20, the region defined by , , and is the last region of intersected by .

We consider an edge for our routing algorithm when it satisfies the following three conditions:

  1. Vertices and lie inside or on the boundary of .

  2. Edge is part of the last region of that is intersected by .

  3. Edge is the edge that the positive routing algorithm picks at when routing from to . Note that for this condition, we do not require that is part of the positive routing path, but only that should the positive routing path reach , edge is the edge it would select for its next step.

Given and , the first two requirements can be checked using only the location of and and 1-local information, i.e. the neighbors of the current vertex. The last requirement, on the other hand, may need 2-local information as it involves the neighbors of the neighbors of . Hence, instead of using this last requirement, we ignore the edges that can never satisfy it and show that we can route competitively and 1-locally on the graph formed by the edges that meet the first two requirements.

Since lies in a subcone of