TREEWIDTH and PATHWIDTH parameterized by vertex cover
Mathieu Chapelle, Mathieu Liedloff, Ioan Todinca, Yngve Villanger
aa r X i v : . [ c s . D S ] M a y T REEWIDTH and P
ATHWIDTH parameterized by vertex cover
Mathieu Chapelle , Mathieu Liedloff , Ioan Todinca , and Yngve Villanger IGM-LabInfo, Universit Paris-Est Marne-la-Vall´ee, 5 Bd Descartes - Champs sur Marne 77454 Marne laVall´ee cedex 2, France, [email protected] LIFO, Universit´e d’Orl´eans, BP 6759, F-45067 Orl´eans Cedex 2, France, (mathieu.liedloff | ioan.todinca)@univ-orleans.fr Department of Informatics, University of Bergen, N-5020 Bergen, Norway, [email protected]
Abstract.
After the number of vertices,
Vertex Cover is the largest of the classical graph pa-rameters and has more and more frequently been used as a separate parameter in parameterizedproblems, including problems that are not directly related to the
Vertex Cover . Here we con-sider the
TREEWIDTH and
PATHWIDTH problems parameterized by k , the size of a minimumvertex cover of the input graph. We show that the PATHWIDTH and
TREEWIDTH can be com-puted in O ∗ (3 k ) time. This complements recent polynomial kernel results for TREEWIDTH and
PATHWIDTH parameterized by the
Vertex Cover . Parameterized algorithms are typically used in the setting where the provided problem is NP-hardand we want to bound the exponential part of the running time to a function of some specific pa-rameter. This parameter can be any property related to the input, the output, or the problem itself. Aclassical parameter is n , the size of the input or the number of vertices in the input graph. Algorithmsof this type are usually refered to as moderately exponential time algorithms [13], and in many casesit is non trivial to improve the exponential dependence on n to something better than the naive bruteforce bound.The number of vertices is not the only natural graph parameter; there are also parameters like treewidth , feedback vertex set , and vertex cover . For every graph, there is an increasing order onthese parameters: treewidth is the smallest, and then feedback vertex set , vertex cover and eventually n come in this order. We refer to Bodlaender et. al. [6] for more parameters and the relation betweenthem. Many moderately exponential time algorithms have an exponential dependence on n that is ofthe form c n for some constant c < . When the exponential part of the running time is bounded byone of the other graph parameters, we typically see a much faster growing function than we do forparameter n . Thus, we have reached a situation where tradeoffs can be made between the size theparameter we choose and the exponential dependence on this parameter.We use a modified big-Oh notation that suppresses all other (polynomially bounded) terms. Thusfor functions f and g we write f ( n, k ) = O ∗ ( g ( n, k )) if f ( n, k ) = O ( g ( n, k ) · n O (1) ) . Considerthe problems of computing the TREEWIDTH or the
PATHWIDTH of a given graph G . For parameter n both these values can be computed in O ∗ (2 n ) by a dynamic programming approach proposed byHeld and Karp [16]. Currently the best moderately exponential time algorithms for these problemshave O (1 . n ) [12] and O (1 . n ) [18] running times respectively. On the other hand if we goto the smaller parameters treewidth and pathwidth the best known running times are of the from ∗ (2 O ( k ) ) [2]. Thus, it is preferable to use the O ∗ (2 O ( k ) ) algorithm parameterized by treewidth if the treewidth is O ( n / ) , and the algorithms parameterized by n otherwise. In this paper weare considering vertex cover as a parameter for the TREEWIDTH or the
PATHWIDTH problems. Ourobjective is then to find the most efficient algorithm for these two problems where the exponentialpart of the running time is only depending on the size of the vertex cover .Using the size of the vertex cover as a parameter when analyzing algorithms and solving prob-lems is not a new idea. Some examples from the literature are an O ∗ (2 k ) algorithm for CUTWIDTH parameterized by vertex cover [9], an O ∗ (2 k ) algorithm for CHORDAL GRAPH sandwich param-eterized by the vertex cover of an edge set [15], and different variants of graph layout problemsparameterized by vertex cover [11].Another direction in the area of parameterized complexity is kernelization or instance compres-sion. Recently it was shown [10] that we can not expect that the
TREEWIDTH and
PATHWIDTH problems have a polynomial kernel unless
N P ⊆ coN P/poly when parameterized by treewidth or pathwidth , but on the other hand they do have a kernel of size O ( k ) when parameterized by vertexcover [6,7]. Existence of a polynomial size kernel does not necessarily imply the existence of analgorithm that has a slow growing exponential function in the size of the parameter. Indeed if wefirst kernelize then use the best moderately exponential time algorithm of [12] on the kernel, we stillobtain an O ∗ (2 O ( k ) ) algorithm for TREEWIDTH parameterized by vertex cover . Hence dependencein the parameter is still similar to the algorithm parameterized by treewidth [2].
Our results.
We provide an O ∗ (3 k ) time algorithm for PATHWIDTH and
TREEWIDTH when param-eterized by vc the size of the vertex cover . It means that this algorithm will be preferable for graphswhere the treewidth is Ω ( vc / ) and the vertex cover is at most . n and . n for the TREEWIDTH and
PATHWIDTH problems respectively. Another consequence is that the
TREEWIDTH and
PATH - WIDTH of a bipartite graph can be computed in O ∗ (3 n/ ) or O ∗ (1 . n ) time, which is better thanthe running time provided by the corresponding moderate exponential time algorithms ( O ∗ (1 . n ) [12] and O ∗ (1 . n ) [18] respectively). We point out that for TREEWIDTH , we first provide an O ∗ (4 k ) algorithm based on dynamic programming. The algorithm is then modified to obtain a running timeof O ∗ (3 k ) , and for this purpose we use the subset convolution technique introduced in [1].In addition to this we also show (in Appendix D) that the PATHWIDTH can be computed in O ∗ (2 k ′ ) time where k ′ is the vertex cover size of the complement of the graph. This matches theresult of [4] for TREEWIDTH parameterized by the vertex cover size of the complement of the graph.
All graphs considered in this article are simple and undirected. For a graph G = ( V, E ) we denoteby n = | V | the number of vertices and by m = | E | the number of edges. The neighborhood of avertex v is defined as N ( v ) = { u ∈ V : { u, v } ∈ E } , and the closed neighborhood is defined as N [ v ] = N ( v ) ∪ { v } . For a vertex set W , we define its neighborhood as N ( W ) = S v ∈ W N ( v ) \ W ,and its closed neighborhood as N [ W ] = N ( W ) ∪ W . A vertex set C ⊆ V in a graph G = ( V, E ) iscalled a vertex cover if for every edge uv ∈ E ( G ) we have that vertex u or v is in C . By extension,the minimum size of a vertex cover of G is usually called the vertex cover of G . Vertex set X iscalled a clique of G if for each pair u, v ∈ X we have that uv ∈ E . Proposition 1 ([8]).
The minimum vertex cover problem can be solved in time O ∗ (1 . k ) , where k is the vertex cover of the input graph.
2e now define tree and path decompositions . A tree decomposition of a graph G = ( V, E ) is apair ( T, X ) where T = ( I, F ) is a tree and X = { X i | i ∈ I } is a family of subsets of V , called bags , where – V = S i ∈ I X i , – for each edge uv ∈ E there exists an i ∈ I such that u, v ∈ X i , and – for each vertex v ∈ V the nodes { i ∈ I | v ∈ X i } induce a (connected) subtree of T .The width of the tree decomposition ( T, X ) is max i ∈ I | X i | − (the maximum size of a bag, minusone) and the treewidth of G is the minimum width over all tree decompositions of G .A path decomposition of G is a tree decomposition ( T, X ) such that the tree T is actually a path.The pathwidth of G is the minimum width over all path decomposition of G .The following result is a straightforward consequence of Helly’s property for a family of subtreesof a tree. Proposition 2.
Let ( T, X ) be a tree decomposition of graph G = ( V, E ) . Let H = ( V, F ) be thegraph such that xy ∈ F if and only if there exists a bag of the decomposition containing both x and y . A set W ⊆ V of vertices induces a clique in H if and only if there is a bag X i ∈ X such that W ⊆ X i . It is well-known that the graph H constructed above is a chordal graph (or an interval graph if wereplace tree decomposition by path decomposition), but we will not use this here. See e.g. [14] formore details on these graphs and a proof of the previous proposition.Let i be a node of an arbitrarily rooted tree decomposition ( T, X ) . Let T i be the subtree of T rooted in i . We denote by V i the union of bags of the subtree T i . We let L i = V i \ X i ( L like “lower”)and R i = V \ V i ( R like “rest”). Clearly, ( L i , X i , R i ) is a partition of V . Proposition 3 ([3]).
Let ( T, X ) be a tree decomposition of graph G = ( V, E ) . The bag X i sepa-rates, in graph G , any two vertices a ∈ L i and b ∈ R i , i.e. a and b are in different components of G [ V \ X i ] . For our purpose, it is very convenient to use nice tree and path decompositions (see e.g. [3]). Ina nice tree decomposition ( T, X ) , the tree is rooted, and has only four types of nodes :1. Leaf nodes i , in which case | X i | = 1 .2. Introduce nodes i , having a unique child j s.t. X i = X j ∪ { u } for some u ∈ V \ X j .3. Forget nodes i , having a unique child j s.t. X i = X j \ { u } for some u ∈ X j .4. Join nodes i , having exactly two children j and k , s.t. X i = X j = X k .Moreover, we can assume that the root node corresponds to a bag of size 1.Let us associate an operation τ i to each node of a nice tree decomposition. If we are in the secondcase of the definition (introduce node i ), we associate operation τ i = introduce ( u ) , where u is thevertex introduced in bag X i . If we are in the third case (forget node i ), we associate operation τ i = f orget ( u ) , where u is the forgotten vertex. In the fourth case (join node), we associate operation τ i = join ( X i ; L j , L k ) . For a leaf node i with X i = { u } , we also associate operation τ i = introduce ( u ) .Nice path decompositions are defined in a similar way, but of course they do not have join nodes.It is well known [3] that any tree or path decomposition can be refined into a nice one in lineartime, without increasing the width. 3 roposition 4 ([3]). Let ( T, X ) be a tree decomposition of G . There exists a nice tree decomposition ( T ′ , X ′ ) , such that – each bag of X ′ is a subset of a bag in X – for each node i of T , there is a node i ′ of T ′ such that the corresponding partitions ( L i , X i , R i ) (induced by i in ( T, X ) ) and ( L ′ i ′ , X ′ i ′ , R ′ i ′ ) (induced by i ′ in ( T ′ , X ′ ) ) are equal. Traces and valid partitions
Let C be a vertex cover of minimum size of our input graph G , andlet S = V \ C be the remaining independent set. We denote k = | C | . Our objective is to describe,in a first step, an O ∗ (4 k ) algorithm for treewidth and an O ∗ (3 k ) algorithm for pathwidth. Veryinformally, if we fix an nice tree or path decomposition of G [ C ] , then there is an optimal way ofadding the vertices of S to this tree or path decomposition. Trying all nice decompositions of G [ C ] by brute force would be too costly. Therefore we introduce the notion of traces and valid partitions of C . Definition 1.
Consider a node i of a tree decomposition ( T, X ) of G . The trace of node i on C isthe three-partition ( L Ci , X Ci , R Ci ) of C such that L Ci = L i ∩ C , X Ci = X i ∩ C and R Ci = R i ∩ C .A partition ( L C , X C , R C ) of C is called a valid triple or valid partition if it is the trace ofsome node of a tree decomposition. We say that a tree decomposition respects the valid partition ( L C , X C , R C ) if some node of the tree decomposition produces this trace on C . The following lemma gives an easy characterization of valid partitions of C . It also proves thata partition is the trace of a node of some tree decomposition, this also holds for some path decom-position. Therefore we do not need to distinguish between partitions that would be valid for treedecompositions or valid for path decompositions. Lemma 1.
A three-partition ( L C , X C , R C ) is the trace of some tree decomposition (or path de-composition) if and only if X C separates L C from R C in the graph G [ C ] .Proof. “ ⇒ :” Consider a node i of a tree decomposition ( T, X ) of G such that ( L C , X C , R C ) is thetrace of node i on C . By Proposition 3, bag X i separates L i from R i in G . Therefore X i ∩ C = X C separates L i ∩ C = L C from R i ∩ C = R C in G [ C ] .‘ ⇐ :” Conversely, since X C separates L C from R C in G [ C ] and S = V \ C is an independentset of G , note that the three bags L C ∪ S, X C ∪ S and R C ∪ S form a path decomposition of G . Thetrace of the middle bag is ( L C , X C , R C ) . ⊓⊔ By Proposition 4, for any valid partition ( L C , X C , R C ) , there exists a nice tree or path decompo-sition respecting it. Our algorithms will proceed by dynamic programming over valid three-partitions ( L C , X C , R C ) of this type, for a given vertex cover C . There is a natural partial ordering on suchthree-partitions. Definition 2.
A valid three-partition ( L Cj , X Cj , R Cj ) precedes the three-partition ( L Ci , X Ci , R Ci ) ifthey are different and they are the respective traces of two nodes j and i of a same nice tree decom-position ( T, X ) , where i is the father of j in T . Observe that if ( L Cj , X Cj , R Cj ) precedes ( L Ci , X Ci , R Ci ) we have that L Cj ( L Ci (if i is a join or f orget node) or L Cj = L Ci and X Cj ( X Ci (if i is an introduce node). In particular, we can order4he three-partitions according to a linear extension of the precedence relation. Our algorithms willproceed by dynamic programming over three-partitions of C , according to this order.It is convenient for us to have a unique maximal three-partition w.r.t. the precedence order. There-fore, starting from graph G , we create a new graph G ′ by adding a universal vertex univ (i.e. adjacentto all other vertices of G ). Clearly, C ∪ { univ } is a vertex cover of G ′ , of size k + 1 . Note that thetreewidth (resp. pathwidth) of G ′ equals the treewidth (resp. pathwidth) of G , plus one. Moreover, G has an optimal nice tree (resp. path) decomposition whose root bag only contains vertex univ .Therefore, it is sufficient to compute the treewidth (pathwidth) for graph G ′ . From now on we as-sume that the input graph is G ′ , i.e. it contains a special universal vertex univ , and we only usenice tree (path) decompositions whose root bag is { univ } . If C denotes the vertex cover of the inputgraph, then the trace of the root is always ( C \ { univ } , { univ } , ∅ ) . REEWIDTH parameterized by vertex cover
Recall that the nice tree decompositions are rooted, thus we can speak of lower and upper nodes ofthe decomposition tree.
Lemma 2.
Let ( L C , X C , R C ) be a three-partition of C . Let ( T, X ) be a nice tree-decompositionand consider the set of nodes of T whose trace on C is ( L C , X C , R C ) . If L C = ∅ , then these nodesof T induce a directed subpath in T , from a lower node imin to an upper node imax .Proof. Consider two nodes i and j leaving this same trace ( L C , X C , R C ) on C . We claim that one ofthem is ancestor of the other in the tree. By contradiction, assume there is a lowest common ancestor k of i and j , different from i, j . Let x ∈ L C (note that here we use the condition L C = ∅ ). Observethat x appears in bags of both subtrees T i and T j of T , hence by definition of a tree decompositionit must belong to bag X k . Since x is in X k and in the subtree T i , we must also have x ∈ X i . But X i ∩ C = X C , implying that x is in both X C and L C — contradicting the fact that the latter setsdo not intersect. It follows that one of i, j must be ancestor of the other.Let imin (resp. imax ) be the lowest (resp. highest) node whose trace on C is ( L C , X C , R C ) . Itremains to prove that any node on the path from imin to imax in T leaves the same trace. Let i bea node on this path. Recall that L i denotes the set of vertices of G that appear only in bags strictlybelow i , and R i denotes the vertices that do not appear in bags below i . Since i is between imin and imax , cleary X C ⊆ X i . If X i contains some vertex x ∈ C \ X C , then either x ∈ L C and thus x must also appear in bag X imin , or x ∈ R C and it must appear in bag X imax . In both cases, thiscontradicts the trace of imin and imax on C . We thus have L C ⊆ L i ∩ C . If L i ∩ C also containssome node x ∈ R C , as before we have that x must be in bag X imax — a contradiction. Eventually,observe that R C ⊆ R i ∩ C , and that if R i ∩ C contained some vertex x ∈ L C , this vertex mustappear in bag imin — a contradiction. ⊓⊔ In order to “glue” a valid three-partition ( L C , X C , R C ) with the previous and next ones, into anice tree decomposition of G [ C ] , we need to control the operation right below and right above thesubpath of nodes leaving this trace. Therefore we introduce the following notion of valid quintuples . Definition 3.
Let ( L C , X C , R C ) be a valid partition of C , with L C = ∅ . Let τ + and τ − be opera-tions of type introduce , f orget or join . We say that ( τ − , L C , X C , R C , τ + ) is a valid quintuple ifthere is a nice tree decomposition ( T, X ) of G respecting ( L C , X C , R C ) , with imin and imax be-ing the lower and upper node corresponding to this trace, such that τ − = τ imin and τ + = τ imax +1 , here imax + 1 is the father of imax . In the particular case when imax is the root we assume forconvenience that τ imax +1 is the f orget operation on the unique vertex of the root bag.We say that this nice tree decomposition ( T, X ) respects the quintuple ( τ − , L C , X C , R C , τ + ) . The following result characterizes all valid quintuples and will be used by our algorithm toenumerate all of them. Its proof is moved to the Appendix, Subsection B.1.
Lemma 3.
A quintuple Q = ( τ − , L C , X C , R C , τ + ) is valid if and only if ( L C , X C , R C ) is a validpartition of C , L C is not empty and the following two conditions hold: – τ − is of type • introduce ( u ) for some u ∈ X C and N ( u ) ∩ L C = ∅ , or • f orget ( u ) for some u ∈ L C , or • join ( X C ; L C , L C ) where ( L C , L C ) forms a non-trivial two-partition of L C and thethree-partitions ( L C , X C , R C ∪ L C ) and ( L C , X C , R C ∪ L C ) are valid. – τ + is of type • introduce ( v ) with v ∈ R C , or • f orget ( v ) with v ∈ X C and N ( v ) ∩ R C = ∅ , or • join ( X C ; L C , LR C ) where LR C is a non-empty subset of R C , and three-partitions ( L C ∪ LR C , X C , R C \ LR C ) and ( LR C , X C , R C \ LR C ∪ L C ) are valid. To be able to start our dynamic programming, we introduce a new category of valid quintu-ples that we call degenerate , corresponding to valid partitions of type ( ∅ , X C , R C ) . Roughly, theywill correspond to the leaves of our optimal tree decomposition. We point out that for degeneratequintuples, parameter τ − is irrelevant. Definition 4.
Let ( ∅ , X C , R C ) be a valid partition of C and let τ + be an operation of type f orget ( u ) ,with u ∈ X C such that N G ( u ) ⊆ X C . We say that ( τ − , ∅ , X C , R C , τ + ) is a degenerate valid quin-tuple and a tree decomposition respects this quintuple if it has a node imax whose trace on C is ( ∅ , X C , R C ) , and whose father corresponds to operation f orget ( u ) . Let us fix a valid quintuple Q = ( τ − , L C , X C , R C , τ + ) . We want to construct a tree decompo-sition ( T, X ) respecting Q , of minimum width. We must understand how to place the vertices of S in the bags of ( T, X ) . For this purpose we define some special subsets of S w.r.t. Q , and the nextlemmata describe how these subsets are forced to be in some bags on the subpath of T from imin to imax (cf. Lemma 2). Notation 1
Let Q = ( τ − , L C , X C , R C , τ + ) be a valid quintuple. – We denote
XT R S ( Q ) = { x ∈ S | N ( x ) ∩ L C = ∅ and N ( x ) ∩ R C = ∅} . – • If τ − is of type introduce ( u ) , then we denote XL S ( Q ) = { x ∈ S | N ( x ) ⊆ L C ∪ X C and u ∈ N ( x ) and N ( x ) ∩ L C = ∅} . • If τ − is of type join ( X C ; L C , L C ) , then XL S ( Q ) = { x ∈ S | N ( x ) ∩ L C = ∅ and N ( x ) ∩ L C = ∅ and N ( x ) ∩ R C = ∅} . In particular, the last condition ensuresthat XL S ( Q ) does not intersect XT R S ( Q ) . • If τ − is a f orget operation or if the quintuple is degenerate, then we let XL S ( Q ) = ∅ . – Suppose that τ + is of type f orget ( v ) . Then we let XR S ( Q ) = { x ∈ S | N ( x ) ⊆ R C ∪ X C and v ∈ N ( x ) and N ( x ) ∩ R C = ∅} . If τ + is a introduce or join operation, then XR S = ∅ . emma 4. Let Q = ( τ − , L C , X C , R C , τ + ) be a valid quintuple and let ( T, X ) be a nice tree de-composition respecting Q . Denote by [ imin, imax ] the directed subpath of nodes whose trace on C is ( L C , X C , R C ) (in the case where L C = ∅ , we take imin = imax ). Then – For any i in the subpath [ imin, imax ] , X i contains X C ∪ XT R S ( Q ) . – X imin contains X C ∪ XT R S ( Q ) ∪ XL S ( Q ) . – X imax contains X C ∪ XT R S ( Q ) ∪ XR S ( Q ) .Proof. Let x ∈ XT R S ( Q ) . By definition of XT R S , vertex x has a neighbor a ∈ L C and a neighbor b ∈ R C . Since a ∈ L C , it only appears in the bags of T strictly below imin . Since x is adjacentto a , it must also appear on one of these bags. Since b ∈ R C , vertex b appears in no bag below imax (included). Therefore, x must appear in some bag which is not below imax . Consequently, x appears in every bag of the [ imin, imax ] subpath.Assume that XL S ( Q ) is not empty. If τ − = τ imin = introduce ( u ) , then every vertex x ∈ XL S ( Q ) must appear in some bag strictly below imin (because it has a neighbor in L C ) and insome bag containing u (because it sees u ). This latter bag cannot be strictly below imin . Thus x ∈ X imin and XL S ( Q ) is contained in X imin . When imin is a join node, L C = ∅ and we mustshow that X imin contains XL S ( Q ) . But then each vertex x ∈ XL S ( Q ) has a neighbor which onlyappears in the left subtree of imin , strictly below imin , and one in the right subtree of imin , strictlybelow imin . Thus x must appear in the bag of imin .If XR S ( Q ) is not empty, then τ + = f orget ( v ) and v is a neighbor of each x ∈ XR S ( Q ) . Hence x must appear in a bag below imax (included). But x also has neighbors in R C , thus it must appearin some bag which is not below imax . Consequently, XR S ( Q ) is contained in X imax . ⊓⊔ We consider now vertices of S whose neighborhood is a subset of X C . Notation 2
Let Q = ( τ − , L C , X C , R C , τ + ) be a valid quintuple. We denote by XF S ( Q ) the set ofvertices x ∈ S such that N ( x ) ⊆ X C .Let ǫ ( Q ) be set to if there is some x ∈ XF S ( Q ) such that N ( x ) = X C , set to otherwise. Lemma 5.
Let ( T, X ) be a tree decomposition respecting a quintuple Q = ( τ − , L C , X C , R C , τ + ) .Then ( T, X ) has a bag of size at least | X C | + ǫ ( Q ) .Proof. If ǫ ( Q ) = 0 the claim is trivial. If ǫ ( Q ) = 1 , let x ∈ S such that N ( x ) = X C . By Helly’sproperty (see Proposition 2), there must be a bag of ( T, X ) containing x and X C . ⊓⊔ Notation 3
Let Q = ( τ − , L C , X C , R C , τ + ) be a valid quintuple. We define the local treewidth of Q as loctw ( Q ) = | X C | + max {| XT R S | + | XL S | , | XT R S | + | XR S | , ǫ ( Q ) } − . The − used above plays the same role as in the definition of treewidth. By Lemmata 4 and 5we deduce. Corollary 1.
Any nice tree decomposition of G respecting a valid quintuple Q is of width at least loctw ( Q ) . We now define the partial treewidth of a valid quintuple. Intuitively, the partial treewidth of aquintuple Q is the minimum value t such that there is a nice tree decomposition of G [ C ] , respecting Q , with all valid quintuples below Q having local treewidth at most t . We shall prove in Lemma 67nd Theorem 5 that actually the partial treewidth of Q is at most t if and only if there exists a nicetree decomposition of the whole graph G , respecting Q , such that all bags below imax have size atmost t + 1 . Notation 4
Given a valid quintuple Q = ( τ − , L C , X C , R C , τ + ) , we define the partial treewidth of Q , denoted ptw ( Q ) , as follows. – If Q = ( τ − , ∅ , X C , R C , f orget ( u )) is a degenerate valid quintuple then ptw ( Q ) = loctw ( Q ) . – If τ − = introduce ( u ) , ptw ( Q ) = max (cid:26) loctw ( τ − , L C , X C , R C , τ + ) , min valid quintuple Q − ptw ( Q − ) (cid:27) where the minimum is taken over all valid quintuples Q − of type ( τ −− , L C , X C \ { u } , R C ∪{ u } ) , introduce ( u )) . – If τ − = f orget ( u ) , ptw ( Q ) = max (cid:26) loctw ( τ − , L C , X C , R C , τ + ) , min valid quintuple Q − ptw ( Q − ) (cid:27) where the minimum is taken over all valid quintuples Q − of type ( τ −− , L C \{ u } , X C ∪{ u } , R C ) ,f orget ( u )) . – If τ − = join ( X C ; L C , L C ) , ptw ( Q ) = max ( loctw ( τ − , L C , X C , R C , τ + ) , min valid quintuple Q − ptw ( Q − ) , min valid quintuple Q − ptw ( Q − )) where the minima are taken over all valid quintuples Q − of type ( τ −− , L C , X C , R C ∪ L C ) , join ( X C ; L C , L C )) and all quintuples Q − of type ( τ −− , L C , X C , R C ∪ L C ) ,join ( X C ; L C , L C )) . Lemma 6.
Any nice tree decomposition of G respecting a valid quintuple Q is of width at least ptw ( Q ) .Proof. We order the three-partitions ( L C , X C , R C ) of C according to the precedence relation (Def-inition 2). We prove the lemma for every valid quintuple Q = ( τ − , L C , X C , R C , τ + ) , by induction(according to this order) on ( L C , X C , R C ) .For quintuples such that L C = ∅ , the property follows directly from Corollary 1 and the basecase of Notation 4.Now take Q = ( τ − , L C , X C , R C , τ + ) with L C = ∅ . Let imin the lowest node of the treedecomposition respecting Q , whose trace is ( L C , X C , R C ) . If imin is a join node, it has two sonswith traces ( L C , X C , R C ∪ L C ) and ( L C , X C , R C ∪ L C ) and the proof follows from the join case of Notation 4 and the induction hypothesis on the valid quintuples preceding Q . Note8hat both L C and L C are non empty, otherwise imin would not be the lowest node with trace ( L C , X C , R C ) . Similarily, if imin is an introduce ( u ) node, then we apply Corollary 1 and the introduce case of Notation 4 to the quintuple preceding Q in the tree decomposition. The sameholds if imin is of type f orget ( u ) (using the f orget case of Notation 4). We point out that, if τ − = f orget ( u ) and L C = { u } , the quintuple Q − of Notation 4 corresponds to the base case of ourinduction. ⊓⊔ The next theorem is the main combinatorial tool for our T
REEWIDTH algorithm.
Theorem 5.
The treewidth of G is tw ( G ) = min Q last ptw ( Q last ) over all valid quintuples Q last of the form ( τ − , C \ { univ } , { univ } , ∅ , f orget ( univ )) .Proof. First note that tw ( G ) ≥ min Q last ptw ( Q last ) . Indeed, an optimal tree decomposition will con-tain a root whose bag corresponds to a single vertex univ , and this root will leave a trace on C oftype ( C \ { univ } , { univ } , ∅ ) . The inequality follows from Lemma 6.Conversely, let Q last = ( τ − , C \ { univ } , { univ } , ∅ , f orget ( univ )) be the valid quintuple ofminimum ptw , among all quintuples of this type; denote by t this minimum value. The computationof ptw ( Q last ) naturally provides a tree T C of quintuples, the root being Q last , and such that forthe node corresponding to quintuple Q its sons are the preceding quintuples realizing the minimumvalue for ptw ( Q ) in Notation 4. The leaves of this tree correspond to the base case of Notation 4,hence to degenerate valid quintuples. By definition of ptw , all these selected quintuples have loctw at most t . We construct a tree decomposition of G with bags of size at most t + 1 .Let Q i = ( τ − i , L Ci , X Ci , R Ci , τ + i ) be the quintuple associated to node i in T C . Let ( T C , X C ) be the tree-decomposition of G [ C ] obtained by associating to each node i of T C the bag X C . Eachnode i , except for the leaves, corresponds to an introduce , f orget or join operation τ − i .Let T be the tree obtained from T C by replacing each node i with a path of three nodes, denoted imin, imid and imax (from the bottom towards the top). Initially, we associate to the three nodes imin, imid, imax the same bag X Ci . Now, for each i ,1. add XT R S ( Q i ) to all bags in the subpath [ imin, imax ] of T ;2. add XL S ( Q i ) to bag number imin ;3. add XR S ( Q i ) to bag number imax ;4. For each vertex x ∈ XF S ( Q i ) , which has not yet been added to some bag of T , create a newnode of T adjacent only to imid and associate to this node the bag N [ x ] . These nodes are called pending nodes .We claim that in this way we have obtained a tree decomposition ( T, X ) of G . Clearly all bagscreated at step i are of size at most loctw ( Q i ) + 1 , hence at most t + 1 . It remains to prove that thesebags satisfy the conditions of a tree decomposition.Recall that ( T C , X C ) is a tree decomposition of G [ C ] . By construction of ( T, X ) , for each vertex y ∈ C , the bags of ( T, X ) containing it will form a subtree of T . Also, for each edge yz of G [ C ] ,some bag of ( T, X ) shall contain both y and z . It remains to verify the same type of conditions forvertices of S and edges incident to them. This part of the proof is skipped due to space restrictions,see details in the Appendix, Subsection B.2. ⊓⊔ heorem 6. The T REEWIDTH problem can be solved in O ∗ (4 k ) time, where k is the size of theminimum vertex cover of the input graph.Proof. Given an arbitrary graph G , we first compute a minimum vertex cover in O ∗ (1 . k ) (Propo-sition 1). Then G is transformed into a graph G ′ by adding a universal vertex univ . Let C be thevertex cover of G ′ obtained by adding univ to the minimum vertex cover of G (hence | C | = k + 1 ).The treewidth of G ′ is computed as follows.1. Compute all valid partitions ( L C , X C , R C ) , by enumerating all three-partitions of C and keep-ing only the valid ones (Lemma 1). This can be done in time O ∗ (3 k ) . The number of validpartitions is at most k +1 .2. Compute all valid quintuples using Lemma 3. For quintuples Q = ( τ − , L C , X C , R C , τ + ) where τ + is a join node, the parameters of this join are not relevant for loctw ( Q ) and ptw ( Q ) .Therefore, we do not need to memorize the parameters of the join . With this simplification,we only need to store O ∗ (4 k ) valid (simplified) quintuples, and their computation can be per-formed in time O ∗ (4 k ) . The k comes from quintuples of the type ( join ( X C ; L C , L C ) , L C ,X C , R C , τ + ) , since ( L C , L C , X C , R C ) is a partition of C into four parts. The quintuples arethen sorted by the precedence relation on the corresponding valid three-partitions. This can bedone within the same running time, the triples ( L C , X C , R C ) being sorted by increasing size of L C , and in case of tie-breaks by increasing size of X C (see Definition 2 and following remarks).3. For each valid quintuple Q = ( τ − , L C , X C , R C , τ + ) , according to the ordering above, computeby dynamic programming loctw ( Q ) (Notation 3) and then ptw ( Q ) (Notation 4). In order toprocess efficiently the quintuples Q − of Notation 4, let us observe the value min Q − ptw ( Q − ) over all Q − of a given type can be updated online, as soon as we compute ptw ( Q − ) . Indeed, forall the Q − of a same type, the first parameter τ −− will differ, but the four others are equal. Soit is actually a minimum over all τ −− . The same holds for the minimum over all Q − and overall Q − . Hence, when we process quintuple Q , we have these minima at hand and the value ptw ( Q ) is computable in polynomial time. This step can be performed in polynomial for each Q , so the overall running time is still O ∗ (4 k ) .4. Compute the treewidth of G ′ using Theorem 5, and return tw ( G ) = tw ( G ′ ) − . This step takespolynomial running time.Altogether, the algorithm takes O ∗ (4 k ) running time and space. This achieves the proof of the the-orem. The algorithm can also be adapted to return, within the same time bounds, an optimal treedecomposition of the input graph. ⊓⊔ Note that the algorithm for pathwidth, described in Appendix A is quite similar, with a slightdifference in the definition of local pathwidth (Notation 9). Due to the fact that it only uses introduce and f orget operations, the number of valid quintuples is O ∗ (3 k ) , and so is the running time of thepathwidth algorithm. Theorem 7.
The P ATHWIDTH problem can be solved in O ∗ (3 k ) time, where k is the size of theminimum vertex cover of the input graph. O ∗ (3 k ) algorithm for TREEWIDTH (sketch)
We want to improve the running time of our algorithm for treewidth from O ∗ (4 k ) to O ∗ (3 k ) . Dueto space restrictions we only sketch here, rather informally, the main ideas. Full details are given inAppendix C. 10e need to cope with join quintuples Q = ( τ − = join ( X C ; L C , L C ) , L C , X C , R C , τ + ) because we cannot afford to store parameters L C , L C ; we only want to recall that τ − is of type join . (Note that our algorithm already does this kind of simplification when τ + is of type join ).Recall that the partial treewidth ptw ( Q ) of a valid quintuple Q is defined (Notation 4) as theminimum value t such that there is a trimmed nice tree decomposition of G [ C ] , with a node i cor-responding to valid quintuple Q , and such that all nodes below i have valid quintuples of localtreewidth at most t . (By trimmed nice decomposition we mean that leaf bags might not be of size1, see Appendix C for a formal description.) The part of the tree decomposition rooted in i is calleda Q -rooted subtree decomposition. We introduce an integer parameter d and define ptw ( d, Q ) asabove, but adding the constraint that, in the Q -rooted subtree decomposition, every path from a leafto the root has at most d nodes of type join . E.g., if d = 0 , it means that the Q -rooted subtree mustbe a path. Observe that, for d = k , we have ptw ( k, Q ) = ptw ( Q ) , because any nice decompositionof G [ C ] will have at most k join nodes from a leaf to the root.For “simplified” join quintuples ˜ Q = ( join, L C , X C , R C , τ + ) we let ptw ( d, ˜ Q ) be the minimumvalue of ptw ( d, join ( X C ; L C , L C ) , X C , R C , τ + ) , over all possible partitions ( L C , L C ) of L C .Our algorithm P TW (Algorithm 1, Appendix C) computes in O ∗ (3 k ) time the values pwd ( d, ˜ Q ) for all simplified quintuples ˜ Q , from values ptw ( d − , . . . ) . For that purpose, it first calls a specificalgorithm J OIN P TW , which computes in O ∗ (3 k ) time all values ptw ( d, ( join, . . . )) for all simplifiedjoin quintuples. For all other quintuples, it simply runs (almost) the same algorithm as in Theorem 6,and since we avoid joins this can be done within the required time bound of O ∗ (3 k ) .We give some hints about the J OIN P TW algorithm (Algorithm 2, Appendix C), computing all val-ues ptw ( d, ( join, . . . )) for simplified join quintuples. Let ˜ Q = ( join, L C , X C , R C , τ + ) . To checkthat ptw ( d, ˜ Q ) ≤ t , we need the existence of a two-partition ( L C , L C ) of L C and of two (simpli-fied) quintuples Q − = ( τ −− , L C , X C , C \ ( X C ∪ L C ) , join ) and Q − = ( τ −− , L C , X C , C \ ( X C ∪ L C ) , join ) such that ptw ( d − , Q − ) ≤ t and ptw ( d − , Q − ) ≤ t . Observe that herewe make use of parameter d . Now comes into play the fast subset convolution (Theorem 14). We fixa set X C . We define a boolean function ptw atmost t ( L C ) over subsets L C of C \ X C , which isset to if ptw ( d − , ( τ −− , L C , X C , C \ ( X C ∪ L C ) , join )) ≤ t for some τ −− , set to 0 oth-erwise. The subset convolution ( ptw atmost t ⋆ ptw atmost t ) is an integer function over subsets L C of C \ X C defined as: ( ptw atmost t ⋆ ptw atmost t )( L C ) = X ( L C ,L C ) ptw atmost t ( L C ) · ptw atmost t ( L C ) over all partitions ( L C , L C ) of L C . Therefore, the existence of Q − and Q − is equivalent tothe fact that ( ptw atmost t ⋆ ptw atmost t )( L C ) ≥ . By Theorem 14, this subset convolution,over all subsets L C of C \ X C , can be computed in O ∗ (2 k −| X C | ) . Hence, for a fixed X C , allquintuples ˜ Q = ( join, L C , X C , R C , τ + ) can be processed within the same running time. This willmake O ∗ (3 k ) time over all simplified join quintuples. Several technical points have been deliberatelyomitted, especially the fact that we cannot define loctw ( ˜ Q ) on a simplified join quintuple, becausethe set XL S (Notation 1) depends on the parameters of the join . Full details are in Appendix C. We have shown that it is possible to obtain O ∗ (3 k ) time algorithms for computing TREEWIDTH and
PATHWIDTH where parameter k is the size of the vertex cover of the graph. This puts vertex cover in11he same class as parameter n as both allows an O ∗ ( c k ) time algorithm for the considered problems.It is an interesting question whether an O ∗ ( c k ) time algorithm exists when using feedback vertex set of the graph as the parameter k . References
1. Andreas Bj¨orklund, Thore Husfeldt, Petteri Kaski, and Mikko Koivisto. Fourier meets M¨obius: fast subsetconvolution. In David S. Johnson and Uriel Feige, editors,
STOC , pages 67–74. ACM, 2007.2. Hans L. Bodlaender. A linear-time algorithm for finding tree-decompositions of small treewidth.
SIAM J.Comput. , 25(6):1305–1317, 1996.3. Hans L. Bodlaender. Treewidth: Algorithmic techniques and results. In Igor Pr´ıvara and Peter Ruzicka,editors,
MFCS , volume 1295 of
Lecture Notes in Computer Science , pages 19–36. Springer, 1997.4. Hans L. Bodlaender, Fedor V. Fomin, Arie M. C. A. Koster, Dieter Kratsch, and Dimitrios M. Thilikos. Onexact algorithms for treewidth. In Yossi Azar and Thomas Erlebach, editors,
ESA , volume 4168 of
LectureNotes in Computer Science , pages 672–683. Springer, 2006.5. Hans L. Bodlaender, Fedor V. Fomin, Arie M. C. A. Koster, Dieter Kratsch, and Dimitrios M. Thilikos. Anote on exact algorithms for vertex ordering problems on graphs.
Theory Comput. Syst. , 50(3):420–432,2012.6. Hans L. Bodlaender, Bart M. P. Jansen, and Stefan Kratsch. Preprocessing for treewidth: A combinatorialanalysis through kernelization. In Luca Aceto, Monika Henzinger, and Jiri Sgall, editors,
ICALP (1) ,volume 6755 of
Lecture Notes in Computer Science , pages 437–448. Springer, 2011.7. Hans L. Bodlaender, Bart M. P. Jansen, and Stefan Kratsch. Kernel bounds for structural parameterizationsof pathwidth. In Fedor V. Fomin and Petteri Kaski, editors,
SWAT , volume 7357 of
Lecture Notes inComputer Science , pages 352–363. Springer, 2012.8. Jianer Chen, Iyad A. Kanj, and Ge Xia. Improved upper bounds for vertex cover.
Theor. Comput. Sci. ,411(40-42):3736–3756, 2010.9. Marek Cygan, Daniel Lokshtanov, Marcin Pilipczuk, Michal Pilipczuk, and Saket Saurabh. On cutwidthparameterized by vertex cover. In Venkatesh Raman and Saket Saurabh, editors,
IPEC , volume 6478 of
Lecture Notes in Computer Science , pages 246–258. Springer, 2011.10. Andrew Drucker. New limits to classical and quantum instance compression. In
FOCS , pages 609–618.IEEE Computer Society, 2012.11. Michael R. Fellows, Daniel Lokshtanov, Neeldhara Misra, Frances A. Rosamond, and Saket Saurabh.Graph layout problems parameterized by vertex cover. In Seok-Hee Hong, Hiroshi Nagamochi, and TakuroFukunaga, editors,
ISAAC , volume 5369 of
Lecture Notes in Computer Science , pages 294–305. Springer,2008.12. Fedor V. Fomin and Yngve Villanger. Finding induced subgraphs via minimal triangulations. In Jean-YvesMarion and Thomas Schwentick, editors,
STACS , volume 5 of
LIPIcs , pages 383–394. Schloss Dagstuhl -Leibniz-Zentrum fuer Informatik, 2010.13. F.V. Fomin and D. Kratsch.
Exact Exponential Algorithms . Texts in Theoretical Computer Science. AnEATCS Series. Springer, 2010.14. M. C. Golumbic.
Algorithmic Graph Theory and Perfect Graphs . Academic Press, New York, 1980.15. Pinar Heggernes, Federico Mancini, Jesper Nederlof, and Yngve Villanger. A parameterized algorithm forchordal sandwich. In Tiziana Calamoneri and Josep D´ıaz, editors,
CIAC , volume 6078 of
Lecture Notes inComputer Science , pages 120–130. Springer, 2010.16. Michael Held and Richard M. Karp. A dynamic programming approach to sequencing problems.
Journalof the Society for Industrial and Applied Mathematics , 10(1):pp. 196–210, 1962.17. Nancy G. Kinnersley. The vertex separation number of a graph equals its path-width.
Inf. Process. Lett. ,42(6):345–350, 1992.18. Kenta Kitsunai, Yasuaki Kobayashi, Keita Komuro, Hisao Tamaki, and Toshihiro Tano. Computing directedpathwidth in O (1 . n ) time. In Dimitrios M. Thilikos and Gerhard J. Woeginger, editors, IPEC , volume7535 of
Lecture Notes in Computer Science , pages 182–193. Springer, 2012. P ATHWIDTH parameterized by vertex cover
In the case of pathwidth, the following lemma holds even if L C = ∅ . Lemma 7.
Let ( L C , X C , R C ) be a three-partition of C and let ( P, X ) be a nice path decompositionof G respecting it. The set of nodes of P whose trace is ( L C , X C , R C ) induces a (connected) subpathof P , from a lower node imin to an upper node imax .Proof. The arguments of Lemma 2 hold here, since the only place in that proof where we used theassumption L C = ∅ was in the case when the tree decomposition had join nodes. ⊓⊔ The definition of a valid quintuple is the same as for treewidth, but of course in this case we willnot use join nodes. Next result is a restriction of Lemma 3:
Lemma 8.
A quintuple ( τ − , L C , X C , R C , τ + ) is valid if ( L C , X C , R C ) is a valid partition of C and the following two conditions hold: – τ − is of type • introduce ( u ) for some u ∈ X C and u ∩ L C = ∅ , or • f orget ( u ) for some u ∈ L C – τ + is of type • introduce ( v ) with v ∈ R C , or • f orget ( v ) with v ∈ X C and N ( v ) ∩ R C = ∅ . Given a valid quintuple Q , sets XT R S ( Q ) , XL S ( Q ) and XR S ( Q ) are defined like in Nota-tion 1. Lemma 4 also holds in this case.Unlike in the case of treewidth, the situation is more complicated with the vertices of S whoseneighborhood is contained in X C . If N ( x ) ⊆ X Cimin − ( X C , then we should rather put vertex x in bag imin − or before (as we shall see, this will not increase the width of the decomposition).Symmetrically, if N ( x ) ⊆ X Cimax +1 ( X C then x should be put in some bag after imax +1 . If noneof these holds, we can create a bag in the subpath [ imin, imax ] containing only X C ∪ XT R S ( Q ) ∪{ x } . Notation 8
Let Q = ( τ − , L C , X C , R C , τ + ) be a valid quintuple. Let X C − (resp. X C + ) correspond to X C before operation τ − (resp. to X C after operation τ + ).Let XF S ( Q ) be the set of vertices x ∈ S such that – N ( x ) ⊆ X C , and – if X C − ( X C then N ( x ) X C − , and – if X C + ( X C then N ( x ) X C + .Let ǫ ( Q ) be set to if XF S ( Q ) is not empty, set to otherwise. Lemma 9.
Let P be a path decomposition respecting a quintuple Q = ( τ − , L C , X C , R C , τ + ) . Then P has a bag of size at least | X C | + | XT R S ( Q ) | + ǫ ( Q ) .Proof. If ǫ ( Q ) = 0 then the result comes directly from Lemma 4. Assume that ǫ ( Q ) = 1 . Wedistinguish three cases, depending on operations τ − and τ + .13 ase 1: τ − = introduce ( u ) and τ + = f orget ( v ) . Let x be a vertex of XF S ( Q ) . Note that x isadjacent to u in G (otherwise N ( x ) ⊆ X C − ( X C , contradicting x ∈ XF S ( Q ) ) and symmetrically x is adjacent to v (otherwise N ( x ) ⊆ X C + ( X C ). Therefore x must be in some bag above imin and in some bag below imax . Hence there is some bag in the [ imin, imax ] subpath containing x .By Lemma 4, that bag is of size at least | X C | + | XT R S ( Q ) | + 1 . Case 2: τ + = introduce ( v ) . We claim that the bag X imax +1 contains XT R S ( Q ) . Let Q + be thevalid quintuple corresponding to bag X imax +1 . The quintuple Q + is of the type ( introduce ( v ) , L C ,X C ∪ { v } , R C \ { v } , τ ++ ) . Observe that each vertex x of XT R S ( Q ) belongs to XT R S ( Q + ) (if x has a neighbor in R C \ { v } ) or to XL S ( Q + ) (if the only neighbor of x in R C is v ). ApplyingLemma 4 to the valid quintuple Q + we deduce that X imax +1 contains X C ∪ { v } ∪ XT R S ( Q ) .Recall that XT R S ( Q ) ⊆ XT R S ( Q + ) ∪ XL S ( Q + ) . Consequently, the size of the bag X imax +1 isat least | X C | + | XT R S ( Q ) | + 1 . Case 3: τ − = f orget ( u ) . This case is perfectly symmetric to the previous one. Let Q − be thevalid quintuple ( τ −− , L C \ { u } , X C ∪ { u } , R C , f orget ( u )) corresponding to bag X imin − . Thenby symmetric arguments XT R S ( Q ) ⊆ XT R S ( Q − ) ∪ XR S ( Q − ) and hence by Lemma 4 the set X C ∪ { u } ∪ XT R S ( Q ) is contained in bag X imin − . ⊓⊔ The definition of local pathwidth is slightly different from the local treewidth.
Notation 9
Let Q = ( τ − , L C , X C , R C , τ + ) be a valid quintuple. We define the local pathwidth of Q as locpw ( Q ) = | X C | + | XT R S | + max {| XL S | , | XR S | , ǫ ( Q ) } − . By Lemmata 4 (which also holds for the pathwidth case) and 9 we deduce:
Corollary 2.
Any nice path decomposition of G respecting a valid quintuple Q is of width at least locpw ( Q ) . Notation 10
Given a valid quintuple Q = ( τ − , L C , X C , R C , τ + ) , we define the quantity ppw ( Q ) (like partial pathwidth ) as follows. – If Q = ( introduce ( u ) , ∅ , { u } , C \ { u } , τ + ) then ppw ( Q ) = locpw ( Q ) , – else if τ − = introduce ( u ) , ppw ( Q ) = max (cid:26) locpw ( τ − , L C , X C , R C , τ + ) , min valid quintuple Q − ppw ( Q − ) (cid:27) where the minimum is taken over all valid quintuples Q − of type ( τ −− , L C , X C \ { u } , R C ∪{ u } ) , introduce ( u )) . – else ( τ − = f orget ( u ) ), ppw ( Q ) = max (cid:26) locpw ( τ − , L C , X C , R C , τ + ) , min valid quintuple Q − ppw ( Q − ) (cid:27) where the minimum is taken over all valid quintuples Q − of type ( τ −− , L C \{ u } , X C ∪{ u } , R C ) ,f orget ( u )) . emma 10. Any path decomposition respecting a valid quintuple Q is of width at least ppw ( Q ) .Proof. Recall that the three-partitions ( L C , X C , R C ) of C can be naturally ordered by the prece-dence relation (Definition 2). Here we restrict this relation to path decomposition, thus the succes-sors of ( L C , X C , R C ) are obtained by moving a vertex from R C to X C (as happens by operation introduce ) or from X C to L C (as for f orget ). We prove the lemma for every valid quintuple ( τ − , L C , X C , R C , τ + ) , by induction (according to this order) on ( L C , X C , R C ) . The minimal ele-ments are of type Q = ( introduce ( u ) , ∅ , { u } , C \ { u } , τ + ) , and the result follows from Corollary 2and the definition of ppw for this case.Now let P be a path decomposition respecting ( τ − , L C , X C , R C , τ + ) , and let as before denoteby [ imin, imax ] the subpath of bags whose trace on C is ( L C , X C , R C ) . In particular, imin ≥ .Let ( L C − , X C − , R C − ) be the trace of node imin − on C and let Q − = ( τ −− , L C − , X C − , R C − , τ − ) be thevalid quintuple respected by P . Note that Q − is one of the candidates for valid quintuples preceding Q , used in the min of the formula for ppw ( Q ) (see Notation 10). By induction hypothesis, the widthof P is at least ppw ( Q − ) . We conclude by Corollary 2. ⊓⊔ Theorem 11.
The pathwidth of G is pw ( G ) = min Q last ppw ( Q last ) over all valid quintuples Q last of the form ( τ − , C \ { univ } , { univ } , ∅ , f orget ( univ )) .Proof. First note that pw ( G ) ≥ min Q last ppw ( Q last ) . Indeed, there exists a path decomposition P ofminimum width that has a root whose trace is ( C \ { univ } , { univ } , ∅ ) . The inequality follows fromLemma 10.Conversely, let Q last = ( τ − , C \ { univ } , { univ } , ∅ , f orget ( univ )) be a valid quintuple of min-imum ppw , among all quintuples of this type; denote by t this minimum value. By definition of ppw , there exists a sequence Q , Q , . . . , Q p of valid quintuples, the last being Q last = ( τ − , C \{ univ } , { univ } , ∅ , f orget ( univ )) , the first being Q = ( introduce ( u ) , ∅ , { u } , C \ { u } , τ +1 ) , suchthat we go from Q j to Q j +1 by an introduce or a f orget operation. Moreover, by definition of ppw ,all these Q j s have a local pathwidth locpw ( Q j ) at most t . We shall now construct a path decompo-sition of G of width t .Let I = ( X C , . . . , X Cp ) be a linear arrangement of bags, where Q j = ( τ − j , L Cj , X Cj , R Cj , τ + j ) .By construction of the sequence Q j , we have that I is a nice path-decomposition of G [ C ] . It remainsto place the vertices of S in order to transform it into a path decomposition of G . Firstly, replace in I each bag X Cj by a sequence of | XF S ( Q j ) | + 2 copies of it. Denote by [ jmin, jmax ] the newsubpath of | XF S ( Q j ) | + 2 nodes that map to bags equal to X Cj . Now – add XT R S ( Q j ) to all bags in the subpath [ jmin, jmax ] ; – add XL S ( Q j ) to bag numbered jmin ; – add XR S ( Q j ) to bag numbered jmax ; – add each vertex of XF S ( Q j ) that does not appear in any XF S ( Q l ) with l < j in exactly oneof the bags in the [ jmin + 1 , jmax − subpath.Let I ′ be this new linear arrangement of bags, we claim it represents a path decomposition of G ,of width t . Note that the size of each bag in the [ jmin, jmax ] subpath is at most locpw ( Q j ) +1, byconstruction of I ′ and by Lemmata 4 and 9. 15or any vertex u ∈ C , u is in some bag of I ′ and the bags containing u form a subpath, because I was a path decomposition of G [ C ] . For the same reason, every edge of G with both endpoints in C has its ends in a same bag of I ′ . It remains to show that similar conditions hold for vertices of S and edges with an endpoint in S and one in C .Let x be a vertex of S . Let HC be the interval graph induced by I on vertex set C , i.e. twovertices are adjacent in HC if and only if there is a bag of I containing both of them. We shalldistinguish two cases, depending on whether the neighborhood N G ( x ) of x in G induces a clique on HC or not.If x is in some set XF S ( Q j ) for some ≤ j ≤ p , then its neighbors in G induce a clique in HC .Conversely, if N G ( x ) forms a clique in HC , then by Helly’s property this clique is in some bag X Cj (see Proposition 2). Among all these bags, let j be minimum index such that X Cj is a local minimum(in size), in the sequence X C , . . . , X Cp , among bags containing N G ( x ) . By definition of sets XF S (Notation 8), we have x ∈ XF S ( Q j ) and by construction of I ′ , x will be put in exactly one bag ofthe [ jmin + 1 , jmax − subpath. This bag also contains all neighbors of x in G . We claim thatthis is the unique bag of I ′ containing x . Assume the contrary, so x is in some set XT R S ( Q i ) or XL S ( Q i ) or XR S ( Q i ) for some Q i . By definition of these sets (Notation 1), x would have twoneighbors a and b in G , such that a and b are non adjacent in HC — a contradiction.The second case is when N G ( x ) is not a clique in HC . Among all neighbors of x in G , let a be the first vertex that is forgotten in the sequence Q j , and let b be the last vertex introduced inthis sequence. Let X j be the last bag of I containing a , and X j ′ the first containing b . In particular j < j ′ , otherwise N G ( x ) would induce a clique in HC . By Notation 1, we have x ∈ XR S ( Q j ) , x ∈ XL S ( Q j ′ ) and x ∈ XT R S ( Q r ) for all j < r < j ′ . Moreover, x is not in any other set XT R S , XL S or XR S or XF S corresponding to quintuples of the sequence. Therefore the bags containing x in I ′ form exactly the subpath [ jmax, j ′ min ] and they contain all neighbors of x in C .We conclude that I ′ is a path decomposition of G of size t , and the equality of the theoremholds. ⊓⊔ Theorem 12.
The P ATHWIDTH problem can be solved in time O ∗ (3 k ) , where k is the size of theminimum vertex cover of the input graph.Proof. Given an arbitrary graph G , we first compute a minimum vertex cover in O ∗ (1 . k ) (Propo-sition 1). Then G is transformed into a graph G ′ by adding a universal vertex univ . Let C be thevertex cover of G ′ obtained by adding univ to the minimum vertex cover of G (hence | C | = k + 1 ).The pathwidth of G ′ is computed as follows.1. Compute all valid partitions ( L C , X C , R C ) , by enumerating all three-partitions of C and keep-ing only the valid ones (Lemma 1). This can be done in time O ∗ (3 k ) . The number of validpartitions is O (3 k +1 ) .2. Compute all valid quintuples using Lemma 8 and sort them using the precedence relation on thecorresponding valid three-partitions. The number of valid quintuples is O ∗ (3 k ) , their computa-tion can be performed in time O ∗ (3 k ) . The sorting can be done within the same running time,the triples ( L C , X C , R C ) being sorted by increasing size of L C , and in case of tie-breaks byincreasing size of X C (see Definition 2 and following remarks).3. For each valid quintuple Q , according to the ordering above, compute by dynamic programming locpw ( Q ) (Notation 9) and then ppw ( Q ) (Notation 10). Since this step is polynomial for each Q , the overall running time is still O ∗ (3 k ) . 16. Compute the pathwidth of G ′ using Theorem 11, and return pw ( G ) = pw ( G ′ ) − . This steptakes polynomial running time.This achieves the proof of the theorem. The algorithm can also be adapted to return, within the sametime bounds, an optimal path decomposition of the input graph. ⊓⊔ B Proofs of Section 3
B.1 Proof of Lemma 3
Proof.
Assume that Q = ( τ − , L C , X C , R C , τ + ) is a valid quintuple and let ( T, X ) be a nice tree-decomposition respecting it. Let imin and imax be the nodes of T like in Lemma 2. By definitionof introduce and f orget operations, if τ − = f orget ( u ) we must have u ∈ L C , and if τ − = introduce ( u ) we must have u ∈ X C . Also, if τ + = introduce ( v ) it means that for imax , vertex v was still in R C , and if τ + = f orget ( v ) we must have v ∈ X C . In the latter case, to be able toperform the f orget ( v ) operation, v must have no neighbor in R C , because bag X imax +1 separatesall vertices from bags below imax +1 from all vertices not appearing below imax +1 (Proposition 3applied to imax + 1 ). Symmetrically, if τ − = f orget ( u ) , then u has no neighbors in R C because X C separates L C from R C , and u ∈ L C .If imin is join ( X C ; L C , L C ) , then ( L C , X C , R C ∪ L C ) and ( L C , X C , R C ∪ L C ) arethe traces of the two sons j and k of imin . Both three-partitions are thus valid. Moreover L C (resp. L C ) is not empty, otherwise j (reps. k ) would have the same trace as imin – a contra-diction. If imax + 1 is an introduce of f orget node, the condition on τ + follows by the samearguments as in Lemma 8. If τ + is a join node, then it is of type join ( X C ; L C , LR C ) . Notethat LR C = ∅ (otherwise imax + 1 would leave the same trace as imax ). The three-partitions ( L C ∪ LR C , X C , R C \ LR C ) and ( LR C , X C , R C \ LR C ∪ L C ) are the respective traces of imax +1 and of the sibling of imax , so they are valid.Conversely, let ( L C , X C , R C ) , τ − and τ + satisfy the conditions of the lemma, we constructa nice tree decomposition respecting Q . We start with a unique node i with bag X C . If τ − is an introduce or f orget node, let ( L C − , X C − , R C − ) correspond to ( L C , X C , R C ) before operation τ − .Add to node i a son j with bag X C − and to j a son j ′ with bag L C − ∪ X C − . If τ − = join ( X C ; L C , L C ) we add to i two sons j and k with bags X C and add to j (resp. k ) a son j ′ with bag X C ∪ L C (resp.a son k ′ with bag X C ∪ L C ). If τ + is an introduce or f orget node, let ( L C + , X C + , R C + ) correspondto ( L C , X C , R C ) after operation τ + . Add to i a father l with bag X C + and to l a father l ′ with bag X C + ∪ R C + . If τ + = join ( X C ; L C , LR C ) then add to i a father l and a sibling r with bag X C . Weadd a father l ′ of l , with bag X C ∪ R C \ LR C , and to r a son r ′ with bag X C ∪ LR C . Observe thatat this stage we have a tree-decomposition of G [ C ] . Add S to each bag of the tree decomposition,we obtain a tree decomposition of G . By refining it into a nice one (Proposition 4), we obtain a nicetree decomposition of G . The original node i plays both the role of imin and imax in the new treedecomposition, and Q is the valid quintuple for it. ⊓⊔ B.2 Proof of Theorem 5
Proof.
For the sake of readability, we briefly recall the construction of ( T, X ) .We have started from the tree decomposition ( T C , X C ) of G [ C ] , which is a nice tree decom-position of G [ C ] , except for the leaf nodes whose bags are not necessarily of size one. The tree T
17s obtained from T C by replacing each node i with a path of three nodes, denoted imin, imid and imax (from the bottom towards the top). fInitially, we associate to the three nodes imin, imid, imax the same bag X Ci . Now, for each i ,1. add XT R S ( Q i ) to all bags in the subpath [ imin, imax ] of T ;2. add XL S ( Q i ) to bag number imin ;3. add XR S ( Q i ) to bag number imax ;4. For each vertex x ∈ XF S ( Q i ) , which has not yet been added to some bag of T , create a newnode of T adjacent only to imid and associate to this node the bag N [ x ] . These nodes are called pending nodes .It remains show that ( T, X ) is a tree decomposition of G , more precisely that, for every vertex x ∈ S , the bags containing x form a connected subtree of T , and the edges of G incident to x arecovered by some bag.Let HC be the graph on vertex set C , where two vertices are adjacent if and only if they belongto a same bag of ( T C , X C ) (see also Proposition 2). We distinguish two types of vertices of S :vertices x whose neighborhood N G ( x ) induces a clique in HC , and vertices whose neighborhoodin G does not induce a clique in HC . Claim 1.
A vertex x ∈ S is of the first type, i.e. N G ( x ) induces a clique in HC , if and only if x ∈ XF S ( Q i ) for one of the selected quintuples Q i .By definition of XF S ( Q i ) , if x belongs to this set then N G ( x ) ⊆ X Ci and thus N G ( x ) formsa clique in HC . Conversely, if N G ( x ) is a clique in HC , by Proposition 2 there is some bag X Ci containing N G ( x ) . Therefore x ∈ XF S ( Q i ) . Claim 2.
A vertex x ∈ S is of the second type, i.e. N G ( x ) does not induce a clique in HC , if andonly if there is a selected quintuple Q i such that x ∈ XT R S ( Q i ) , x ∈ XR S ( Q i ) or x ∈ XL S ( Q i ) .Assume there is a selected quintuple such that x ∈ XT R S ( Q i ) . Then x has two neighbors u, v in G such that u ∈ L Ci and v ∈ R Ci . Note that ( T C , X C ) is a tree decomposition of HC , soby Proposition 3, X Ci separates, in graph HC , the vertices u ∈ L Ci and v ∈ R Ci . In particular, N G ( x ) is not a clique in HC . In the case when x ∈ XL S ( Q i ) , we have two possibilities. If τ − i = join ( X Ci ; L Ci , L Ci ) , then it means that x has, in graph G , two neighbors u ∈ L Ci and v ∈ L Ci . Again X Ci separates these two vertices in HC thus N G ( x ) is not a clique in HC . If τ − i = introduce ( u ) , then u is a neighbor of x in G , and x also has another neighbor v ∈ L Ci . Let j bethe unique son of i in T C , in particular X Cj does not contain u . Note that x ∈ XT R S ( Q j ) because v ∈ L Cj and u ∈ R Cj , so again N G ( x ) is not a clique in HC . The case x ∈ XL S ( Q i ) is symmetricalto this last case.Conversely, assume that N G ( x ) is not a clique in HC and let u, v ∈ N G ( x ) be two vertices, non-adjacent in HC . Thus, in the tree decomposition ( T C , X C ) of G [ C ] , there is a bag i separating, in T C , the bags containing u from the bags containing v . Let Q i be the corresponding valid quintuple.Either u ∈ L Ci and v ∈ R Ci (or symmetrical), in which case x belongs to XT R S ( Q i ) , or i is a join ( X Ci ; L Ci , L Ci ) and u, v belong to different parts L Ci and L Ci . In the latter case, if x hasneighbors in R Ci then x belongs to XT R S ( Q i ) , otherwise it belongs to XL C ( Q i ) . We concludethat x ∈ XT R S ( Q i ) or x ∈ XL S ( Q i ) .The two claims ensure that every vertex x ∈ S appears in some bags of the tree decomposition ( T, X ) . Moreover, if x is in the second case, then x appears in a unique, pending bag. Hence thebags containing x form a (trivial) subtree in T , and since this unique bag contains N G [ x ] it coversall edges incident to x in G . 18t remains to prove that for every vertex x of the second type, the bags of ( T, X ) form a subtreeof T and cover all edges incident to x in G . Assume x appears in the bags of two nodes a and b of T , and let c be a node on the a, b -path of the decomposition tree. We must prove that x isin the bag of c . Clearly, a and b are not pending nodes. Suppose first that a and b have c as acommon ancestor. Then c = kmin for some node k of T C . Also a (resp. b ) come from somenode i (resp. j ) of T C . Let Q i = ( τ − i , L Ci , X Ci , R Ci , τ + i ) , Q j = ( τ − j , L Cj , X Cj , R Cj , τ + j ) and Q k = ( τ − k = join ( X Ck ; L Ck , L Ck ) , L Ck , X Ck , R Ck , τ + k ) be the valid quintuples corresponding tonodes i , j and k . Since x has been added to node a , x is in XT R S ( Q i ) , XL S ( Q i ) or XR S ( Q i ) . Inthe two first cases, it means that x has a neighbor in L Ci . Note that L Ci ⊆ L Ck . In the third case, itmeans that τ + i is of type f orget ( u ) and u is a neighbor of x . Again, u ∈ L Ck . Therefore x has aneighbor in L Ck . For symmetrical reasons, x has a neighbor in L Ck . Hence, x is in XT R S ( Q k ) or XL S ( Q k ) , and consequently in the bag of node c = kmin of the tree decomposition ( T, X ) .We consider now w.l.o.g. that b is an ancestor of a . With the same notations as above, x has aneighbor in L Ci , or a = imax , τ i + = f orget ( u ) and u is a neighbor of x . Since c is an ancestor of a , we have L Ci ⊆ L Ck , hence x has a neighbor in L Ck . Since x is in the bag of node b , we have one ofthe following – x ∈ XT R S ( Q j ) , thus x has a neighbor in R Cj , – b = jmin and x ∈ XL S ( Q j ) , thus τ − j = join ( L Ci ; L Cj , L Cj ) and x has neighbors in bothsets L Cj , L Cj .Note that the case x ∈ XR S ( Q j ) is not possible, because x has a neighbor in L Ci ⊆ L Cj . Note that R Cj ⊆ R Ck and, if we are in the second case, L Ci ⊆ R Ck (assuming that k is a left descendent of j ).Therefore, we must have x ∈ XT R S ( Q k ) , and x is in the bag of node c .We have shown that for each x ∈ S of the second type, the bags of ( T, X ) containing it forma connected subtree of T . Let us prove that for each edge incident to x in G , both ends are insome bag of X . We first study the placement of N G ( x ) in the bags of ( T C , X C ) . Let r ( x ) bethe lowest node of T C such that every vertex of N G ( x ) appears in the subtree of T C rooted in r ( x ) . Equivalently, r ( x ) is the lowest node of T C such that the corresponding quintuple Q r ( x ) =( τ − r ( x ) , L Cr ( x ) , X Cr ( x ) , R Cr ( x ) , τ + r ( x ) ) satisfies R Cr ( x ) ∩ N G ( x ) = ∅ . Note that r ( x ) is unique. Weprove that x ∈ XL S ( Q r ( x ) ) . If r ( x ) has a unique son j , then r ( x ) must be of type introduce ( u ) for some u ∈ N G ( x ) (otherwise we could replace r ( x ) by j , contradicting its definition). Also x must have some neighbor in L Cr ( x ) (otherwise N G ( x ) ⊆ X Cr ( x ) , contradicting the fact that x is ofthe second type). Hence x ∈ XL S ( Q r ( x ) ) by Notation 1. Assume now that r ( x ) is a join node, so τ − r ( x ) = join ( X Cr ( x ) ; L Cr ( x ) , L Cr ( x ) ) . Then N G ( x ) intersects both L Cr ( x ) and L Cr ( x ) , otherwise wecould replace r ( x ) by one of its sons. Again, x ∈ XL S ( Q r ( x ) ) by Notation 1 applied to join nodes.Now the fact that x ∈ XL S ( Q r ( x ) ) implies that x belongs to bag r ( x ) min in the decomposition ( T, X ) .Let now { l ( x ) , . . . , l p ( x ) } be the set of lowest nodes l of T C such that the quintuple Q l =( τ − l , L l , X l , R l , τ + l ) satisfies τ + l = f orget ( u ) , for some u ∈ N G ( x ) . We prove that x ∈ XR S ( Q l ) .Indeed x has no neighbors in L l (otherwise l would not have been a lowest node with the requiredproperty) and x must have some neighbor in R l (otherwise N G ( x ) ⊆ X l , contradicting the fact that x is of the second type). Hence, by Notation 1, x belongs to XR S ( Q l ) , and by our construction italso belongs to the bag of node lmax in ( T, X ) .Let T ( x ) be the minimal subtree of T spanning the nodes r ( x ) min, l ( x ) max, . . . , l p ( x ) max .We have proven above that the bags of ( T, X ) containing x form a subtree of T . Therefore x belongs19o all these all bags of ( T, X ) , of the subtree T ( x ) . It remains to argue that these bags include allvertices of N G ( x ) . Let u ∈ N G ( x ) (we may assume that u = univ , because the property is trivialfor vertex univ ). In the tree decomposition ( T C , X C ) , clearly u appears in some bag of the subtreerooted in r ( x ) (because u R Cr ( x ) ). Let j be the node with operation f orget (( u ) . There must besome node l q ( x ) in the subtree of T C rooted in j . Also note that l q ( x ) is in the subtree of T C rootedin r ( x ) . Hence u is in some bag of ( T C , X C ) , on the path from l q ( x ) to r ( x ) in T C . Thus u belongsto some bag of ( T, X ) , on the path from l q ( x ) max to r ( x ) min of T . Hence u belongs to a bag of T ( x ) , which also contains vertex x . We deduce that all edges incident to x in G are covered by somebag of ( T, X ) .This concludes the proof of the theorem. ⊓⊔ C An O ∗ (3 k ) algorithm for TREEWIDTH
Let us have a deeper look at the partial treewidth parameter ptw ( Q ) . Let ( T C , X C ) be a nice treedecomposition of G [ C ] (again the root only contains the universal vertex). The trace of each node i is some valid triple ( L Ci , X Ci , R Ci ) . We trim this tree decomposition, removing all nodes i such that L Ci = ∅ , except if the parent of i is a f orget node. We call such a tree decomposition a trimmed treedecomposition of G [ C ] . At this stage, to each node i of the trimmed tree decomposition correspondsa valid quintuple Q i (for the leaf nodes, the corresponding valid quintuples are degenerated). Let Q i be a valid quintuple corresponding to some node i of a trimmed tree decomposition ( T C , X C ) . Wecall Q i -rooted subtree decomposition the part of ( T C , X C ) induced by the subtree rooted in i .Note that an equivalent definition of ptw ( Q ) is the following: ptw ( Q ) is the minimum value t such that there exists a Q -rooted subtree decomposition whose nodes correspond to valid quintuples Q ′ of local treewidth loctw ( Q ′ ) at most t . Let us add a constraint on the structure of the Q -rootedsubtree decomposition, more precisely on the “depth” of this subtree in terms of join nodes. Notation 13
Let d ∈ { , . . . , k } and let Q be a valid quintuple. We denote by ptw ( d, Q ) the min-imum integer t such that there exists a Q -rooted subtree decomposition satisfying the followingconditions: – For any valid quintuple Q ′ corresponding to a node of the Q -rooted subtree decomposition, loctw ( Q ′ ) ≤ t . – On any path from the root of the subtree to a leaf, there are at most d nodes of type join . In particular, ptw (0 , Q ) is the minimum value that can be obtained using tree decompositionwithout any join node in the subtree of Q . Clearly, ptw ( Q ) = ptw ( k, Q ) , since any trimmed treedecomposition contains at most k (actually even at most k − ) join nodes from the root to a leaf.The principle of our algorithm is to compute, for each d from to k , the values ptw ( d, Q ) usingthe previously computed values. In order to gain in time complexity from O ∗ (4 k ) to O ∗ (3 k ) , we cannot afford to consider each quintuple of the type ( join ( X C ; L C , L C ) , L C , X C , R C , τ + ) . (Note that, as before, if the quintuple Q has a τ + is of type join , the parameters of the join areirrelevant for the value of ptw ( d, Q ) ). Instead of computing ptw ( d, ( join ( X C ; L C , L C ) , L C , X C , R C , τ + ))
20e shall simply store a unique value ptw ( d, ( join, L C , X C , R C , τ + )) , which is defined as min ptw ( d, ( join ( X C ; L C , L C ) , L C , X C , R C , τ + )) , over all non-trivial partitions ( L C , L C ) of L C (moreover there must exist valid quintuples of theform ( τ − , L C , X C , R C ∪ L C , join ) and ( τ − , L C , X C , R C ∪ L C , join ) ).All these values ptw ( d, ( join, . . . )) will be computed from values ptw ( d − , . . . ) , by subsetconvolution, using a specific algorithm J OIN P TW (Algorithm 2). Assume that one call of AlgorithmJ OIN P TW runs in time O ∗ (3 k ) . Then Algorithm P TW (Algorithm 1) correctly computes all values ptw ( d, . . . ) , in O ∗ (3 k ) time. Eventually, using d = k , we obtain the treewidth of graph G within thesame time complexity. Algorithm 1: P TW computes ptw ( d, . . . ) Input : d and, if d ≥ , all values ptw ( d − , . . . ) Output : all values ptw ( d, . . . ) if d = 0 then set all values ptw (0 , ( join, . . . )) to ∞ ; else use Algorithm J OIN P TW to compute all values ptw ( d, ( join, . . . )) from ptw ( d − , . . . ) ; foreach valid quintuple Q = ( τ − , L C , X C , R C , τ +) s.t. τ − = join , by increasing order on ( L C , X C , R C ) do if Q is degenerate then ptw ( d, Q ) = loctw ( Q ) ; if τ − = introduce ( u ) then ptw ( d, Q ) = max( loctw ( Q ) , min valid quintuple Q − ptw ( Q − )) over all valid quintuples Q − oftype ( τ −− , L C , X C \ { u } , R C ∪ { u } ) , introduce ( u )) ; if τ − = forget ( u ) then ptw ( d, Q ) = max( loctw ( Q ) , min valid quintuple Q − ptw ( Q − )) over all valid quintuples Q − oftype ( τ −− , L C \ { u } , X C ∪ { u } , R C ) , forget ( u )) ; It remains to describe Algorithm J
OIN P TW . The key algorithmic tool is the following result onsubset convolution [1]: Theorem 14 ( [1]).
Let U be a universe of size s and f, g be two functions from U to N . Assumethese functions are stored as tables. The function f ⋆ g : 2 U → N defined as f ⋆ g ( X ) = X Y ⊆ X f ( Y ) · g ( X \ Y ) is called the subset convolution of f and g .If the maximum values of f, g and f ⋆ g are at most s , then f ⋆ g can be computed in time O ∗ (2 s ) . ptw ( d, ( join, L C , X C , R C , τ + )) in O ∗ (3 k ) time. For this purpose, We shall fix a set X C ⊆ C and use Theorem 14 to compute thecorresponding quantities in time O ∗ (2 k −| X C | ) , using only values of the type ptw ( d − , . . . ) .The family of functions defined above will be used in the subset convolution: Notation 15
Let X C ⊆ C . Let d, l be two integers ≤ d, l ≤ k and let t be a positive integer. Wedefine the function ptw atmost t t,ld,X C : 2 C \ X C → { , } as follows: ptw atmost t t,ld,X C ( L C ) = if there is a valid quintuple Q = ( τ − , L C , X C , R C , join ) s.t. ptw ( d, Q ) ≤ t and |{ x ∈ S | N ( x ) ∩ L C = ∅ and N ( x ) ∩ R C = ∅}| = l otherwise Lemma 11.
Let ˜ Q = ( join, L C , X C , R C , τ + ) correspond to a simplified valid triple (without theparameters of the join operation). Sets XT R S ( ˜ Q ) , XR S ( ˜ Q ) and the value ǫ ( ˜ Q ) are defined like inNotation 1 and Lemma 5 . Let l be the size of the set { x ∈ S | N ( x ) ∩ L C = ∅ and N ( x ) ∩ R C = ∅} .Then ptw ( d, join, L C , X C , R C , τ + ) is the minimum integer t such that there exists integers l , l , ≤ l , l ≤ k and a two-partition ( L C , L C ) of L C satisfying:1. | X C | + max n | XT R S ( ˜ Q ) | + l − l − l , | XT R S ( ˜ Q ) | + | XR S ( ˜ Q ) | , ǫ ( ˜ Q ) o ≤ t .2. ptw atmost t t,l d − ,X C ( L C ) = 1 and ptw atmost t t,l d − ,X C ( L C ) = 1 .Proof. If ptw ( d, join, L C , X C , R C , τ + ) ≤ t , there exists a valid quintuple Q = ( join ( L , L , L C ,X C , R C , τ + ) such that ptw ( d, Q ) ≤ t . Fix a Q -rooted subtree decomposition realizing ptw ( d, Q ) and let Q − = ( τ −− , L C , X C , R C ∪ L C , join ) and Q − = ( τ −− , L C , X C , R C ∪ L C , join ) be the valid quintuples corresponding to the sons of the root of the subtree. Let l (resp. l ) be thenumber of vertices of S having neighbors in L C but with no neighbors in R C ∪ L C ) (resp. hav-ing neighbors in L C but not in R C ∪ L C ). We point out that | XL S ( Q ) | = l − l − l . Since loctw ( Q ) ≤ t , this implies the first property. We also observe that ptw ( d − , Q − ) ≤ t and ptw ( d − , Q − ) ≤ t , since the Q − and the Q − -rooted subtree decompositions have at most d − join nodes on any path from their root to a leaf (one less that the Q -rooted subtree decompo-sition). This implies the second property of the theorem.Conversely, consider ˜ Q = ( join, L C , X C , R C , τ + ) , t, l, l , l , L C and L C satisfying the con-ditions of the theorem. We prove that ptw ( d, ˜ Q ) ≤ t . Since ptw atmost t t,l d − ,X C ( L C ) = 1 and ptw atmost t t,l d − ,X C ( L C ) = 1 there exist valid quintuples Q − = ( τ −− , L C , X C , R C ∪ L C , join ) and Q − ( τ −− , L C , X C , R C ∪ L C , join ) such that ptw ( d − , Q − ) ≤ t and ptw ( d − , Q − ) ≤ t . Let Q = ( join ( L C , L C ) , L C , X C , R C , τ + ) . Note that Q is a valid quin-tuple and | XL S ( Q ) | = l − l − l . By the first proprety, we have that loctw ( Q ) ≤ t . Denote by These values are uniquely defined, but observe that we cannot use the same notation to define the set XL S ( ˜ Q ) a Q -rooted subtree decomposition such that each part from the root to a leaf contains at most d − join nodes and each valid triple of the subtree has a local treewidth at most t . Choose a similar Q -rooted subtree decomposition denoted T . Let now T be any Q -rooted tree decomposition, andlet i and i be the sons of the root. Replace the subtree rooted in i (resp. in i ) by T (resp T ). Inthis new Q -rooted subtree decomposition, all paths from the root to a leaf contain at most d nodes oftype join , and all valid quintuples have local treewidth at most t . This certifies that ptw ( d, Q ) ≤ t and consequently ptw ( d, ˜ Q ) ≤ t . ⊓⊔ Algorithm 2, J
OIN P TW , simply applies Lemma 11 and the observation that the second conditionof this lemma can be expressed by a convolution: Lemma 12.
The second condition of Lemma 11 is equivalent to: ( ptw atmost t t,l d − ,X C ⋆ ptw atmost t t,l d − ,X C )( L C ) ≥ . Proof. “ ⇒ :” Assume the second condition of Lemma 11 is satisfied. Then there is a two-partition ( L C , L C ) of L C such that ptw atmost t t,l d − ,X C ( L C ) = 1 and ptw atmost t t,l d − ,X C ( L C ) =1 . Recall that ( ptw atmost t t,l d − ,X C ⋆ ptw atmost t t,l d − ,X C )( L C ) is defined (see 14) as X Y ⊆ L C ptw atmost t t,l d − ,X C ( Y ) · ptw atmost t t,l d − ,X C ( L C \ Y ) . Hence, in the sum over all Y ⊆ L C , when Y = L C , both factors are equal to one. Therefore thesum is at least .‘ ⇐ :” Conversely, in the sum above all terms are either 0 or 1. If the sum is at least 1, it meansthere exists Y ⊆ L C such that ptw atmost t t,l d − ,X C ( Y ) = 1 and ptw atmost t t,l d − ,X C ( L C \ Y ) = 1 . Thus by taking ( L C , L C ) = ( Y, L C \ Y ) we have the two-partition of L S required byLemma 11. ⊓⊔ Algorithm J
OIN P TW (Algorithm 2) is correct by Lemma 11. Its running time is given by thecomputations of lines 4-5. For each set X C ⊆ C , we compute O ( k n ) subset convolutions asfunctions from C \ X C to N . Each of these computations takes, by Theorem 14, O ∗ (2 k −| X C | ) time.Recall that X | X C |⊆ C k −| X C | = k X i =0 (cid:18) ki (cid:19) k − i = 3 k . hence the whole running time of the algorithm is of order O ∗ (3 k ) .Altogether, we obtain: Theorem 16.
The T REEWIDTH problem can be solved in O ∗ (3 k ) time, where k is the size of theminimum vertex cover of the input graph. lgorithm 2: J OIN P TW computes ptw ( d, ( join, . . . ) Input : d and, if d ≥ , all values ptw ( d − , . . . ) Output : all values ptw ( d, ( join, . . . ) foreach X C ⊆ C do foreach t, l with ≤ t ≤ n and ≤ l ≤ k do compute all functions ptw atmost t t,ld − ,X C : 2 C \ X C → { , } ; foreach l , l with ≤ l , l ≤ l do compute, using Theorem 14, all convolutions ptw atmost t t,l d − ,X C ⋆ ptw atmost t t,l d − ,X C ; foreach L C , R C , τ + such that ˜ Q = ( join, L C , X C , R C , τ + ) corresponds to valid tuples do compute XT R S ( ˜ Q ) , XR S ( ˜ Q ) , ǫ ( ˜ Q ) using Notation 1 and Lemma 5; let l be the size of { x ∈ S | x sees L C but does not see C \ ( L C ∪ X C ) } ; find the minimum t such that there exist l, l , l satisfying (cf. Lemmata 11 and 12) (1) | X C | + max n | XT R S ( ˜ Q ) | + l − l − l , | XT R S ( ˜ Q ) | + | XR S ( ˜ Q ) | , ǫ ( ˜ Q ) o ≤ t , and (2) ( ptw atmost t t,l d − ,X C ⋆ ptw atmost t t,l d − ,X C )( L C ) ≥ ; ptw ( d, ( join, L C , X C , R C , τ + )) := t ; D P
ATHWIDTH parameterized by the vertex cover of the complement
Let C be a vertex cover of G and let S = V \ C be an independent set in G and thus a clique in G .Denote k ′ = | C | . Recall that, by Proposition 4, for any tree or path decomposition of G , there willbe some bag of the decomposition containing S . Boadlender et. al. [4] proved the following. Proposition 5 ([4]).
There is an algorithm taking as input a graph G = ( V, E ) and a clique S of G and computing the treewidth of G in O ∗ (2 | V \ S | ) time. Consequently, the treewidth of G can be computed in time O ∗ (2 k ′ ) .The previous lemma can be adapted, with similar techniques, to the pathwidth case. Lemma 13.
Let G = ( V, E ) be a graph and W ⊂ V a vertex subset. Let us denote by pw ( G ; W ) the minimum width, over all path decompositions of G having W as an end bag.There is an O ∗ (2 | C | ) algorithm computing the values pw ( G [ N [ L ]]; N ( L )) , for all subsets L of C .Proof. We use an alternative definition for pathwidth, expressed as a vertex layout problem, seee.g. [5]. A layout is a total ordering L = ( v , . . . , v n ) of the vertices of G . The vertex separation ofa layout is vs ( L ) = max ≤ i ≤ n | N ( { v i , v i +1 , . . . , v n } ) | . Consider a path decomposition ( P, X ) of G . We can associate a layout L ( P, X ) as follows : forany two vertices u and v , if the lowest bag containing u is strictly before the lowest bag containing v , then u must appear before v in the layout. It is known [17] that vs ( L ( P, X ) ) ≤ width (( P, X )) .Conversely, given a layout L = ( v , . . . , v n ) , we can construct a path decomposition ( P, X ) L with n bags, bag i being N ( { v i , v i +1 , . . . , v n } ) ∪ { v i } . Clearly, the width of this path decomposition equals vs ( L ) . In particular, pw( G ) = min L∈Q vs ( L ) [17] where Q is the set of all layouts.24onsider now parameter pw( G [ N [ L ]]; N ( L )) , for a subset L of V \ C . With similar arguments, pw( G [ N [ L ]]; N ( L )) = min L =( v ,...,v n ) (cid:26) max n −| L | +1 ≤ i ≤ n N ( { v i , v i +1 , . . . , v n } ) (cid:27) where the minimum is taken over all layouts L = ( v , . . . , v n ) such that L = { v n −| L | +1 , . . . , v n } .In full words, the minimum is taken over all layouts ending with the vertices of L .For L = ∅ , we take pw( G [ ∅ ]; ∅ ) = 0 . For each L non empty, we have (see e.g. [5]) that pw( G [ N [ L ]]; N ( L )) = max (cid:26) | N ( L ) | , min u ∈ L { pw( G [ N [ L ′ ]]; N ( L ′ )) | L ′ = L \ { u }} (cid:27) . Intuitively, for computing an optimal layout ending with L , we must try which vertex u ∈ L oc-cupies the position v n −| L | +1 , then we simply take the best ordering on L ′ = L \ { u } . Usingthe above equation, if the values pw( G [ N [ L ′ ]]; N ( L ′ )) are known for all subsets L ′ smaller that L , then pw( G [ N [ L ]]; N ( L )) is computable in polynomial time. Thus we can compute all values pw( G [ N [ L ]]; N ( L )) by dynamic programming over all sets L ⊆ C by increasing size, in time O ∗ (2 | C | ) . ⊓⊔ Lemma 14.
Let G = ( V, E ) be a graph, C be a vertex cover of G and S = V \ C . Then pw( G ) = min L ⊆ C max { pw ( G [ N [ L ]]; N ( L )]) , pw ( G [ N [ R ]]; N ( R )) , | S ∪ N ( L ) | − |} where R = C \ N [ L ] .Proof. Let L be a subset of C realizing the minimum of the right-hand side member of the aboveequation. Denote by p this minimum. Take a path decomposition ( P L , X L ) of G [ N [ L ]] , of width atmost p , having N ( L ) as highest end-bag. Also take a path decomposition ( P R , X R ) of G [ N [ R ]] , ofwidth at most p , having N ( R ) as lowest end-bag. Observe that N ( R ) ⊆ S ∪ N ( L ) . Therefore, byadding a bag S ∪ N ( L ) between the root N ( L ) of ( P L , X L ) and the leaf N ( R ) of ( P R , X R ) , weobtain a path decomposition ( P, X ) of G , of width p .Conversely, let ( P, X ) be an optimal rooted path decomposition of G and let p be its width. Let X i be a bag containing S . Let L = L i be the set of vertices of G which only appear in bags strictlybelow node i . Observe that X i contains S ∪ N ( L i ) , in particular | S ∪ N ( L i ) | − ≤ p . We constructa path decomposition of G [ N [ L ]] by deleting all nodes strictly above i and by removing, from theremaining bags, all vertices that do not belong to N [ L i ] . Observe that all vertices of N ( L i ) are stillin the bag X i . This implies that pw( G [ N [ L i ]]; N ( L i )) ≤ p .Let now R = C \ N [ L i ] . We start again from the path decomposition ( P, X ) and we constructa path decomposition of G [ N [ R ]] with N ( R ) as a leaf bag. Since R = C \ N [ L ] , we have that N ( R ) ∩ C ⊆ N ( L ) , in particular N ( R ) ⊆ X i . Remove from ( P, X ) all bags strictly below i and addbelow i a new bag N ( R ) . From the remaining bags, remove all vertices that are not in G [ N [ R ]] . Weobtain a path decomposition of G [ N [ R ]] whose leaf bag is N ( R ) , thus pw( G [ N [ R ]]; N ( R )) ≤ p . ⊓⊔ Theorem 17.
The P ATHWIDTH problem can be solved in time O ∗ (2 k ′ ) , where k ′ is the size of theminimum vertex cover of the complement of the input graph.Proof. We compute, using Lemma 13, all values pw( G [ N [ L ]]; N ( L )) , for each L ⊆ C . These valuesare stored in a table of size O ∗ (2 k ′ ) under the label L . Then, for each such L , we let R = C \ N [ R ] and we take the maximum of pw( G [ N [ L ]]; N ( L )) , pw( G [ N [ R ]]; N ( R )) and | S ∪ N ( L ) | − . ByLemma 14, the minimum of all these values is the pathwidth of G . ⊓⊔⊓⊔