2-Layer Graph Drawings with Bounded Pathwidth

We determine which properties of 2-layer drawings characterise bipartite graphs of bounded pathwidth.

Figure 1: A caterpillar drawn on 2-layers with no crossings, and the corresponding path-decompostion with width 1.
A 2-layer drawing of a bipartite graph G with bipartition {A, B} positions the vertices in A at distinct points on a horizontal line, and positions the vertices in B at distinct points on a different horizontal line, and draws each edge as a straight line-segment.2-layer graph drawings are of fundamental importance in graph drawing research and have been widely studied [2, 6, 7, 10, 11, 14-17, 19, 21, 22, 24].As illustrated in Figure 1, the following basic connection between 2-layer graph drawings and graph pathwidth 1 is folklore: Observation 1 A connected bipartite graph G has a 2-layer drawing with no crossings if and only if G is a caterpillar if and only if G has pathwidth 1.
Motivated by this connection, we consider (and answer) the following question: what properties of 2-layer drawings characterise bipartite graphs of bounded pathwidth?
A matching in a graph G is a set of edges in G, no two of which are incident to a common vertex.A k-matching is a matching of size k.In a 2-layer drawing of a graph G, a k-crossing is a set of k pairwise crossing edges (which necessarily is a k-matching).Excluding a k-crossing is not enough to guarantee bounded pathwidth.For example, as illustrated in Figure 2, if T h is the complete binary tree of height h, then T h has a 2-layer drawing with no 3-crossing, but it is well known that T h has pathwidth ⌊h/2⌋ + 1.Even stronger, if G h is the h × h square grid graph, then G h has a 2-layer drawing with no 3-crossing, but G h has treewidth and pathwidth h.
Figure 2: 2-layer drawings of a complete binary tree and a 5 × 5 grid.There is no 3-crossing since each edge is assigned one of two colours, so that monochromatic edges do not cross.
Angelini, Da Lozzo, Förster, and Schneck [1] showed that every graph that has a 2-layer drawing with at most k crossings on each edge has pathwidth at most k + 1.However, this property does not characterise bipartite graphs with bounded pathwidth.For example, as illustrated in Figure 3, if S n is the 1-subdivision of the n-leaf star, then S n is bipartite with pathwidth 2, but in every 2-layer drawing of S n , some edge has at least (n − 1)/2 crossings.v form a non-empty sub-sequence of (B 1 , . . ., Bn).The width of a path-decomposition (B 1 , . . ., Bn) The pathwidth of a graph G is the minimum width of a path-decomposition of G. Pathwidth is a fundamental parameter in graph structure theory [4,5,8,23] with many connections to graph drawing [2,3,10,12,13,18,20,24].A caterpillar is a tree such that deleting the leaves gives a path.It is a straightforward exercise to show that a connected graph has pathwidth 1 if and only if it is a caterpillar.
These examples motivate the following definition.A set S of edges in a 2-layer drawing is non-crossing if no two edges in S cross.In a 2-layer drawing of a graph G, an (s, t)-crossing is a pair (S, T ) where S is a non-crossing s-matching, T is a non-crossing t-matching, and every edge in S crosses every edge in T ; as illustrated in Figure 4. We show that excluding a k-crossing and an (s, t)-crossing guarantees bounded pathwidth.
We prove the following converse to Theorem 2.
Theorem 3 For any k ∈ N every bipartite graph G with pathwidth at most k has a 2-layer drawing with no (k + 2)-crossing and no (k + 1, k + 1)-crossing.
Theorems 2 and 3 together establish the following rough characterisation of bipartite graphs with bounded pathwidth, thus answering the opening question.
Corollary 4 A class G of bipartite graphs has bounded pathwidth if and only if there exists k, s, t ∈ N such that every graph in G has a 2-layer drawing with no k-crossing and no (s, t)-crossing.

Proofs
We use the following notation throughout.Consider a 2-layer drawing of a bipartite graph with bipartition {A, B}.Let ⪯ A be the total order of A, where v ≺ A w if v is to the left of w in the drawing.Define ⪯ B similarly.Let ⪯ be the poset on E(G), where vw ⪯ xy if v ⪯ A x and w ⪯ B y. Two edges of G are comparable under ⪯ if and only if they do not cross.Thus every chain under ⪯ is a set of pairwise non-crossing edges, and every antichain under ⪯ is a matching of pairwise crossing edges.
Lemma 5 Let G be a bipartite graph with bipartition A, B, where each vertex in A has degree at least 1 and each vertex in B has degree at most d.Assume that G has a 2-layer drawing with no (k + 1)-crossing and no non-crossing (ℓ + 1)-matching.Then |A| ⩽ kℓd.
Proof: Let X be a set of edges in G with exactly one edge in X incident to each vertex in A. So |X| = |A|.Let E 1 , . . ., E d be the partition of X, where for each edge vw ∈ E i , if v ∈ A and w ∈ B, then v is the i-th neighbour of w with respect to ⪯ A .So each E i is a matching.Since G has no (k + 1)-crossing, every antichain in ⪯ has size at most k.By Dilworth's Theorem [9] applied to ⪯ (restricted to E i ), there is a partition E i,1 , . . ., E i,k of E i such that edges in each E i,j are pairwise non-crossing.By assumption, |E i,j | ⩽ ℓ.Thus |A| = |X| ⩽ kℓd.□ Proof of Theorem 2: Consider a bipartite graph G with bipartition {A, B} and a 2-layer drawing of G with no (k + 1)-crossing and no (s, t)-crossing.Our goal is to show that pw(G) ⩽ 8k 2 (t − 1) + 4k 2 (s − 1) 2 (s − 2) + 5k + 4. (We make no effort to optimise this bound.)Consider the partial order ⪯ defined above.By assumption, every antichain in ⪯ has size at most k.By Dilworth's Theorem [9], there is a partition of E(G) into k chains under ⪯.Each chain is a caterpillar forest, which can be oriented with outdegree at most 1 at each vertex.So each vertex has out-degree at most k in G.
As illustrated in Figure 5, let X = {e 1 , . . ., e n } be a maximal non-crossing matching, where ) Let Y 0 be the set of vertices of G strictly to the left of e 1 .For i ∈ {1, 2, . . ., n − 1}, let Y i be the set of vertices of G strictly between e i and e i+1 .Let Y n be the set of vertices of G strictly to the right of e n .By the maximality of X, each set Y i is independent.For i ∈ {0, 1, . . ., n}, arbitrarily enumerate Y i = {v i,1 , . . ., v i,mi }.Note that v i,j is an end-vertex of no edge in X (for all i, j).
x y e i We now prove that is a path-decomposition of G.We first show that each vertex v is in some bag.If v is an end-vertex of some edge e i , then v ∈ V i .Otherwise v = v i,j for some i, j, implying that v ∈ V i,j , as desired.We now show that each vertex v is in a sequence of consecutive bags.Suppose that v ∈ V i ∩ V p and i < j < p.Thus e i ≺ e j ≺ e p .Our goal is to show that v ∈ V j .If v is an end-vertex of e j , then v ∈ V j .So we may assume that v is not an end-vertex of e j .By symmetry, we may assume that v is to the left of the end-vertex of e j that is in the same layer as v. Thus, v is not an end-vertex of e p .Since v ∈ V p , there is an arc − → yv that crosses e p or such that y is an end-vertex of e p .Since e j ≺ e p , this arc − → yv crosses e j .Thus v ∈ V j , as desired.This shows that v is in a (possibly empty) sequence of consecutive bags V i , V i+1 , . . ., V j .If v ∈ V i then v ∈ V i,j for all j ∈ {1, . . ., m i }, and v ∈ V i−1,j for all j ∈ {1, . . ., m i−1 }.It remains to consider the case in which v is in no set V i .Since the end-vertices of e i are in V i , we have that v = v i,j for some i, j.Since Y i is an independent set, v is adjacent to no other vertex in Y i .Moreover, if there is an arc − → zv in G, then either z is an end-vertex of e i or e i−1 , or − → zv crosses e i−1 or e i , implying v is in V i−1 ∪ V i , which is not the case.Hence v has indegree 0, implying V i,j is the only bag containing v.This completes the proof that v is in a sequence of consecutive bags in (1).Finally, we show that the end-vertices of each edge are in some bag.Consider an arc − → vw in G.If v = v i,j for some i, j, then v, w ∈ V i,j , as desired.Otherwise, v is an end-vertex of some e i , implying v, w ∈ V i , as desired.Hence the sequence in (1) defines a path-decomposition of G.
We now bound the width of this path-decomposition.The goal is to identify certain subgraphs of G to which Lemma 5 is applicable.
As illustrated in Figure 7, for i, j ∈ {0, 1, . . ., n}, let Y i,j be the set of vertices v ∈ Y i such that there is an arc − → zv in G with z ∈ Y j .Suppose that |Y i,j | ⩾ 2k 2 |j − i| + 1 for some i, j ∈ {0, 1, . . ., n}.Since Y i is an independent set, i ̸ = j.Without loss of generality, i < j and there exists Z ⊆ Y i,j ∩ A with |Z| ⩾ k 2 (j − i) + 1.Let H 1 be the subgraph of G consisting of all arcs − → zv in G with z ∈ Y j ∩ B and v ∈ Z (and their end-vertices).If H 1 has a non-crossing (j − i + 1)-matching M , then (X \ {e i+1 , . . ., e j }) ∪ M is a non-crossing matching in G larger than X, thus contradicting the choice of X. Hence H 1 has no non-crossing (j − i + 1)-matching.By construction, H 1 has no (k + 1)-crossing, every vertex in V (H 1 ) ∩ A has degree at least 1 in H 1 , and every vertex in V (H 1 ) ∩ B has degree at most k in H 1 .By Lemma 5 applied to H 1 with ℓ = j − i and d = k, we have This bound on |Y i,j | is useful if |i − j| is 'small', but not useful if |i − j| is 'big'.We now deal with this case.
As illustrated in Figure 8, for i ∈ {1, . . ., n}, let P i be the set of vertices v in G for which there is an arc − → zv in G that crosses e i−s+1 , e i−s+2 , . . ., e i or crosses e i , e i+1 , . . ., e i+s−1 .Suppose that P i ⩾ 4k 2 (t − 1) + 1.Without loss of generality, there exists Consider a bag V i , which consists of N i along with every vertex v ∈ V (G) such that some arc − → zv ∈ E(G) crosses e i .Thus Hence Therefore the path-decomposition of G defined in (1) has width at most 8k 2 (t − 1) + 4k 2 (s − 1) 2 (s − 2) + 5k + 4. □ Proof of Theorem 3: Let G be a bipartite graph with pathwidth at most k.Our goal is to construct a 2-layer drawing of G with no (k + 2)-crossing and no (k + 1, k + 1)-crossing.Let (X 1 , . . ., X n ) be a path-decomposition of G with width k.Let ℓ(v) := min{i : v ∈ X i } and r(v) := max{i : v ∈ X i } for each v ∈ V (G).We may assume that ℓ(v) ̸ = ℓ(w) for all distinct v, w ∈ V (G).Let {A, B} be a bipartition of G. Consider the 2-layer drawing of G, in which each v ∈ A is at (ℓ(v), 0), each v ∈ B is at (ℓ(v), 1), and each edge is straight.

Figure 3 :
Figure 3: Every 2-layer drawing of S 9 has at least 4 crossings on some edge.

Figure 6 :
Figure 6: The set of vertices V i where e i = xy are shown in red and yellow.

Figure 7 :
Figure 7: If many vertices in Y i are the head of an arc starting in Y j , then there is a large noncrossing matching amongst these edges, which can replace e i+1 , . . ., e j in M , contradicting the maximality of M .
e i+1 , ..., e i+s−1 .Let H 2 be the subgraph of G consisting of all such arcs and their end-vertices.So V (H 2 ) ∩ A = Q.If H 2 has a non-crossing t-matching M , then ({e i , e i+1 , ..., e i+s−1 }, M ) is an (s, t)-crossing.Thus H 2 has no non-crossing t-matching.By construction, H 2 has no (k + 1)-crossing, every vertex in V (H 2 ) ∩ A has degree at least 1 in H 2 , and every vertex in V (H 2 ) ∩ B has degree at most k in H 2 .By Lemma 5 applied to H 2 with ℓ = t − 1 and d = k, we have |Q| = |V (H 2 ) ∩ A| ⩽ k 2 (t − 1), which is a contradiction.Hence |P i | ⩽ 4k 2 (t − 1) for all i ∈ {1, ..., n}.Figure8: If many vertices are the head of an arc crossing e i , e i+1 , . . ., e i+s−1 , then amongst these edges there is a non-crossing t-matching, implying that G has an (s, t)-crossing, which is a contradiction.