Cutwidth: Obstructions and Algorithmic Aspects
 157 Downloads
Abstract
Cutwidth is one of the classic layout parameters for graphs. It measures how well one can order the vertices of a graph in a linear manner, so that the maximum number of edges between any prefix and its complement suffix is minimized. As graphs of cutwidth at most k are closed under taking immersions, the results of Robertson and Seymour imply that there is a finite list of minimal immersion obstructions for admitting a cut layout of width at most k. We prove that every minimal immersion obstruction for cutwidth at most k has size at most \(2^{{O}(k^3\log k)}\). As an interesting algorithmic byproduct, we design a new fixedparameter algorithm for computing the cutwidth of a graph that runs in time \(2^{{O}(k^2\log k)}\cdot n\), where k is the optimum width and n is the number of vertices. While being slower by a \(\log k\)factor in the exponent than the fastest known algorithm, given by Thilikos et al. (J Algorithms 56(1):1–24, 2005; J Algorithms 56(1):25–49, 2005), our algorithm has the advantage of being simpler and selfcontained; arguably, it explains better the combinatorics of optimumwidth layouts.
Keywords
Cutwidth Obstructions Immersions Fixedparameter tractability1 Introduction
The cutwidth of a graph is defined as the minimum possible width of a linear ordering of its vertices, where the width of an ordering \(\sigma \) is the maximum, among all the prefixes of \(\sigma \), of the number of edges that have exactly one vertex in a prefix. Due to its natural definition, cutwidth has various applications in a range of practical fields of computer science: whenever data is expected to be roughly linearly ordered and dependencies or connections are local, one can expect the cutwidth of the corresponding graph to be small. These applications include circuit design, graph drawing, bioinformatics, and text information retrieval; we refer to the survey of layout parameters of Díaz et al. [7] for a broader discussion.
As finding a layout of optimum width is NPhard [10], the algorithmic and combinatorial aspects of cutwidth were intensively studied. There is a broad range of polynomialtime algorithms for special graph classes [14, 15, 27], approximation algorithms [19], and fixedparameter algorithms [23, 24]. In particular, Thilikos et al. [23, 24] proposed a fixedparameter algorithm for computing the cutwidth of a graph that runs^{1} in time \(2^{{O}(k^2)}\cdot n\), where k is the optimum width and n is the number of vertices. Their approach is to first compute the pathwidth of the input graph, which is never larger than the cutwidth. Then, the optimum layout can be constructed by an elaborate dynamic programming procedure on the obtained path decomposition. To upper bound the number of relevant states, the authors had to understand how an optimum layout can look in a given path decomposition. For this, they borrow the technique of typical sequences of Bodlaender and Kloks [3], which was introduced for a similar reason, but for pathwidth and treewidth instead of cutwidth.
Since the class of graphs of cutwidth at most k is closed under immersions, and the immersion order is a wellquasi ordering of graphs^{2} [20], it follows that for each k there exists a finite obstruction set \(\mathcal {L}_k\) of graphs such that a graph has cutwidth at most k if and only if it does not admit any graph from \(\mathcal {L}_k\) as an immersion. However, this existential result does not give any hint on how to generate, or at least estimate the sizes of the obstructions. The sizes of obstructions are important for efficient treatment of graphs of small cutwidth; this applies also in practice, as indicated by Booth et al. [4] in the context of VLSI design.
The estimation of sizes of minimal obstructions for graph parameters like pathwidth, treewidth, or cutwidth, has been studied before. For minorclosed parameters pathwidth and treewidth, Lagergren [18] showed that any minimal minor obstruction to admitting a path decomposition of width k has size at most singleexponential in \({O}(k^4)\), whereas for tree decompositions he showed an upper bound doubleexponential in \({O}(k^5)\) . Less is known about immersionclosed parameters, such as cutwidth. Govindan and Ramachandramurthi [13] showed that the number of minimal immersion obstructions for the class of graphs of cutwidth at most k is at least \(3^{k7}+1\), and their construction actually exemplify minimal obstructions for cutwidth at most k with \({(3^{k5}1)}/{2}\) vertices. To the best of our knowledge, nothing was known about upper bounds for the cutwidth case.
1.1 Results on Obstructions
Our main result concerns the sizes of obstructions for cutwidth.
Theorem 1
Suppose a graph G has cutwidth larger than k, but every graph with fewer vertices or edges (strongly) immersed in G has cutwidth at most k. Then G has at most \(2^{{O}(k^3\log k)}\) vertices and edges.
The above result immediately gives the same upper bound on the sizes of graphs from the minimal obstruction sets \(\mathcal {L}_k\) as they satisfy the prerequisites of Theorem 1. This somewhat matches the \(({3^{k5}1})/{2}\) lower bound of Govindan and Ramachandramurthi [13].
Our approach for Theorem 1 follows the technique used by Lagergren [18] to prove that minimal minor obstructions for pathwidth at most k have sizes singleexponential in \({O}(k^4)\). Intuitively, the idea of Lagergren is to take an optimum decomposition for a minimal obstruction, which must have width \(k+1\), and to assign to each prefix of the decomposition one of finitely many “types”, so that two prefixes with the same type “behave” in the same manner. If there were two prefixes, one being shorter than the other, with the same type, then one could replace one with the other, thus obtaining a smaller obstruction. Hence, the upper bound on the number of types, being doubleexponential in \({O}(k^4)\), gives some upper bound on the size of a minimal obstruction. This upper bound can be further improved to singleexponential by observing that types are ordered by a natural domination relation, and the shorter a prefix is, the weaker is its type. An important detail is that one needs to make sure that the replacement can be modeled by minor operations. For this, Lagergren uses the notion of linked path decompositions (a weaker variant of lean path decompositions; cf. [1, 25]).
To prove Theorem 1, we perform a similar analysis of prefixes of an optimum ordering of a minimal obstruction. We show that prefixes can be categorized into a bounded number of types, each comprising prefixes that have the same “behavior”. Provided two prefixes with equally strong type appear one after the other, we can “unpump” the part of the graph in their difference.
To make sure that unpumping is modeled by taking an immersion, we define linked orderings for cutwidth and reprove the analogue of the result of Thomas [25] (see [1] for simplified proofs): there is always an optimumwidth ordering that is linked. We remark this already follows from more general results on submodular functions: the same is true for parameters like linear rankwidth, as observed by Kanté and Kwon [16], which in turns follows from the proof of an analogous theorem of Geelen et al. [11] that applies to branchdecompositions, and thus, e.g., to parameters known as branchwidth and carvingwidth. Linked cutwidth orderings have been used before by Chudnovsky and Seymour [6] to show that tournaments are wellquasiordered by immersions.
The proof of the upper bound on the number of types essentially boils down to the following setting. We are given a graph G and a subset X of vertices, such that at most \(\ell \) edges have exactly one endpoint in X. The question is how X can look like in an optimumwidth ordering of G. We prove that there is always an ordering where X is split into at most \({O}(k\ell )\) blocks, where k is the optimum width. This allows us to store the relevant information on the whole X in one of a constant number of types (called bucket interfaces). The swapping argument used in this proof holds the essence of the typical sequences technique of Bodlaender and Kloks [3], while being, in our opinion, more natural and easier to understand.
As an interesting byproduct, we can also use our understanding to treat the problem of removing edges to get a graph of small cutwidth. More precisely, for parameters w, k, we consider the class of all graphs G, such that w edges can be removed from G to obtain a graph of cutwidth at most k. We prove that for every constant k, the minimal (strong) immersion obstructions for this class have sizes bounded linearly in w. Moreover we give an exponential lower bound to the number of these obstructions. These results are presented in Sect. 6.
1.2 Algorithmic Results
Consider the following “compression” problem: given a graph G and its ordering \(\sigma \) of width \(\ell \), we would like to construct, if possible, a new ordering of the vertices of G of width at most k, where \(k<\ell \). Then the types defined above essentially match states that would be associated with prefixes of \(\sigma \) in a dynamic programming algorithm solving this problem. Alternatively, one can think of building an automaton that traverses the ordering \(\sigma \) of width \(\ell \) while constructing an ordering of G of width at most k. Hence, our upper bound on the number of types can be directly used to limit the state space in such a dynamic programming procedure/automaton, yielding an FPT algorithm for the above problem.
With this result in hand, it is not hard to design of an exact FPT algorithm for cutwidth. One could introduce vertices one by one to the graph, while maintaining an ordering of optimum width. Each time a new vertex is introduced, we put it anywhere into the ordering, and it can be argued that the new ordering has width at most three times larger than the optimum. Then, the dynamic programming algorithm sketched above can be used to “compress” this approximate ordering to an optimum one in linear FPT time.
The above approach yields a quadratic algorithm. To match the optimum, linear running time, we use a similar trick as Bodlaender in his lineartime algorithm for computing the treewidth of the graph [2]. Namely, we show that instead of processing vertices one by one, we can proceed recursively by removing a significant fraction of all the edges at each step, so that their reintroduction increases the width at most twice. We then run the compression algorithm on the obtained 2approximate ordering to get an optimum one. The main point is that, since we remove a large portion of the graph at each step, the recursive equation on the running time solves to a linear function, instead of quadratic. This gives the following.
Theorem 2
There exists an algorithm that, given an nvertex graph G and an integer k, runs in time \(2^{{O}(k^2\log k)}\cdot n\) and either correctly concludes that the cutwidth of G is larger than k, or outputs an ordering of G of width at most k.
The algorithm of Theorem 2 has running time slightly larger than that of Thilikos et al. [23, 24]. The difference is the \(\log k\) factor in the exponent, the reason for which is that we use a simpler bucketing approach to bound the number of states, instead of the more entangled, but finer, machinery of typical sequences. We believe the main strength of our approach lies in its explanatory character. Instead of relying on algorithms for computing tree or path decompositions, which are already difficult by themselves, and then designing a dynamic programming algorithm on a path decomposition, we directly approach cutwidth “via cutwidth”, and not “via pathwidth”. That is, the dynamic programming procedure for computing the optimum cutwidth ordering on an approximate cutwidth ordering is technically far simpler and conceptually more insightful than performing the same on a general path decomposition. We also show that the “reductionbyalargefraction” trick of Bodlaender [2] can be performed also in the cutwidth setting, yielding a selfcontained, natural, and understandable algorithm.
2 Preliminaries
We denote the set of nonnegative integers by \(\mathbb {N}\) and the set of positive integers by \(\mathbb {N}^+\). For \(r,s\in \mathbb {N}\) with \(r\le s\), we denote \([r]=\{1,\ldots ,r\}\) and \([r,s]=\{r,\ldots ,s\}\). Notice that \([0]=\emptyset \).
Graphs All graphs considered in this paper are undirected, without loops, and may have multiple edges. The vertex and edge sets of a graph G are denoted by V(G) and E(G), respectively. For disjoint \(X,Y\subseteq V(G)\), by \(E_G(X,Y)\) we denote the set of edges of G with one endpoint in X and one in Y. If \(S\subseteq V(G)\), then we denote \(\delta _{G}(S)=E_G(S,V(G)\setminus S)\). We drop the subscript if it is clear from the context. Every partition (A, B) of V(G) is called a cut of G; the size of the cut (A, B) is \(\delta (A)\).
Cutwidth Let G be a graph and \(\sigma \) be an ordering of V(G). For \(u,v\in V(G)\), we write \(u<_{\sigma } v\) if u appears before v in \(\sigma \). Given two disjoint sequences \(\sigma _{1}=\langle x_1,\ldots ,x_{r_{1}}\rangle \) and \(\sigma _{2}=\langle y_1,\ldots ,y_{r_{2}}\rangle \) of vertices in V(G), we define their concatenation as \(\sigma _1\circ \sigma _{2}=\langle x_1,\ldots ,x_{r_{1}},y_1,\ldots ,y_{r_{2}}\rangle \). For \(X\subseteq V(G)\), let \(\sigma _X\) be the ordering of X induced by \(\sigma \), i.e., the ordering obtained from \(\sigma \) if we remove the vertices that do not belong in X. For a vertex v we denote by \(V_{v}^{\sigma }\) the set \(\{u\in V(G) \mid u \le _{\sigma } v\}\). A \(\sigma \)cut is any cut of the form \((V^\sigma _v,V(G) \setminus V^\sigma _v)\) for \(v\in V(G)\). The cutwidth of an ordering \(\sigma \) of G is defined as \(\mathbf {cw} _{\sigma }(G) = \max _{v \in V(G)} \delta (V^{\sigma }_{v})\). The cutwidth of G, \(\mathbf {cw} (G)\), is the minimum of \(\mathbf {cw} _{\sigma }(G)\) over all possible orderings of V(G).
 O1:

\(G\not \in \mathcal{G}\), i.e., G is not a member of \(\mathcal{G}\), and
 O2:

for each \(G'\) with \(G'\lneqq G\), we have that \(G'\in \mathcal{G}\).
We say that a set of graphs \(\mathcal{H}\) is a \(\le \)antichain if it does not contain any pair of comparable elements wrt. \(\le \). By definition, for any class \(\mathcal{G}\) closed under \(\le \), the set \(\mathbf{obs}_{\le }(\mathcal{G})\) is an antichain.
Immersions Let H and G be graphs. We say that G contains H as an immersion if there is a pair of functions \((\phi , \psi )\), called an Himmersion model of G, such that \(\phi \) is an injection from V(H) to V(G) and \(\psi \) maps every edge uv of H to a path of G between \(\phi (u)\) and \(\phi (v)\) so that different edges are mapped to edgedisjoint paths. Every vertex in the image of \(\phi \) is called a branch vertex. If we additionally demand that no internal vertex of a path in \(\psi (E(H))\) is a branch vertex, then we say that \((\phi , \psi )\) is a strong Himmersion model and H is a strong immersion of G. We denote by \(H\le _\mathrm{i} G\) (\(H\le _\mathrm{si} G\)) the fact that H is an immersion (strong immersion) of G; these are partial orders. Clearly, for any two graphs H and G, if \(H\le _\mathrm{si}G\) then \(H\le _\mathrm{i}G\). This implies the following observation:
Observation 1
If \(\mathcal{G}\) is a class closed under \(\le _\mathrm{i}\), then \(\mathbf{obs}_{\le _\mathrm{i}}(\mathcal{G})\subseteq \mathbf{obs}_{\le _\mathrm{si}}(\mathcal{G})\).
Robertson and Seymour proved in [20] that every \(\le _\mathrm{i}\)antichain is finite and conjectured the same for \(\le _\mathrm{si}\). It is wellknown that for every \(k\in {\mathbb {N}}\), the class \(\mathcal{C}_{k}\) of graphs of cutwidth at most k is closed under immersions. It follows from the results of [20] that \(\mathbf {obs}_{\le _\mathrm{i}}(\mathcal {C}_{k})\) is finite; the goal of this paper is to provide good estimates on the sizes of graphs in \(\mathbf {obs}_{\le _\mathrm{si}}(\mathcal{C}_{k})\). As the cutwidth of a graph is the maximum cutwidth of its connected components, it follows that graphs in \(\mathbf {obs}_{\le _\mathrm{si}}(\mathcal {C}_{k})\) are connected. Moreover, every graph in \(\mathbf {obs}_{\le _\mathrm{si}}(\mathcal {C}_{k})\) has cutwidth exactly \(k+1\), because the removal of any of its edges decreases its cutwidth to at most k.
3 Bucket Interfaces
Let G be a graph and \(\sigma \) be an ordering of V(G). For a set \(X\subseteq V(G)\), the Xblocks in \(\sigma \) are the maximal subsequences of consecutive vertices of \(\sigma \) that belong to X. Suppose (A, B) is a cut of G. Then we can write \(\sigma = b_1\circ \ldots \circ b_p,\) where \(b_1,\ldots ,b_p\) are the A and Bblocks in \(\sigma \); these will be called jointly (A, B)blocks. The next lemma is the cornerstone of our approach: we prove that given a graph G and a cut (A, B) of G, there exists an optimum cutwidth ordering of G where number of blocks depends only on the cutwidth and the size of (A, B).
Lemma 1
Let \(\ell \in {\mathbb {N}}^+\) and G be a graph. If (A, B) is a cut of G of size \(\ell \), then there is an optimum cutwidth ordering \(\sigma \) of V(G) with at most \((2\ell +1) \cdot (2\mathbf {cw} (G)+3)+2\ell \) (A, B)blocks.
Proof
Let \(\sigma \) be an optimum cutwidth ordering such that, subject to the width being minimum, the number of (A, B)blocks it defines is also minimized. Let \(\sigma = b_1 \circ b_2 \circ \dots \circ b_r\), where \(b_1, b_2, \dots , b_r\) are the (A, B)blocks of \(\sigma \). If \(\sigma \) defines less than three blocks, then the claim already follows, so let us assume \(r \ge 3\).
Consider any ordering \(\sigma '\) obtained by swapping two blocks, i.e., \(\sigma ' = b_1 \circ \dots \circ b_{j1} \circ b_{j+1} \circ b_j \circ b_{j+2} \dots b_r\), for some \(j \in [r1]\). Observe that since the blocks \(b_1, \dots , b_r\) alternate as Ablocks and Bblocks, the ordering \(\sigma '\) has a strictly smaller number of blocks; indeed, either \(j1 \ge 1\), in which case \(b_{j1} \circ b_{j+1}\) defines a single block of \(\sigma '\), or \(j=1\) and hence \(j+2 \le r\), in which case \(b_j \circ b_{j+2}\) does. Therefore, by choice of \(\sigma \), for each \(j\in [r1]\), swapping \(b_j\) and \(b_{j+1}\) in \(\sigma \) must yield an ordering with strictly larger cutwidth.
Suppose, to the contrary, that there exists a sequence of \(q>2\mathbf {cw} (G)+3\) consecutive free blocks in \(\sigma \). Let these blocks be \(b_r,b_{r+1},\ldots ,b_{s}\), where \(sr+1=q\). For \(j \in [r,s1]\), we define \(\mu (j)\) to be the size of the cut between all vertices inside or preceding the vertices of block \(b_j\) and all vertices inside or following the vertices of block \(b_{j+1}\) in \(\sigma \); see Fig. 1. \(\square \)
Claim 1
For all \(j\in [r+1,\dots ,s2]\), we have that \(\mu (j1) > \mu (j)\) or \(\mu (j) < \mu (j+1)\).
Proof
Suppose that for some \(j\in [r+1,s2]\), \(\mu (j) \ge \max (\mu (j1),\mu (j+1))\). We will then show that the ordering \(\sigma '\) obtained by swapping the blocks \(b_{j}\) and \(b_{j+1}\) still has optimum cutwidth, a contradiction to the choice of \(\sigma \). Notice that for every vertex v preceding all vertices of \(b_{j}\) or succeeding all vertices of \(b_{j+1}\), \(\delta (V^{\sigma '}_{v})=\delta (V^{\sigma }_{v})\). Thus, it remains to show that for any vertex v belonging to the block \(b_{j}\) or to the block \(b_{j+1}\), also \(\delta (V^{\sigma '}_{v})\le \delta (V^{\sigma }_{v})\).
Let \(p_{j}\) be the number of edges of G with one endpoint in the block \(b_{j}\) and the other endpoint preceding (in \(\sigma \)) all vertices of \(b_{j}\). Let also \(s_{j}\) be the number of edges of G with one endpoint in \(b_j\) and the other endpoint succeeding (in \(\sigma \)) all vertices of \(b_{j}\) (and hence succeeding all vertices of block \(b_{j+1}\), since both \(b_{j}\) and \(b_{j+1}\) are free). Notice that \(\mu (j)=\mu (j1)  p_{j} + s_{j}\) and recall that \(\mu (j)\ge \mu (j1)\). This yields that \(s_{j} \ge p_{j}.\)
Similarly, let \(p_{j+1}\) be the number of edges of G with one endpoint in \(b_{j+1}\) and the other endpoint preceding all vertices of the block \(b_{j+1}\) (and, in particular, all vertices of block \(b_{j}\)). Let also \(s_{j+1}\) be the number of edges of G with one endpoint in \(b_{j+1}\) and the other endpoint succeeding all vertices of block \(b_{j+1}\). Again, we have \(\mu (j+1)=\mu (j)  p_{j+1} + s_{j+1}\) and \(\mu (j)\ge \mu (j+1)\). This yields that \(p_{j+1} \ge s_{j+1}.\)
Let v be a vertex of the block \(b_{j}\). Recall that the blocks \(b_{j}\) and \(b_{j+1}\) are free and thus, there are no edges between them. Observe then that \(\delta (V^{\sigma '}_{v})=\delta (V^{\sigma }_{v})+s_{j+1}p_{j+1}\le \delta (V^{\sigma }_{v})\). Symmetrically, for any vertex v in \(b_{j+1}\), observe that \(\delta (V^{\sigma '}_{v})=\delta (V^{\sigma }_{v})+p_{j}s_{j}\le \delta (V^{\sigma }_{v})\). Thus, \(\mathbf {cw} _{\sigma '}(G)\le \mathbf {cw} _{\sigma }(G)=\mathbf {cw} (G)\), a contradiction. \(\square \)
Claim 1 shows that for all \(j\in [r+1,s2]\), we have \(\mu (j1) > \mu (j)\) or \(\mu (j) < \mu (j+1)\). It follows that any nondecreasing pair \(\mu (j1)\le \mu (j)\) must be followed by an increasing pair \(\mu (j) < \mu (j+1)\). Hence, if \(j_{\min }\) is the minimum index such that \(\mu (j_{\min })\le \mu (j_{\min }+1)\), then the sequence \(\mu (j)\) has to be strictly decreasing up to \(j_{\min }\) and strictly increasing from \(j_{\min }+1\) onward. Since \(\mu (j) \le \mathbf {cw} (G)\) for all j, the length q of the sequence of consecutive free blocks cannot be longer than \(2\mathbf {cw} (G)+3\) in total, concluding the proof. \(\square \)
We use the above lemma to bound the number of “types” of prefixes in graph orderings. To describe such a prefix, i.e., one side of a cut in a graph, we use the following definition.
Definition 1
A kboundaried graph is a pair \(\mathbf {G}=(G,\bar{x})\) where G is a graph and \(\bar{x}=(x_{1},\dots ,x_k)\) is a ktuple of the graph’s boundary vertices (ordered, not necessarily distinct). The extension of \(\mathbf {G}\) is the graph \(G^{*}\) obtained from G by adding k new vertices \(x_{1}',\dots ,x_k'\) and edges \(x_{1} x_{1}', \dots , x_k x_k'\). The join \(\mathbf {A} \oplus \mathbf {B}\) of two kboundaried graphs \(\mathbf {A} = (A, \bar{x}), \mathbf {B}=(B,\bar{y})\) is the graph obtained from the disjoint union of A and B by adding an edge \(x_{i} y_{i}\) for \(i\in [k]\).
From Lemma 1 we derive that for any given cut (A, B) of size \(\ell \) of a graph G with \(\mathbf {cw} (G)\le k\), there is an optimum cutwidth ordering in which the vertices of A occur in \({O}(k\ell )\) blocks. Our next goal is to show that the only information about A that can affect the cutwidth of G is: the placing of the endpoints of each cutedge (\(x_{i}\) and \(x_{i}'\)) into blocks, and the cutwidth of each block (as an induced subgraph of A or \(A^{*}\)). Recall that for an ordering \(\sigma \) of V(G), \(\sigma \)cuts are cuts of the form \((V^\sigma _v, V(G)\setminus V^\sigma _v)\), for \(v \in V(G)\).
Definition 2
Lemma 2
Let \(k,\ell \) be positive integers and \(\mathbf {A}=(A,\bar{x}),\mathbf {B}=(B,\bar{y})\) be two kboundaried graphs. Let also \(\sigma \) be a vertex ordering of \(\mathbf {A}\oplus \mathbf {B}\) with \(\ell \)bucketing T. If \(T^{1}(i)\) does not contain any vertex of A, for some \(i\in [\ell ]\), that is, \(T^{1}(i) \cap V(A) = \emptyset \), then it holds that \(\mathtt {width}(\mathbf {A}\oplus \mathbf {B}, \sigma , T, i) = \mathtt {width}(A, \sigma _{A}, T_{A}, i) + \mathtt {width}(B^{*}, \sigma _{B^{*}}, T_{B^{*}}, i)\).
Proof

1. \(e\in E_{A}(L \cap V(A), R\cap V(A))\) or 3. \(e\in E_{G}(L\cap V(A), R\cap V(B))\), or

2. \(e\in E_{B}(L \cap V(B), R \cap V(B))\) or 4. \(e\in E_{G}(R\cap V(A), L\cap V(B))\).
Definition 3

\(b,b': [k] \rightarrow [\ell ]\) identifying the buckets which contain \(x_{i}\) and \(x_{i}'\), respectively

\(\mu ,\mu ^{*}: [\ell ] \rightarrow [0,k]\) corresponding to the widths of buckets.

T(v) is odd for \(v\in V(G)\) and even for \(v\in \{x_{1}',\dots ,x_k'\}\),

\(T(x_{i}) = b(i)\) and \(T(x_{i}') = b'(i)\), for each \(i\in [k]\),

\(\mathtt {width}(G, \sigma _{G}, T_{G}, j) \le \mu (j)\), for each \(j\in [\ell ]\),

\(\mathtt {width}(G^{*}, \sigma , T, j) \le \mu ^{*}(j)\), for each \(j\in [\ell ]\).
Observation 2
For all \(k,\ell \in \mathbb {N}^+\) there are \( \le 2^{2(k\log \ell +\ell \log (k+1))}\) \((k,\ell )\)bucket interfaces.
We call two kboundaried graphs \(\mathbf {G}_{1}, \mathbf {G}_{2}\) (k,\(\ell \))similar if the sets of \((k,\ell )\)bucket interfaces they conform with are equal. The following lemma subsumes the above ideas. The proof follows easily from Lemma 2 and the fact that \(\mathbf {cw} _\sigma (G) = \max _{i\in [\ell ]}\ \mathtt {width}(G,\sigma ,T,i)\) [Eq. (1)].
Theorem 3
Let k, r be two positive integers. Let also \(\mathbf {A}_{1}\) and \(\mathbf {A}_{2}\) be two kboundaried graphs that are \((k,\ell )\)similar, where \(\ell =(2k+1) \cdot (2r+4)\). Then for any kboundaried graph \(\mathbf {B}\) where \(\mathbf {cw} (\mathbf {A}_{1}\oplus \mathbf {B})\le r\), it holds that \(\mathbf {cw} (\mathbf {A}_{2}\oplus \mathbf {B})=\mathbf {cw} (\mathbf {A}_{1}\oplus \mathbf {B})\).
Proof

\(b(i) = T_{1}(x^{1}_{i})\) and \(b'(i)=T_{1}_{A_{1}^{*}}({x^{1}_{i}}')=T_{1}(y_{i})\) for \(i\in [k]\),

\(\mu (i) = \mathtt {width}(A_{1}, \sigma _{1}_{A_{1}}, T_{1}_{A_{1}}, i)\) and \(\mu ^{*}(i) = \mathtt {width}(A_{1}^{*}, \sigma _{1}_{A_{1}^{*}}, T_{1}_{A_{1}^{*}}, i)\) for \(i \in [\ell ]\).

each bucket \(T_{2}^{1}(i)\) is contained in \(A_{2}\) for odd \(i\in [\ell ]\) and in \(\{{x^{2}_{1}}',\dots ,{x^{2}_{k}}'\}\) for even \(i\in [\ell ]\)

\(b(i) = T_{2}(x^{2}_{i})\) and \(b'(i)=T_{2}({x^{2}_{i}}')\) for \(i\in [k]\),

\(\mu (i) \ge \mathtt {width}(A_{2}, \sigma _{2}_{A_{2}}, T_{2}_{A_{2}}, i)\) and \(\mu ^{*}(i) \ge \mathtt {width}(A_{2}^{*}, \sigma _{2}_{A_{2}^{*}}, T_{2}_{A_{2}^{*}}, i)\) for \(i \in [\ell ]\).

\(\varPi (v) = T_{1}(v)\) for \(v \in V(B)\) and

\(\varPi (v) = T_{2}(v)\) for \(v \in V(A_{2})\).
 1.
\(\varPi (u) < \varPi (v)\),
 2.
\(u <_{\sigma _{2}} v\) and \(\varPi (u)=\varPi (v)\) is odd, or
 3.
\(u <_{\sigma _{1}} v\) and \(\varPi (u)=\varPi (v)\) is even.
4 Obstruction Sizes and Linked Orderings
In this section we establish the main result on the sizes of obstructions for cutwidth. We first introduce linked orderings and prove that there is always an optimum ordering that is linked.
Definition 4
(linked ordering) An ordering \(\sigma \) of V(G) is linked if for any two vertices \(u\le _{\sigma } u'\), there exist \(\min \{\delta (V^{\sigma }_{v}) \mid u\le _{\sigma } v\le _{\sigma } u' \}\) edgedisjoint paths between \(V^{\sigma }_{u}\) and \(V(G)\setminus V^{\sigma }_{u'}\) in G.
Lemma 3
([6, 11, 16]) For each graph G, there is a linked ordering \(\sigma \) of V(G) with \(\mathbf {cw} _{\sigma }(G)=\mathbf {cw} (G)\).
Proof
Without loss of generality, we may assume that the graph is connected. Let \(\sigma \) be an optimum cutwidth ordering of \(V=V(G)\). Subject to the optimality of \(\sigma \), we choose \(\sigma \) so that \(\sum _{v\in V} \delta (V^{\sigma }_v)\) is minimized. We prove that \(\sigma \) defined in this manner is in fact linked.
Assume the contrary. Then by Menger’s theorem, there exist vertices \(u <_\sigma u'\) in V and \(i\in {\mathbb {N}}\) such that \(\delta (V^{\sigma }_{v})> i\) for every \(u\le _{\sigma } v\le _{\sigma } u'\), but a minimum cut (A, B) of G with \(V^{\sigma }_{u}\subseteq A\) and \(V\setminus V^{\sigma }_{u'}\subseteq B\) has size \(\delta (A) \le i\). We partition A into sets \(A_{1}\) and \(A_{2}\), where \(A_{1}=V^{\sigma }_{u}\) and \(A_2=A\setminus A_1\), and we partition B into sets \(B_{1}\) and \(B_{2}\), where \(B_{2}=V\setminus V^{\sigma }_{u'}\) and \(B_1=B\setminus B_2\) (see Fig. 2). Notice that \(A_{2}=A\setminus V^{\sigma }_{u}=\{v\mid u<_{\sigma } v \le _{\sigma }u'\}\cap A\) and that \(B_{1}=B\setminus (V\setminus V^{\sigma }_{u'})=\{v\mid u<_{\sigma } v \le _{\sigma }u'\}\cap B\). Let \(\sigma '\) be the ordering of V obtained by concatenating \(\sigma _{A_{1}}\), \(\sigma _{A_{2}}\), \(\sigma _{B_{1}}\), and \(\sigma _{B_{2}}\).
We prove that \(\delta (V^{\sigma '}_{v})\le \delta (V^{\sigma }_{v})\), for every \(v\in V\). Observe first that for every vertex \(v\in A_{1}\cup B_{2}\) it holds that \(V^{\sigma '}_{v}=V^{\sigma }_{v}\) and thus, \(\delta (V^{\sigma '}_{v})= \delta (V^{\sigma }_{v})\). Let now \(v\in A_{2}\). Then \(V^{\sigma '}_{v}=V^{\sigma }_{v}\cap A\). By the submodularity of cuts it follows that \(\delta (V^{\sigma }_{v}\cup A)+\delta (V^{\sigma }_{v}\cap A)\le \delta (A)+\delta (V^{\sigma }_{v})\). Notice that \((V^{\sigma }_{v}\cup A,V\setminus (V^{\sigma }_{v}\cup A))\) is also a cut separating \(A_{1}=V^{\sigma }_{u}\) and \(B_{2}=V\setminus V^{\sigma }_{u'}\). From the minimality of (A, B) it follows that \(\delta (A)\le \delta (V^{\sigma }_{v}\cup A)\). Therefore, \(\delta (V^{\sigma }_{v}\cap A)\le \delta (V^{\sigma }_{v})\). As \(V^{\sigma '}_{v}=V^{\sigma }_{v}\cap A\), we obtain that \(\delta (V^{\sigma '}_{v})\le \delta (V^{\sigma }_{v})\).
Symmetrically, let now \(v\in B_{1}\). Then \(V^{\sigma '}_{v}=V^{\sigma }_{v}\cup A\). By the submodularity of cuts we have \(\delta (V^{\sigma }_{v}\cup A)+\delta (V^{\sigma }_{v}\cap A)\le \delta (A)+\delta (V^{\sigma }_{v})\). Notice that \((V^{\sigma }_{v}\cap A,V\setminus (V^{\sigma }_{v}\cap A))\) is a cut separating \(A_{1}\) and \(B_{2}\). From the minimality of (A, B) it follows that \(\delta (A)\le \delta (V^{\sigma }_{v}\cap A)\). Therefore, \(\delta (V^{\sigma }_{v}\cup A)\le \delta (V^{\sigma }_{v})\). As \(V^{\sigma '}_{v}=V^{\sigma }_{v}\cup A\), we obtain that \(\delta (V^{\sigma '}_{v})\le \delta (V^{\sigma }_{v})\).
Thus, \(\delta (V^{\sigma '}_{v})\le \delta (V^{\sigma }_{v})\le \mathbf {cw} (G)\) for every \(v\in V\), and hence \(\mathbf {cw} _{\sigma '}(G)=\mathbf {cw} (G)\). Finally, note that \(\delta (V^{\sigma '}_{v}) = \delta (A) \le i < \delta (V^{\sigma }_{v})\) for the last vertex v in A. Thus \(\sum _v \delta (V^{\sigma '}_v)<\sum _v \delta (V^{\sigma }_v)\), contradicting the choice of \(\sigma \). Therefore, \(\sigma \) is a linked ordering of V with \(\mathbf {cw} _{\sigma }(G)=\mathbf {cw} (G)\). \(\square \)
The rest of Sect. 4 is devoted to the proof of Theorem 1. Before we proceed with this proof, we need a series of auxiliary lemmas.
For every \(s,r\in {\mathbb {N}}^+\), we set \(A_{s,r}=[s,s+r1]\). We prove the following.
Lemma 4
Let N be a positive integer. For every \(s,r\in {\mathbb {N}}^+\) and every word w over \(A_{s,r}\) of length \(N^{r}\) there is a symbol \(k\in A_{s,r}\) and a subword u of w such that (a) u contains only numbers not smaller than k, and (b) u contains the number k at least N times.
Proof
We prove the lemma by induction on r. Notice that for \(r=1\), \(A_{s,r}=\{s\}\) and thus the only word w of length N is \(s^{N}\). Thus, the lemma holds with \(k=s\) and \(u=w\). We proceed to the inductive step for \(r>1\).
Let now \(s\in {\mathbb {N}}\) and let w be a word over \(A_{s,r}\) of length \(N^{r}\). If s occurs at least N times, then again, the lemma holds with \(k=s\) and \(u=w\). Thus, we may assume that s occurs at most \(N1\) times. Then, since w has length at least \(N^{r}\), there exists a subword \(w'\) of w of length at least \(N^{r1}\) over \(A_{s,r}\setminus \{s\} = A_{s+1,r1}\). From the inductive hypothesis, there exists \(k \in A_{s+1,r1}\subseteq A_{s,r}\) and a subword u of \(w'\) such that k occurs at least N times in u and u contains only numbers at least k. Since \(w'\) is a subword of w, u is also a subword of w. This completes the inductive step and the proof of the lemma. \(\square \)
We use Lemma 4 only for \(s=1\), giving the following corollary.
Corollary 1
Let r, N be positive integers and let w be a word of length \(N^{r}\) over the alphabet [r]. Then there is a number \(k\in [r]\) and a subword u of w such that (a) u contains only numbers not smaller than k, and (b) u contains the number k at least N times.
We also need one additional statement about boundaried graphs and bucket interfaces.
Lemma 5
Let \(k,\ell \in {\mathbb {N}}\). Suppose \(\mathbf {A}=(A,\bar{x})\) and \(\mathbf {B}=(B,\bar{y})\) are two kboundaried graphs, and suppose further that there is an immersion model \((\phi ,\psi )\) of A in B such that \(\phi (x_i)=y_i\), for all \(i=1,2,\ldots ,k\). Then for every \((k,\ell )\)bucket interface \((b,b',\mu ,\mu ^*)\), if \(\mathbf {B}\) conforms to \((b,b',\mu ,\mu ^*)\) then also \(\mathbf {A}\) conforms to \((b,b',\mu ,\mu ^*)\).
Proof

For \(u,v\in V(A^*)\), we put \(u<_{\sigma '}v\) if and only if \(\phi ^*(u)<_{\sigma '}\phi ^*(v)\).

For \(u\in V(A^*)\), we put \(T'(u)=T(\phi ^*(u))\).
The following theorem is the technical counterpart of Theorem 1. Its proof is based on Theorem 3, Lemma 3, Observation 2 and the idea of “unpumping” repeating types, presented in the introduction. The linkedness is used to make sure that within the unpumped segment of the ordering, one can find the maximum possible number of edgedisjoint paths between the parts of the graph on the left side and on the right side of the segment. This ensures that the graph obtained from unpumping can be immersed in the original one.
Theorem 4
Let k be a positive integer. If \(G\in \mathbf {obs}_{\le _\mathrm{si}}(\mathcal {C}_{k})\), then \(V(G)\le N^{k+1}\), where \(N=2^{2((k+1)\log \ell +\ell \log (k+2))}+2\) and \(\ell =(2k+3) \cdot (2k+6)\).
Proof
Take any \(G\in \mathbf {obs}_{\le _{si}}(\mathcal {C}_{k})\) and assume, towards a contradiction, that \(V(G)> N^{k+1}\). Let \(\sigma =\langle v_{1},v_{2},\dots , v_{V(G)}\rangle \) be a linked optimum cutwidth ordering of G, which exists by Lemma 3. We define \(c_{i}=\delta (V^{\sigma }_{v_{i}})\), that is, \(c_{i}\) is the size of the cut between the vertices of G up to \(v_{i}\) and the rest of the graph. Notice that since \(G\in \mathbf {obs}_{\le _{si}}(\mathcal {C}_{k})\), we have that \(\mathbf {cw} (G)=k+1\) and G is connected. This implies that \(c_{i}\in [k+1]\), for every \(i\in [V(G)1]\).
Observe that \(c_{1}c_{2}\dots c_{V(G)1}\) is a word of length at least \(N^{k+1}\) over the alphabet \([k+1]\). From Corollary 1, it follows that there exist \(1\le s\le t< V(G)\) and \(q\in [k+1]\) such that for every \(s\le i\le t\) we have \(c_{i}\ge q\), and there also exist N distinct indices \(s\le i_{1}<i_{2}<\dots <i_{N}\le t\) such that \(c_{i_j}=q\), for every \(j\in [N]\). Without loss of generality we may assume that \(i_{1}=s\) and \(i_{N}=t\).
For each \(j\in [N]\), define a qboundaried graph \(\mathbf {G}_{j}=(G_{j},(z_{j}^{1},z_{j}^{2},\dots ,z_{j}^{q}))\) in the following way. First, by linkedness, we find edgedisjoint paths \(P_{1}, \dots , P_{q}\) between \(V^\sigma _{v_{i_{1}}}\) and \(V\setminus V^\sigma _{v_{i_{N}}}\). Notice that for each \(j\in [N]\) the cut \(E_G(V^{\sigma }_{v_{i_j}},V(G)\setminus V^{\sigma }_{v_{i_j}})\) contains exactly one edge of each path \(P_{i}\). Denote this edge by \(e_{j}^{i}\), for \(i\in [q]\). For \(i\in [q]\), let \(x_j^i\) be the endpoint of \(e_{j}^{i}\) that belongs to \(V^{\sigma }_{v_{i_j}}\), and let \(y_j^i\) be the endpoint that does not belong to \(V^{\sigma }_{v_{i_j}}\). We construct \(G_j\) by taking \(G[V^{\sigma }_{v_{i_j}}]\), adding fresh boundary vertices \((z_{j}^{1},z_{j}^{2},\dots ,z_{j}^{q})\), and adding one fresh edge \(x_j^iz_j^i\) for each \(i\in [q]\).
Proof (of Theorem 1)
Theorem 4 provides an upper bound on the number of vertices of a graph in \(\mathbf {obs}_{\le _{si}}(\mathcal {C}_{k})\). Observe that since such a graph has cutwidth \(k+1\), each of its vertices has degree at most \(2(k+1)\). It follows that any graph from \(\mathbf {obs}_{\le _{si}}(\mathcal {C}_{k})\) has \(2^{{O}(k^3\log k)}\) vertices and edges. Finally, by Observation 1 we have \(\mathbf{obs}_{\le _\mathrm{i}}(\mathcal {C}_{q})\subseteq \mathbf{obs}_{\le _{si}}(\mathcal {C}_{q})\), so the same bound holds also for immersions instead of strong immersions. This concludes the proof of Theorem 1. \(\square \)
5 An Algorithm for Computing Cutwidth
In this section we present an exact FPT algorithm for computing the cutwidth of the graph. First, we need to give a dynamic programming algorithm that given an approximate ordering \(\sigma \) of width r, finds, if possible, an ordering of width at most k, where \(k\le r\) is given.
Our algorithm takes advantage of the given ordering \(\sigma \) and essentially computes, for each subgraph of G induced by a prefix of \(\sigma \), the \((r,\ell )\)bucket interfaces it conforms to. More precisely, in Lemma 6 we show that if G has an optimum ordering of width k, then there is an optimum ordering were each of these induced subgraphs occupies at most \(\ell = O(rk)\) buckets, allowing to restrict our search to \((r,\ell )\)bucket profiles (a variant of bucket interfaces to be defined later, refined so as to consider border vertices more precisely). The proof slightly strengthens that of Lemma 1.
Lemma 6
Let G be a graph with an ordering \(\sigma \) of width r. Then there exists also an ordering \(\tau \) of optimum width, i.e., with \(\mathbf {cw} _\tau (G)=\mathbf {cw} (G)\), that has the following property: for every prefix X of \(\sigma \), the number of Xblocks in \(\tau \) is at most \(2r\cdot \mathbf {cw} (G)+\mathbf {cw} (G)+4r+2\).
Proof
The proof of Lemma 1 in fact shows that for any ordering \(\sigma \) of V(G) and any cut (A, B) of G of size at most r, either \(\sigma \) already has at most \(2\lambda 1\) (A, B)blocks, or an ordering \(\sigma '\) can be obtained from \(\sigma \) by swapping its (A, B)blocks so that \(\sigma '\) has strictly less (A, B)blocks. Therefore, by reordering (A, B)blocks of \(\sigma \), we eventually get a new ordering which has at most \(2\lambda 1\) (A, B)blocks, and hence at most \(\lambda \) Ablocks.
For \(i=1,2,\ldots ,V(G)1\), let \((A_i,B_i)\) be the cut of G, where \(A_i\) is the prefix of \(\sigma \) of length i, while \(B_i\) is the suffix of \(\sigma \) of length \(V(G)i\). Let \(\tau _0\) be any optimumwidth ordering of G. We now inductively construct orderings \(\tau _1,\tau _2,\ldots ,\tau _{V(G)1}\), as follows: once \(\tau _i\) is constructed, we apply the above reordering procedure to \(\tau _i\) and cut \((A_{i+1},B_{i+1})\). This yields a new ordering \(\tau _{i+1}\) of optimum width such that the number of \(A_{i+1}\)blocks in \(\tau _{i+1}\) is at most \(\lambda \). Furthermore, \(\tau _{i+1}\) is obtained from \(\tau _i\) by reordering \(A_{i+1}\) and \(B_{i+1}\)blocks in \(\tau _i\). Hence, whenever X is a subset of \(A_{i+1}\), then any Xblock in \(\tau _i\) remains consecutive in \(\tau _{i+1}\), as it is contained in one \(A_{i+1}\)block in \(\tau _i\) that is moved as a whole in the construction of \(\tau _{i+1}\). Consequently, if for all \(j\le i\) we had that the number of \(A_j\)blocks in \(\tau _i\) is at most \(\lambda \), then this property is also satisfied in \(\tau _{i+1}\). It is now clear that a straightforward induction yields the following invariant: for each \(j\le i\), then number of \(A_j\)blocks in \(\tau _i\) is at most \(\lambda \). Therefore \(\tau =\tau _{V(G)1}\) gives an ordering with the claimed properties. \(\square \)
Bucket profiles We now define a refinement of the widths of the buckets of a bucket interface as well as a refinement of the notion of bucket interfaces. They are used in the dynamic programming algorithm of Lemma 7.
Definition 5
Let \((G,\bar{x})\) be a kboundaried graph and let \(S = \{x_1,\dots ,x_k,\) \(x_1',\dots ,x_k'\}\subseteq V(G^*)\).
We also need to refine the notion of a \((k,\ell )\)bucket interface.
Definition 6

\(b,b': [k] \rightarrow [\ell ]\) identifying the buckets which contain \(x_{i}\) and \(x_{i}'\), respectively,

\(p,p':[k]\rightarrow [k]\) highlighting the ordering between the vertices \(x_{i}\) and \(x_{i}'\) inside a bucket, respectively,

\(\nu : [\ell ]\times [0,k] \rightarrow [0,k]\) corresponding to the widths of segments of buckets defined by the vertices \(x_{i}\), respectively.

T(v) is odd for \(v\in V(G)\) and even for \(v\in \{x_{1}',\dots ,x_k'\}\),

\(T(x_{i}) = b(i)\) and \(T(x_{i}') = b'(i)\), for each \(i\in [k]\),

\(p(i)<p(j)\), if \(b(i)=b(j)\) and \(x_{i}<_{\sigma } x_{j}\), and \(p'(i)<p'(j)\) if \(b'(i)=b'(j)\) and \(x_{i}'<_{\sigma } x_{j}'\),

\(\mathtt {width}(G, \sigma _{G}, T_{G}, j,s) = \nu (j,s)\), for each \(j\in [\ell ]\) and \(s\in [0,k]\).
From the fact that the boundary vertices of a kboundaried graph \(\mathbf {G}\) split the buckets defined by T into at most 2k segments in total it follows that:
Observation 3
The \((k,\ell )\)bucket profiles that Observation 3 refers to will be called valid. By making use of these two notions we ensure that we will be able to update the widths of each bucket every time a new vertex is processed by the dynamic programming algorithm. We are now ready to prove Lemma 7.
Lemma 7
Let \(r\in \mathbb {N}^+\). Given a graph G and an ordering \(\sigma \) of its vertices with \(\mathbf {cw} _{\sigma }(G)\le r\), an ordering \(\tau \) of the vertices of G with \(\mathbf {cw} _{\tau }(G)=\mathbf {cw} (G)\) can be computed in time \(2^{{O}(r^2 \log r)} \cdot V(G)\).
Proof
The algorithm attempts to compute an ordering of width k for consecutive \(k=0,1,2,\ldots \). The first value of k for which the algorithms succeeds is equal to the value of the cutwidth, and then the constructed ordering may be returned. Since there is an ordering of width r, we will always eventually succeed for some \(k\le r\), which implies that we will make at most \(r+1\) iterations. Hence, from now on we may assume that we know the target width \(k\le r\) for which we try to construct an ordering.
Given a graph G and an ordering \(\sigma \) of its vertices with \(\mathbf {cw} _{\sigma }(G)\le r\) we denote by \(G_{w}\) the graph induced by the vertices of the prefix of \(\sigma \) of length w. Then we naturally define the boundaried graph \(\mathbf {G}_{w}\), where we introduce a boundary vertex \(x_i\) for each edge \(e_i\) of the cut \(E_G(V(G_{w}),V(G)\setminus V(G_{w})\). Note that this cut has at most r edges.
By Lemma 6, we know that there is an optimumwidth ordering \(\tau \) such that every prefix \(V(G_w)\) of \(\sigma \) has at most \(\ell \) blocks in \(\tau \). Our dynamic programming algorithm will simply inductively reconstruct all \((k,\ell )\)bucket profiles that may correspond to \(V(G_w)\)blocks in \(\tau \), for each consecutive w in the ordering \(\sigma \), eventually reconstructing \(\tau \), if \(\mathbf {cw} _\tau (G)\le k\).
We describe which bucket profiles \(P'\) expand P by guessing where the new vertex would land in the bucket profile P, assuming that \(\mathbf {G}_w\) conforms to P. After the guess is made, the updated profile P becomes the expanded profile \(P'\). Different guesses lead to different profiles \(P'\) which extend P; this corresponds to different ways in which the construction of the optimum ordering can continue. As describing the details of this expansion relation is a routine task, we prefer to keep the description rather informal, and leave working out all the formal details to the reader.
Let \(v_{w+1}\) be the \((w+1)\)st vertex in the ordering \(\sigma \), that is, \(v_{w+1}\in V(G_{w+1})\setminus V(G_{w})\). We construct (by guessing) a \((k,\ell )\)bucket profile \(P'\) from the \((k,\ell )\)bucket profile P in the following way. First, we guess an even bucket of P to place each one of the vertices in \(V(G_{w+1}^{*})\setminus V(G_{w}^{*})\): the new vertices of the extension that correspond to new edges of the cut \(E_G(V(G_{w+1}),V(G)\setminus V(G_{w+1}))\) that are incident to \(v_{w+1}\). Notice that each bucket contains, at any moment, at most r vertices. Therefore, we have at most \(r+1\) possible choices about where each vertex will land in each bucket (including the placing in the order, as indicated by the function \(p'(\cdot )\). Notice also that there are at most \(r+1\) vertices in \(V(G_{w+1}^{*})\setminus V(G_{w}^{*})\). Therefore we have at most \((\ell (r+1))^{r+1}\) options for this guess.
Next, we choose the place \(v_{w+1}\) is going to be put in. If \(v_{w+1}\) is an endpoint of an edge from the cut \(E_G(V(G_w),V(G)\setminus V(G_w))\), then this place is already indicated by functions \(b'(\cdot )\) and \(p'(\cdot )\) in the bucket profile P; if there are multiple edges in the cut \(E_G(V(G_w),V(G)\setminus V(G_w))\) that have \(v_{w+1}\) as an endpoint, then all of them must be placed next to each other in the same even bucket (otherwise P has no extension). Otherwise, if \(v_{w+1}\) is not an endpoint of an edge from \(E_G(V(G_w),V(G)\setminus V(G_w))\), we guess the placing of \(v_{w+1}\) by guessing an even bucket (one of at most \(\ell +1\) options) together with a segment between two consecutive extension vertices in this bucket (one of at most \(r+1\) options).
The placing of \(v_{w+1}\) may lead to one of three different scenarios; we again guess which one applies. First, \(v_{w+1}\) can establish a new odd bucket and split the even bucket into which it was put into two new even buckets, one on the left and one on the right of the new odd bucket containing \(v_{w+1}\); the other extension vertices placed in this bucket are split accordingly. Second, \(v_{w+1}\) can be present at the leftmost or rightmost end of the even bucket it is placed in, so it gets merged into the neighboring odd bucket. Finally, if the even bucket in which \(v_{w+1}\) is placed did not contain any other extension vertices of \(G_w^*\), then \(v_{w+1}\) can be declared to be the last vertex placed in this bucket, in which case we merge it together with both neighboring odd buckets. In these scenarios, whenever the extended profile turns out to have more than \(\ell \) buckets, we discard this option.
Having guessed how the placing of \(v_{w+1}\) will affect the configuration of buckets, we proceed with updating the sizes of cuts, as indicated by the function \(\nu (\cdot )\). For this, we first examine all the edges of the cut \(E_G(V(G_w),V(G)\setminus V(G_w))\) that have \(v_{w+1}\) as an endpoint. These edges did not contribute to the values of \(\nu (\cdot )\) in the bucket profile P, but should contribute in \(P'\). Note that given the placement of \(v_{w+1}\), for each such edge we exactly see over which segments this edge “flies over”, and therefore we can update the values of \(\nu (\cdot )\) for these segments by incrementing them by one. Finally, when \(v_{w+1}\) got merged to a neighboring odd bucket (or to two of them), we may also need to take into account one more cut in the value of \(\nu (\cdot )\) for the last/first segment of this bucket: the one between \(v_{w+1}\) and the vertices placed in this bucket. It is easy to see that from the value of \(\nu (\cdot )\) for the segment in which \(v_{w+1}\) is placed, and the exact placement of the endpoints of all the boundary edges, we can deduce the exact size of this cut. Hence, the relevant value of \(\nu (\cdot )\) can be efficiently updated by taking the maximum of the old value and the deduced size of the cut. We update \(\nu \) in a similar fashion when \(v_{w+1}\) merges with both neighboring odd buckets. If at any point any of the values of \(\nu (\cdot )\) exceeds k, we discard this guess.
This concludes the definition of the extension. For every \((k,\ell )\)bucket profile P and every \((k,\ell )\)bucket profile \(P'\) that extends it, we add to D an arc from (w, P) to \((w+1,P')\). It is easy to see from the description above that, given P and \(P'\), it can be verified in time polynomial in r whether such an arc should be added.
Finally, in the graph D we determine using, say, depthfirst search, whether there is a directed path from node \((0,P_\emptyset )\) to node \((V(G),P_\mathrm{full})\), where \(P_\emptyset \) is an empty bucket profile and \(P_\mathrm{full}\) is a bucket profile containing just one odd bucket. It is clear from the construction that if we find such a path, then by applying operations recorded along such a path we obtain an ordering of the vertices of G of width at most k. On the other hand, provided \(k=\mathbf {cw} (G)\), by Lemma 6 we know that there is always an optimumwidth ordering \(\tau \) such that every prefix of \(\sigma \) has at most \(\ell \) blocks in \(\tau \). Then the \((k,\ell )\)bucket profiles naturally defined by the prefixes of \(\sigma \) in \(\tau \) define a path from \((0,P_\emptyset )\) to \((V(G),P_\mathrm{full})\) in D.
The graph D has \(2^{{O}(r^{2}\log r)}\cdot V(G)\) vertices and arcs, and the depthfirst search runs in time linear in its size. It is also trivial to reconstruct the optimumwidth ordering of the vertices of G from the obtained path in linear time. This yields the promised running time bounds. \(\square \)
Having the algorithm of Lemma 7, a standard application of the iterative compression technique immediately yields a \(2^{{O}(k^2 \log k)} \cdot n^2\) time algorithm for computing cutwidth, as sketched in Sect. 1. Simply add the vertices of G one by one, and apply the algorithm of Lemma 7 at each step. However, we can make the dependence on n linear by adapting the approach of Bodlaender [2]; more precisely, we make bigger steps. Such a big step consists of finding a graph H that can be immersed in the input graph G, which is smaller by a constant fraction, but whose cutwidth is not much smaller. This is formalised in Lemma 9. For its proof we need the following definition and a known result about obstacles to small cutwidth.
Definition 7
A perfect binary tree is a rooted binary tree in which all interior nodes have two children and all leaves have the same distance from its root. The height of a perfect binary tree is the maximum roottoleaf distance.
Lemma 8
([13, 17, 22]) If T is a perfect binary tree of height 2k, then its cutwidth is \(\mathbf {cw} (T)\ge k\).
Lemma 9
There is an algorithm that given a positive integer k and a graph G, works in time \({O}(k^2 \cdot V(G))\) and either concludes that \(\mathbf {cw} (G) > k\), or finds a graph H immersed in G such that \(E(H) \le E(G) \cdot (11/(2k+1)^{4(k+1)+3})\) and \(\mathbf {cw} (G) \le 2\mathbf {cw} (H)\). Furthermore, in the latter case, given an ordering \(\sigma \) of the vertices of H, an ordering \(\tau \) of the vertices of G with \(\mathbf {cw} _{\tau }(G)\le 2\mathbf {cw} _{\sigma }(H)\) can be computed in \({O}(V(G))\) time.
Proof
Without loss of generality we assume that G is connected, because we can apply the algorithm on the connected components of G separately and then take the disjoint union of the results.
Observe first that we may assume that every vertex in G is incident to at most 2k edges, as otherwise, we could immediately conclude that \(\mathbf {cw} (G)>k\). This also implies that every vertex in G has at most 2k neighbors; by N(v) we denote the set of neighbors of a vertex v, and \(N(X)=(\bigcup _{v\in X} N(v))\setminus X\) for a vertex subset X. Let \(G'\) be the graph obtained from G by exhaustively dissolving any vertices of degree 2 whose neighbors are different. That is, having such a vertex v, we delete it from the graph and replace the two edges incident to it with a fresh edge between its neighbors, and we proceed doing this as long as there are such vertices in the graph. Clearly, the eventually obtained graph \(G'\) can be immersed in G, we have \(E(G')\le E(G)\), the degree of every vertex in \(G'\) is the same to its degree in G, and \(\mathbf {cw} (G') \le \mathbf {cw} (G)\). However, observe that any ordering of the vertices of \(G'\) can be turned into an ordering of the vertices of G with the same width by placing each dissolved vertex in any place between its two original neighbors. Thus, \(\mathbf {cw} (G')=\mathbf {cw} (G)\).
Moreover, \(G'\) can be constructed in linear time by inspecting, in any order, all the vertices that have degree 2 in the original graph G. It is also easy to see that, given an ordering of vertices of \(G'\), one can reconstruct in linear time an ordering of G of at most the same width.
Case 1 \(V_{1} \ge E(G')/(2k+1)^{4(k+1)+2}\). Notice first that \(V_{1}\subseteq N(N(V_{1}))\), and recall that every vertex in \(G'\) is incident to at most 2k edges and therefore has at most 2k neighbors. It follows then that \(V_{1} \le 2k \cdot N(V_{1})\) and hence \(N(V_{1}) \ge E(G')/(2k+1)^{4(k+1)+3}\). Let H be the graph obtained from \(G'\) by removing, for each vertex in \(N(V_{1})\), one of its neighbors in \(V_1\). Then \(E(H) \le E(G') \cdot (1  1/(2k+1)^{4(k+1)+3})\) and H is immersed in \(G'\) (as it is an induced subgraph). Hence, H is also immersed in G. Furthermore, let \(\sigma \) be any ordering of the vertices of H. Then, we can obtain an ordering of the vertices of \(G'\) by placing each deleted vertex next to its original neighbors. Notice that this placement increases the width of \(\sigma \) by at most 1 in total, and thus by a multiplicative factor of at most 2. As we already showed how to obtain an ordering of V(G) from a given ordering of \(V(G')\), the lemma follows for the case where \(V_{1} \ge E(G')/(2k+1)^{4(k+1)+2}\).
Case 2 \(V_{1} < E(G')/(2k+1)^{4(k+1)+2}\). For every \(v\in V(G')\) and every positive integer s, we define \(B_{s}(v)\) to be the ball of radius s around v, that is, the set of vertices at distance at most s from v in \(G'\). Recall that every vertex of \(G'\) has at most 2k neighbors and observe then that \(B_{s}(v) \le (2k+1)^{s}\). We construct a set of vertices \(v_{1}, v_{2}, \dots , v_{\ell } \in V(G')\) whose pairwise distance is greater than \(4(k+1)\) in the following greedy way. Having chosen \(v_1, \dots , v_i\), if \(B_{4(k+1)}(v_1) \cup \dots \cup B_{4(k+1)}(v_{i})\ne V(G')\) then let \(v_{i+1}\) be any vertex outside of \(B_{4(k+1)}(v_1) \cup \dots \cup B_{4(k+1)}(v_{i})\). If such a vertex does not exist, we stop by putting \(\ell =i\) and consider the set \(v_{1},v_{2},\dots ,v_{\ell }\). Observe here that we can calculate \(B_{4(k+1)}(v_{i})\) by breadthfirst search in \({O}((2k+1)^{4(k+1)+1})\) time, by stopping the search at depth \(4(k+1)\). However, note we do not need to revisit a previously visited vertex, unless we reach it with fewer steps. That is, starting with \(i=0\), we mark which vertices we have already visited (the set \(B_{4(k+1)}(v_1) \cup \dots \cup B_{4(k+1)}(v_i)\)) and remember minimum distances from \(\{v_1,\dots ,v_i\}\) to each previously visited vertex. Considering vertices in any order, we let \(v_{i+1}\) be the first not yet visited. We then mark the new ball of radius \(4(k+1)\) around it, but only exploring a previously visited vertex when the minimum distance to it strictly decreases by adding \(v_{i+1}\). This way, we explore each vertex at most \(4(k+1)\) times, as this is an upper bound on the minimum distance of any vertex when first visited. Hence the sequence \(v_1,\dots ,v_\ell \) can be computed in \({O}(k^2 V(G))\) time. We now estimate the length \(\ell \) of the sequence.
Claim 2
In time \({O}(E(G'))\) we can either conclude that \(\mathbf {cw} (G')>k\), or for each \(i\in I\) find a cycle in \(G'\) passing only through the vertices of the ball \(B_{2(k+1)}(v_i)\).
Proof
Suppose for some \(i\in I\), \(B_{2(k+1)}(v_i)\) does not contain a cycle. We will prove that every vertex in \(G'[B_{2(k+1)}(v_i)]\) has degree at least 3 in \(G'\), and that every edge appears with multiplicity 1. Notice first that every edge of the graph \(G'[B_{2(k+1)}(v_{i})]\) has multiplicity 1, as otherwise an edge with multiplicity at least 2 would form a cycle, a contradiction. Notice also that \(B_{2(k+1)}(v_{i})\) does not have any vertex that has degree 2 in G. Indeed, recall that by the construction of the graph \(G'\) any vertex of degree 2 is incident only to one edge of multiplicity 2, which is again a contradiction. Moreover, by the choice of \(i\in [I]\), we obtain that \(B_{2(k+1)}(v_{i})\cap V_{1}=\emptyset \) and therefore, \(G'[B_{2(k+1)}(v_{i})]\) does not have any vertex that has degree 1 in G. We conclude that every vertex in \(G'[B_{2(k+1)}(v_i)]\) has degree at least 3 in G, and every edge appears with multiplicity 1. Recall that the subgraph of \(G'\) induced by \(B_{2(k+1)}(v_i)\) contains the full breadthfirst search tree of vertices at distance at most \(2(k+1)\) from \(v_{i}\). If \(G'[B_{2(k+1)}(v_i)]\) did not contain any cycle, then it would be equal to this breadthfirst search tree, and in this tree all vertices except possibly the last layer would have degrees at least 3. Hence, \(G'\) would contain as a subgraph a perfect binary tree of height \(2(k+1)\). From Lemma 8, this tree has cutwidth at least \(k+1\). The algorithm can thus check (by breadthfirst search) for a cycle in the subgraph induced by \(B_{2(k+1)}(v_i)\). If it does not find any such cycle it immediately concludes that \(\mathbf {cw} (G)=\mathbf {cw} (G') > k\).
If for every \(i\in I\), the breadthfirst search in \(G'[B_{2(k+1)}(v_{i})]\) finds a cycle, then the algorithm obtained, in total time \({O}(E(G'))\), a set of at least \(I\ge E(G')/(2(k+1))^{4(k+1)+2}\) vertexdisjoint (and hence edgedisjoint) cycles. \(\square \)
Let us assume that the algorithm has now found a set \(\mathcal{C}\) of at least \(E(G')/\) \((2k+1)^{4(k+1)+2}\) edgedisjoint cycles and let H be the subgraph obtained from \(G'\) by removing one, arbitrarily chosen, edge \(e_C\) from each cycle \(C\in \mathcal{C}\). Then H can be immersed in \(G'\) and \(E(H) \le E(G') \cdot (11/(2k+1)^{4(k+1)+2})\). To complete the proof of the lemma we will prove that if \(\sigma \) is any ordering of the vertices of H then \(\sigma \) is also an ordering of the vertices of \(G'\) such that \(\mathbf {cw} _{\sigma }(G')\le 2\mathbf {cw} _{\sigma }(H)\). Notice that by reintroducing an edge \(e_C\) of \(G'\) to H we increase the width of the \(\sigma \)cuts separating its endpoints by exactly 1. Observe also that since \(e_C\) belongs to the cycle C, the rest of the cycle forms a path \(P_C\) in H that connects the endpoints of \(e_C\). Therefore, each of the \(\sigma \)cuts separating the endpoints of \(e_C\) has to contain at least one edge of \(P_C\). Since for different edges \(e_C\), for \(C\in \mathcal {C}\), the corresponding paths \(P_C\) are pairwise edgedisjoint and they are present in H, it follows that the size of each \(\sigma \)cut in \(G'\) is at most twice the size of this \(\sigma \)cut in H. Therefore \(\mathbf {cw} _{\sigma }(G')\le 2 \mathbf {cw} _{\sigma }(H)\). Thus, H can be returned, concluding the algorithm. \(\square \)
We are now ready to put all the pieces together.
Proof (of Theorem 2)
Given an nvertex graph G and an integer k, one can in time \(2^{{O}(k^2\log k)}\cdot n\) either conclude that \(\mathbf {cw} (G)>k\), or output an ordering of G of width at most k. The proof follows the same recursive Reduction and Compression scheme as the algorithm of Bodlaender [2]. By applying Lemma 9, we obtain a significantly smaller immersion H, and we recurse on H. This recursive call either concludes that \(\mathbf {cw} (H)>k\), which implies \(\mathbf {cw} (G)>k\), or it produces an ordering of H of optimum width \(\mathbf {cw} (H)\le k\). This ordering can be lifted, using Lemma 9 again, to an ordering of G of width \(\le 2k\). Given this ordering, we apply the dynamic programming procedure of Lemma 7 to construct an optimum ordering of G in time \(2^{{O}(k^2\log k)}\cdot V(G)\).
6 Obstructions to EdgeRemoval Distance to Cutwidth
Throughout this section, by \({O}_k(w)\) we mean a quantity bounded by \(c_k\cdot w+d_k\), for some constant \(c_k,d_k\) depending on k only.
In this section, we provide bounds to the sizes of the obstruction sets of the class of graphs G with \(\mathbf{dcw}_k(G)\le w\), for each \(k,w\in \mathbb {N}\). Our results are the following.
Theorem 5
For every \(w,k\in \mathbb {N}\), every graph in \(\mathbf{obs}_{\le _\mathrm{si}}(\mathcal{C}_{w,k})\) has \({O}_k(w)\) vertices.
Theorem 6
For every \(k,w\in \mathbb {N}\) where \(k\ge 7\), the set \(\mathbf{obs}_{\le _\mathrm{i}}(\mathcal{C}_{w,k})\) contains at least \(\left( {\begin{array}{c}3^{k7} + w + 1\\ w+1\end{array}}\right) \) nonisomorphic graphs.
From Observation 1, both bounds of Theorems 5 and 6 holds for both immersions and strong immersions as well.
Given a collection \(\mathcal{H}\) of graphs, we define the parameter \(\mathbf{aic}_\mathcal{H}(G)\) as the minimum number of edges whose removal from G creates an \(\mathcal{H}\)immersion free graph, that is, a graph that does not admit any graph from \(\mathcal{H}\) as an immersion. In both subsections that follow, we need the following observation.
Observation 4
For every graph G and every \(w\in \mathbb {N}\), it holds that \(\mathbf{dcw}_w(G)=\mathbf{aic}_{\mathrm{obs}(\mathcal{C}_{w})}(G)\).
We remark that, within the same set of authors, we have recently studied kernelization algorithms for edge removal problems to immersionclosed classes. The following result has been obtained in [12]: whenever a finite collection of graphs \(\mathcal{H}\) contains at least one planar subcubic graph, and all graphs from \(\mathcal{H}\) are connected, then the problem of computing \(\mathbf{aic}_\mathcal{H}(G)\), parameterized by the target value, admits a linear kernel. These prerequisites are satisfied for \(\mathcal{H}=\mathrm{obs}(\mathcal{C}_{w})\), and hence the problem of computing \(\mathbf{dcw}_w(G)\), parameterized by the target value k, admits a linear kernel.
The connections between kernelization procedures and upper bounds on minimal obstruction sizes have already been noticed in the literature; see e.g., [8]. Intuitively, whenever the kernelization rules apply only minor or immersion operations, the kernelization algorithm can be turned into a proof of an upper bound on the sizes of minimal obstacles for the corresponding order. Unfortunately, this is not the case for the results of [12]: the main problem is the lack of linked decompositions for parameter treecut width, which plays the central role. Here, the situation is different, as we know that there are always linked orderings of optimum width. We therefore showcase how to use the linkedness to obtain a linear upper bound on the sizes of obstructions for \(\mathcal{C}_{w,k}\). The arguments are somewhat similar as in [12]: we use the idea of protrusions, adapted to the setting of edge cuts, and we try to replace protrusions with smaller ones having the same behavior. The main point is that linkedness ensures us that the replacement results in an immersion of the original graph.
6.1 Upper Bound on Obstruction Size
A partial qboundaried graph is a pair \(\mathbf {G}=(G,\bar{x})\) where G is a graph and \(\bar{x}=(x_{1},\dots ,x_q)\) is a qtuple that consists either of vertices of G or from empty slots (that are indices that do not correspond to vertices of G). If \(x_{i}\) is an empty slot, we denote it by \(x_{i}=\diamond \). The extension of such \(\mathbf {G}\) is defined just as for qboundaried graphs, but we put \(x'_{i}=\diamond '\) iff \(x_{i}=\diamond \). Intuitively a partial qboundaried graph extends the notion of a boundaried graph by allowing the vertices of the boundary to carry indices from a set whose cardinality might be bigger than the boundary.
Let H be a graph and let \((X_{1},X_{2})\) be its cut where \(q=\delta (X_{1})\). Let \(E_H(X_1,X_2)=\{e_{1},\ldots ,e_{q}\}\) where \(e_{i}=\{x_{i}^{1},x_{i}^{2}\}\), \(i\in [q]\), and such that \(x_i^j\in X_{j}\) for \((i,j)\in [q]\times [2]\). For \(j\in [2]\), we say that the pair \((X_1,X_2)\) generates the qboundaried graph \(\mathbf{A}_j=({A}_j,\overline{x}_{j})\) if \(A_i=G[X_i]\) and \(\overline{x}_{i}=(x_{1}^{j},\ldots ,x_{q}^{j})\).
We denote by \(\mathcal{B}_{q,h}\) the collection containing every qboundaried graph that can be generated from some cut \((X_{1},X_{2})\) of some graph H where \(V(H)+E(H)\le h\) and \(q=\delta (X_{1})\). Moreover, we denote by \(\mathcal{M}_{q,h}\) the set of all partial qboundaried graphs \(\mathbf {F}'=(F',\bar{x}')\) such that, for some \(\mathbf {F} =(F,\bar{x})\) of \(\mathcal {B}_{q,h}\), \(F'\) is a subgraph of F and a vertex \(x_i\) in \(\bar{x}'\) is an empty slot iff \(x_{i}\in V(F)\setminus V(F')\).
In other words, \(\mathcal{M}_{q,h}\) contains all partial qboundaried graphs that can be generated by a graph whose number of edges and vertices does not exceed h. We insist that if \(\mathbf{H}=(H,\overline{x})\in \mathcal{M}_{q,h}\), then the vertices of H are taken from some fixed repository of h vertices and that an element \(x_{i}\) of \(\overline{x}\) is either an empty slot (i.e., \(x_{i}=\diamond \)) or the ith vertex of some predetermined ordering \((x_{1},\ldots ,x_{q})\) of q vertices from this repository. This permits us to assume that \(\mathcal{M}_{q,h}\) is bounded by some function that depends only on q and h.
Lemma 10
There is some function \(f_1:\mathbb {N}^2\rightarrow \mathbb {N}\) such that for every two nonnegative integers q and h, the number of equivalence classes of \(\sim _{q,h}\) is at most \(f_1(q,h)\).
The next lemma is a consequence of the definition of the function \(\mathcal{F}_{q,h}\).
Lemma 11
Let \(\mathcal{H}\) be some set of connected graphs, each of at most h vertices, and let \(\mathbf{G}_i=(G_i,\overline{x}_{i}), i\in \{1,2\}\) be two qboundaried graphs such that \(\mathbf{G}_{1}\sim _{q,h}\mathbf{G}_{2}\) and such both \(G_{1},G_{2}\) are \(\mathcal{H}\)immersion free. Then, for every qboundaried graph \(\mathbf{F}=(F,\overline{y})\), it holds that \(\mathbf{aic}_\mathcal{H}(\mathbf{F}\oplus \mathbf{G}_{1})=\mathbf{aic}_\mathcal{H}(\mathbf{F}\oplus \mathbf{G}_{2})\).
The proof is omitted as it is very similar to the one in [5] where a similar encoding was defined in order to treat the topological minor relation. To see the main idea, recall that \(\mathcal{F}_{q,h}(\mathbf{G}_{i})\) registers all different “partial occurrences” of graphs of \(\le h\) vertices (and therefore also of graphs of \(\mathcal{H}\)) in \(\mathbf{G}_i'\), for all possible ways to obtain \(\mathbf{G}_i'\) from \(\mathbf{G}_i\) after removing at most q edges. This encoding is indeed sufficient to capture the behavior of all possible edge sets whose removal from \(\mathbf{F}\oplus \mathbf{G}_{i}\) creates an \(\mathcal{H}\)free graph. Indeed, as both \(G_{1}\) and \(G_{2}\) are \(\mathcal{H}\)immersion free, any such set should have at most q edges inside \(\mathbf{G}_{i}\) as, if not, the qboundary edges between \(\mathbf{F}\) and \(\mathbf{G}_i\) would also make the same job. A similar discussion is also present in [12].
Given a graph G and a subset \(X\subseteq V(G)\), we write \(\mathbf{cw}_{\sigma }(G,X)=\delta _G(X)+\mathbf{cw}_{\sigma _{X}}(G[X])\). We require the following extension of the definition of linked orderings.
Definition 8
(extended linked ordering) Let G be a nvertex graph and let X be a subset of V(G). An ordering \(\sigma =\langle v_{1},\ldots ,v_{n}\rangle \) of G is Xlinked if \(X=\{v_{nX+1},\ldots ,v_{n}\}\) and for every \(i,j\in [nX,n]\) where \(i<j\) there exist \(\min \{\delta (\{{v_{1},\ldots ,v_h}\}) \mid i\le h\le j \}\) edgedisjoint paths between \(\{v_{1},\ldots ,v_{i}\}\) and \(\{v_{j},\ldots ,v_{n}\}\) in G.
The proof of the following result is very similar to the one of Lemma 3. We just move X to the end of the ordering, in the order given by \(\sigma \), and apply exhaustively the same refinement step based on submodularity, but only to the subordering induced by X.
Lemma 12
For every graph G and every subset X of V(G), if there exists an ordering \(\sigma \) of G such that \(\mathbf{cw}_{\sigma }(G,X)\le r\), then there exists an Xlinked ordering \(\sigma '\) of G such that \(\mathbf{cw}_{\sigma '}(G,X)\le r\).
Let \(w_1,w_2\in \mathbb {N}\), G be a graph, and \(X\subseteq V(G)\). We say that X is an \((w_1,w_2)\)cutwidthedgeprotrusion of G if \(\delta (X)\le w_1\) and \(\mathbf{cw}(G[X_{i}])\le w_2\).
The next lemma uses an idea similar to the one of Lemma 4. Here \(\sim _{q,h}\) plays the role of \((q,\ell )\)similarity.
Lemma 13
There is a computable function \(f_2:\mathbb {N}^2\rightarrow \mathbb {N}\) such that the following holds: Let k be a nonnegative integer and let \(\mathcal{H}\) be a finite set of connected graphs, each having at most h vertices and edges. Let also G be a graph and let X be a (2k, k)cutwidthedgeprotrusion of G. If \(X>f_2(k,h)\), then G contains as a proper strong immersion a graph \(G'\) where \(\mathbf{aic}_\mathcal{H}(G)=\mathbf{aic}_\mathcal{H}(G')\).
Proof
We set \(f_{2}(k,h)=(f_{1}(3k,h)+1)^{3k+1}1\). We have that \(X>f_{2}(k,h)\) or, equivalently, \(X\ge (f_{1}(3k,h)+1)^{3k+1}\). We set \(\ell =X\). Let \(\sigma ^*=\langle x_{1},\ldots ,x_{\ell }\rangle \) be an ordering of the vertices in X such that \(\mathbf{cw}_{\sigma ^*}(G[X])\le k\). Let \(\sigma =\langle v_{1},\ldots ,v_{n\ell },v_{n\ell +1},\ldots ,v_{n}\rangle \) be any ordering of V(G) such that \(\sigma ^*\) is a suffix of \(\sigma \), i.e., \(\langle x_{1},\ldots ,x_{\ell }\rangle =\langle v_{n\ell +1},\ldots ,v_{n}\rangle \). It follows that \(\mathbf{cw}_{\sigma }(G,X)\le \mathbf{cw}_{\sigma ^*}(G[X])+\delta _{G}(X)\le k+2k=3k\). From Lemma 12, there is an Xlinked ordering \(\sigma '\) of V(G), where \(\mathbf{cw}_{\sigma '}(G,X)\le 3k\).
We set \(k_i=\delta _{G[X]}(\{x_{1},\ldots ,x_{i(n\ell )})+\delta _{G}(X)\) and observe that \(k_{i}\le k+2k=3k, i\in [n\ell ,n1]\). We set up the alphabet \(\mathbb {A}=\{0,1,\ldots ,3k\}\) and we see \(w=k_{n\ell },k_{n\ell +1},\ldots ,k_{n1}\) as a word on \(\mathbb {A}\). Let also \(N=f_{1}(3k,h)\). Notice that \(w=X=\ell \ge (f_{1}(3k,h)+1)^{3k+1}=(N+1)^{\mathbb {A}}\). From Corollary 1, if \(w\ge (N+1)^{\mathbb {A}}\), there are \(a,b\in [n\ell ,n1], a<b\) and some \(p\in \mathbb {A}\) such that \(k_{a},k_{b}\ge p\) and p appears in \(\{k_{a},\ldots ,k_{b}\}\) at least \(N+1\) times. Let these appearance be at indices \(a\le i_1<i_2<\ldots <i_{N+1}\le b\).
By Xlinkedness, there are p edgedisjoint paths \(P^i\), for \(i\in [p]\), from \(\{v_1,\ldots ,v_{i_1}\}\) to \(\{v_{i_{N+1}},\ldots ,\) \(v_{V(G)}\}\). Observe that for each \(j\in [N+1]\), each path \(P^i\) must cross exactly one edge of the cut \(\delta _G(\{v_1,\ldots ,v_{i_j}\})\); let this edge be \(z^i_jw^i_j\), where \(z^i_j\in \{v_1,\ldots ,v_{i_j}\}\) and \(w^i_j\notin \{v_1,\ldots ,v_{i_j}\}\). For each \(j\in [N+1]\) we define pboundaried graphs \(\mathbf{F}_j=(F_j,(z^1_j,\ldots ,z^p_j))\) where \(F_{j}=G[\{v_{1},\ldots ,v_{i_j}\}]\) and \(\mathbf{G}_{j}=(G_{j},(w^1_j,\ldots ,w^p_j))\), \(G_{j}=G[\{v_{i_j+1},\ldots ,v_{V(G)}\}]\).
As, from Lemma 10, the equivalence relation \(\sim _{3k,h}\) has at most N equivalent classes, there are \(j_1,j_2\) such that \(a\le j_1<j_2\le b\) such that \(\mathbf{G}_{j_1}\sim _{3k,h} \mathbf{G}_{j_2}\). Let \(G'=\mathbf{F}_{i_{j_1}}\oplus \mathbf{G}_{i_{j_2}}\); it is easy to observe that \(G'\) is a proper immersion of G, because the edges added when joining can be modeled using appropriate infixes of the paths \(P_i\). From Lemma 11, however, we have \(\mathbf{aic}_\mathcal{H}(\mathbf{F}_{i}\oplus \mathbf{G}_{i})=\mathbf{aic}_\mathcal{H}(\mathbf{F}_{i}\oplus \mathbf{G}_{j})\), and therefore \(\mathbf{aic}_\mathcal{H}(G)=\mathbf{aic}_\mathcal{H}(G')\). \(\square \)
Lemma 14
Let \(k,w,\ell \in \mathbb {N}\) and let G be a graph. If \(\mathbf{dcw}_k(G)\le w\) and \(V(G)\ge \ell \cdot (2w+1)+2w\), then G has a (2k, k)cutwidthedgeprotrusion X where \(X\ge \ell \).
Proof
We denote \(n=V(G)\). Let F be a set of edges of G such that if \(G'=G\setminus F\), then \(\mathbf{cw}(G')\le k\). Let \(\sigma =\langle v_{1},\ldots ,v_{n}\rangle \) be an ordering of \(V(G')\) such that \(\mathbf{cw}_{\sigma }(G')\le k\). Let I denote the indices in \(\sigma \) of the endpoints of the edges in F and notice that \(I \le 2w\). We consider the maximal intervals of [n] that do not intersect I. The set \([n] \setminus I\) has \(nI\ge n2w\) elements, that are distributed among at most \(I+1\le 2w+1\) such intervals. By the pigeonhole principle, one interval \(\{i, \dots , j\}\) has at least \(\frac{n  2w}{2w+1} \ge \ell \) elements.
Consider now the set \(X=\{v_{i},\ldots ,v_{j}\}\), \(X\ge \ell \). Notice that for \(\sigma '=\langle v_{i},\ldots ,v_{j} \rangle \), \(\mathbf{cw}_{\sigma '}(G[X])\le k\). Moreover there are at most \(\delta _{G'}(\{v_{1},\ldots ,v_{i1}\})+\delta _{G'}(\{v_{j+1},\ldots ,v_{n}\})\le 2k\) edges with one vertex in X and the other not in X. Therefore, \(\delta _{G}(X)\le 2k\) and X is a (2k, k)cutwidthedgeprotrusion of G. \(\square \)
Proof (of Theorem 5)
We set \(\mathcal{H}=\mathbf{obs}_{\le _\mathrm{im}}(\mathcal{C}_{k})\). By Theorem 4, there is a \(f_{3}:\mathbb {N}\rightarrow \mathbb {N}\) such that graphs from \(\mathcal{H}\) have at most \(h=f_{3}(k)\) vertices. Let \(G\in \mathbf{obs}_{\le _\mathrm{im}}(\mathcal{C}_{w,k})\). This means that \(\mathbf{dcw}_k(G)=w+1\), while, for every proper strong immersion \(G'\) of G, it holds that \(\mathbf{dcw}_k(G')\le w\). This, together with Observation 4 and Lemma 13, implies that G cannot have a (2k, k)cutwidthedgeprotrusion X of more than \(\ell =f_{2}(k,h)\), vertices. As \(\mathbf{dcw}_k(G)=w+1\), Lemma 14 implies that \(V(G)< \ell \cdot (2w+3)+2(w+1)={O}_{k}(w)\) vertices. \(\square \)
Notice that Theorem 5 can be seen as an application of Lemma 3 on the existence of linked orderings of optimum cutwidth (along with Lemma 12, that is an easy extension of it). We stress that this bound is constructive as, by going through the proof, one can make an estimation of the functions of k hidden in the \({O}_{k}\) notation. In future work we plan to further develop the above technique of proving such linear bounds for other edge modification problems. Some analogous work for vertex modification problems have been done in [8] where the parameter k is the number of vertices that one should remove in order to transform a graph to one of treewidth at most k. The corresponding bound in [8] is \(w^{{O}_{k}(1)}\), is nonconstructive, and follows a distinct (more elaborated) approach.
6.2 Lower Bound on Number of Obstructions
We now focus on the proof of Theorem 6. We need the following result.
Theorem 7
([13]) For every \(k \ge 7\), the number of nonisomorphic connected minimal obstructions in \(\mathbf{obs}_{\le _\mathrm{i}}(\mathcal{C}_{k})\) is at least \(3^{k7} + 1\).
Recall that, given a graph class \(\mathcal{H}\), we defined \(\mathbf{aic}_\mathcal{H}(G)\) as the minimum number of edges of G whose removal yields an \(\mathcal{H}\)immersionfree graph. We set \(\mathcal{C}_{w,\mathcal{H}}=\{G\mid \mathbf{aic}_\mathcal{H}(G)\le w\}\). In particular \(\mathcal{C}_{0,\mathcal{H}}\) is the class of all \(\mathcal{H}\)immersion free graphs. If G and H are graphs, we denote by \(G\uplus H\) the disjoint union of G and H.
The following observations follow directly from the definition of \(\mathbf{aic}_\mathcal{H}\).
Observation 5
If G and H are graphs, then \(H\le _\mathrm{i}G\) implies that \(\mathbf{aic}_\mathcal{H}(H)\le \mathbf{aic}_\mathcal{H}(G)\).
Observation 6
If G and H are graphs, then \(\mathbf{aic}_\mathcal{H}(G\uplus H) = \mathbf{aic}_\mathcal{H}(G) + \mathbf{aic}_\mathcal{H}(H)\).
Observation 7
If \(G\in \mathbf{obs}_{\le _\mathrm{i}}(\mathcal{C}_{w,\mathcal{H}})\), then \(\mathbf{aic}_\mathcal{H}(G)=w+1\).
Lemma 15
Let \(\mathcal{H}\) be some \(\le _\mathrm{i}\)antichain. For every nonnegative integer w, if \(G_1, \dots ,G_{w+1}\) are (not necessarily distinct) members of \(\mathcal{H}\), then \(\biguplus _{i=1}^{w+1} G_i\in \mathbf{obs}_{\le _\mathrm{i}}(\mathcal{C}_{w,\mathcal{H}})\).
Proof
Let \(G = \biguplus _{i=1}^{w+1} G_i\). To prove that \(G\in \mathbf{obs}_{\le _\mathrm{i}}(\mathcal{C}_{w,\mathcal{H}})\) we have to show that it satisfies O1 and O2. Notice that since \(\mathcal {H}\) is an \(\le _\mathrm{i}\)antichain, \(\mathbf{aic}_\mathcal{H}(H) = 1\) for every \(H \in \mathcal {H}\). By Observations 6 and 7, \(\mathbf{aic}_\mathcal{H}(G) = \sum _{i=1}^{w+1}\mathbf{aic}_\mathcal{H}(G_i) = w+1\) and O1 holds. Therefore, \(G\not \in \mathcal{C}_{w,\mathcal{H}}\). Let now \(G'\) is a proper immersion of G. This mean that \(G'=\biguplus _{i=1}^{w+1}G'_{i}\) where \(G'_{i}\le _\mathrm{i}G_{i}\) and at least one of \(G_{1}',\ldots ,G_{w+1}'\) is different than \(G_{i}\). W.l.o.g. we assume that this graph is \(G_{w+1}\). As \(\mathcal{H}\) is a \(\le _\mathrm{i}\)antichain, \(G'_{w+1}\) is not isomorphic to a graph of \(\mathcal{H}\). Therefore \(\mathbf{aic}_\mathcal{H}(G'_{w+1})=0\). Then, by Observations 5 and 6, \(\mathbf{aic}_\mathcal{H}(G')=\sum _{i=1}^{k}\mathbf{aic}_\mathcal{H}(G'_{i}) +\mathbf{aic}_\mathcal{H}(G'_{w+1})\le \sum _{i=1}^{w}\mathbf{aic}_\mathcal{H}(G_{i}) +0=w\) and O2 holds. \(\square \)
Theorem 8
If k is a nonnegative integer and \(\mathcal{H}\) is a \(\le _\mathrm{i}\)antichain that contains at least q connected graphs, then \(\mathbf{obs}_{\le _\mathrm{i}}(\mathcal{C}_{w,\mathcal{H}})\ge \left( {\begin{array}{c} q+ w\\ w+1\end{array}}\right) \).
Proof
Let \(\mathcal{H}'\) be some subset of \(\mathcal{H}\) containing q connected graphs. Using Lemma 15, we observe that every multiset of cardinality \(w+1\) whose elements belong to \(\mathcal{H}'\) corresponds to a different (i.e., nonisomorphic) obstruction of \(\mathcal{C}_{w,\mathcal{H}}\). Therefore, \(\mathbf{obs}_{\le _\mathrm{i}}(\mathcal{C}_{w,\mathcal{H}})\) is at least the number of multisets of cardinality \(w+1\) the elements of which are taken from a set of cardinality q, which is known to be \(\left( {\begin{array}{c}q+w\\ w+1\end{array}}\right) \). \(\square \)
Proof (of Theorem 6)
From Observation 4, it holds that \(\mathcal{C}_{w,k}=\mathcal{C}_{w,\mathcal{H}_{k}}\), where \(\mathcal{H}_{k}=\mathbf{obs}_{\le _\mathrm{i}}(\mathcal{C}_{k})\). This means that \(\mathbf{obs}_{\le _\mathrm{i}}(\mathcal{C}_{w,k})=\mathbf{obs}_{\le _\mathrm{i}}(\mathcal{C}_{w,\mathcal{H}_k}).\) The result follows from Theorems 7 and 8. \(\square \)
7 Conclusions
In this paper we have proved that the immersion obstructions for admitting a layout of cutwidth at most k have sizes singleexponential in \({O}(k^3\log k)\). The core of the proof can be interpreted as bounding the number of different behavior types for a part of the graph that has only a small number of edges connecting it to the rest. This, in turn, gives an upper bound on the number of states for a dynamic programming algorithm that computes the optimum cutwidth ordering on an approximate one. This last result, complemented with an adaptation of the reduction scheme of Bodlaender [2] to the setting of cutwidth, yields a direct and selfcontained FPT algorithm for computing the cutwidth of a graph. In fact, we believe that our algorithm can be thought of “Bodlaender’s algorithm for treewidth in a nutshell”. It consists of the same two components, namely a recursive reduction scheme and dynamic programming on an approximate decomposition, but the less challenging setting of cutwidth makes both components simpler, thus making the key ideas easier to understand. For an alternative attempt of simplification of the algorithm of Bodlaender and Kloks [3], applied for the case of pathwidth, see [9].
In our proof of the upper bound on the number of types/states, we used a somewhat new bucketing approach. This approach holds the essence of the typical sequences of Bodlaender and Kloks [3], but we find it more natural and conceptually simpler. The drawback is that we lose a \(\log k\) factor in the exponent. It is conceivable that we could refine our results by removing this factor provided we applied typical sequences directly, but this is a price that we are willing to pay for the sake of simplicity and being selfcontained.
An important ingredient of our approach is the observation that there is always an optimum cutwidth ordering that is linked: the cutsizes along the ordering precisely govern the edge connectivity between prefixes and suffixes. Recently, there is a growing interest in parameters that are treelike analogues of cutwidth: treecut width [26] and carvingwidth [21]. In future work, we aim to explore and use linkedness for treecut decompositions and carving decompositions in a similar manner as presented here.
Footnotes
Notes
Acknowledgements
The second author thanks Mikołaj Bojańczyk for the common work on understanding and reinterpreting the BodlaenderKloks dynamic programming algorithm [3], which influenced the bucketing approach presented in this paper. We also thank Ojoung Kwon for pointing us to [11, 16], as well as an anonymous referee for noting that the running time in Lemma 9 can be reduced to polynomial by amortization.
References
 1.Bellenbaum, P., Diestel, R.: Two short proofs concerning treedecompositions. Comb. Probab. Comput. 11(6), 541–547 (2002)MathSciNetCrossRefMATHGoogle Scholar
 2.Bodlaender, H.L.: A lineartime algorithm for finding treedecompositions of small treewidth. SIAM J. Comput. 25(6), 1305–1317 (1996)MathSciNetCrossRefMATHGoogle Scholar
 3.Bodlaender, H.L., Kloks, T.: Efficient and constructive algorithms for the pathwidth and treewidth of graphs. J. Algorithms 21(2), 358–402 (1996)MathSciNetCrossRefMATHGoogle Scholar
 4.Booth, H., Govindan, R., Langston, M.A., Ramachandramurthi, S.: Cutwidth approximation in linear time. In: Proceedings of the Second Great Lakes Symposium on VLSI, pp. 70–73. IEEE (1992)Google Scholar
 5.Chatzidimitriou, D., Raymond, J., Sau, I., Thilikos, D.M.: An \({O}(\log {OPT})\)approximation for covering/packing minor models of \(\theta _r\). In: Proceedings of WAOA 2015, pp. 122–132 (2015). arXiv:1510.03945
 6.Chudnovsky, M., Seymour, P.D.: A wellquasiorder for tournaments. J. Comb. Theory Ser. B 101(1), 47–53 (2011)MathSciNetCrossRefMATHGoogle Scholar
 7.Díaz, J., Petit, J., Serna, M.J.: A survey of graph layout problems. ACM Comput. Surv. 34(3), 313–356 (2002)CrossRefGoogle Scholar
 8.Fomin, F.V., Lokshtanov, D., Misra, N., Saurabh, S.: Planar \({{\cal{F}}}\)deletion: approximation, kernelization and optimal FPT algorithms. In: Proceedings of FOCS 2012, pp. 470–479. IEEE Computer Society (2012)Google Scholar
 9.Fürer, M.: Faster computation of pathwidth. In: Mäkinen, V., Puglisi, J.S., Salmela, L. (eds.) Combinatorial Algorithms: 27th International Workshop, IWOCA 2016, Helsinki, Finland, August 17–19, 2016, Proceedings, pp. 385–396. Springer, Cham (2016)Google Scholar
 10.Garey, M.R., Johnson, D.S.: Computers and Intractability, vol. 174. Freeman, New York (1979)MATHGoogle Scholar
 11.Geelen, J.F., Gerards, A.M.H., Whittle, G.: Branchwidth and wellquasiordering in matroids and graphs. J. Comb. Theory, Ser. B 84(2), 270–290 (2002). A correction is available at http://www.math.uwaterloo.ca/~jfgeelen/Publications/bncorr.pdf
 12.Giannopoulou, A.C., Pilipczuk, M., Thilikos, D.M., Raymond, J.F., Wrochna, M.: Linear kernels for edge deletion problems to immersionclosed graph classes (2016). arXiv:1609.07780
 13.Govindan, R., Ramachandramurthi, S.: A weak immersion relation on graphs and its applications. Discrete Math. 230(1), 189–206 (2001)MathSciNetCrossRefMATHGoogle Scholar
 14.Heggernes, P., van’t Hof, P., Lokshtanov, D., Nederlof, J.: Computing the cutwidth of bipartite permutation graphs in linear time. SIAM J. Discrete Math. 26(3), 1008–1021 (2012)MathSciNetCrossRefMATHGoogle Scholar
 15.Heggernes, P., Lokshtanov, D., Mihai, R., Papadopoulos, C.: Cutwidth of split graphs and threshold graphs. SIAM J. Discrete Math. 25(3), 1418–1437 (2011)MathSciNetCrossRefMATHGoogle Scholar
 16.Kanté, M.M., Kwon, O.: An upper bound on the size of obstructions for bounded linear rankwidth (2014). arXiv:1412.6201
 17.Korach, E., Solel, N.: Treewidth, pathwidth, and cutwidth. Discrete Appl. Math. 43(1), 97–101 (1993)MathSciNetCrossRefMATHGoogle Scholar
 18.Lagergren, J.: Upper bounds on the size of obstructions and intertwines. J. Comb. Theory Ser. B 73(1), 7–40 (1998)MathSciNetCrossRefMATHGoogle Scholar
 19.Leighton, F.T., Rao, S.: Multicommodity maxflow mincut theorems and their use in designing approximation algorithms. J. ACM 46(6), 787–832 (1999)MathSciNetCrossRefMATHGoogle Scholar
 20.Robertson, N., Seymour, P.D.: Graph minors XXIII. Nash–Williams’ immersion conjecture. J. Comb. Theory Ser. B 100(2), 181–205 (2010)MathSciNetCrossRefMATHGoogle Scholar
 21.Seymour, P.D., Thomas, R.: Call routing and the ratcatcher. Combinatorica 14(2), 217–241 (1994)MathSciNetCrossRefMATHGoogle Scholar
 22.Takahashi, A., Ueno, S., Kajitani, Y.: Minimal acyclic forbidden minors for the family of graphs with bounded pathwidth. Discrete Math. 127(1–3), 293–304 (1994). (Graph theory and applications (Hakone, 1990)) MathSciNetCrossRefMATHGoogle Scholar
 23.Thilikos, D.M., Serna, M.J., Bodlaender, H.L.: Cutwidth I: a linear time fixed parameter algorithm. J. Algorithms 56(1), 1–24 (2005)MathSciNetCrossRefMATHGoogle Scholar
 24.Thilikos, D.M., Serna, M.J., Bodlaender, H.L.: Cutwidth II: algorithms for partial \(w\)trees of bounded degree. J. Algorithms 56(1), 25–49 (2005)MathSciNetCrossRefMATHGoogle Scholar
 25.Thomas, R.: A Mengerlike property of treewidth: the finite case. J. Comb. Theory Ser. B 48(1), 67–76 (1990)MathSciNetCrossRefMATHGoogle Scholar
 26.Wollan, P.: The structure of graphs not admitting a fixed immersion. J. Comb. Theory Ser. B 110, 47–66 (2015)MathSciNetCrossRefMATHGoogle Scholar
 27.Yannakakis, M.: A polynomial algorithm for the mincut linear arrangement of trees. J. ACM 32(4), 950–988 (1985)MathSciNetCrossRefMATHGoogle Scholar
Copyright information
Open AccessThis article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.