On edge-intersection graphs of k-bend paths in grids

Edge-intersection graphs of paths in grids are graphs that can be represented such that vertices are paths in a grid and edges between vertices of the graph exist whenever two grid paths share a grid edge. This type of graphs is motivated by applications in conﬂict resolution of paths in grid networks. In this paper, we continue the study of edge-intersection graphs of paths in a grid, which was initiated by Golumbic, Lipshteyn and Stern. We show that for any k , if the number of bends in each path is restricted to be at most k , then not all graphs can be represented. Then we study some graph classes that can be represented with k -bend paths, for small k . We show that every planar graph has a representation with 5-bend paths, every outerplanar graph has a representation with 3-bend paths, and every planar bipartite graph has a representation with 2-bend paths. We also study line graphs, graphs of bounded pathwidth, and graphs with κ -regular edge orientations.


Introduction
Presume you have a network and need to route calls in it.Since calls interfere with each other, you need to route calls such that no two connections share a link.This transforms into a colouring problem in an edge-intersection graph of paths.The network is the host graph, and each call becomes a path in the host graph; calls share a link if and only if the paths share an edge of the host graph.The edge-intersection graph defined by this has a vertex for every path, and vertices are adjacent if and only if the paths have overlapping edges; the goal is hence to colour this edge-intersection graph.
Edge-intersection graphs of paths in a network have been studied almost exclusively for networks that are trees; this graph class is known as EPT graphs and was introduced over 20 years ago, though research is still ongoing (see [9] and the references therein).
Very recently, Golumbic, Lipshteyn and Stern generalized the framework by allowing networks that are grids, rather than trees [10].Thus, they define EPG graphs to be the edge-intersection graphs of paths in a grid.They showed that every graph is an EPG graph, and then restricted the graph class by limiting the number of bends for the paths, i.e., the number of times that the direction of the path switches from horizontal to vertical.(See [10] for more motivation of why few bends are relevant for chip manufacturing.)Focusing on the case of single bends, they proved a number of existence and impossibility results.
In this paper, we continue this work, and study graphs that can be represented with few (but more than 1) bends in each path.We first show that for any given k, there exist graphs that are not k-bend EPG graphs.We then study planar graphs and subclasses thereof, and give upper and lower bounds on the number of bends required for planar graphs, outerplanar graphs and planar bipartite graphs.We also study some other graph classes, such as line graphs, graphs of bounded pathwidth, and graphs that have edge orientations with bounded indegrees.

Related results
EPG graphs have, to our knowledge, not been studied except by Golumbic, Lipshteyn and Stern [10] and the very recent work by Asinowski and Suk [1].The closest related works are on representing graphs by paths with other restrictions.Much is known about representing graphs as intersection graphs of paths in trees, not grids, both for vertex-intersection and edge-intersection.These are the so-called VPT graphs and EPT graphs (see for example [9,13] and the references therein).
Another related line of work does not put any restrictions on the paths (i.e., they are arbitrary Jordan curves in the plane): these are the string graphs.Kratochvíl proved that recognizing them is NP-hard [12], but only recently was it proved that recognizing them is in NP [15].Restricting Jordan curves further to intersect each other at most once gives the class of 1-STRING graphs; it was shown only recently that this includes the planar graphs [2] and all chordal VPT graphs [3].

Definitions
We assume familiarity with graph theory notation, see for example Golumbic's book [8].In this paper, grid is used to denote the 2-way infinite orthogonal grid, i.e., the vertices are all points in 2D with integer coordinates, and grid points are adjacent if they have distance 1.A (grid) path is a path in the grid.A bend is a place where a grid path changes direction.A (grid) segment is a grid path without any bends.Two grid paths (edge-)intersect if they share at least one grid edge, otherwise they are (edge-)disjoint.Note that edge-disjoint grid paths may still share a vertex of the grid.As we will never consider any other kind of intersection, we omit 'edge-' from now on.We will also omit "grid" whenever this does not lead to confusion.
An EPG representation of a graph G = (V, E) is an assignment of grid paths to vertices of G such that (v, w) is an edge if and only if the paths assigned to v and w intersect.We call it a k-bend EPG representation if every grid path representing a vertex has at most k bends.A graph is called a k-bend EPG graph if it has a k-bend EPG representation.(These graphs were called B k -EPG graphs in [10].)In what follows, we often identify the graph-theoretic concept (such as vertex) with the geometric object that represents it (the grid path).
An EPG representation is said to have grid-size w × h if there are w columns and h rows that contain a bend or endpoint of a grid path representing a vertex.

k-bend EPG graphs
In this section, we will show that the complete bipartite graph K (k+3)/2,N is not a k-bend EPG graph, for some N ∈ O(k 4 ).As we learned only recently, a similar result, without asymptotic bounds on N , was discovered independently [1].We note here that the fact that some graphs are not k-bend EPG graphs could be proved quite easily, using K N,N for large enough N .We work here on keeping one side of the ccmplete bipartite graph small so that it can be used for lower bounds for planar graphs later on.
Proof: Set = (k + 3)/2 and N = 2 (k+1) 2 + 1 ∈ O(k 4 ).Let V = A ∪ B be the vertex partition of K ,N , with |B| = N .Assume for contradiction that K ,N has a k-bend EPG representation, and let S be the grid segments of the paths representing vertices in A; S contains at most (k + 1) many segments.
Every path representing a vertex in B must intersect of the segments in S, and no two of these paths can intersect such segments at the same place since the vertices in B are an independent set.Consider two segments s 1 and s 2 in S, and assume that P is a path that intersects both and has at most one bend inbetween.If s 1 and s 2 have the same orientation (horizontal or vertical), then P cannot have a bend inbetween them, and hence must contain an endpoint of each of s 1 and s 2 .If s 1 and s 2 have different orientation, then P must contain a bend between them, and it necessarily must be on the point where the two lines through s 1 and s 2 intersect.So in the first case there can be at most one, and in the second case at most two edge-disjoint paths that go from s 1 to s 2 with at most one bend inbetween.
Considering now all (k+1) 2 possible pairs of grid segments.So at most 2 (k+1) 2 grid paths can contain two of them consecutively with at most one bend inbetween.By choice of N , there is at least one vertex in B for which the representing path hence contains at least two bends between any two intersections with grid segments in S. Since the path intersects grid segments, it has at least 2 −2 = k+1 bends total, a contradiction. 2 We conjecture that the value of N in the above theorem is too large, and that already K ,N , for some ∈ θ(k) and N ∈ θ(k 2 ) is not a k-bend EPG graph.The graph to provide the lower bound is a bipartite graph.Hence we now study how many bends are needed in an EPG representations for bipartite graphs.Proof: Fig. 1 illustrates the construction for the complete bipartite graph K a,b .(Our construction is essentially the same as the one by Golumbic et al. [10], except that one bend can be saved since the graph is bipartite.)Represent each of the a vertices as a horizontal line, say at y-coordinates 1, 2, . . ., a. Define a "vertical zig-zag" to be the path (1, 1) Represent each of the b vertices by such a zig-zag, translated horizontally as to make them vertex-disjoint.(For the complete bipartite graph, they could in fact be placed even closer so that they share vertices; this would reduce the width to |B|+1.)One easily verifies that this is an EPG representation of K a,b with the desired properties.For an arbitrary bipartite graph, we can obtain an EPG representation similarly, by omitting a "zig" or "zag" at any pair of vertices where no edge exists. 2 Notice in particular that K (k+3)/2,N is not a k-bend EPG graph for sufficiently large N by Theorem 1, but it is a (k + 1)-bend EPG graph by Theorem 2. So for any odd k, there exists a graph that is a (k + 1)bend EPG graph, but not a k-bend EPG graph, which proves that the set of k-bend EPG graphs forms a non-collapsing hierarchy.(It remains open whether the above statement also holds for even k; we suspect that this is the case.)Furthermore, Theorem 1 shows that the bound on the number of bends in Theorem 2 is tight if |B| is large (but can be improved if |B| is small [1]).

Planar graphs
A planar graph is a graph that can be drawn without crossing in the 2-dimensional plane.Much is known about planar graphs (see e.g.[14]).We will study here bounds on the number of bends needed in EPG representations, both for planar graphs and for some of their subclasses.

Planar graphs are 5-bend EPG graphs
We show that every planar graph has a 5-bend EPG representation.Moreover, the layout of the paths for this is such that the paths only touch; they do not cross (in some sense, this is therefore a planar drawing.) We construct this representation using the canonical ordering for triangulated planar graphs.We explain the approach and these terms in detail in the following: • First, fix an arbitrary planar drawing Γ of the graph.This fixes the planar embedding (the clockwise order of edges around each vertex), the faces (the maximal connected regions of R 2 − Γ) and the outer-face (the face which is unbounded.) • Add edges to the graph to make it triangulated, i.e., it is planar and every face is a triangle.It is well-known that this can always be done.
• For triangulated planar graphs, there exists the canonical ordering introduced by de Fraysseix, Pach and Pollack [7].This is a vertex order v 1 , . . ., v n such that {v 1 , v 2 , v n } is the outer-face, and for all i ≥ 3, v i is a vertex in the outer-face of the graph G i−1 induced by v 1 , . . ., v i−1 , and incident to a consecutive set of at least two vertices on the outer-face of G i−1 .See also Figure 2.
The canonical ordering can be used to obtain many types of graph drawings for planar graphs, e.g., straight-line drawings, orthogonal drawings, visibility representations, and others (see e.g.[11]).These drawings are usually obtained by maintaining some invariant on the drawing while adding vertices according to the ordering.We do the same for obtaining an EPG representation with up to 5 bends per grid path.
Proof: We show this first for trianglated graphs.Compute a canonical ordering.To create the EPG representation, we start with v 1 and v 2 as illustrated in Fig. 2. While adding more vertices, we maintain the invariant that any vertex on the outer-face is represented by a grid path with at most 4 bends that ends in an upward ray that does not intersect any other grid path.Moreover, the order of these unobstructed rays from left to right is the same as the clockwise order of the corresponding vertices on the outer-face, starting at v 1 and ending at v 2 .Clearly the invariant holds initially.
Vertex v i can then be added by placing it between the upward rays of its leftmost earlier neighbour c α (i.e., the neighbour in G i−1 that comes first in clockwise order around the outer-face) and the rightmost earlier neighbour c β (defined similarly.)See Figure 2. The path for v i shares one vertical grid-edge with c α along the ray of c α , continues horizontally to the ray of c β , shares one grid-edge with it, then U-turns and turns again to end in an upward ray as desired.(If the rays of c α and c β are in consecutive columns, then we insert (i) a new column between them for v i .)All this is done in two rows that are above all previously used rows.For any earlier neighbour v h = c α , c β of v i , the path of v h ends in a ray between the rays of c α and c β by the invariant.We let the grid-path of v h turn to share one horizontal grid-edge with v i .Thus v h now has at most 5 bends and does not end in a ray anymore, which is compatible with the invariant since v h is not on the outer-face after adding v i .
Repeating this until i = n gives an EPG representation of the triangulated graph.The bound on the size is easily proved since every vertex adds two rows and at most 1 column, except for v 1 and v 2 (which use 1 row and 2 columns total) and v n (which does not add a column since it has at least 3 earlier neighbours.) For graphs that are not triangulated, make them triangulated by adding edges.Draw the resulting graph G as above, but modify the construction for v i slightly for any added edge (v h , v i ) with h < i.If v h is the leftmost earlier neighbour, omit the first segment of v i .If v h is neither leftmost nor rightmost earlier neighbour, omit the last segment of v h .If v h is the rightmost earlier neighbour, then re-route the path of v i to turn upward into the ray immediately, without visiting the ray of v h .In any of these cases, the grid paths of v h and v i now have no more edges in common, and hence we have an EPG representation of the original graph with the same bounds on the size and bends. 2 Fig. 2: An EPG representation obtained with the canonical ordering.
We mention here that our EPG representations are quite similar to the representations of planar graphs by touching upside-down T s that is known to exist for any planar graph [6].
(i) "Inserting" a grid line really means that all coordinates of all endpoints and bends to the right/above are increased by 1.
As for lower bounds, we can easily see that some planar graphs are not 1-bend EPG graphs, by applying Theorem 1 to the planar graph K 2,N , for N sufficiently large.We strongly suspect that some planar graphs are not 2-bend EPG graphs either (and possibly not even 4-bend EPG graphs), but this remains open.

Planar bipartite graphs
Now consider graphs that are both planar and bipartite.We have already seen in Theorem 1 that these are not always 1-bend EPG graphs, since K 2,N is planar and bipartite.Proof: It is known [5] that every planar bipartite graph can be represented by touching horizontal and vertical line segments, i.e., vertices are assigned to disjoint open segments such that (v, w) is an edge if and only if the closure of the segments of v and w intersect.Furthermore, one can achieve that these segments are in an |A| × |B|-grid and no two segments are on the same horizontal or vertical line.
Let s h and s v be a horizontal and vertical segment that touch at point (x, y).For at least one of them, this point must be an endpoint.If only s v ends at (x, y), then add segment [x, x + 1] × y to the grid-path replacing s v .If only s h ends at (x, y), then add segment x × [y, y + 1] to the grid path replacing s h .If they both end at (x, y), then add segment x × [y, y + 1] to both (if not in s v already.)See also Figure 3. Put differently, we replace a vertical segment by a "C" and a horizontal segment by a "U", except when both segments end at the same point.We obtain a 2-bend EPG representation with the desired properties. 2 Fig. 3: Converting a representation by touching segments into an EPG representation with at most 2 bends per path.

Outer-planar graphs and claw-free graphs
An outer-planar graph is a planar graph that can be drawn so that all vertices are on the outer-face.Since K 2,N is not an outer-planar graph (for N ≥ 3), one could suspect that these are all 1-bend EPG graphs.This is not the case.
Theorem 5 There exists an outer-planar graph that is not a 1-bend EPG graph.
Proof: The graph G shown in Fig. 4(a) is an outer-planar graph, but as we will argue now, it is not a 1-bend EPG graph.Consider a triangle in a 1-bend EPG representation.The union of three 1-bend paths cannot form a cycle in a rectangular grid, hence for each triangle the union of the paths forms a tree.It follows from the analysis of edge-intersection graphs of paths in trees [9] that these three paths either all intersect in one grid edge (we say that they are an edge-clique), or they form a claw-clique, i.e., there exists a K 1,3 in the grid such that any degree-1 vertex of the claw is used by exactly two paths.See Fig. 4(c).
Define a 3-sun to be the graph that consists of a central triangle, and for every edge of the triangle a degree-2 vertex (called the outrigger) connected to the endpoints of the edge.From the work by Golumbic et al. [10], it follows that the central triangle of a 3-sun necessarily must be a claw-clique in any 1-bend EPG representation.Now consider the triangle {a, b, c} in graph G. Since it is part of an induced 3-sun, it is a claw-clique.After possible renaming, assume that a and b have a bend in common, and let a be the outrigger-vertex attached to edge (a, b).Since {a, b, a } is part of a sun, it, too, must be a claw clique.One of a and b must have a bend in that claw clique, too, say vertex a does.Since a has only one bend, the two bends in the two claw cliques must be at the same grid point, and hence a and b both have a bend in claw clique {a, b, a }, and a is drawn as a straight line.But then a and c share grid edges: a contradiction since they are not adjacent. 2 As for upper bounds, it is well-known that every outer-planar graph has a vertex ordering v 1 , . . ., v n such that each vertex v i has at most 2 earlier neighbours, i.e., neighbours in v 1 , . . ., v i−1 .We say that it is 2-regular acyclic orientable.We can give a 3-bend construction for any graph that has such an orientation (which includes more graphs, for example all series-parallel graphs, and even some non-planar graphs such as the graph obtained from K n by subdividing all edges.)Theorem 6 Every 2-regular acyclic orientable graph has 3-bend EPG representation in an n × n-grid.
Proof: Let v 1 , . . ., v n be a vertex order such that every vertex v i has at most 2 earlier neighbours.We maintain the hypothesis that the graph induced by v 1 , . . ., v i has a 3-bend EPG representation such that every vertex-path contains a horizontal grid segment and a vertical grid segment that do not intersect any other vertex-path; we call these the free segments.This is trivial for v 1 : represent it by an arbitrary vertical and horizontal segment attached to each other.
To add vertex v i to an existing drawing, find its earlier neighbours, say v j and v k .(The case of only one earlier neighbour is even easier.)Pick one grid edge e j from the vertical free segment of v j and one grid edge e k from the horizontal free segment of v k .Insert a new horizontal grid line j that splits e j , and a new vertical grid line k that splits e k .Now define a path by using one part of e j , going along j until the crossing with k , going along k until e k , and then using one part of e k .See Fig. 5.
One easily verifies that this path has three bends, intersects with the paths of v j and v k , and does not intersect any other paths.Moreover, v j and v k still have free segments (the other parts of e j and e k ), and v i also has free segments (along j and k ), so the induction hypothesis holds with the new vertex.Since every vertex adds at most one new row and column, the grid size for n vertices is n × n.We suspect that this construction is not optimal, especially for outer-planar graphs.
Conjecture 1 Every outer-planar graph is a 2-bend EPG graph.

Line graphs and claw-free graphs
A graph G is a line graph if there exists a root graph H such that every vertex of G corresponds to an edge of H, and two vertices of G are adjacent if the two corresponding edges have an endpoint in common.One can easily show the following result (see also Figure 6): Let k be a vertex of H (which is an edge (i, j) in G).The path for k starts at (0, i), goes to (k, i), from there to (k, j), and from there to (0, j).One easily verifies that this is a 2-bend EPG representation.
2 One might ask whether a similar result exists for generalization of line graphs, e.g., for claw-free graphs (which are the graphs without an induced K 1,3 .)One can easily see that not all claw-free graphs have a 1-bend EPG representation: Take the graph in Figure 4(a) and contract three pairs of vertices, as shown in Figure 7.The resulting graph is claw-free.Moreover, the exact same argument as before shows that it cannot have a 1-bend EPG representation: Triangle {a, b, c} must form a claw-clique, and if (say) vertex c is the horizontal vertex in it, then {a, b, a } is a central triangle of another induced 3-sun and hence must also be a claw-clique, leading to an intersection between a and c.Note that this is in contrast to claw-free chordal graphs, where is was shown very recently that they indeed have a 1-bend EPG representation (Asinowski and Ries, private communication).It remains open to show whether every claw-free graph has a 2-bend EPG representation.

Bounded pathwidth graphs
A graph of pathwidth k is a graph that has a vertex order v 1 , . . ., v n such that for any j, at most k vertices in v 1 , . . ., v j−1 have a neighbour in v j , . . ., v n .
Proof: Let the vertex ordering v 1 , . . ., v n be as described above.We say that vertex i is active at time j > i if it has a neighbour in {v j , . . ., v n }; thus at most k vertices are active at any given time.
We route the vertices such that the paths of all vertices that are active at time j end in a ray to the right.v 1 simply starts as a horizontal line segment.For j > 1, consider the earlier neighbours of v j .There can be at most k of them (since all of them are active at time j).Route v j starting at the horizontal ray at one of its earlier neighbours, use one edge in common with that ray, use two bends to get to the ray of the next neighbour, and so on.The order of visiting the neighbours is irrelevant, except that the last one should be one that is not active at time j + 1, if there is such a neighbour.
Since at most k vertices are active at time j + 1, there are three possible cases (see also Fig. 8:) (1) v j has at most k − 1 earlier neighbours.Then we add another two bends to the route of v j and let it end in a ray to the right.(2) v j has k earlier neighbours, and v j is not active at time j + 1.Then we end v j 's path after the common grid edge with the last neighbour.(3) v j has k earlier neighbours, and v j is active at time j + 1.Then one of the earlier neighbours, say v i , is not active at time j + 1, and v j ends in its row.We let the grid path of v i end at this point, and v j continues as a rightward ray in the row that was v i 's.
In all cases, we have used at most 2k − 2 bends for v j , and all paths of vertices active at time j + 1 end in a ray to the right.We can restrict the height by using only k rows, one for each of the active vertices.As for the width, the path of v j uses only two columns except in case (3), where it uses four; but in case (3) the last column can be re-used for the path of v j+1 since it only contains one point from v i and hence the paths of v i and v j+1 are edge-disjoint.Since case (3) can only happen for j ∈ {k + 1, . . ., n − 1} (v j must have k earlier neighbours and at least one later neighbour), and since v 1 doesn't need to use a column (it can start when v 2 starts), the bound follows. 2 (3) v j Fig. 8: The grid path for vertex vj in the three cases of a graph of pathwidth k.Only grid paths of earlier neighbours of vj are shown.

Graphs with κ-regular edge orientations
We say that a graph has a κ-regular acyclic orientation if it has an acyclic edge orientation with i ndeg(v) ≤ κ for all vertices v.The construction in [10] yields that every κ-regular acyclic orientable graph has a 2κbend EPG representation.
In Theorem 6, we improved this to 3 bends for κ = 2.We suspect that such an improvement is possible in general, and any κ-regular acyclic orientable graph is a (2κ − 1)-bend EPG graph.Such graphs include graphs of treewidth κ (and also graphs of pathwidth κ, though Theorem 8 provides a better bound here.) We show here a similar bound even if the edge orientation need not be acyclic.We say that a graph G has a κ-regular orientation if G has an edge orientation such that i ndeg(v) ≤ κ for all vertices v. Theorem 9 Every κ-regular orientable graph G has a (2κ + 1)-bend EPG representation in a 2n × 2ngrid.If G is bipartite, then the representation has only 2κ bends per path.
Proof: Assume we are given a κ-regular orientation.For every vertex w, a predecessor is a vertex v for which an edge (v, w) exists and is directed v → w.
Number the vertices arbitrarily as v 1 , . . ., v n .The idea is to represent vertex v i by an L using the (2i)th column and the (2n − 2i)th row (counting bottom-to-top) of a 2n × 2n-grid.Any vertex v i crosses the path of any vertex v j (j > i) at point (2i, 2n − 2j).If v i → v j is an edge, then re-route v j near the crossing by adding two bends such that the paths of v i and v j share an edge.See also Fig. 9.
More precisely, the grid path for v j is defined as follows.Start at the top of column 2j.Continue until you reach the row of some predecessor v i , i < j, i.e., row 2n − 2i or 2n − 2i + 1.If v j has an even number of predecessors in {v 1 , . . ., v i }, then the path of v j switches from column 2j to column 2j + 1, else it switches from column 2j + 1 to column 2j.This switch is done in row 2n − 2i if v i has an even number of predecessors in {v 1 , . . ., v j } and in row 2n − 2i + 1 otherwise.
The grid path for v j thus continues until it reaches row 2n−2j, and thus has intersected all predecessors v i with i < j.Then the path adds one bend and continues in row 2n − 2j if it was in column 2j before, and in row 2n − 2j + 1 otherwise.For any predecessor v i with i > j, the path switches similarly between row 2n − 2j and 2n − 2j + 1, using the column of v i as determined by the parity of predecessors of v i in {v 1 , . . ., v j }.
In total, the number of bends in the path of vertex v is 2i ndeg(v) + 1, which is at most 2κ + 1. See Fig. 9.It is easy to see that the size of the grid is 2n × 2n.
If G is bipartite, then let {v 1 , . . ., v a } be one vertex class, and {v a+1 , . . ., v n } be the other.Each vertex v j with j ≤ a then has no predecessor v i with i < j, so we can omit the part of the path using columns 2j and 2j + 1 and save the bend that transitions this part to the part using rows 2n − 2j and 2n − 2j + 1.
Similarly we can save one bend for a vertex v j with j > a by omitting the part of the path that uses rows 2n − 2j and 2n − 2j + 1.  Graphs with a κ-regular orientation include planar graphs (κ = 3), and planar bipartite graphs (κ = 2), though we showed bounds better than Theorem 9 for these classes already.It is known that the smallest κ for which G has a κ-regular orientation is max H⊆G |E(H)|/|V (H)| [4].Also, every graph is (∆+1)/2 -regular orientable: edge-colour the graph with ∆+1 colours, split the graph into (∆+1)/2 subgraphs with maximum degree 2, and orient each, such that each vertex has at most one incoming edge.Edge colourings with ∆ colours (which exist for example for bipartite graphs) gives even better bounds.

Theorem 7
Every line graph has a 2-bend EPG representation in an n × (m + 1)-grid.Proof: Number the vertices of G as 1, . . ., n and the edges of G (which are vertices of H) as 1, . . ., m.

Fig. 6 :
Fig. 6: 2-bend EPG representation of a line graph G with root graph H.

Fig. 7 :
Fig.7: A claw-free graph that does not have a 1-bend EPG representation.