Abstract 1 Introduction 2 Preliminaries 3 Translating Twin-Width and Oriented Twin-Width 4 A Fixed-Parameter Algorithm Parameterized by Treedepth 5 An Exact Algorithm Based on Vertex Integrity References

Computing Twin-Width
via Treedepth and Vertex Integrity

Robert Ganian ORCID Algorithms and Complexity Group, TU Wien, Austria Mathis Rocton ORCID Algorithms and Complexity Group, TU Wien, Austria
Abstract

Twin-width is a graph parameter that has become central to explaining the fixed-parameter tractability of first-order model checking across many graph classes. Despite its algorithmic importance, computing twin-width remains poorly understood: even recognizing graphs of twin-width at most four is NP-hard, and no fixed-parameter approximations parameterized by twin-width itself are known. A recent approach towards breaking this barrier focuses on first developing fixed-parameter algorithms for computing or approximating twin-width under parameterizations distinct from twin-width.

Our first result establishes that approximating twin-width is fixed-parameter tractable when parameterized by treedepth, thereby breaking the long-standing barrier that all previous tractable parameterizations were based on deletion distance. The proof proceeds via oriented twin-width, yielding the first constructive evidence that this variant may be easier to handle algorithmically. As our second main result, we show that computing twin-width exactly is fixed-parameter tractable with respect to vertex integrity. This constitutes the first non-trivial parameterized algorithm for computing optimal contraction sequences.

Keywords and phrases:
twin-width, fixed-parameter algorithms, treedepth, vertex integrity
Funding:
Robert Ganian: Robert Ganian acknowledges support by the FWF and WWTF Science Funds (FWF projects 10.55776/Y1329 and 10.55776/COE12, WWTF project ICT22-029).
Mathis Rocton: margin: [Uncaptioned image] Mathis Rocton acknowledges support by the European Union’s Horizon 2020 research and innovation COFUND programme (LogiCS@TUWien, grant agreement No 101034440), and the FWF Science Fund (FWF project Y1329).
Copyright and License:
[Uncaptioned image] © Robert Ganian and Mathis Rocton; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Parameterized complexity and exact algorithms
Editors:
Meena Mahajan, Florin Manea, Annabelle McIver, and Nguyễn Kim Thắng

1 Introduction

Twin-width is a relatively recent graph-theoretic parameter that has both emerged from and stimulated a series of breakthroughs in algorithmic model theory [10, 11, 12, 14, 15]. It holds the promise of offering a unifying explanation for why first-order logic model-checking is fixed-parameter tractable on a wide range of graph classes which, until recently, were viewed as isolated “islands of tractability.” Examples include graphs of bounded rank-width, proper minor-closed graphs, bounded-width posets [3], map graphs [16] as well as a number of other specialized graph classes [4, 25].

Although twin-width is related to other parameters such as path-width, clique-width and rank-width [15], it stands apart in one crucial respect: no efficient algorithms are known for computing it. In fact, already deciding whether a graph has twin-width 4 is NP-hard [6]. This poses a serious challenge, as essentially all known algorithms that exploit twin-width require access to a contraction sequence, which plays a role analogous to that of decompositions for classical parameters such as treewidth [39] and rank-width [36]. Intuitively, a contraction sequence of width t – which exists whenever G has twin-width at most t – is a sequence 𝒞 of contractions of (not necessarily adjacent) vertex pairs such that, at each step of 𝒞, every vertex v has at most t neighbors with an ancestor not adjacent to some ancestor of v; see Section 2 for formal details.

The NP-hardness of recognizing graphs of twin-width at most 4 [6] rules out both fixed-parameter and XP algorithms for computing optimal contraction sequences when parameterized by twin-width itself. A natural workaround would be to design a fixed-parameter algorithm (parameterized by the twin-width t) that computes an approximate contraction sequence, i.e., one of width f(t) for a computable function f. From a complexity-theoretic standpoint, such a result would be nearly as powerful as computing the exact twin-width as it would still enable fixed-parameter tractability of first-order model checking. In fact, two decades ago it was the discovery of an analogous approximate decomposition-computing result [37] which opened the door to the algorithmic applications of clique-width.

Unfortunately, finding such an algorithm for twin-width has proven to be highly challenging, and it remains unclear whether it is even possible. Indeed, determining whether twin-width admits any fixed-parameter approximation (for arbitrary computable f) is arguably the central open problem in current research on the parameter. In their recent work, Balabán, Ganian and Rocton [1] approached this question by relaxing the runtime requirements and asked whether one could obtain an f(t)-approximation for twin-width via a fixed-parameter algorithm parameterized by a graph measure other than twin-width itself. As a first step, they developed a fixed-parameter algorithm that computes a contraction sequence of width at most t+1, parameterized by the feedback edge number of the graph [1], i.e., by the edge deletion distance to a forest. In a follow-up work, the same authors obtained a fixed-parameter approximation algorithm which computes a contraction sequence of width at most 2t and is parameterized by the vertex integrity of the graph [2]. Vertex integrity can be roughly understood as the deletion distance to a collection of small components, and the aforementioned 2-approximation algorithm can be seen as a way of lifting the trivial fixed-parameter algorithm for computing optimal contraction sequences parameterized by the vertex cover number of the graph [1, 2].

Results.

In this article, we push beyond the state of the art for computing twin-width in two directions. As our first result, we lift the fixed-parameter approximability of twin-width from the vertex integrity parameterization to treedepth – a well-studied parameter that has fundamental ties to the theory of graph sparsity [35]. In particular, we prove:

Main Result 1.

Approximating twin-width is FPT w.r.t. the treedepth of the input graph.

Even though the algorithm underlying Main Result 1 (formalized in Theorem 20) provides approximation guarantees only in terms of a superexponential function of the twin-width, we believe it to be a major step forward in our conceptual understanding. Indeed, while all previous parameterizations which supported efficient approximation algorithms for twin-width were based on deletion distance, twin-width itself – as well as major structural parameters such as treewidth and clique-width – are decompositional in nature. Our result thus marks the first time we are able to break the barrier towards decompositional parameters: having bounded treedepth is typically witnessed via a certain type of decomposition (which resembles a bounded-depth tree), but cannot be expressed via a constant number of deletion operations111We remark that both treedepth and treewidth admit characterizations that rely on vertex deletion operations – however, in both cases the number of such operations is not bounded by the parameter..

A further noteworthy property of Theorem 20 is that the proof does not target the computation of twin-width directly. Instead, it relies on reduction rules which maintain a 2-approximate bound on the so-called oriented twin-width – a variant of twin-width where contraction sequences only capture information about edges of the original graph in a one-sided way. Oriented twin-width has been proposed and studied already in the pioneering series of works that introduced twin-width [15]; it was known to be functionally equivalent to twin-width [15, Theorem 4.1], and in Section 3 we make this relationship both explicit and constructive. It was suspected that oriented twin-width could be easier to compute, and Theorem 20 yields concrete substance to that claim: the algorithm achieves a 2-approximation on the oriented twin-width of the input graph, but it is entirely unclear how to obtain any such bound for “vanilla” twin-width.

While our first result relies on allowing for a potentially large approximative error in the twin-width, the second one makes do without this entirely:

Main Result 2.

Computing twin-width is FPT w.r.t. the vertex integrity of the input graph.

Main Result 2 (formalized in Theorem 33) is the first non-trivial parameterized algorithm for computing optimal contraction sequences, and shows that the NP-hardness of the problem can be overcome at least under restrictive parameterizations. Moreover, while its running time guarantees are weak in practice, the underlying algorithm relies on the performance of reduction rules which are easy to implement and guaranteed to preserve the twin-width of the input graph. We remark that both algorithms obtained in this work are deterministic, constructive and rely exclusively on computable functions.

Technical Contributions.

On a high level, the proof of Theorem 20 relies on establishing that every sufficiently large graph of bounded treedepth must have a “redundant” subgraph H – that is, a subgraph which we can find and safely delete from the instance. Recursively applying such a rule will eventually reduce the graph to a problem kernel [18], at which point one may compute a contraction sequence via brute force or any other known algorithm. It is well-known that deleting vertices cannot increase the twin-width of a graph, but for correctness it is also necessary to prove the converse: that by deleting H, we have not accidentally reduced the twin-width of G. In other words, a redundant subgraph must have the property that it can be reinserted into the graph without increasing the twin-width.

The main obstacle towards approximating twin-width when parameterized by treedepth is that – unlike many problems where the above recursive deletion technique has been successfully applied – reinserting H may require the contraction sequence to have a short subsequence where the twin-width is elevated. In particular, the red degree (see Section 2) can exceed the twin-width bound by a factor of at most 2, and this can happen both for vertices in H and vertices outside of H. For a single reinsertion step this would not be an issue, but the algorithm must be able to perform deletion multiple times, which would then lead to the error gradually snowballing to a factor of 4, 8, and so forth. The crucial insight here is that if we instead consider contraction sequences for oriented twin-width, the red degree exceeds the twin-width bound only for vertices inside H; in turn, this allows us to isolate the approximation error in clearly delimited and pairwise disjoint parts of the contraction sequence.

For Theorem 33, we build on the very recently introduced Ramsey Pruning technique [19]. The core idea behind that technique is that instead of repeatedly arguing that a single redundant subgraph can be safely reinserted if it is deleted, we use Ramsey-type arguments to argue that every contraction sequence S for G must contain a carefully selected subgraph Q which induces “guiding subsequence” S – a contraction sequence for Q that is highly structured in a precisely defined way. Once defined, the properties of S will allow us to argue that every solution on Q can be lifted to a contraction sequence of width t for an infinite set of supergraphs of Q which also includes G. Thus, while we do not directly prove the safeness of performing any single deletion operation, the proof technique guarantees that the existence of a solution (in this case, a contraction sequence of width t) is preserved between the first and final graph in the sequence of reduction rules.

The main difficulty that arises when trying to implement the above strategy in the setting of twin-width is that, essentially, the properties of S one can guarantee by invoking the analogous Ramsey-type arguments as in the preceding work [19] are too weak. There, the core idea was to capture pairwise relationships between certain subgraphs of G via color-coded edges in an auxiliary graph, and then employ Ramsey theory to guarantee the existence of a monochromatic subclique. Unfortunately, pairwise relationships do not capture sufficient information to guarantee the ability to expand S into a solution for G (or a supergraph thereof). We solve this by showing that maintaining information about interactions between triplets of certain subgraphs in G does suffice – a complication which necessitates the use of Ramsey hypergraph theory instead of the classical bounds used in [19].

Related Work.

Beyond the computation of twin-width and its associated contraction sequences, a substantial body of work has focused on fixed-parameter algorithms for computing a structural graph parameter A when parameterized by graph parameters different from A. The overarching goal of this research direction is to deepen our understanding of the fundamental task of computing the target parameter A. Prominent examples include fixed-parameter algorithms for treedepth parameterized by the vertex cover number [32], treewidth parameterized by the feedback vertex number [9], MIM-width parameterized by the feedback edge number and other parameters [24], as well as directed feedback vertex number parameterized by the undirected feedback vertex number [7].

Treedepth and vertex integrity have also served as effective parameterizations for developing algorithms for a variety of hard problems [5, 29, 33, 8, 30, 27, 31]. Moreover, vertex integrity has been studied under several asymptotically equivalent notions in the literature, including the fracture number [23, 28] and starwidth [40].

2 Preliminaries

For integers i and j, we let [i,j]:={n|inj} and [i]:=[1,i]. We assume familiarity with basic concepts in graph theory [20] and parameterized algorithmics [21, 18]. When H is an induced subgraph of G, we denote it by HG. Given vertex sets X and U, we will use G[X] to denote the graph induced on X and GU to denote the graph G[V(G)U]. A vertex v of a rooted tree T is a descendant of a vertex w if w occurs on the root-to-v path in T; we then call w an ancestor of v. We recall that the number of non-isomorphic graphs of size up to n can be upper-bounded by n2n2. To express some of our bounds, we will occasionally use the Knuth notation where for an integer z, 2z represents an exponential tower of 2’s of height z.

Treedepth.

A treedepth decomposition of a graph G is a pair (T,f), where T is a rooted forest and f:V(G)V(T) is a bijective function such that for each {u,v}E(G), either f(u) is a descendant of f(v) or f(v) is a descendant of f(u). The depth of the treedepth decomposition is the number of vertices in the longest root-to-leaf path in T; or ease of presentation, w.l.o.g. we will assume that f is just an identity. The treedepth of a graph G, denoted by 𝗍𝖽(G), is the minimum over the depths of all possible treedepth decompositions of G. When G is connected, T is a tree. For any vertex u of T, we denote by Tu the subtree of T rooted at u, and Xu the subgraph G[V(Tu)].

A treedepth decomposition T is nice if, for each node uV(T) and each child w of u in T, Xw forms a connected component of Xu{u} – in particular, there is a one-to-one correspondence between the subtrees rooted at the children of u in T and the set Compu of connected components in Xu{u}. It is known that every treedepth decomposition can be transformed into a nice one with a smaller or equal depth via a simple rearrangement argument [38], and that a nice treedepth decomposition of depth 𝗍𝖽(G) can be computed in time 2𝒪(𝗍𝖽(G)2)|V(G)| [38], see also the recent work [34] on the topic.

For ease of presentation, we say that a subgraph H of G appears in T if there exist a seed vertex u in T such that H=Xu. Moreover, we call two subgraphs Xa, Xb appearing in T siblings if a and b are siblings in T, i.e., have the same parent.

Vertex Integrity.

A graph G has vertex integrity 𝗏𝗂(G)=p if p is the smallest integer with the following property: G contains a vertex set S such that for each connected component H of GS, |V(H)S|p. One may observe that the vertex integrity is upper-bounded by the size of a minimum vertex cover in the graph (i.e., the vertex cover number) plus one. The vertex integrity of an n-vertex graph along with a corresponding partition into S and 𝒞=GS can be computed in time 𝒪(pp+1n) [22].

Hypergraph Ramsey Bounds.

We will employ a known generalization of Ramsey’s classical theorem to edge-colored hypergraphs in order to argue the existence of certain structures in our correctness proof. In particular, the following fact follows directly from the application of Erdős’ and Rado’s improved bound on the Ramsey numbers for multicolored hypergraphs [26, Theorem 1]; see also the recent work on the topic [17] for an overview.

Fact 1.

Let H be a complete hypergraph whose hyperedges all have size 3 and are mapped to single colors from [L], and let t be a positive integer. If |V(H)|LL2Lt, then H contains an induced t-vertex subhypergraph H such that all hyperedges fully contained in H have the same color.

Twin-Width.

Our notation for twin-width follows the conventions introduced in the recent related works aimed at computing twin-width under more restrictive parameterizations [1, 2]. A trigraph G is a graph whose edge set is partitioned into a set of black and red edges. The set of red edges is denoted R(G), and the set of black edges E(G). The black (resp. red) degree of uV(G) is the number of black (resp. red) edges incident to u in G. We extend graph-theoretic terminology to trigraphs by ignoring the colors of edges; for example, the degree of u in G is the sum of its black and red degrees.

Given a trigraph G, a contraction of two distinct vertices u,vV(G) is the operation which produces a new trigraph by (1) removing u,v and adding a new vertex w, (2) adding a black edge wx for each xV(G) such that xu, xvE(G), and (3) adding a red edge wy for each yV(G) such that yuR(G), or yvR(G), or y has a black edge to either v or u (but not both). For an integer p, a sequence 𝒞=(G=G1,,Gp) is a partial contraction sequence of G if it is a sequence of trigraphs such that for all i[p1], Gi+1 is obtained from Gi by contracting two vertices; if p=|V(G)| then Gp is the single-vertex graph and we call 𝒞 a contraction sequence. We call a contiguous subsequence of 𝒞 a segment. The width of a (partial) contraction sequence 𝒞 is the maximum red degree over all vertices in all trigraphs in 𝒞. The twin-width of G, denoted tww(G), is the minimum width of any contraction sequence of G, and a contraction sequence of width tww(G) is called optimal. An example of a contraction sequence is provided in Figure 1.

Fact 2 (e.g., Observation 6 in [1]).

An optimal contraction sequence of an n-vertex graph can be computed in time 2𝒪(nlogn).

Figure 1: A contraction sequence of width 2 for the leftmost graph, consisting of 6 trigraphs.

Let us now fix a contraction sequence 𝒞=(G=G1,,Gn). For each i[n], we associate each vertex uV(Gi) with a set β(u,i)V(G), called the bag of u, which contains all vertices contracted into u. Formally, we define the bags as follows:

  • for each uV(G), β(u,1):={u};

  • for i[n1], if w is the new vertex in Gi+1 obtained by contracting u and v, then β(w,i+1):=β(u,i)β(v,i); otherwise, β(w,i+1):=β(w,i).

Note that if a vertex u appears in multiple trigraphs in 𝒞, then its bag is the same in all of them, and so we may denote the bag of u simply by β(u). Let us fix i,j[n], ij. If uV(Gi), vV(Gj), and β(u)β(v), then we say that u is a 𝒞-ancestor of v in Gi and v is the 𝒞-descendant of u in Gj (clearly, the 𝒞-descendant is unique). If H is an induced subtrigraph of Gi, then uV(Gj) is a 𝒞-descendant of H if it is a 𝒞-descendant of at least one vertex of H. A contraction of u,vV(Gj) into uvV(Gj+1) involves wV(Gi) if w is a 𝒞-ancestor of uv. Given a contraction sequence 𝒞 of G and vertex subset ZV(G), we let 𝒞[Z] denote the restriction of 𝒞 to Z, i.e., the contraction sequence obtained from 𝒞 by omitting each step that involves vertices outside of Z; note that 𝒞[Z] is a contraction sequence of G[Z] whose width is upper-bounded by the width of 𝒞.

The twin-width of a graph with vertex integrity p is upper-bounded by p. Indeed, given a vertex set S such that for each connected component H of GS, |V(H)S|p, we can construct a contraction sequence of width p by processing components in an arbitrary order as follows. We contract the first component H1 into a single vertex v1 (during which the red degree never exceeds p). Afterwards, for each unprocessed component i, i2, we contract Hi into a single vertex (during which the red degree never exceeds p either) and contract this vertex with vi1 to produce vi.

Oriented Twin-Width.

The oriented variant of twin-width is defined using the same concept of contraction sequences as twin-width, and hence we opt to use primarily shared terminology (as opposed to the homogeneity-based notation of [15]). Intuitively, in oriented twin-width red edges only represent discrepancies between the corresponding bags in a one-directional manner; this will require the individual trigraphs in a contraction sequence to depend not only on the previous trigraph in the sequence but also on the original graph. We formalize below.

An oriented trigraph is a graph whose edge set is partitioned into a set of black undirected edges and red directed edges (arcs). Given an initial graph G and an oriented trigraph Gi1 each of whose vertices zV(Gi1) is associated with a bag β(z,i1)V(G), an oriented contraction of two distinct vertices u,vV(Gi1) is the operation which produces a new oriented trigraph Gi as follows. First, we remove u,v and add a new vertex w where β(w,i)=β(u,i1)β(v,i1); for all other vertices, the bags remain the same and so do the edges and arcs not incident to w. For each aV(Gi) we add a black edge aw if every vertex of β(a,i) is adjacent to every vertex of β(w,i) in G. For each bV(Gi) we add a red arc (w,b) if there exist w1,w2β(w,i) and b0β(b,i) such that w1b0E(G) and w2b0E(G). Similarly, for each cV(Gi) we add a red arc (c,w) if there exist c1,c2β(c,i) and w0β(w,i) such that c1w0E(G) and c2w0E(G). Notice that an oriented contraction cannot increase the red out-degree of any vertex in V(Gi){w}.

An oriented contraction sequence is then defined analogously as a contraction sequence, but using oriented contractions. The oriented width of an oriented contraction sequence 𝒞 the maximum red out-degree over all vertices in all trigraphs in 𝒞. While the oriented twin-width of a graph can be smaller than its twin-width, by comparing the definitions of the two notions of contraction sequences we immediately obtain:

Fact 3 ([15]).

The oriented twin-width of every oriented contraction sequence C is upper-bounded by the width of the contraction sequence C obtained by the same sequence of vertex pair contractions.

The oriented twin-width of a graph G, denoted otww(G), is the minimum oriented width of any oriented contraction sequence of G.

 Remark.

Since Section 4 will deal exclusively with oriented contraction sequences and oriented width, for brevity we omit the adjective “oriented” in that section.

3 Translating Twin-Width and Oriented Twin-Width

Bonnet, Kim, Reinald and Thomassé established the functional equivalence between twin-width and its oriented variant by showing:

Fact 4 (Proof of Theorem 4.1 in [15]).

For every graph G, otww(G)tww(G)22𝒪(otww(G).

Unfortunately, the proof of the above statement is not constructive – it does not provide any algorithm for converting an oriented contraction sequence 𝒞 of oriented width α into a contraction sequence 𝒞 of width bounded by a function of α. In order to construct the contraction sequences for Main Result 1, we need to revisit the relationship between the two parameters and provide an efficient conversion algorithm.

First, we provide some background for the terminology required solely in this section. Given a total order σ over V(G), the ordered adjacency matrix M(G,σ) is the adjacency matrix of G where the rows and columns both appear in the order σ. The mixed number is a numerical parameter of ordered adjacency matrices which is known to be related to twin-width, but we will not need its definition for our purposes. Similarly, a notion of twin-width has also been defined over ordered adjacency matrices but we will not need its definition for our purposes. We say that a (oriented) contraction sequence in C of G respects σ if the vertices in every bag in every trigraph of C occur consecutively in σ – in other words, for each pair of vertices a,b occurring in some bag β(,), there cannot exist any cβ(,) such that c occurs between a and b in σ. The following result can be obtained by adapting the proof of [15, Theorem 4.1].

Lemma 5.

Given a graph G with an oriented contraction sequence 𝒞 of oriented width at most k, we can compute in polynomial time an ordering σ on V(G) such that (M(G,σ)) has mixed number at most 2k+3.

The first part of the following statement follows directly from the second part of the Grid Minor Theorem for Twin-Width [16, Theorem 10], see also [10, Theorem 2.2], when setting t2k+3. The second part follows from [16, Theorem 5.8], which translates the aforementioned grid minor theorem to graphs. We note that the statement of [16, Theorem 5.8] omits the fact that the constructed contraction sequence respects σ, but this follows directly from the proof.

Fact 6.

Every ordered matrix (M(G),σ) of mixed number 2k+3 has twin-width at most 22𝒪(k). Moreover, there exists a contraction sequence of G which respects σ and has width at most 22𝒪(k).

We remark that 1002212k can serve as a non-tight but explicit bound for the above terms involving k. Next, we recall the fixed-parameter tractability of approximating contraction sequences with respect to a provided total order of the vertex set [13, Theorem 7].

Fact 7.

There is a fixed-parameter algorithm that takes as input a graph G with a total order σ of its vertices, and outputs a contraction sequence of G which respects σ of width at most 2𝒪(p4). Here, the parameter p is the minimum width among all contraction sequences of G which respect σ.

By chaining the above arguments, we obtain:

Lemma 8.

There is a fixed-parameter algorithm that takes as input a graph G together with a contraction sequence 𝒞 of oriented width k (the parameter) and outputs a contraction sequence 𝒞 of width at most 222𝒪(k). Moreover, if kf(otww(G)) for some computable non-decreasing function f, then 𝒞 has width at most 222𝒪(f(tww(G))).

4 A Fixed-Parameter Algorithm Parameterized by Treedepth

In this section, we design an FPT 2-approximation algorithm for computing oriented twin-width when parameterized by the treedepth, see Theorem 19. In combination with Lemma 8, this will in turn imply Main Result 1 as formalized in Theorem 20.

4.1 Initial Setup and Overview

For the following, it will be useful to recall the definition of treedepth presented in Section 2.

Let G be an arbitrary graph with treedepth p and T a nice treedepth decomposition of G of depth p. Note that G and T have the same set of vertices. We assume without loss of generality that the input graph G is connected, as the oriented twin-width of a graph is the maximum oriented twin-width of its connected components; connectivity will then be preserved throughout our reduction rules. For a given vertex u in T, we now define a notion of “component-types” which intuitively captures the equivalence between components which exhibit the same outside connections and internal structure.

Definition 9.

We say that two graphs H0,H1Compu appearing in T are u-twin-blocks, denoted H0uH1, if there exists a canonical isomorphism α from H0 to H1 such that for each vertex vV(H0) and each wV(G(H0+H1)), vwE(G) if and only if α(v)wE(G). Clearly, u is an equivalence relation.

When u is clear from context, we simply refer to H0 and H1 as twin-blocks (H0H1) and note that can be tested in time 𝒪(|H0||H0|p) via isomorphism testing procedures. Moreover, we lift α to sets of vertices by simply setting α(S)={α(s)|sS}.

The core of our approach lies in establishing a reduction rule which takes a graph G with its treedepth decomposition T and gradually deletes subgraphs from G until we obtain a subgraph whose size is upper-bounded by a function of 𝗍𝖽(G).

Definition 10.

A vertex u at depth d in T is processed if: Tu{u} contains only processed vertices, and |Compu|g(d,p), where we set g(p,p)=2p and, for any i[0,p1], g(i,p)2g(i+1,p)6p.

Lemma 11.

If a subtree Tu of T is rooted at depth d and u is processed, it contains at most b(d,p)(g(d,p)+1)p vertices. In particular, if the root of T is processed, T contains at most (g(1,p)+1)p=2𝒪(p) vertices.

Definition 12.

Let G be a graph, T a treedepth decomposition of G, vV(G) and 𝒞 a contraction sequence for G. We say that a segment Y of 𝒞 is an Xv-merge if v has a sibling w in T with the following properties:

  • XvXw, i.e., they are twin-blocks in G.

  • In the first trigraph Gι of Y:

    • the subgraph induced by V(Xw) contains no black edges and all red arcs in it are symmetric, and

    • vertices of Xv are in bags only with other vertices of Xv, and

    • for each pair of canonically isomorphic vertices zV(Xv) and zV(Xw), let B(z) and B(z) be the bags containing z and z in Gι, respectively. Then α(β(B(z)))=β(B(z))V(Xw) – in particular, the bag contents match when restricted to the subtrees rooted at v and w.

  • Each contraction in Y is a contraction between corresponding vertices of the subtrigraphs induced by V(Xv) and V(Xw) that merges pairwise-isomorphic vertices w.r.t. α.

  • In the last trigraph of Y, each vertex of Xv has been contracted with a vertex from Xw.

Intuitively, an Xv-merge Y is a subsequence of 𝒞 such that at the beginning of the subsequence, Xv and Xw are in the “same state” if we ignore external vertices in the latter, and Y merely contracts the two subtrees into each other. The conditions on Xw moreover guarantee that Y acts as a deletion operation on Xv which will not result in new red edges in the resulting trigraph (even though new red edges may be created in the intermediate steps). In particular:

Lemma 13.

Let Ystart and Yend be the first and last trigraphs in an Xv-merge Y, respectively. Then Yend=Ystart{B(x)|xV(Xv)} and, for each trigraph Ymid between Ystart and Yend (included) in 𝒞, otww(Ymid)2otww(Ystart).

For each Xv-merge Y, we define its internal part Yint as the subsegment obtained by removing the first and last trigraph of Y. We now show that the above notion of Xv-merges has two useful properties: they are unique (in the sense of Lemma 14) and they do not interfere with each other (in the sense of Lemma 15).

Lemma 14.

Let G be a graph, T a treedepth decomposition of G and 𝒞 a contraction sequence for G. Each vertex vV(G) admits at most a single Xv-merge in 𝒞.

Lemma 15.

Let G be a graph, T a treedepth decomposition of G, 𝒞 a contraction sequence for G and v,vV(G). If v and v admit an Xv-merge Y and an Xv-merge Y, respectively, then Yint and Yint do not intersect in 𝒞, unless the following holds: XvXv and Y=Y.

In particular, we note that the only distinction between the trigraph at the end of Y and the trigraph at the beginning of Y is that all vertices of T(v) have been removed. This will allow us to use Xv merges as a viable reduction rule when parameterized by treedepth – however, care must be given to the fact that during the merge, the oriented twin-width may increase by a factor of at most 2. Towards formally treating this, we define the following refinement of oriented twin-width that will serve as an invariant during the recursive application of our reduction rule.

Definition 16.

Let G be a graph, T a treedepth decomposition of G, and t a positive integer. We say that a (potentially partial) contraction sequence 𝒞 for (G,T) has (t,2t)-oriented twin-width if:

  • the width of 𝒞 is at most 2t, and

  • each trigraph in 𝒞 of width larger than t lies in the internal part of an Xv-merge for some vV(G).

Reduction Rule 1.

Let (G,T) be a graph with its nice treedepth decomposition of depth p. Let uT be not yet processed such that vV(Tu){u}, v is processed. Let d be the depth of u. For a connected component H0 in Compu such that the equivalence class of H0 for u is strictly larger than h(d,p)=224pb(d+1,p), delete H from both the graph and the treedepth decomposition to obtain a pair (G,T).

Observe that by the choice of H, if G was connected then the graph G obtained by Reduction 1 remains connected. The cornerstone of our proof will be the following lemma, which states that Reduction 1 is a safe reduction rule to use and that we prove in Section 4.2.

Lemma 17.

Let (G,T),(G,T) be the tuples before and after applying Reduction Rule 1, respectively. If (G,T) admits a (t,2t)-oriented twin-width contraction sequence 𝒞, then (G,T) does as well and we can construct the corresponding sequence 𝒞 from 𝒞 in time 2𝒪(p)|V(G)|𝒪(1).

For now, we proceed towards establishing our results conditioned on the correctness of Lemma 17. The following statement summarizes the outcome after the exhaustive application of Reduction Rule 1.

Lemma 18.

Let (G,T) be a graph and its nice treedepth decomposition with depth p. Applying Reduction Rule 1 exhaustively can be done in polynomial time, and in the resulting pair (G,T) the graph G has size upper bounded by (g(1,p)+1)p=2𝒪(p). Moreover, if (G,T) has a (t,2t)-oriented twin-width contraction sequence 𝒞, (G,T) does as well and we can construct the corresponding sequence 𝒞 from 𝒞 in time at most 2𝒪(p)|V(G)|𝒪(1).

Using Lemma 18 to guarantee the desired properties during the exhaustive application of Reduction Rule 1, we obtain the claimed tractability result for oriented twin-width:

Theorem 19.

2-approximating oriented twin-width is FPT parameterized by treedepth. Specifically, given a graph G on n vertices and treedepth p, there exist a computable function λ and an algorithm running in time λ(p)n𝒪(1) which outputs a contraction sequence for G of oriented width at most 2otww(G).

By combining Theorem 19 and Lemma 8, we obtain:

Theorem 20.

There is an algorithm which takes as input an n-vertex graph G of twin-width t and treedepth p, runs in time at most f(p)n𝒪(1) and outputs a contraction sequence of width at most q(t), for some computable functions q, f.

4.2 Proof of Lemma 17

The main idea to prove Lemma 17 is that we will integrate the deleted subgraph H into 𝒞 in a very local manner. The high-level ideas underlying this integration are inspired by those previously used for approximating twin-width via vertex integrity [2], but with significant distinctions caused by the difference in both the employed parameter (treedepth) and the computed measure (oriented twin-width).

Intuitively, we will first follow the sequence of contractions 𝒞 without interacting with H, until at some point we put 𝒞 on hold, identify a special twin-block HH, and insert H using H. Namely, we will do contractions within H to fit the current state of H, and then use a H-merge to identify vertices of H with vertices of H. After this insertion, we can continue with the contractions of 𝒞 for the rest of the contraction. The main difficulties of this subsection are to identify the point where we stop following 𝒞 to insert H, and prove the existence of a twin-block H such that the obtained sequence satisfies our requirements.

Let (G,T),(G,T) be the graph-decomposition pairs that occur, respectively, before and after applying Reduction Rule 1, and H the subgraph of G appearing in T which was deleted to obtain (G,T). Let 𝒞=(G0,G1,) be a contraction sequence for (G,T).

Definition 21.

For a given trigraph Gi in 𝒞, the extension Ext(Gi,H) is the trigraph obtained by applying the partitioning of vertices of V(G)V(H) following on V(G) the partitioning corresponding to Gi, and leaving all vertices in V(H) in bags as singletons. This intuitively corresponds to the trigraph obtained from G following the same contractions leading from G to Gi. We extend this notion to partial contraction sequences: Ext(𝒞,H)=(Ext(G0,H),Ext(G1,H),).

Observe that Ext(𝒞,H) and 𝒞 have the same length, and at the end of Ext(𝒞,H), all vertices of G are merged into one bag, but the vertices of H are still each in a separate bag.

Definition 22.

Let the pair (G,T) (resp. (G,T)) contain the graph and the associated decomposition before (resp. after) applying Reduction Rule 1, H be the subgraph of G appearing in T which was deleted to obtain (G,T), and Ext(𝒞,H)=(G=G0,G1,G2,) the extension of 𝒞 to G.

  • We say that a trigraph Gi in Ext(𝒞,H) is H-indifferent if there is no red arc from the bags containing vertices of G to the vertices of H.

  • We say that a trigraph Gi in Ext(𝒞,H) is H-safe if: there exist H,H′′ twin-blocks to H which are merged by 𝒞 in Gi – in particular, for each uV(H), there is a vertex vV(Gi) such that u,α(u)β(v).

Observation 23.

Ext(𝒞,H) contains H-indifferent trigraphs as well as trigraphs which are not H-indifferent. Moreover, the property is monotone: along Ext(𝒞,H) if a trigraph is H-indifferent then so is every trigraph preceding it in Ext(𝒞,H).

The next lemma guarantees an H-safe trigraph sufficiently early in Ext(𝒞,H).

Lemma 24.

Let the pair (G,T) (resp. (G,T)) contain the graph and the associated decomposition that occurs before (resp. after) applying Reduction Rule 1, H be the subgraph of G appearing in T which was deleted to obtain (G,T), and Ext(𝒞,H)=(G=G0,G1,G2,) the extension of 𝒞 to G. The first trigraph in Ext(𝒞,H) which is not H-indifferent is H-safe.

In fact, we need a slightly stronger result: for our purposes, it will be necessary to have a graph which is both H-indifferent and H-safe.

Lemma 25.

Let the pair (G,T) (resp. (G,T)) contain the graph and the associated decomposition before (resp. after) applying Reduction Rule 1, H the subgraph of G appearing in T which was deleted to obtain (G,T), and Ext(𝒞,H)=(G=G0,G1,G2,) the extension of 𝒞 to G.
The last H-indifferent trigraph G in Ext(𝒞,H) is H-safe.

The following lemma has a crucial role in controlling the approximation factor of the final algorithm.

Lemma 26.

Let the pair (G,T) (resp. (G,T)) contain the graph and the associated decomposition before (resp. after) applying Reduction Rule 1, H the subgraph of G appearing in T which was deleted to obtain (G,T), and Ext(𝒞,H)=(G=G0,G1,G2,) the extension of 𝒞 to G. The last H-indifferent trigraph G in Ext(𝒞,H) does correspond in 𝒞 to a trigraph Gi1 which is not in the internal part of any Xu-merge segment.

With this final intermediate step done, we proceed to the proof of Lemma 17.

Proof Sketch for Lemma 17.

We first construct Ext(𝒞,H)=(G=G0,G1,), i.e., the extension of 𝒞 to G. We moreover identify the index i of the first trigraph in Ext(𝒞,H) which is not H-indifferent. Let z be the seed vertex of H, i.e., H=Xz. By Definition 22 and Lemma 25, there are H,H′′ that are merged in Gi1. Towards computing these, we first test, for each pair of siblings a,b of z in T, whether Xa and Xb are twin-blocks (i.e., belong to the same equivalence class of ). If they are, we have a canonical isomorphism α:HH′′ witnessing the equivalence, and can then test whether each vertex v of H lies in the same bag as α(v) in Gi1. Once again, by Lemma 25 we are guaranteed that this test will eventually succeed.

Let 𝒞indifferent:=(𝒞)[0,i1]. Let 𝒞H be the restriction of 𝒞indifferent to H, i.e., 𝒞H=𝒞indifferent[H]. Using the canonical isomorphism α from H to H, we define 𝒞H as the result of applying α on each vertex (or bag) of each trigraph in 𝒞H. It is easy to observe that 𝒞H is a valid partial contraction of H. Let us now define 4 partial contraction sequences:

  • 𝒞AExt(𝒞indifferent,H),

  • 𝒞BExt(𝒞H,Gi1),

  • 𝒞C is an arbitrary H-merge of H into H starting from the last trigraph of 𝒞B,

  • 𝒞D(𝒞)i1 the end of the contraction sequence 𝒞.

We now combine these by appending them in order. To complete the proof, it remains to show that after removing duplicates, the resulting sequence of trigraphs 𝒞 is a (t,2t)-oriented twin-width contraction sequence of G.

5 An Exact Algorithm Based on Vertex Integrity

Let S be a vertex set satisfying that for each connected component H of GS, |V(H)S|𝗏𝗂(G), and recall that we may compute such a set S using known results (see Section 2). Let 𝒟S denote the set of connected components of GS; we drop the S when the set is clear from context. For the rest of the section, we assume to have computed and fixed a specific choice of S and that p=𝗏𝗂(G). Throughout the section, we assume that p2 since instances where p1 are trivial.

5.1 Setting Up the Framework

In this subsection, we adapt the preparatory steps for using the framework [19] to our setting. Our aim here is to define and compute a “reduced graph” whose size is bounded by a function of 𝗏𝗂(G) (Lemma 31). The main novel contributions then lie in Subsection 5.2, which shows that a contraction sequence of the reduced graph can be lifted to a contraction sequence of the original graph.

We first define a basic notion of equivalence between components and restate a known result about computing these.

Definition 27.

We say two graphs H0,H1𝒟 are twins, denoted H0H1, if there exists a canonical isomorphism α from H0 to H1 such that for each vertex uV(H0) and each vS, uvE(G) if and only if α(u)vE(G).

Fact 28 ([19]).

Each graph H𝒟 has at most p vertices, is an equivalence relation and the number of equivalence classes in [] is upper-bounded by p22p2. Moreover, a partition of connected components into [] can be computed in time at most 𝒪(p22p2n).

A crucial feature of the Ramsey Pruning technique is that it requires every connected component in 𝒟S to occur sufficiently many times. These components will then later be placed into groups, as we define below.

Definition 29.

Let k be a positive integer, an equivalence class [H] of is said to be k-large if |[H]|k. Further a vertex set LV(G) is called a k-large group if the induced subgraph G[L] is a disjoint union of exactly one graph from each k-large equivalence class of .

With this, we can proceed to a formalization of our reduced graphs. Intuitively, this is the graph obtained by first recursively adding all equivalence classes that are “too small” for our purposes into S, until we form a deletion set SS. Note that adding components to the deletion set in such a way does not impact the remaining components, nor the twin relation between them. After that, we place a parameter-bounded number of representatives of “large” equivalence classes into groups and delete all the remaining connected components in 𝒟SS. Towards formalizing this, we fix two computable functions: g(p)=2(p22p26+6)p upper-bounds the size of the deletion set after we expand it to contain all small equivalence classes, and f(p,x)=222222xp+1 specifies a safe bound for how large the groups need to be.

Definition 30.

An induced subgraph G of G is said to be a reduced graph of G if there exists a positive integer xg(p) and a partition of V(G)=SSY satisfying:

  1. 1.

    |SS|=x and S is the set of all vertices in graphs in 𝒟 that do not belong to an f(p,x)-large equivalence class of .

  2. 2.

    If there are no f(p,x)-large equivalence classes of , Y= and V(G)=SS=V(G). Otherwise, it holds that Y=L1Lf(p,x) where Li is an f(p,x)-large group for each i{1,,f(p,x)}, and each pair of Li and Lj, ij, is vertex-disjoint.

We now prove that a reduced graph can be computed efficiently by essentially following the intuitive description in the previous paragraph. One technical challenge that is treated in the proof is that when we increase the size of the set SS, we also increase the lower bound for our large equivalence classes.

Lemma 31.

There exists a reduced graph G of G, and given S and such a graph can be computed in polynomial time. Further, the number of vertices in G is upper-bounded by 2((p22p26+6)p+10).

The central lemma we will be proving in the next subsection is that every contraction sequence of a reduced graph G can be lifted to a contraction sequence of G with the same width. We formalize this statement below.

Lemma 32.

Let G be a reduced graph of G. Then tww(G)=tww(G). Moreover, given a partition of G into SSL1Lf(p,x) and a contraction sequence 𝒞 of G with width k, we can compute in time 𝒪((g(p)+pp22p2)!|G|2) a contraction sequence 𝒞 of G with width k.

Before proceeding towards the proof of Lemma 32 (which will be our aim in the next two subsections), we show that establishing the lemma would allow us to prove Main Result 2.

Theorem 33.

An optimal contraction sequence of an input graph G can be computed in time f(p)n, where p is the vertex integrity of G and f is a computable function.

5.2 Towards Lemma 32: The Ramsey Machinery

Recalling Lemma 32, let us consider a reduced graph G of the input graph G such that V(G)V(G) (as otherwise the lemma is trivial). Hence, let V(G)=SSL1Lf(p,|SS|) be a partition witnessing that G is a reduced graph. Let {L1,,Lf(p,|SS|)}. For brevity, we will hereinafter use large as shorthand for f(p,|SS|)-large. Note that each of the vertex sets Li, i[f(p,|SS|] forms a large group.

For identification and tie-breaking purposes, it will be useful to fix an arbitrary total order <# over V(G). Among others, this immediately yields a total order of the equivalence classes [] of and a total order of the large groups in L1Lf(p,|SS|) (both can be defined, e.g., by the order in which each vertex set is seen when following <#, however the specific way we induce these total orders does not matter, only their existence). It will also be useful to introduce a notion of “canonical representative” for each of the large equivalence classes in []; intuitively, one could imagine that these canonical representatives all occur in the same large group, but this is neither important nor necessary.

Definition 34.

Let k be the number of large equivalence classes in and let Ri be an arbitrarily chosen but fixed canonical representative of the ith large equivalence class of . Let R:=V(R1)V(Rk).

The set R above will essentially be used as a sort of blank “canvas” for our future statements. In particular, its sole purpose is to have a natural isomorphism to R that allows us to map consistently between different large groups and identify vertices between groups:

Definition 35.

For a large group X with G[X]=H1Hk, Hi[Ri] for each i[k], let αX be an isomorphism from G[X] to G[R]=R1Rk such that for each i[k] and vertex uHi, αX(u)V(Ri), and for each vS, uvE(G) if and only if αX(u)vE(G).

For any large group A and for each uR we will sometimes use uA as shorthand for αA1(u). From now, say LLL, in . The role of these will be to serve as an extended “canvas” for comparing triples of large groups.

Definition 36.

For XYZ{L,L,L}, we define ϕX,Y,Z:SSXYZSSLLL as follows:

  • ϕX,Y,Z(s)=s for each sSS

  • ϕX,Y,Z(x)=αL1(αX(x)) for each xX

  • ϕX,Y,Z(y)=αL1(αY(y)) for each yY

  • ϕX,Y,Z(z)=αL1(αZ(z)) for each zZ

Note that ϕX,Y,Z is an isomorphism from G[SSXYZ] to G[SSLLL′′].

Now, let us consider an arbitrary hypothetical “solution” to our problem on G – that is, a contraction sequence 𝒞 of G with minimum width. Given such 𝒞, we can characterize the behavior of a triple of large groups via a signature of size that is bounded solely by our parameter. We formalize this below (for a choice of 𝒞):

Definition 37.

For XYZ{L,L,L}, info𝒞(X,Y,Z) is the contraction sequence on G[SSL,L,L] obtained from 𝒞[SSXYZ] by applying ϕX,Y,Z on every vertex in every trigraph in 𝒞[SSXYZ].

Essentially, info𝒞(X,Y,Z) is 𝒞[SSXYZ] but translated into the shared canvas of G[SSXYZ] – as a consequence, for two distinct triples X,Y,Z and X,Y,Z of large groups it may happen that info𝒞(X,Y,Z)=info𝒞(X,Y,Z). The above considerations mean that for any set of three large groups, we can apply to obtain an ordering XYZ and then view info𝒞(X,Y,Z) as a color from a set of a parameter-bounded number of colors. We can then invoke Fact 1 to show that the reduced graph contains a subset of 3p+3 “uniformly behaved” large groups w.r.t. 𝒞, regardless of what 𝒞 is.

Lemma 38.

Let G be a reduced graph of G and 𝒞 be an arbitrary contraction sequence of G of width w. There exist distinct large groups H1,,H3p+3{L,L,L} such that for each 1a<b<c3p+3 and each 1a<b<c3p+3, info𝒞(Ha,Hb,Hc)=info𝒞(Ha,Hb,Hc).

We call a set of 3p+3 large groups satisfying the conditions of Lemma 38 uniform (w.r.t. 𝒞). Below, we show that while Lemma 38 only stipulates that a uniform set satisfies a ternary form of uniformity, this in fact implies also uniformity of pairs and singletons from the set. Many of our arguments in the next subsection in fact only rely on these simpler forms of uniformity. Towards formalizing these, we define info𝒞(X,Y) and info𝒞(X) analogously as info𝒞(X,Y,Z) but where the vertices are only mapped to L,L and L, respectively.

Lemma 39.

Let H1,,H3p+3 be a uniform set of large groups. Then for each 1i<j3p+3 and each 1k<3p+3, info𝒞(Hi,Hj)=info𝒞(Hk,H) and info𝒞(Hi)=info𝒞(H).

5.3 The Proof of Lemma 32

Let {L,L,L} be the family of distinct large groups whose existence is given by Lemma 38 with (B1,,Bω), where BiBj if i<j. Let 𝒞 be the restriction of 𝒞 to V(iBiSS).

Definition 40.

We say that a contraction c in 𝒞 is:

  • unique if it contracts bags intersecting SS together; otherwise,

  • special if it contracts a bag intersecting a given Bi with a bag intersecting SS; otherwise

  • vertical if it contracts two bags intersecting a given Bi; otherwise

  • horizontal if it contracts a bag x with a bag y such that v0β(x) and w0β(y) such that α(v0)=w0; and

  • diagonal if none of the above cases apply.

Intuitively, unique contractions will form a small number of “milestones” in our considered contraction sequence, special contractions merge vertices from large groups with SS, vertical contractions merge vertices from the same large group and horizontal contractions merge corresponding vertices across large groups. We now prove several useful properties of such contractions, including the fact that diagonal contractions can be disregarded; however, before that it will be useful to introduce some additional terminology.

Definition 41.

We say that a contraction c of the bags b1 and b2 contracts a pair (x,y) if xβ(b1) and yβ(b2).

For any uV(R), xSS and i,j[ω], we say that (x,uBi) and (x,uBj) are corresponding pairs. For any (not necessarily distinct) u,vV(R) and i<k,j<[ω], we say that (uBi,vBk) and (uBj,vB) are corresponding pairs.

The proofs of the next three lemmas rely heavily on the Ramsey machinery of Subsection 5.2. In particular, the reason one needs to consider the Ramsey hypergraph theory is to obtain Lemma 44.

Lemma 42.

Let c be any non-unique contraction and (x,y) be a pair contracted by c. A pair (x,y) corresponding to (x,y) and intersecting B1 or Bω is either contracted by c or had already been contracted by an earlier contraction in the sequence.

To provide intuition for Lemma 42, we present the corresponding pairs in each case:

  • for (x,y)=(xBi,sSS): (x,y){(xB1,s),(xBω,s)},

  • for (x,y)=(xBi,yBj) where i<j: (x,y){(xB1,yB)1<ω,(xBk,yBω)1k<ω}, and

  • for (x,y)=(xBi,yBi): (x,y){(xB1,yB1),(xBω,yBω)}.

Lemma 43.

For ij, let c contract the pair (xBi,yBj) – possibly x=y. One of the pairs (x1,y2) and (xω1,yω) is either contracted by c or had already been contracted.

Lemma 44.

No diagonal contraction can be present in 𝒞.

The next definition allows us to identify certain milestones that in turn leads to the crucial notion of blocks of 𝒞.

Definition 45.

We say that two pairs (A,BA) and (C,DC) of large groups are synchronized at a trigraph Gs in 𝒞 if the trigraphs induced on V(SSAB) and V(SSCD) are identical up to renaming via α.

Let H1,,H3p+3 be a uniform set of large groups w.r.t. the contraction sequence 𝒞. We say that a segment of 𝒞 is a block if it is a minimal segment of size at least 2 – i.e., one that contains at least one contraction – such that in its first and last trigraphs, the following holds: Every two pairs (Hi,Hj), (Hk,H) for i,j,k,[3p+3], ij, k are synchronized.

For brevity, we say that two large groups AC are synchronized at a trigraph Gs in 𝒞 if the trigraphs induced on V(SSA) and V(SSC) are identical up to renaming via α. We note that this notion of synchronization also occurs at the beginning and end of blocks as it is directly implied by the synchronization of pairs.

It is easy to see that, by definition, all pairs are synchronized on G and K1, thus 𝒞 contains at least one block. Moreover, blocks form a “near-partitioning’ of 𝒞 where each pair of blocks can only intersect in its first or last trigraph.

We then proceed to prove increasingly restrictive structural properties on the blocks of 𝒞, until we reach the following key lemma:

Lemma 46.

A block containing no unique contraction is of the form:
Cσ(1),Cσ(1),σ(2),Cσ(2),Cσ(2),σ(3),,,Cσ(ω1),Cσ(ω1),σ(ω),Cσ(ω) where each Cσ(i) contains only vertical and special contractions of Bσ(i), Ci and Cj are equivalent w.r.t. α, Cσ(i),σ(i+1) contains exclusively horizontal contractions between Bσ(i) and Bσ(i+1), Ci,i+1 and Cj,j+1 are equivalent w.r.t. α, and σ is either the identity or ω+1 minus the identity (reversing the order defined by ).

The next lemma is crucial: it allows us to lift “well-behaved” contraction sequences towards G (or a supergraph thereof).

Lemma 47.

Given k, 𝒞 a contraction sequence of width t for G with uniformity, and Gsuper the graph obtained from G by adding k large groups. We can construct in linear time a contraction sequence 𝒞super of width t for Gsuper.

We can now prove Lemma 32, which was the last missing piece required for Theorem 33.

Proof of Lemma 32.

Let G be a reduced graph of G, a partition SSL1Lf(p,x) of its vertices. Using Lemma 38, we know that for any hypothetical solution of width k for G, there exists a uniform set of large groups of size 3p+3. Thus, we can define Gcore as the subgraph of G (and of G) containing only S, S and an arbitrary set of 3p+3 large groups, and brute-force a contraction sequence 𝒞core of width k for Gcore, such that the group of large groups in Gcore is uniform for 𝒞core. This brute-force computation takes time at most 𝒪((g(p)+pp22p2)!). Let us set m the maximum size of a equivalence class in G. We define Gsuper the supergraph of G such that all equivalence classes of which are not in S are of size m. We use Lemma 47 to create a contraction sequence 𝒞super for Gsuper, since it can be obtained from Gcore by adding mk large groups, and 𝒞core has the structure argued in Lemma 46. This takes at most linear time in |𝒞super| which is 𝒪(|G|2), and we can in the same amount of time take a restriction of 𝒞super to G, obtaining the sought-after contraction sequence of width k for G.

References

  • [1] Jakub Balabán, Robert Ganian, and Mathis Rocton. Computing twin-width parameterized by the feedback edge number. In Olaf Beyersdorff, Mamadou Moustapha Kanté, Orna Kupferman, and Daniel Lokshtanov, editors, 41st International Symposium on Theoretical Aspects of Computer Science, STACS 2024, March 12-14, 2024, Clermont-Ferrand, France, volume 289 of LIPIcs, pages 7:1–7:19. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2024. doi:10.4230/LIPIcs.STACS.2024.7.
  • [2] Jakub Balabán, Robert Ganian, and Mathis Rocton. Twin-width meets feedback edges and vertex integrity. In Édouard Bonnet and Pawel Rzazewski, editors, 19th International Symposium on Parameterized and Exact Computation, IPEC 2024, September 4-6, 2024, Royal Holloway, University of London, Egham, United Kingdom, volume 321 of LIPIcs, pages 3:1–3:22. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2024. doi:10.4230/LIPIcs.IPEC.2024.3.
  • [3] Jakub Balabán and Petr Hlinený. Twin-width is linear in the poset width. In Petr A. Golovach and Meirav Zehavi, editors, 16th International Symposium on Parameterized and Exact Computation, IPEC 2021, September 8-10, 2021, Lisbon, Portugal, volume 214 of LIPIcs, pages 6:1–6:13. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2021. doi:10.4230/LIPIcs.IPEC.2021.6.
  • [4] Jakub Balabán, Petr Hlinený, and Jan Jedelský. Twin-width and transductions of proper k-mixed-thin graphs. In Michael A. Bekos and Michael Kaufmann, editors, Graph-Theoretic Concepts in Computer Science - 48th International Workshop, WG 2022, Tübingen, Germany, June 22-24, 2022, Revised Selected Papers, volume 13453 of Lecture Notes in Computer Science, pages 43–55. Springer, 2022. doi:10.1007/978-3-031-15914-5_4.
  • [5] Michael J. Bannister, Sergio Cabello, and David Eppstein. Parameterized complexity of 1-planarity. J. Graph Algorithms Appl., 22(1):23–49, 2018. doi:10.7155/jgaa.00457.
  • [6] Pierre Bergé, Édouard Bonnet, and Hugues Déprés. Deciding twin-width at most 4 is np-complete. In Mikolaj Bojanczyk, Emanuela Merelli, and David P. Woodruff, editors, 49th International Colloquium on Automata, Languages, and Programming, ICALP 2022, July 4-8, 2022, Paris, France, volume 229 of LIPIcs, pages 18:1–18:20. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2022. doi:10.4230/LIPIcs.ICALP.2022.18.
  • [7] Benjamin Bergougnoux, Eduard Eiben, Robert Ganian, Sebastian Ordyniak, and M. S. Ramanujan. Towards a polynomial kernel for directed feedback vertex set. Algorithmica, 83(5):1201–1221, 2021. doi:10.1007/s00453-020-00777-5.
  • [8] Sujoy Bhore, Robert Ganian, Fabrizio Montecchiani, and Martin Nöllenburg. Parameterized algorithms for queue layouts. J. Graph Algorithms Appl., 26(3):335–352, 2022. doi:10.7155/JGAA.00597.
  • [9] Hans L. Bodlaender, Bart M. P. Jansen, and Stefan Kratsch. Preprocessing for treewidth: A combinatorial analysis through kernelization. SIAM J. Discret. Math., 27(4):2108–2142, 2013. doi:10.1137/120903518.
  • [10] Édouard Bonnet, Colin Geniet, Eun Jung Kim, Stéphan Thomassé, and Rémi Watrigant. Twin-width II: small classes. In Dániel Marx, editor, Proceedings of the 2021 ACM-SIAM Symposium on Discrete Algorithms, SODA 2021, Virtual Conference, January 10 - 13, 2021, pages 1977–1996. SIAM, 2021. doi:10.1137/1.9781611976465.118.
  • [11] Édouard Bonnet, Colin Geniet, Eun Jung Kim, Stéphan Thomassé, and Rémi Watrigant. Twin-width III: max independent set, min dominating set, and coloring. In Nikhil Bansal, Emanuela Merelli, and James Worrell, editors, 48th International Colloquium on Automata, Languages, and Programming, ICALP 2021, July 12-16, 2021, Glasgow, Scotland (Virtual Conference), volume 198 of LIPIcs, pages 35:1–35:20. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2021. doi:10.4230/LIPIcs.ICALP.2021.35.
  • [12] Édouard Bonnet, Ugo Giocanti, Patrice Ossona de Mendez, Pierre Simon, Stéphan Thomassé, and Szymon Torunczyk. Twin-width IV: ordered graphs and matrices. In Stefano Leonardi and Anupam Gupta, editors, STOC ’22: 54th Annual ACM SIGACT Symposium on Theory of Computing, Rome, Italy, June 20 - 24, 2022, pages 924–937. ACM, 2022. doi:10.1145/3519935.3520037.
  • [13] Édouard Bonnet, Ugo Giocanti, Patrice Ossona de Mendez, Pierre Simon, Stéphan Thomassé, and Szymon Torunczyk. Twin-width IV: ordered graphs and matrices. J. ACM, 71(3):21, 2024. doi:10.1145/3651151.
  • [14] Édouard Bonnet, Ugo Giocanti, Patrice Ossona de Mendez, and Stéphan Thomassé. Twin-width V: linear minors, modular counting, and matrix multiplication. In Petra Berenbrink, Patricia Bouyer, Anuj Dawar, and Mamadou Moustapha Kanté, editors, 40th International Symposium on Theoretical Aspects of Computer Science, STACS 2023, March 7-9, 2023, Hamburg, Germany, volume 254 of LIPIcs, pages 15:1–15:16. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2023. doi:10.4230/LIPIcs.STACS.2023.15.
  • [15] Édouard Bonnet, Eun Jung Kim, Amadeus Reinald, and Stéphan Thomassé. Twin-width VI: the lens of contraction sequences. In Joseph (Seffi) Naor and Niv Buchbinder, editors, Proceedings of the 2022 ACM-SIAM Symposium on Discrete Algorithms, SODA 2022, Virtual Conference / Alexandria, VA, USA, January 9 - 12, 2022, pages 1036–1056. SIAM, 2022. doi:10.1137/1.9781611977073.45.
  • [16] Édouard Bonnet, Eun Jung Kim, Stéphan Thomassé, and Rémi Watrigant. Twin-width I: tractable FO model checking. J. ACM, 69(1):3:1–3:46, 2022. doi:10.1145/3486655.
  • [17] Domagoj Bradač, Jacob Fox, and Benny Sudakov. The growth rate of multicolor ramsey numbers of 3-graphs. Research in the Mathematical Sciences, 11(3):52, 2024.
  • [18] Marek Cygan, Fedor V. Fomin, Lukasz Kowalik, Daniel Lokshtanov, Dániel Marx, Marcin Pilipczuk, Michal Pilipczuk, and Saket Saurabh. Parameterized Algorithms. Springer, 2015. doi:10.1007/978-3-319-21275-3.
  • [19] Thomas Depian, Simon D. Fink, Robert Ganian, and Vaishali Surianarayanan. Linear layouts revisited: Stacks, queues, and exact algorithms. In 33rd Annual European Symposium on Algorithms (ESA 2025), LIPIcs. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2025. doi:10.4230/LIPIcs.ESA.2025.15.
  • [20] Reinhard Diestel. Graph Theory, 4th Edition, volume 173 of Graduate texts in mathematics. Springer, 2012.
  • [21] Rodney G. Downey and Michael R. Fellows. Fundamentals of Parameterized Complexity. Texts in Computer Science. Springer, 2013. doi:10.1007/978-1-4471-5559-1.
  • [22] Pål Grønås Drange, Markus S. Dregi, and Pim van ’t Hof. On the computational complexity of vertex integrity and component order connectivity. Algorithmica, 76(4):1181–1202, 2016. doi:10.1007/S00453-016-0127-X.
  • [23] Pavel Dvorák, Eduard Eiben, Robert Ganian, Dusan Knop, and Sebastian Ordyniak. The complexity landscape of decompositional parameters for ILP: programs with few global variables and constraints. Artif. Intell., 300:103561, 2021. doi:10.1016/J.ARTINT.2021.103561.
  • [24] Eduard Eiben, Robert Ganian, Thekla Hamm, Lars Jaffke, and O-joung Kwon. A unifying framework for characterizing and computing width measures. In Mark Braverman, editor, 13th Innovations in Theoretical Computer Science Conference, ITCS 2022, January 31 - February 3, 2022, Berkeley, CA, USA, volume 215 of LIPIcs, pages 63:1–63:23. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2022. doi:10.4230/LIPIcs.ITCS.2022.63.
  • [25] David Eppstein. The widths of strict outerconfluent graphs. CoRR, abs/2308.03967, 2023. arXiv:2308.03967.
  • [26] Paul Erdos and Richard Rado. Combinatorial theorems on classifications of subsets of a given set. Proceedings of the London mathematical Society, 3(1):417–439, 1952.
  • [27] Johannes Klaus Fichte, Robert Ganian, Markus Hecher, Friedrich Slivovsky, and Sebastian Ordyniak. Structure-aware lower bounds and broadening the horizon of tractability for QBF. In LICS, pages 1–14, 2023. doi:10.1109/LICS56636.2023.10175675.
  • [28] Robert Ganian, Fabian Klute, and Sebastian Ordyniak. On structural parameterizations of the bounded-degree vertex deletion problem. Algorithmica, 83(1):297–336, 2021. doi:10.1007/S00453-020-00758-8.
  • [29] Robert Ganian and Sebastian Ordyniak. The complexity landscape of decompositional parameters for ILP. Artif. Intell., 257:61–71, 2018. doi:10.1016/J.ARTINT.2017.12.006.
  • [30] Tatsuya Gima, Tesshu Hanaka, Masashi Kiyomi, Yasuaki Kobayashi, and Yota Otachi. Exploring the gap between treedepth and vertex cover through vertex integrity. Theor. Comput. Sci., 918:60–76, 2022. doi:10.1016/J.TCS.2022.03.021.
  • [31] Tatsuya Gima and Yota Otachi. Extended MSO model checking via small vertex integrity. Algorithmica, 86(1):147–170, 2024. doi:10.1007/S00453-023-01161-9.
  • [32] Yasuaki Kobayashi and Hisao Tamaki. Treedepth parameterized by vertex cover number. In Jiong Guo and Danny Hermelin, editors, 11th International Symposium on Parameterized and Exact Computation, IPEC 2016, August 24-26, 2016, Aarhus, Denmark, volume 63 of LIPIcs, pages 18:1–18:11. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2016. doi:10.4230/LIPIcs.IPEC.2016.18.
  • [33] Michael Lampis and Valia Mitsou. Fine-grained meta-theorems for vertex integrity. In Hee-Kap Ahn and Kunihiko Sadakane, editors, 32nd International Symposium on Algorithms and Computation, ISAAC 2021, December 6-8, 2021, Fukuoka, Japan, volume 212 of LIPIcs, pages 34:1–34:15. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2021. doi:10.4230/LIPIcs.ISAAC.2021.34.
  • [34] Wojciech Nadara, Michal Pilipczuk, and Marcin Smulewicz. Computing treedepth in polynomial space and linear FPT time. In Shiri Chechik, Gonzalo Navarro, Eva Rotenberg, and Grzegorz Herman, editors, 30th Annual European Symposium on Algorithms, ESA 2022, September 5-9, 2022, Berlin/Potsdam, Germany, volume 244 of LIPIcs, pages 79:1–79:14. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2022. doi:10.4230/LIPIcs.ESA.2022.79.
  • [35] Jaroslav Nesetril and Patrice Ossona de Mendez. Sparsity - Graphs, Structures, and Algorithms, volume 28 of Algorithms and combinatorics. Springer, 2012. doi:10.1007/978-3-642-27875-4.
  • [36] Sang-il Oum. Rank-width and vertex-minors. J. Comb. Theory, Ser. B, 95(1):79–100, 2005. doi:10.1016/j.jctb.2005.03.003.
  • [37] Sang-il Oum and Paul D. Seymour. Approximating clique-width and branch-width. J. Comb. Theory B, 96(4):514–528, 2006. doi:10.1016/J.JCTB.2005.10.006.
  • [38] Felix Reidl, Peter Rossmanith, Fernando Sánchez Villaamil, and Somnath Sikdar. A faster parameterized algorithm for treedepth. In Javier Esparza, Pierre Fraigniaud, Thore Husfeldt, and Elias Koutsoupias, editors, Automata, Languages, and Programming - 41st International Colloquium, ICALP 2014, Copenhagen, Denmark, July 8-11, 2014, Proceedings, Part I, volume 8572 of Lecture Notes in Computer Science, pages 931–942. Springer, 2014. doi:10.1007/978-3-662-43948-7_77.
  • [39] Neil Robertson and Paul D. Seymour. Graph minors. i. excluding a forest. J. Comb. Theory B, 35(1):39–61, 1983. doi:10.1016/0095-8956(83)90079-5.
  • [40] Martijn van Ee. Some notes on bounded starwidth graphs. Inf. Process. Lett., 125:9–14, 2017. doi:10.1016/J.IPL.2017.04.011.