Measuring what Matters: A Hybrid Approach to Dynamic Programming with Treewidth

We develop a framework for applying treewidth-based dynamic programming on graphs with"hybrid structure", i.e., with parts that may not have small treewidth but instead possess other structural properties. Informally, this is achieved by defining a refinement of treewidth which only considers parts of the graph that do not belong to a pre-specified tractable graph class. Our approach allows us to not only generalize existing fixed-parameter algorithms exploiting treewidth, but also fixed-parameter algorithms which use the size of a modulator as their parameter. As the flagship application of our framework, we obtain a parameter that combines treewidth and rank-width to obtain fixed-parameter algorithms for Chromatic Number, Hamiltonian Cycle, and Max-Cut.


Introduction
Over the past decades, the use of structural properties of graphs to obtain efficient algorithms for NP-hard computational problems has become a prominent research direction in computer science. Perhaps the best known example of a structural property that can be exploited in this way is the tree-likeness of the inputs, formalized in terms of the decompositionbased structural parameter treewidth [61]. It is now well-known that a vast range of fundamental problems admit so-called fixed-parameter algorithms parameterized by the treewidth of the input graph -that is, can be solved in time f (k) · n O (1) on n-vertex graphs of treewidth k (for some computable function f ). We say that such problems are FPT parameterized by treewidth.
On the other hand, dense graphs are known to have high treewidth and hence require the use of different structural parameters; the classical example of such a parameter tailored to dense graphs is clique-width [16]. Clique-width is asymptotically equivalent to the structural parameter rank-width [60], which is nowadays often used instead of clique-width due to a number of advantages (rank-width is much easier to compute [42] and can be used to design more efficient fixedparameter algorithms than clique-width [35,36]). While rank-width (or, equivalently, clique-width) dominates 1 treewidth and can be used to "lift" fixed-parameter algorithms designed for treewidth to well-structured dense graphs for a number ✩ A preliminary version of this paper appeared as an extended abstract in [23].
We remark that modulators have also been used in a variety of other contexts. For instance, modulators to graphs of bounded treedepth can be used to obtain polynomial kernels for many problems [33,9], and there are also numerous applications of modulators to cluster graphs [21] and natural restrictions of these [34]. The parameterizations considered in this paper are also related to the notion of elimination distance, which has been studied in a variety of contexts [1,10,11,46,55].

Preliminaries
For i ∈ N, let [i] denote the set {1, . . . , i}. All graphs considered in this paper are simple and undirected. We refer to the standard textbook [20] for basic graph terminology.
For a graph G, let V (G) and E(G) denote the vertex set and the edge set of G, respectively. For S ⊆ V (G), let G[S] denote the subgraph of G induced by S. For v ∈ V (G) and S ⊆ V (G), let G − v be the graph obtained from G by removing v, and let G − S be the graph obtained by removing all vertices in S. For v ∈ V (G), the set of neighbors of v in G is denoted by N G (v) (or N(v) when G is clear from the context). For A ⊆ V (G), let N G (A) denote the set of vertices in G − A that have a neighbor in A. For v ∈ V (G) and a subgraph H of G − v, we say v is adjacent to H if it has a neighbor in H . For a vertex set A of a graph G, an A-path is a path whose endpoints are contained in A and all the internal vertices are contained in A set M of vertices in a graph G is called a modulator to a graph class H if G − M ∈ H. The operation of collapsing a vertex set X , denoted G • X , deletes X from the graph and adds an edge between vertices u, v ∈ V (G − X) if uv / ∈ E(G) and there is an u-v path with all internal vertices in G[ X].

Parameterized complexity
A parameterized problem P is a subset of * × N for some finite alphabet . Let L ⊆ * be a classical decision problem for a finite alphabet, and let p be a non-negative integer-valued function defined on * . Then L parameterized by p denotes the parameterized problem { (x, p(x)) | x ∈ L } where x ∈ * . For a problem instance (x, k) ∈ * × N we call x the main part and k the parameter. A parameterized problem P is fixed-parameter tractable (FPT in short) if a given instance (x, k) can be solved in time f (k) · |x| O (1) where f is an arbitrary computable function of k; we call algorithms which run in this time fixed-parameter algorithms. Similarly, a parameterized problem P is in the class XP if a given instance (x, k) can be solved in time |x| f (k) where f is an arbitrary computable function of k, and we call algorithms running in this time XP algorithms.
Parameterized complexity classes are defined with respect to fpt-reducibility. A parameterized problem P is fpt-reducible to Q if in time f (k) · |x| O (1) , one can transform an instance (x, k) of P into an instance (x , k ) of Q such that (x, k) ∈ P if and only if (x , k ) ∈ Q, and k ≤ g(k), where f and g are computable functions depending only on k. Central to parameterized complexity is the following hierarchy of complexity classes, defined by the closure of canonical problems under fpt-reductions: FPT ⊆ W [1] ⊆ W [2] ⊆ · · · ⊆ XP. All inclusions are believed to be strict. In particular, FPT = W [1] under the Exponential Time Hypothesis [43]. The class W [1] can be considered the analog of NP in parameterized complexity. A major goal in parameterized complexity is to distinguish between parameterized problems which are in FPT and those which are W[1]-hard, i.e., those to which every problem in W [1] is fpt-reducible.
We refer the reader to the respective books [18,22,58] for more details on parameterized complexity. Finally, we recall that a parameter α dominates a parameter β if for each graph class where β is bounded, α is also bounded. Two parameters are incomparable if neither dominates the other.

Treewidth
A tree decomposition of a graph G is a pair (T , {B t | t ∈ V (T )}) where B t ⊆ V (G) for every t ∈ V (T ) and T is a tree such that: 1. for each edge {u, v} ∈ E(G), there is a t ∈ V (T ) such that {u, v} ⊆ B t , and 2. for each vertex v ∈ V (G), T is a non-empty (connected) tree.
The width of a tree decomposition is max t∈V (T ) |B t | − 1. The treewidth [52] of G is the minimum width taken over all tree decompositions of G and it is denoted by tw(G). We call the elements of V (T ) nodes and B t bags.
Fact 1 ([4]). There exists an algorithm which, given an n-vertex graph G and an integer k, runs in time k O(k 3 ) · n, and either outputs a tree decomposition of G of width at most k or correctly determines that tw(G) > k.
A tree decomposition (T , {B t | t ∈ V (T )}) of a graph G is nice if T can be rooted such that the following conditions hold: 1. Every node of T has at most two children. 2. If a node t of T has two children t 1 and t 2 , then B t = B t 1 = B t 2 ; in this case we call t a join node.
3. If a node t of T has exactly one child t , then either of the following holds: (a) |B t | = |B t | + 1, in which case we call t an introduce node, or (b) |B t | = |B t | − 1 in which case we call t a forget node. 4. If a node t is a leaf, then |B t | = 1; in this case we call t a leaf node.
The advantage of nice tree decompositions is that they allow the design of more transparent dynamic programming algorithms, since one only needs to deal with four specific types of nodes. It is well known (and easy to see) that given a tree decomposition of a graph G = (V , E) of width at most k and with O(|V |) nodes, one can construct in linear time a nice tree decomposition of G with O(|V |) nodes and width at most k [7].
Given a node t in T , we let Y t be the set of all vertices contained in the bags of the subtree of T rooted at t, i.e., Y t = B t ∪ p is separated from the root by t B p .

Rank-width
For a graph G and U , W ⊆ V (G), let A G [U , W ] denote the U × W -submatrix of the adjacency matrix over the twoelement field GF(2), i.e., the entry a u,w , with A rank-decomposition of a graph G is a pair (T , μ) where T is a tree of maximum degree 3 and μ : V (G) → {t | t is a leaf of T } is a bijective function (see Fig. 1). For an edge e of T , the connected components of T − e induce a bipartition (X, Y ) of the set of leaves of T . Then the width of e in rank-decomposition (T , μ) is ρ G (μ −1 (X)). The width of (T , μ) is the maximum width over all edges of T . The rank-width of G, rw(G) in short, is the minimum width over all rank-decompositions of G. We denote by R i the class of all graphs of rank-width at most i. A rooted rank-decomposition is obtained from a rank-decomposition (T , μ) by subdividing an arbitrary edge of T , and considering the newly created vertex as root. For any node t ∈ V (T ) we use G t to denote the subgraph of G, induced by all vertices associated to leaves of T for which t lies on the unique path from the respective leaf to the root in T .
Unlike clique-width, rank-width can be computed exactly using a fixed-parameter algorithm (which also outputs a corresponding rank-decomposition).
Fact 2 ([42,Theorem 7.3]). There exists an algorithm which, given an n-vertex graph G and an integer k, returns in time f (k) · n 3 , and either outputs a rank-decomposition of width at most k or correctly determines that rw(G) > k.

Monadic Second-Order Logic
Counting Monadic Second-Order Logic (CMSO 1 ) is a basic tool to express properties of vertex sets in graphs. The syntax of CMSO 1 includes logical connectives ∧, ∨, ¬, ⇔, ⇒, variables for vertices and vertex sets, quantifiers ∃, ∀ over these variables, and the relations a ∈ A where a is a vertex variable and A is a vertex set variable; adj(a, b), where a and b are vertex variables and the interpretation is that a and b are adjacent; equality of variables representing vertices and sets of vertices; Parity( A), where A is a vertex set variable and the interpretation is that |A| is even.
The CMSO 1 Optimization problem is defined as follows: A graph G, a CMSO 1 formula φ(A) with a free set variable A, and opt ∈ {min, max}.

Task:
Find an interpretation of the set A in G such that G models φ(A) and A is of minimum/maximum (depending on opt) cardinality.
From the fixed-parameter tractability of computing rank-width [42], the equivalence of rank-width and clique-width [60] and Courcelle's Theorem for graphs of bounded clique-width [15] (see also later work that establishes the result directly for rank-width [35]) it follows that:
We refer the reader to the books [14,29] for an in-depth overview of Monadic Second Order logic.

H-Treewidth
The aim of H-treewidth is to capture the treewidth of a modulator to the graph class H. However, one cannot expect to obtain a parameter with reasonable algorithmic applications by simply measuring the treewidth of the graph induced by a modulator to H -instead, one needs to measure the treewidth of a so-called torso, which adds edges to track how the vertices in the modulator interact through H. To substantiate this, we observe that Hamiltonian Cycle would become NP-hard even on graphs with a modulator that (1) induces an edgeless graph, and (2) is a modulator to an edgeless graph, and where (3) each connected component outside the modulator has boundedly many neighbors in the modulator. Proof. Hamiltonian Cycle is known to be NP-hard on cubic bipartite graphs [2]. Setting X to be one side of the bipartition of any graph in this graph class is easily seen to satisfy the given conditions. The notion of a torso has previously been algorithmically exploited in other settings [37,39,57], and its adaptation is our first step towards the definition of H-treewidth (see also Typically, we will want to consider a graph class H for which certain problems are polynomial-time tractable. Hence, we will assume w.l.o.g. that (∅, ∅) ∈ H. From the definition it is obvious that then: Observation 7. For any graph G, tw H (G) ≤ tw(G).

Nice H-tree decompositions
Just like for tree decompositions, we can also define a canonical form of decompositions which has properties that are convenient when formulating dynamic programs using H-treewidth. Intuitively, a nice H-tree decomposition behaves like a nice tree decomposition on the torso graph (see points 1-3), with the exception that the neighborhoods of the collapsed parts must occur as special boundary leaves (see points [4][5].
is a rooted tree decomposition of G • X , and: 1. Every node in T has at most two children.
2. If a node t of T has two children t 1 and t 2 , then B t = B t 1 = B t 2 ; in this case we call t a join node.
3. If a node t of T has exactly one child t , then either of the following holds: (a) |B t | = |B t | + 1, in which case we call t an introduce node, or  In line with standard terminology for treewidth, we call the sets B t bags. The width of a nice H-tree decomposition is simply the width of (T , {B t | t ∈ V (T )}). Below we show that computing a nice H-tree decomposition of bounded width can be reduced to finding an appropriate H-torso. Lemma 9. Given an n-vertex graph G and an H-torso U of G with tw(U ) ≤ k, we can find a nice H-tree decomposition of G with width at most k in time k O(k 3 ) · n.
Proof. The following construction is illustrated in Fig. 3.
Obtain T from T by successively performing the following, for each connected component C of G[ X]: Replace t C by a new node t with two children t 1 and t 2 , and set B t = B t 1 = B t 2 = B t C . Below t 1 , attach the descendants of t C (i.e., a copy of the subtree rooted at t C taken from the tree that was obtained after the adaptations for the previously considered connected components of G[ X]), and below t 2 attach a path s 1 , . . . , It is easy to see that these manipulations result in a nice H-tree decomposition without introducing bags larger than the ones already occurring in (T , {B t | t ∈ V (T )}).
Hence, we can state the problem of computing a decomposition as follows:

H-Treewidth
Parameter: k Instance: A graph G and an integer k. Task: Find an H-torso U of G such that tw(U ) ≤ k, or correctly determine that no such H-torso exists.

An algorithmic meta-theorem
Before proceeding to the flagship application of H-treewidth where we chose H to be the class of graphs of bounded rank-width, here we give a generic set of conditions that allow fixed-parameter algorithms for problems parameterized by H-treewidth. Specifically, we consider graph problems that are finite-state [13] or have finite integer index [5,8,33]. Informally speaking, such problems only transfer a limited amount of information across a small separator in the input graph and hence can be solved "independently" on both sides of such a separator. Since these notions are only used in this section, we provide concise definitions below.
First of all, we will need the notion of boundaried graphs and gluing. A graph Ḡ is called t-boundaried if it contains t The gluing operation ⊕ takes two t-boundaried graphs Ḡ and H , creates their disjoint union, and then alters this disjoint union by identifying the boundaries of the two graphs (i.e. by setting b G . Consider a decision problem P whose input is a graph. We say that two t-boundaried graphs C and D are equivalent with respect to P, denoted by C ∼ P,tD , if for each t-boundaried graph H it holds that C ⊕H ∈ P if and only ifD ⊕H ∈ P. We say that P is finite-state (or FS, in brief) if, for each t ∈ N, ∼ P,t has a finite number of equivalence classes.
Next, consider a decision problem Q whose input is a graph and an integer. In this case we say that two t-boundaried graphs C and D are equivalent with respect to Q (denoted by C ∼ Q,tD ) if there exists an offset δ(C, D ) ∈ Z such that for each t-boundaried graph H and each q ∈ Z: We say that Q has finite integer index (or is FII, in brief) if, for each t ∈ N, ∼ Q,t has a finite number of equivalence classes.
We note that a great number of natural graph problems are known to be FS or FII. For instance, all problems definable in Monadic Second Order logic are FS [5,Lemma 3.2], while examples of FII problems include Vertex Cover, Independent Set, Feedback Vertex Set, Dominating Set, Connected Dominating Set, and Edge Dominating Set [33].
We say that a FS problem P is efficiently extendable on a graph class H if there is a fixed-parameter algorithm (parameterized by t) that takes as input two t-boundaried graphs Ḡ and H such that their boundaries are modulators to H and decides whether Ḡ ∼ P,tH . Similarly we say that a or FII problem P is efficiently extendable on a graph class H if there is a fixed-parameter algorithm (parameterized by t) that takes as input two t-boundaried graphs Ḡ and H such that their boundaries are modulators to H and decides whether Ḡ ∼ P,tH as well as computing a corresponding offset δ(Ḡ, H ).
For our meta-theorem, we will make use of the fact that every FII and FS problem is known to be FPT when parameterized by treewidth. This can be seen in, e.g., the work of Bodlaender and de Fluiter [8], but we also provide a short direct proof that uses the protrusion replacement technique introduced by Bodlaender et al. [5].

Fact 10. Every FS and every FII graph problem is FPT when parameterized by the treewidth of the input graph.
Proof. Let G be the input graph of an FS or FII problem P. We begin by computing a width-optimal nice tree-decomposition Let c be the maximum size of a representative of an equivalence class of ∼ P,t [5,Lemma 5.18], and observe that c only depends on P and the treewidth of G. If G contains at most c-many vertices, we can solve the problem by brute force. Otherwise, there must exist a node t ∈ V (T ) such that c < |Y t | ≤ 2c. We now apply the protrusion replacement technique from the proof of Lemma 5.18 in Bodlaender et al. [5] to obtain an equivalent instance of P where Y t has been replaced by a new subgraph of order at most c; we remark that while the lemma is only stated for FII, the proof is oblivious to whether the problem is FII or FS. We then proceed along the nodes of the original tree-decomposition tree T until we obtain an equivalent instance whose size is bounded by c, at which point we can invoke the first case in the proof.
]. Since C ∈ H, and tw(G • X) ≤ k and the fact that N(C ) forms a clique in G • X imply |N(C)| ≤ k, Point 1. can be used to compare other at most k-boundaried graphs to H with respect to ∼ P,k in fixed parameter time. We use this to compute a minimum-size representative of the equivalence class of H with respect to ∼ P,k ; note that the procedure used to do so in the general setting of this meta-theorem does not allow us to give any explicit upper bound on the parameter dependency. To this end we use a brute-force enumeration argument that has previously been applied in the kernelization setting [40]: we enumerate all boundaried graphs (in any order with a non-decreasing number of vertices), and for each graph we check whether it is equivalent to H with respect to ∼ P,k . Observe that since the size of a minimum-cardinality representative of any equivalence class of ∼ P,k depends only on P and k, the number of graphs that need to be checked in this way as well as the size of each such graph depends only on P and k, and hence there exists some function of P and k which upper-bounds the running time of this brute-force procedure. Let Ḡ α be the computed minimum-cardinality representative of the equivalence class of H . In case P is FII, Point 1. also allows us to additionally determine the offset δ(H , Ḡ α ).
In the final step, for each C the algorithm glues G • X (with boundary N(C )) with the computed representative Ḡ α . Let G be the graph obtained after processing each connected component C in the above manner. Note that since tw(G • X) ≤ k and each Ḡ α has size bounded by a function of k, the graph G has treewidth bounded by a function of k. Indeed, one can extend a tree decomposition of G • X by adding each Ḡ α into a new bag (a leaf in the decomposition) adjacent to the leaf of the nice H-tree decomposition we obtain containing N(C ). At this stage, the algorithm invokes Fact 10 and outputs Yes iff G ∈ P. In the case of FII problems where the input was (G, ), the algorithm instead outputs Yes iff (G , ) ∈ P, where is obtained from by subtracting all the individual offsets δ(

R c -Treewidth
This section focuses on the properties of R c -treewidth, a hierarchy of graph parameters that represent our flagship application of the generic notion of H-treewidth.

Comparison to known parameters
It follows from Observation 7 that R c -treewidth dominates treewidth (for every c ∈ N). Similarly, it is obvious that R c -treewidth dominates the size of a modulator to R c (also for every c ∈ N). The following lemma shows that, for every fixed c, R c -treewidth is dominated by rank-width.
We can obtain a rank-decomposition (T , μ) of G from (X, T , {B t | t ∈ V (T ))} as follows: Turn t into a join node by introducing t 1 , t 2 with B t 1 = B t 2 = B t as children of t , attaching the former child of t to t 1 and a new leaf node t v with B t v = {v} below t 2 . Note that this preserves the fact that for any This defines an injection from V (G • X) to the leaves of T . However, not every leaf of T is mapped to by μ. On one hand there are the boundary leaf nodes, below which we will attach subtrees to obtain a rank-decomposition of G. On the other hand there may be For all such v and t we delete all nodes on the root-t-path in T that do not lie on a path from the root to a vertex in This turns μ into an injection from V (G • X) to the leaves of T , that is surjective on the non-boundary leaf nodes.
Next, we extend (T , μ) to a rank-decomposition of G by proceeding in the following way for each connected component Let T be the tree obtained by performing these modifications for all connected components C . Consider the rankdecomposition of G given by We show that its width is at most c + k + 1. Any edge e of T is of one of the following types: • e corresponds to an edge already contained in T : Then e induces a bipartition ( Let x ∈ X G and y ∈ Y G be such that xy ∈ E(G). Obviously neighbors in X lie within the same connected component of By construction a rank-decomposition of any such connected component of G[ X] is attached completely within one of the two subtrees of T separated by e. Thus e does not separate neighbors in X . So, we consider x ∈ V (G • X). If y ∈ V (G • X) then x and y occur together in some bag of the original tree of the tree decomposition, and as remarked earlier this is still the case modified tree. This implies that at least one of {x, y} must be present in B t . If y / ∈ V (G • X), by the construction of T , y corresponds to a leaf t y ∈ V (T ) in a subtree attached to T rooted at t C ∈ V (T ) with B t C = N(C ) x and t C and t y are not separated by the removal of e. Also, x corresponds to a leaf t x ∈ V (T ) which is in the subtree of T − e not containing t y , i.e. the subtree not containing t C . This means any subtree containing t C and t x also contains t, and since (T , In both cases at least one of {x, y} is in B t . Since this argument applies for every edge crossing the bipartition (X G , Y G ), it follows that A G [X G , Y G ] may only contain "1" entries in rows and columns that correspond to the vertices in B t .
can be converted into a zero matrix by deleting at most k + 1 rows plus columns, which is a sufficient condition for A G [X G , Y G ] having rank at most k + 1.
• e corresponds to an edge in a rank-decomposition of some connected component C of G [ X]: Then e induces a bipar- Next, we compare R c -treewidth to Telle and Saether's notion of sm-width [63], which is another parameter that lies between treewidth and rank-width. The rough idea behind the definition of this parameter is to generalize treewidth towards denser graph classes by allowing the use of graph splits in an explicit way without increasing the parameter value. For completeness, we provide a formal definition for sm-width below using the general notions of branch-width and graph splits.
Definition 13 (Branch-width [62]). A branch decomposition of the vertex set of a graph G is a binary tree T with V (G) as leaf set. Each edge e in T partitions the vertices of V (G) into two sets (say X e and V (G) \ X e ), corresponding to the leaves present in the two connected components of T − e.
A cut function is a function c : The width of a branch decomposition with respect to the cut function c is given by max e∈E(T ) c( X e ). The branch width of a graph with respect to a cut function is the minimum of the branch width with respect to the cut function over all branch decompositions of the vertex set of this graph.
Definition 15 (Split-matching-width [63]). The split-matching-width (or sm-width) of a graph G, denoted by smw(G), is the branch width of G with respect to the cut function given by For clarity, we remark that omitting the first case for c( A) in the definition of sm-width results in a parameter called maximum-matching width, or mm-width for short, which is asymptomatically equivalent to treewidth [49].
Lemma 16. R c -treewidth and smw are incomparable. More formally, the following hold: Proof. For 1. consider the following construction: For arbitrary c there is a graph H c such that tw(H c ) = c + 2 and rw(H c ) = c + 1; notably, this can be achieved by setting H c to be the (c + 2) × (c + 2) square grid [48]. Now let G i be given by taking 2 · (i + 1) copies, H The split-matching-width of G i is at most c + 3 since each copy of H c iteratively defines a split and thus can be treated independently and it is known that the maximum matching width of a graph is at most its treewidth +1 [64]. On the other hand, we claim that tw R c (G i ) ≥ i: • If G i has no non-trivial R c -torso, then since G i is at least ((i + 1) · |V (H c )|)-degenerate because of the complete connections between odd and even copies of H c , we know that • If the R c -treewidth of G i is given by tw(G i • X) and it holds that X only intersects odd (symmetrically only even) copies of H c then, by definition of G i • X , the even (respectively odd) copies of H c form a clique in G i • X and thus • If the R c -treewidth of G i is given by tw(G i • X) and it holds that X intersects even and odd copies of H c and |G − X| ≥ i + 1, then G i • X is a clique of size at least i + 1 and thus • Otherwise the R c -treewidth of G i is given by tw(G i • X) and it holds that |G − X| ≤ i. Then by the pigeon hole principle we find a 1 ≤ j ≤ i such that For 2. let c ≥ 3 and consider the following construction: Fix a cycle C i on 3 · i + 5 vertices. Now let G i to be the complement graph of C i . Since C i has rank-width 2 and the complement graph's rank-width is at most one larger [41], we know rw(G i ) ≤ 3 and we can use V (G i ) to build an R c -torso of treewidth 0. On the other hand, there is no split of G i and the maximum matching width of a graph G is known to be at least 1 3 ·(tw(G) +1) [64]. So smw(

Computing R c -treewidth
Our aim here is to determine the complexity of computing our parameters, i.e., finding a torso of small treewidth. Obtaining such a torso is a base prerequisite for our algorithms. We formalize the problem below.

R c -Treewidth
Parameter: k Instance: A graph G and an integer k. Task: Find a R c -torso U of G such that tw(U ) ≤ k, or correctly determine that no such R c -torso exists.
We show that, for every c, R c -Treewidth is FPT. The main tool we use to this end is Courcelle's Theorem (Fact 3).

Lemma 17. R c -Treewidth is FPT.
Proof. We begin by noting that there exists an CMSO 1 formula φ c (G) that is true iff a graph G has rank-width at most c (and, equivalently, if each connected component of G has rank-width at most c). This was observed already by Kanté, Kim, Kwon and Paul [50] and follows from the fact that the property of having rank-width at most c can be characterized by a finite set of vertex minors [59], a property which can be expressed in CMSO 1 [17]. For clarity, we explicitly remark that |φ c (G)| depends only on c.
Next, we also note that there exists an CMSO 1 formula ψ k (of size depending only on k) that is true iff a graph G has treewidth at most k [54]. Consider now the formula ψ k (Z ) for some fixed Z ⊆ V (G) which operates precisely like ψ k , but only on the graph G • Z . In particular, ψ k (Z ) can be obtained from ψ k by: To conclude the proof, note that Fact 3 alongside Lemma 12 provide an FPT algorithm (with parameter k) to find an interpretation of Z satisfying φ c,k (Z ), or correctly identify that no such interpretation exists.

Algorithms exploiting modulators to R c
For a problem P to be FPT parameterized by R c -treewidth, P must necessarily be FPT parameterized by treewidth and also FPT parameterized by the size of a modulator to R c . However, it is important to note that neither condition is not sufficient; indeed, one can easily construct artificial problems that are defined in a way which make them trivial in both of the cases outlined above, but become intractable (or even undecidable) once parameterized by R c -treewidth. A very simple example for this is achieved by setting P(c, k) to be YES whenever the treewidth or the size of a modulator to R c is at most k, and otherwise ask to solve some undecidable problem. That is, after all, why we need the notion of efficient extendability in Theorem 11.
Hence, in order to develop fixed-parameter algorithms for Chromatic Number, Hamiltonian Cycle and Max-Cut parameterized by R c -treewidth, we first need to show that they are not only FPT parameterized by the size of a modulator to R c , but they are also efficiently extendable. Such a result would be sufficient to employ Theorem 11 together with Lemma 17 in order to establish the desired fixed-parameter tractability results. That is also our general aim in this section, with one caveat: in order to give explicit and tight upper bounds on the parameter dependency of our algorithms, we provide algorithms that solve generalizations of Chromatic Number, Hamiltonian Cycle and Max-Cut parameterized by the size of a modulator to R c . It will become apparent in the next section that these generalizations precisely correspond to the records required by the treewidth-based dynamic program that will be used in the torso. In other words, the efficient extendability of our problems on R c is not proved directly but rather follows as an immediate consequence of our proofs in this section and the correctness of known treewidth-based algorithms.
Notation. Before we proceed to the three algorithms, we introduce some common notation that will be useful to describe the general approach of dynamic programming algorithms using rank-width. For a node t of a rooted rank decomposition (T , μ) of a graph G, let S t ⊆ V (G) be the set of vertices mapped by μ to leaves that t separates from the root (i.e., S t contains the "vertices below t"). For disjoint vertex sets S and Q of G, two vertices v and w in S are twins with respect to Q if A twin class of S with respect to Q is a maximal subset of S that consists of pairwise twins w.r.t. Q .
Twin classes are a useful concept for designing dynamic programming algorithms that run on rank-decompositions, since there are at most 2 rw(G) twin classes of the set S t of vertices assigned in a subtree rooted at an arbitrary node t ∈ V (T ) with respect to the remaining vertices in the graph. For each node t of T we enumerate these twin classes as R t where z = 2 rw(G) is a bound on the number of twin classes of S t w.r.t. V (G) \ (X ∪ S t ); in the case where there are only i < z twin classes, we let R t j = ∅ for all i < j ≤ z.
For two children t 1 and t 2 of some node t, we define L t 1 ,t 2 as a matrix whose rows are indexed by the indices of twin classes of S t 1 and columns are indexed by the indices of twin classes of S t 2 such that for L t 1 ,t 2 [ j 1 , , and L t 1 ,t 2 [ j 1 , j 2 ] = 0 otherwise. For a child t of a node t, we define a function U t ,t from the indices of twin classes of S t to the indices of twin classes of S t such that for U t ,t ( . This function is welldefined because every twin class at S t is fully contained in one of the twin classes at S t . Informally, for two children t 1 and t 2 of a node t, L t 1 ,t 2 specifies which edges are created between twin classes at t, while U t 1 ,t and U t 2 ,t specify how twin-classes are "reshuffled" at t; note that all of these matrices can be pre-computed in polynomial time.

Chromatic number
In Chromatic Number, we are given a graph G and asked for the smallest number χ (G) such that the vertex set of G can be properly colored using χ (G) colors, i.e., the smallest number χ (G) such that V (G) can be partitioned into χ (G) independent sets. Our aim in this section is to solve a variant of Chromatic Number on graphs with a k-vertex modulator X to R c where X is precolored:

R c -Precoloring Extension
Parameter: k Instance: A graph G, a k-vertex modulator X ⊆ V (G) to R c and a proper coloring of X.

Task:
Compute the smallest number of colors required to extend the coloring of X to a proper coloring of G.

Theorem 18. R c -Precoloring Extension can be solved in time 2 O(k) n O(1) .
Proof. Let G be a graph together with a k-vertex modulator X to R c and a proper coloring of X . Let col X be the set of colors assigned to at least one vertex in X ; without loss of generality col X ⊆ [k]. Our starting point is a rooted rankdecomposition (T , μ) of G − X of width at most c, which may be computed in time O(n 3 ), using Fact 2. On a high level, our algorithm will proceed by dynamic programming along (T , μ) and group colors together based on which twin classes they occur in (analogously as in the XP algorithm for Chromatic Number parameterized by clique-width, due to Kobler and Rotics [53]), but it keeps different (more detailed) records about the at most k colors used in X . The Observe that by the interpretation of d, for distinct subsets Z 1 , Z 2 of [z], d(Z 1 ) and d(Z 2 ) count disjoint sets of colors. This provides an easy way to count the total number of colors used. Since all vertices in G − X appear below the root node ro, the minimum number of colors required for a proper coloring of G, given a fixed proper coloring on X will be the minimum value of col over all tuples (b 1 , b 2 , . . . , b k , d) whose M ro value is 1. The tables M t will be filled in a leaves-to-root fashion. Thus, in order to complete the proof, it suffices to show how to fill in the table M t for each node t ∈ V (T ) based on the entries for t's children. Internal nodes. Let us now consider an internal node t with children t 1 , t 2 . To correctly decide whether to set at t, we proceed as described below, for all pairs of tu- First, for the colors in [k], we have to check whether they are used in the twin classes in R t 1 j 1 and R t 2 j 2 that are complete to each other (meaning that an edge will be created connecting vertices of the same color), and if yes then we discard this tuple and proceed to the next. More precisely, we set if the following does not hold: Second, we need to deal colors in {k + 1, . . . , n}. Here, we branch on ("guess") how many colors appear in twin classes with indices in d t 1 (Z 1 ) are the same as the colors that appear in twin classes with indices in d t 2 (Z 2 ) for all pairs Z 1 , Specifically, for all Z 1 , Z 2 ⊆ [z], let τ (Z 1 , Z 2 ) be a non-negative integer; this will correspond to the number of common colors in d t 1 Observe that if Compatibility 2 would be violated, then R t 1 j 1 and R t 2 j 2 contain the same color while being complete to each other, meaning that the result would not be a proper coloring. Hence if Compatibility 2 is violated, we discard and proceed to the next available branch (i.e., choice of τ ).
Third, we check whether T 1 and T 2 will be combined into T with the function τ . Recall that the function U t i ,t provides us with information about which set R t j will contain R t i j . We will use this function to rename our twin classes accordingly.
When we perform this renaming, we also update τ , d t 1 (Z ), d t 2 (Z ) and obtain new functions τ , dm t 1 (Z ), dm t 2 (Z ), respectively. For example, if index 2 were to be renamed to index 1 at node t 1 Finally, for each Z ⊆ [z] we check whether the number of colors in dm t 1 (Z ) and dm t 2 (Z ) correctly add up to d t (Z ) when taking τ into account. This is carried out by checking that the following equality holds.
τ (Z , Z ) Informally, the first row counts the number of colors that are unique to dm t 1 Z , i.e., do not appear on any twin classes in t 2 . The second row then does the same for dm t 2 Z . To correctly determine the actual number of colors in d t Z that we obtain by following τ , we now need to add colors which occur in both t 1 and t 2 and which end up precisely in Zthat is what the third row counts. Summarizing, we assign

Hamiltonian Cycle
In Hamiltonian Cycle, we are given an n-vertex graph G and asked whether G contains a cycle of length n as a subgraph.
Note that if we restrict G to some proper subset of vertices Y ⊆ V (G), then what remains from a Hamiltonian Cycle in G is a set of paths that start and end in the neighborhood of V (G) \ Y . Hence, the aim of this section is to solve the following generalization of Hamiltonian Cycle:

R c -Disjoint Paths Cover
Parameter: k Instance:

Task:
Decide whether there are internally vertex-disjoint paths P 1 , P 2 , . . . , P m in G such that P i is a path from s i to t i and every vertex in G − X belongs to precisely one path in P 1 , P 2 , . . . , P m .

Theorem 19. R c -Disjoint Paths Cover can be solved in time 2 O(k) n O(1) .
Proof. Let G be a graph together with a k-vertex modulator X to R c and m pairs (s 1 , t 1 ), . . . , (s m , t m ) of vertices from X .
Our starting point is once again a rooted rank-decomposition (T , μ) of G − X of width at most c, which may be computed in time O(n 3 ), using Fact 2. We will obtain a fixed-parameter algorithm for checking the existence of such paths P 1 , . . . , P m in G by expanding the records used in Espelage, Gurski and Wanke's algorithm [27] for computing Hamiltonian Cycle parameterized by clique-width.
To follow partial solutions on each subgraph G t , we consider certain generalizations of path-partitions of subgraphs of G. For a subgraph H of G, an X-lenient path-partition P of H is a collection of paths in H that are internally vertex-disjoint and share only endpoints in X such that P ∈P V (P ) = V (H). For convenience, we consider a path as an ordered sequence of vertices, and for a path P = v 1 v 2 · · · v x , we define (P ) = v 1 and r(P ) = v x .
The table. The entries in the table for each node will be associated to tuples of D and SP, and contain either 0 or 1; here 1 ,b 2 will represent the number of paths in an X -lenient pathpartition of G t that are fully contained in G t − X and whose endpoints are contained in R t b 1 . Let SP be a set such that are the only possible tuples in SP, • each integer in {1, . . . , m} appears at most once as an among all tuples ( , 0, p) or ( , ) in SP, and similarly, each integer in {1, . . . , m} appears at most once as an r among all tuples (0, r, p) or (r, r) in SP.
In short, the tuple (i, 0, t) will indicate the existence of a path starting in s i and ending in a vertex in R t x . Similarly, (0, i, t) indicates the existence of a path starting in t i and ending in R t x . The tuple (i, i) will indicate the existence of a path starting in s i and ending in t i . Note that there are at most (n + 1) z 2 possibilities for D. For an element of SP, there are 2mz + 1 possible elements in SP, and thus there are at most 2 2kz+1 possibilities for SP. It implies that the number of possible tuples (D, SP) is bounded by (n + 1) z 2 2 2kz+1 .
We define a dynamic programming table M t such that M t (D, SP) = 1 if there is an X -lenient path-partition P = P 1 P 2 of G t such that • P 1 is the subset of P that consists of all paths fully contained in G t − X , • for every ( , r, p) or ( , r) ∈ SP, there is a unique path P ∈ P 2 such that -if = i > 0, then (P ) = s i , and if r = i > 0, then r(P ) = t i , -if = 0, then (P ) ∈ R t p , and if r = 0, then r(P ) ∈ R t p .
In this case, we say that the X -lenient path-partition P is a partial solution with respect to (D, SP), and also (D, SP) is a characteristic of P. We say that paths in P 1 are normal paths, and paths in P 2 are special paths. The value M t (D, SP) is 0 if there is no such X -lenient path-partition of G t . We define Q t as the set of all tuples (D, SP) where M t (D, SP) = 1. Since all vertices in G − X appear below the root node ro, to decide whether there is a desired X -lenient path-partition, it suffices to confirm that there are D and SP such that The tables M t will be filled in a leaves-to-root fashion. Thus, in order to complete the proof, it suffices to show how to fill in the table M t for each node t ∈ V (T ) based on the entries for t's children.
Leaf nodes. First consider a leaf node t.
For every pair i ∈ J , we can branch on whether a s i -t i path will be only the edge {s i , t i }, or it will contain also some vertices from G − X . For I ⊆ J , let us denote by SP I the set { (i, i) | i ∈ I }. Moreover, let a vertex v be assigned to t, and x be the index of the twin class {v}. If it is adjacent to s i or t i for some i, then we may select it as a starting point or an ending point of a desired path or both. So, for every tuple Internal nodes. Let t be an internal node, and let t 1 , t 2 be the children of t. We assume that Q t 1 and Q t 2 were already computed, and we want to generate Q t from these sets.
For all pairs of tuples (D 1 , SP 1 ) ∈ Q t 1 and (D 2 , SP 2 ) ∈ Q t 2 , we will generate all possible tuples (D, SP) such that for an X -lenient path-partition P with respect to (D, S), its restriction to G t i has (D i , SP i ) as a characteristic.
We first test basic conditions that the two partial solutions can be a partial solution in G t . The starting point or an endpoint of a special path in the final solution should start with one vertex in G − X . So, the following condition has to be satisfied.
If (Special terminal) condition is not satisfied, then we skip this pair of tuples. In the rest, we assume that (Special terminal) condition is satisfied. Secondly, we rename twin classes to consider both partial solutions together. For example, if index 2 were to be renamed to index 1 at node t 1 and d 1 2,3 = 3, then dm 1 2,3 in Dm 1 becomes 0 and apply dm 1 1,3 in Dm 1 to d 1 1,3 + d 1 2,3 . Similarly, if there was a tuple (i, 0, 2) in SP 1 , then we add a tuple (i, 0, 1) to SPm 1 . Because this simply change the indices of twin classes, (Special terminal) condition is still valid. Afterwards we take the sum of (Dm 1 , SPm 1 ) and (Dm 2 , SPm 2 ) which correspond to the disjoint union of partial solutions with respect to those tuples. More precisely, we take that x, y for all x, y ∈ [z] and dm 1 x, y ∈ Dm 1 and dm 2 x, y ∈ Dm 2 , and • SP begin = SPm 1 ∪ SPm 2 .
Because of the condition (Special terminal), no integer in {1, . . . , m} appears twice in SP begin . Therefore, (D begin , SP begin ) is a possible tuple for G t , which corresponds to exactly the disjoint union of partial solutions with respect to (D 1 , SP 1 ) and (D 2 , SP 2 ). We put it into Q t .
Next, we consider to merge two paths in an X -lenient path-partition, using edges between V (G t 1 ) \ X and V (G t 2 ) \ X .
There are three types of merging operations: merging two normal paths, merging a normal path and a special path, and merging two special paths.
• (Merging two normal paths) Suppose there are x 2 and d 1 • (Merging a normal path and a special path) Suppose there are x, The symmetric operation is also applied.
x is complete to R t 2 y and (i, 0, x) ∈ SP 1 and (0, i, y) ∈ SP 2 . Then we remove (i, 0, x ) and (0, i, y ) from SP begin and add (i, i) to SP begin .
To keep track of the information on how many edges are used, we also have to change the information from (D 1 , SP 1 ) and (D 2 , SP 2 ). We recursively apply this process of merging two paths until we can no longer get a tuple (D , SP ) that is not yet in Q t . Because the number of possible tuples (D, SP) is bounded by (n + 1) z 2 2 2kz+1 , this process can be done in time O((n + 1) z 2 2 2kz+1 ) for a fixed pair of tuples (D 1 , SP 1 ) and (D 2 , SP 2 ). Considering all pairs of tuples in Q t 1 and Q t 2 , we can update Q t in time O((n + 1) 3z 2 2 6kz+3 ). Over all, we can update Q t for all t in time O((n + 1) 3z 2 +1 2 6kz+3 ). As z is constant, this problem can be solved in time 2 O(k) n O(1) .

Max-Cut
The third problem we consider is Max-Cut, where we are given an integer together with an n-vertex graph G and asked whether V (G) can be partitioned into sets V 1 and V 2 such that the number of edges with precisely one endpoint in V 1 (called the cut size) is at least .

R c -Max-Cut Extension
Parameter: k Instance: A graph G, a k-vertex modulator X ⊆ V (G) to R c , s ⊆ X, and ∈ N.

Task:
Is there a partition of V (G) into sets V 1 and V 2 such that X ∩ V 1 = s and the number of edges between V 1 and V 2 is at least . Theorem 20. R c -Max-Cut Extension can be solved in polynomial time.
Proof. Let G be a graph together with a k-vertex modulator X to R c and a set s ⊆ X . Since, we fix the partition of X beforehand, we can assume that X is an independent set and only add the number of edges between s and X \ s at the end. We can use Fact 2 to obtain a rank-decomposition (T , μ) of G − X of width at most c in time in O(n 3 ).
The general idea is similar to the one for the XP algorithm for Max-Cut [36]: We determine, via a dynamic programming table, how large the largest cut in G t can be if we assume a certain number of vertices of each twin class to be in the same side of the cut as s. The Leaf nodes. Actually, the only adaptation that has to be made for the consideration of s ⊆ X concerns the leaf nodes. Consider a leaf node t and let v = μ −1 (t). There are two possibilities for a cut C ⊇ s of G t : Either we include v into the side of the cut containing s, this corresponds to defining M t (1) = |N G (v) ∩ (X \ s)|, or we include v into the side of the cut not containing s, this corresponds to defining Internal nodes. Let us now consider an internal node t with children t 1 and t 2 . A cut of G t then always is the union of a cut in G t 1 and a cut in G t 2 . The edges that contribute to the value of these cuts within G t 1 and G t 2 respectively still contribute to the value in G t . However, edges with an endpoint in V (G t 1 ) and an endpoint in V (G t 2 ) are not taken into account in G t 1 and G t 2 . The number of these edges are not dependent on the specific cutsets within G t 1 and G t 2 , but the size of their intersection with each of the twin classes. Thus, each entry of the dynamic programming table at t is given rise to by a pair of two entries M t 1 (c 1 , . . . , c z t 1 ) and M t 2 (d 1 , . . . , d z t 2 ) of the dynamic programming table at t 1 and t 2 , in the following way: To determine the correct c 1 , . . . , c z t 1 , d 1 , . . . , d z t 2 we can take the maximum over all possible choices. We conclude the proof by analyzing the running time of the described algorithm. For a leaf node t, we can fill the  (c 1 , . . . , c z ) and at most n z ≤ n 2 c possibilities to write each of the c i as a 2-sum.

Algorithmic applications of R c -treewidth
In this section, we show that Chromatic Number, Hamiltonian Cycle and Max-Cut are FPT parameterized by R ctreewidth. As our starting point, recall that each of these problems admits a fixed-parameter algorithm when parameterized by treewidth which is based on leaves-to-root dynamic programming along the nodes of a nice tree decomposition. Notably, the algorithms are based on defining a certain record δ(P , Q ) (for vertex sets P , Q ) such that δ(B t , Y t ) captures all the relevant information required to solve the problem on G[Y t ] and to propagate this information from a node t to its parent.
The algorithms compute these records on the leaves of the tree decomposition by brute force, and then dynamically update these records while traversing a nice tree decomposition towards the root; once the record δ(B r , Y r ) is computed for the root r of the decomposition, the algorithm outputs the correct answer. We refer to the standard textbooks for a detailed description of dynamic programming along nice tree decompositions [18,22] and to Subsections 6.1 -6.3 for an overview of the definition of the records used for the target problems. Our general strategy for solving these problems will be to replicate the records employed by the respective dynamic programming algorithm A used for treewidth, but only for the tree of the nice R c -tree decomposition of the input graph G. Recall that aside from the "standard" simple leaf nodes, trees of nice R c -tree decompositions also contain boundary leaf nodes, which serve as separators between the torso and a connected component C with rank-width at most c. For A to work correctly with the desired running time, we need to compute the record for each boundary leaf node using a subprocedure that exploits the bounded rank-width of C ; in particular, we will see that this amounts to solving the problems defined in Section 5. Before proceeding to the individual problems, we provide a formalization and proof for the general ideas outlined above.
Lemma 21. Let P be a graph problem which can be solved via a fixed-parameter algorithm A parameterized by treewidth, where A runs in time f (k ) · n a and operates by computing a certain record δ in a leaves-to-root fashion along a provided nice width-k tree decomposition of the n -vertex input graph.
Let Q be obtained from P by receiving the following additional information in the input: Proof. Consider the algorithm B which computes all the records δ for simple leaf nodes by calling the respective subroutine used in A, uses the records δ(B t , B t ∪ C ) for the boundary leaf nodes, and then proceeds to compute the records in a dynamic leaves-to-root fashion in exactly the same way as A. It is clear that B terminates in the claimed runtime.
To argue correctness, assume for a contradiction that B outputs incorrectly. Now consider the tree decomposition (T , {B t | t ∈ V (T )})) of G obtained by attaching, to each boundary leaf t C in T (where B t C = N(C ) for some connected component C in G[ X]), a new leaf whose bag contains N(C ) ∪ C . While the width of such a decomposition may be linear in the number of vertices, A must still output the correct solution, and observe that the records computed by A on (T , {B t | t ∈ V (T )})) must precisely match those computed by B on (X, T , {B t | t ∈ V (T )}). Hence, we would in this case conclude that A also outputs incorrectly, a contradiction.

Chromatic number
Chromatic Number is W[1]-hard parameterized by rank-width [30] but can be solved in time 2 O(tw(G)·log tw(G)) · n on n-vertex graphs when a minimum-width tree decomposition is provided with the input [47]; moreover, it is known that this runtime is essentially tight, since under ETH the problem cannot be solved in time 2 o(tw(G)·log tw(G)) · n O(1) [56].
It is well known that the chromatic number is at most tw(G) + 1 (this can be observed, e.g., by greedily coloring a vertex when it is introduced in the nice tree decomposition). One possible way of defining records in order to achieve a runtime of 2 O(tw(G)·log tw(G)) · n is to track, for each proper coloring of vertices in a bag B t , the minimum number of colors required to extend such a coloring to Y t [47]. Formally, let S t be the set of all colorings of B t with colors [tw(G) + 1], and let α(B t , Y t ) : S t → Z be defined as follows:

Hamiltonian Cycle
Hamiltonian Cycle is W[1]-hard parameterized by rank-width [30] but can be solved in time 2 O(tw(G)·log tw(G)) · n on n-vertex graphs when a minimum-width tree decomposition is provided with the input via standard dynamic programming (see, e.g., an introduction to advances made for the problem by Ziobro and Pilipczuk [65]). This algorithm can be improved to run in time 2 O(tw(G)) · n by applying the advanced rank-based approach of Cygan, Kratsch and Nederlof [19] to prune the number of records. To simplify our exposition, here we focus on extending the standard dynamic programming algorithm which yields a slightly super-exponential runtime. One possibility for defining the records for Hamiltonian Cycle is to track all possible ways one can cover Y t by paths that start and end in B t (intuitively, this corresponds to what remains of a hypothetical solution if we "cut off" everything above Y t ) [22]. Formally, let B t be defined as follows: • if |B t | > 2, then B t is the set of graphs with at most |B t | edges and degree at most 2 over vertex set B t ; • if |B t | = 2, then B t contains three (multi)graphs over vertex set B t : the edgeless graph, the graph with one edge, and the multigraph with two edges and no loops; • if |B t | = 1, then B t contains an edgeless graph and a graph with a single loop, both over the single vertex in B t ; • if |B t | = 0, then B t = {YES, NO}.
We let β(B t , Y t ) : B t → {0, 1}, where for Q ∈ B t we set β(B t , Y t )(Q ) = 1 if and only if there exists a set P of paths in G[Y t ] and a bijection that maps each (v 1 , . . . , v ) ∈ P to an edge (v 1 , v ) ∈ E(Q ) such that each vertex v ∈ G[Y t \ B t ] is contained in precisely one path in P . In the special case where B t = ∅, our records explicitly state whether G[Y t ] contains a Hamiltonian cycle or not.
As before, we can now shift our attention to the problem of computing our records in boundary leaf nodes. If |B t | ≤ 1, then, because B t is a separator in G, either Y t = B t , in which case β(B t , Y t ) is trivial to compute, or β(B t , Y t ) can be filled by simply solving Hamiltonian cycle on G[Y t ] in polynomial time using known algorithms [36]. In all other cases, we loop over all of the at most k 2k -many graphs Q ∈ B t and for each such Q we need to check whether G[Y t ] − B t can be covered by internally vertex-disjoint paths connecting the pairs of vertices in B t that form the endpoints of the edges in Q . Moreover, note that in this case Q does not contains any loops. Hence, this is precisely the R c -Disjoint Paths Cover problem defined in Subsection 5.2 and combining Theorem 19 and Lemma 21, we obtain: Theorem 23. Hamiltonian Cycle can be solved in time 2 O(k log(k)) · n O(1) if a nice R c -tree decomposition of width k is provided as input.

Max-Cut
Max-Cut is another problem that is W[1]-hard parameterized by rank-width [31] but admits a simple fixed-parameter algorithm parameterized by treewidth -notably, it can be solved in time 2 O(tw(G)) · n on n-vertex graphs when a minimumwidth tree decomposition is provided with the input via standard dynamic programming [18,22].
The simplest way of defining the records for Max-Cut is to keep track of all possible ways the bag B t can be partitioned into V 1 and V 2 , and for each entry in our table we keep track of the maximum number of crossing edges in Y t compatible with that entry. Formally, let γ (B t , Y t ) : 2 B t → N 0 , where for each s ∈ 2 B t it holds that γ (B t , Y t )(s) is the maximum cut size that can be achieved in G[Y t ] by any partition (V 1 , V 2 ) satisfying V 1 ∩ B t = s. As before, from Theorem 20 and Lemma 21, we obtain: Theorem 24. Max-Cut can be solved in time 2 k · n O (1) , if a nice R c -tree decomposition of width k is provided on the input.

Concluding remarks
While the technical contribution of this paper mainly focused on R c -tree-width, a parameter that allows us to lift fixedparameter algorithms parameterized by treewidth to well-structured dense graph classes, it is equally viable to consider H-treewidth for other choices of H. Naturally, one should aim at graph classes where problems of interest become tractable, but it is also important to make sure that a (nice) H-tree decomposition can be computed efficiently (i.e., one needs to obtain analogues to our Lemma 17). Examples of graph classes that may be explored in this context include split graphs, interval graphs, and more generally graphs of bounded mim-width [3,44]. Very recently, Jansen, de Kroon and Wlodarczyk have obtained algorithms that can obtain approximately-optimal H-tree decompositions for a number of interesting choices of H, such as interval graphs and more generally classes defined by forbidden induced subgraphs or minors [46].