Bridging Treewidth and Clique-Width via Cograph-Modular-Treewidth
Abstract
Many classical graph problems – such as Max Cut, Chromatic Number, Edge Dominating Set, and Hamiltonian Cycle – are polynomial-time solvable on cographs, fixed-parameter tractable (FPT) when parameterized by treewidth, but W[1]-hard when parameterized by clique-width. In contrast, Graph Isomorphism is FPT parameterized by treewidth, but for clique-width it is known to be in XP; whether it is FPT or W[1]-hard is open.
This reveals a sharp tractability gap between treewidth and clique-width. In this work, we propose a new structural graph parameter, -modular-treewidth, which lies between treewidth and clique-width. The parameter leverages modular decomposition and restricts modules to induce graphs from a fixed class (e.g., cographs or edgeless graphs). By exploiting true and false twins – a hallmark of cograph-like structure – our parameter allows the design of efficient algorithms for several hard problems beyond the reach of treewidth-based methods. In this work, we show that -modular-treewidth enables efficient solutions under suitable choices of , opening a new pathway in the parameterized complexity landscape between treewidth and clique-width. In particular we show that
-
When parameterized by cograph-modular-treewidth, Isomorphism admits an FPT algorithm, whereas Chromatic Number remains W[1]-hard.
-
When parameterized by independent-modular-treewidth, Hamiltonian Cycle and Edge Dominating Set remain W[1]-hard.
Keywords and phrases:
Treewidth, Clique-width, Cograph, FPT, W[1]-hardFunding:
Václav Blažej: Supported by project BOBR that received funding from the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation programme (grant agreement No. 948057).Copyright and License:
2012 ACM Subject Classification:
Mathematics of computing Graph algorithmsEditors:
Akanksha Agrawal and Erik Jan van LeeuwenSeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
1 Introduction
The field of parameterized complexity offers powerful tools for tackling computationally hard problems by identifying structural parameters that govern the complexity of input instances. Among these parameters, treewidth has played a central role due to its ability to capture the tree-like structure of graphs. Many graph problems that are NP-hard in general become tractable when parameterized by treewidth. This is because a wide range of problems that are solvable in polynomial time on trees can also be efficiently solved on graphs of bounded treewidth [5, 15, 16, 18, 19, 28, 32]. A foundational result in this area is that any graph problem expressible in monadic second-order logic (MSO) can be solved in linear time on graphs of bounded treewidth [2, 10, 11, 13]. This result captures a large family of natural problem such as Hamiltonian Cycle, and optimization versions of the problems like Vertex Cover, Dominating Set, Feedback Vertex Set, Max Cut, Chromatic Number and Edge Dominating Set. For a comprehensive survey on treewidth and its algorithmic implications, we refer the reader to Bodlaender [3]. At the other end of the spectrum lies clique-width, a more general graph parameter introduced by Courcelle and Olariu [14]. Clique-width generalizes treewidth in the sense that every graph class of bounded treewidth also has bounded clique-width [8]. Importantly, for graph problems expressible in monadic second-order logic without edge set quantification (so-called MS1 logic), Courcelle, Makowsky, and Rotics [12] showed that such problems are fixed-parameter tractable (FPT) when parameterized by clique-width. However, this generality comes at a cost. Many problems that are tractable for bounded treewidth become W-hard or even para-NP-hard when parameterized by clique-width [20, 21, 22]. This reveals a crucial algorithmic gap and motivates the need for intermediate parameters – those that extend beyond treewidth but remain more structured than clique-width to retain algorithmic tractability.
In this work, we introduce such an intermediate parameter: -modular-treewidth. This parameter lies strictly between treewidth and clique-width and is inspired by the classical notion of modular decomposition, which partitions a graph into modules – vertex sets that share uniform adjacency to the rest of the graph. The idea is to restrict the induced subgraphs formed by these modules to belong to a fixed class , thereby allowing controlled generalization beyond treewidth. We consider the following five problems in our framework.
| Isomorphism | |
|---|---|
| Input: | Two graphs and . |
| Question: | Are and isomorphic, i.e., is there a bijection such that if and only if ? |
| Max Cut | |
|---|---|
| Input: | A graph , a positive integer . |
| Question: | Can we partition into two subsets such that at least edges have endpoints in both subsets? |
| Chromatic Number | |
|---|---|
| Input: | A graph , a positive integer . |
| Question: | Can we color the vertices of using at most colors such that no adjacent vertices receive the same color? |
| Edge Dominating Set | |
|---|---|
| Input: | A graph , a positive integer . |
| Question: | Is there an edge subset of size at most such that every edge in is either in or adjacent to an edge in ? |
| Hamiltonian Cycle | |
|---|---|
| Input: | A graph . |
| Question: | Is there a cycle that passes through every vertex of exactly once? |
A central case of interest is when consists of cographs (i.e., -free graphs) or edgeless graphs. Cographs, defined recursively via disjoint union and join operations, are well-known for their structural simplicity: they have clique-width at most two, admit cotree representations, and are closed under modular decomposition. Many difficult problems become polynomial-time solvable on cographs, including Chromatic Number and Hamiltonian Cycle. A key feature of cographs is the occurrences of twin vertices – pairs of vertices with identical neighborhoods (true twins if adjacent, false twins if not). These twins play a foundational role in modular decomposition and in our parameter. By leveraging the presence of twin sets, we define a decomposition that generalizes tree decompositions while enforcing that the modules belong to a restricted class .
Motivation and Applications.
Our motivation is to bridge the algorithmic tractability gap between treewidth and clique-width. The same question was asked by Sæther and Telle [30] who introduced the graph parameter sm-width, which lies between treewidth and clique-width. Notably, some graph classes with unbounded treewidth, like distance-hereditary graphs, have bounded sm-width. In [30] the authors showed that MaxCut, Chromatic Number, Hamiltonian Cycle, and Edge Dominating Set are FPT when parameterized by sm-width.
Another parameter between treewidth and clique-width is called modular-treewidth and was introduced by Bodlaender and Jansen [4]. Notably Lampis [25] studied Chromatic Number parameterized by modular-treewidth (), showing an algorithm that decides -coloring in time; this is FPT when parameterized by . Hegerfeld and Kratsch [23] recently studied connectivity problems on modular-width. Notably, they define twinclass-treewidth which is equivalent to ours -modular treewidth when is set to be , i.e., the class of all cliques and edgeless graphs. Several papers [25, 27, 29] use the name modular-treewidth to refer twinclass-treewidth.
Many natural problems are polynomial-time solvable on cographs, FPT when parameterized by treewidth, yet become intractable (e.g., W-hard) under clique-width. Examples include Max Cut, Chromatic Number, Edge Dominating Set, Hamiltonian Cycle. Although Isomorphism is FPT when parameterized by treewidth [26], for clique-width it is only known to be in XP [22] and whether it is FPT or W-hard remains open.
W[1]-hardness reductions for many of these problems exhibit unbounded treewidth due to a simple obstruction, e.g. big cliques or bi-cliques, which additionally form modules in the constructed graph. This, together with their tractability on treewidth, raises the question of whether simple modules can be exploited to design FPT algorithms.
Our Results.
In the following sections, we formally define -modular-treewidth, analyze its structural and algorithmic properties, and show its applicability to the above problems. Our results contribute to the broader goal of identifying and utilizing structural graph parameters that support efficient algorithms, lying between the extremes of treewidth and clique-width.
| problem parameter | treewidth | independent-mt | cograph-mt | clique-width |
|---|---|---|---|---|
| Isomorphism | FPT [26] | FPT | FPT [Sec. 4] | XP [22] |
| Max Cut | FPT [4] | FPT | FPT [4] | W-hard [21] |
| Chromatic Number | FPT [20] | FPT [25] | W-h. [Sec. 5] | W-hard [20] |
| Edge Dominating Set | FPT [20] | W-h. [Sec. 6] | W-hard | W-h. [20, 21] |
| Hamiltonian Cycle | FPT [20] | W-h. [Sec. 7] | W-hard | W-hard [20] |
In Section 2.1 we clarify relations to other parameters and why results for modular-treewidth extend to our parameters. In particular, note that for Chromatic Number the number of colors is naturally bounded for graphs of treewidth, which is also true for independent-modular-treewidth. On the other hand, the number of colors is unbounded in cographs, and we support untractibility in this case by showing coloring is W-hard by cograph-modular-treewidth.
To simplify the notation in this paper, we employ the following convention while discussing problems. We use the following shorthand for width parameters: for treewidth, for clique-width, for independent-modular-treewidth (i.e., -modular-treewidth with as edgeless graphs), and for cograph-modular-treewidth (i.e., -modular-treewidth with as cographs). For a graph problem and a width parameter , when we represent it as it indicates that the problem is considered with parameter . For example, Isomorphism indicates Isomorphism parameterized by treewidth.
2 Preliminaries
We consider undirected unweighted simple graphs, unless stated otherwise. A graph has vertices and edges . For a set of vertices we use for , i.e., all the possible edges with both endpoints in . For adjacency we use ; similarly, denotes . If one side (or both sides) of an adjacency relation contains a set we mean for every , similarly for . We use if the graph of the adjacency is not clear from the context. Let for denote the graph induced on vertices , i.e., . Open neighborhood of is denoted and its closed neighborhood . Two vertices are called true twins if (implying ), and false twins if (implying ). We use to denote that is isomorphic to .
Definition 1 (Module).
For a graph , a subset of vertices is said to be a module in if for each either or .
Treewidth.
A tree decomposition of an undirected graph is a pair where is a tree and such that (i) for all edges there exists a node such that and (ii) for all the subgraph induced by is a non-empty tree. The width of a tree decomposition is . The treewidth of is the minimum width of a tree decomposition of .
Definition 2 (-modular tree-decomposition).
-modular tree-decomposition of a graph is a triple where is a graph, is a surjective function such that and for each we have , and is a tree-decomposition of . Width of a -modular tree-decomposition is defined as the width of the tree decomposition .
Observe that Definition 2 is equivalent to partitioning into modules with each part inducing a graph from .
Definition 3 (-modular-treewidth).
-modular-treewidth (-) of a graph is the minimum such that has a -modular tree-decomposition of width .
In other words, by the above definition we can construct by taking a graph of bounded treewidth and replace every vertex with a graph , making all the replacement vertices adjacent to the prior neighbors of , see Figure 1. Observe that for each every forms a module of . We call the module graph and the function the replacement function.
Note that if contains a single-vertex graph then every graph has a -modular tree-decomposition as we can set , to be identity and to be the tree-decomposition of .
We now show basic properties of this general definition.
Observation 4.
-modular-treewidth, with being a class that consists of only one graph that contains a single vertex, is equivalent to treewidth.
Proof.
With the class being this restricted the replacement function cannot change the graph at all, hence, and we conclude that has treewidth if and only if it has -modular-treewidth .
Observation 5.
Any graph has -modular-treewidth 0.
Proof.
As is from the class it follows that it can be created from a single vertex by replacing with . The graph with a single vertex has treewidth .
Corollary 6.
Every edgeless graph has . Every cograph has .
Lemma 7.
For a graph and graph classes and such that we have -modular-treewidth of is at most -modular-treewidth of .
Proof.
Consider a -modular tree-decomposition , then is also a -modular tree-decomposition because any part of induces a graph of which is a subset of ; the other conditions remain unchanged and still hold.
It is clear that the usefulness of -modular-treewidth depends heavily on the chosen graph class . One challenge with general graph classes is to be able to find a -modular tree-decomposition; one central class in our work is the class of cograph and to overcome this challenge we exploit the nice structure implied by the presence of twins in the class of cographs.
Definition 8 (Disjoint union, complement, join).
Let , be two distinct graphs. The disjoint union of and is the graph . The complement of is . The join of graphs and is .
Definition 9 (Cographs).
Cographs (complement reducible graphs) are defined recursively as follows: 1) a single vertex is a cograph; 2) the disjoint union of cographs is a cograph; 3) the join of cographs is a cograph.
As one can replace join with a sequence of 3 operations: complement, disjoint union, complement; it is not difficult to see that replacing (3) with taking complement of a cograph yields an equivalent (original) definition.
Definition 10 (Cotree [9]).
Cotree of a cograph is a rooted tree with unordered children whose set of leaves is , each internal vertex (except possibly root) has degree at least 2, each internal vertex is labeled by its depth plus one modulo 2, and for each we have if and only if the least common ancestor of the leaves that represent and is labeled with 1.
It was observed in [9] that each cograph has a unique representation by a cotree. We later use the fact that there is an algorithm to retrieve cotree and that tree isomorphism is a solved problem.
For a graph , we denote its treewidth , clique-width , cograph-modular-treewidth , and independent-modular-treewidth .
Parameterized Complexity.
We refer to [15] for an introduction to the area. A parameterized problem where is a string over and a parameter is fixed-parameter tractable (or FPT) if it can be solved in time for some computable function . The standard notion of fixed-parameter intractability is W[1]-hardness.
2.1 -modular-treewidth and other parameters
In this short section, we place the introduced parameters within the context of other parameters. Parameters we use solely in this section are modular-treewidth , modular-width , and split-matching-width (sm-width) . See the overview in Figure 2.
Lemma 11.
For any graph we have .
Proof.
Let us have graph classes: edgeless , cographs , graph with one vertex . Due to Observation 4 we know that treewidth is equivalent to -modular-treewidth. As we can use Lemma 7 to conclude that .
Lemma 12.
For any graph we have .
Proof.
Let . Let be the cograph-modular tree-decomposition that witnesses cograph-modular-treewidth of is . Observe, that one can alter this decomposition by taking modular decomposition of every co-graph and placing it in the stead of the cograph. This alteration results in a modular decomposition witnessing that because every cograph will be decomposed into its cotree sturcture, resulting in tree nodes that are only cliques or independent sets that do not increase modular-treewidth of the decomposition.
Lemma 13.
is incomparable to , , and .
Proof.
Note that due to Lemma 11 it suffices to show a graph class with bounded and unbounded , and another graph class with bounded and unbounded . We claim that the first graph class is a class of all paths – note that its treewidth is 1 as all paths are also trees; the modular-width cannot decompose any path because a path graph contains only trivial modules.
The second graph class we create inductively as follows. Let be a path on vertices. Let consists of modules, each containing exactly , and let the quotient graph over these modules be a path on vertices. Let . By design of , each graph has . On the other hand, notice that contains no true nor false twins. We will later see in Lemma 19 that every non-trivial module of a cograph-modular tree-decomposition contains twins. Therefore, the decomposition of is trivial (each module contains a single vertex) so the quotient graph contains a complete bipartite graph of unbounded size, hence, is unbounded.
Later, we show that hardness of Edge Dominating Set on independent-modular-treewidth; this problem is FPT on sm-width, hence we conclude the following.
Corollary 14.
Unless FPTW, graph classes with bounded do not necessarily have bounded .
We did not find any reference for the relation between and , nor a result that would prove incomparability of to our parameters. The above corollary shows one incomparability direction but it still remains to determine whether bounded implies bounded , , or even .
Lemma 15.
There is a graph class with bounded and unbounded .
Proof.
Consider a graph class that for each contains a graph consisting of a clique where each vertex of the clique has a private pendant leaf . We claim that has bounded but unbounded . To show bounded it is not hard to find embedding of into leaves of a ternary tree such that each subgraph induced by edges between parts of a bipartition that is implied by every edge of the ternary tree forms a complete bipartite graph. Unboundedness of comes from the fact that every contains no non-trivial modules and so the first quotient graph must contain a clique which lower bounds treewith by . Due to Lemma 11, Lemma 15, and Corollary 14 we get the following corollary.
Corollary 16.
Unless FPTW we have that is incomparable to , , and .
As is defined as treewidth of quotient graphs within primal nodes of modular decomposition of the graph whereas is simply the maximum number of vertices within such nodes, implying for any graph .
The fact that bounded implies bounded is a combination of several facts: 1) clique-width is bounded by treewidth [14] – as each quotient graph of primal nodes has buonded treewidth one knows that there is an expression witnessing bounded clique-width of the quotient graph; 2) if we have an expression for a module, then we can change all vertices of the module to a single color and assume there is a single vertex instead – hence, we can easily attach expressions of modules to the expression of the parent quotient graph. Applying this recursively quields an expression of bounded clique-width.
3 Algorithm to find decompositions for and
The usefulness of a parameter towards designing FPT algorithms is significantly impacted by our ability to retrieve a decomposition that witnesses that the parameter is bounded.
We first show an auxiliary lemma that shows structure of module graph of the decompositions. Then we focus on obtaining and of -modular tree-decompositions. We conclude with noting that of can be found by showing how to obtain independent-modular tree-decomposition, which is quite simple, and then move to cograph-modular tree-decomposition for which we will need a number of auxiliary notions.
The below approaches are presented in order to have a self-contained contribution. We believe that using the linear-time algorithm for modular decomposition [31, 7] one can obtain independent- and cograph-modular-treewidth in linear time.
Lemma 17.
For a graph that has -modular-treewidth there exists a -modular tree-decomposition of width such that:
-
1.
if is closed under disjoint unions, then contains no false twins, and
-
2.
if is closed under joins, then contains no true twins.
Proof.
Towards a contradiction for (1), choose an that contains the minimum number of false twins and suppose that this number is positive. Let be one such pair of false twins. The function replaces each vertex of with a graph from to obtain . As are false twins in it follows that is a module in . Let us alter the decomposition by removing to create and observe that can still be created from by creating except for setting to be . This subgraph is in because both and are in and in there is no edge between them as , and because is closed under disjoint union. We removed so the new decomposition contains fewer twins, a contradiction.
We prove (2) by a similar contradiction; assuming is closed under joins and that are true twins in , we show that can be removed because is by a join of the two graphs from .
Theorem 18.
Given a graph on vertices there is an algorithm that in time retrieves a graph and a mapping such that for every the vertices form an independent set of .
Proof.
We aim to find maximal modules that induce independent sets in the graph. is closed under disjoint union so we invoke Lemma 17 and conclude that has an -modular tree-decomposition where its module graph contains no false twins. To find such and of such a decomposition we first retrieve the false twin relation by comparing open neighborhoods of all pairs of vertices; this implies a partition of .
From each part we pick an arbitrary single representative . Let the modular graph be the graph induced on the representatives . The above can be easily done in time. For every let where such that . As splits the graph into parts of equivalent neighborhoods, we have that the parts are modules of . For any pair of vertices we have by , , and being an induced subgraph of .
To retrieve a cograph-modular tree-decomposition we use a very similar argument as for the independent-modular tree-decomposition; a number of notions needs to be introduced first.
Let us establish notations regarding partitions. Let each partition be represented as a family of sets that correspond to the parts, i.e, for a set we can have its partition . The procedure described below creates nested partitions (partitions of partitions), resulting in e.g. . Let partition tree of a set be a tree that corresponds to the bracket structure with labels of replaced with – defined inductively, if is a label let be a rooted tree with only the root vertex, otherwise and is a rooted tree where the root has children – roots of its subtrees .
Let be a graph with cograph-modular-treewidth . Let be a partition of such that belong to the same part if and only if . Let be the quotient graph over , i.e., graph . Similarly for open neighborhoods, let be a partition where if and only if and let be the quotient graph over . Note that taking the quotient graph results in a graph that is isomorphic to a graph where all but one vertex is removed from each part because the considered parts are always modules of the graph.
Lemma 19.
Suppose is a cograph with at least 2 vertices and is an induced subgraph of and is a module of , then contains a pair of vertices that are true or false twins in .
Proof.
As is a cograph it contains a pair of vertices that in are true or false twins [9, Theorem 2]. Suppose contains that are true twins in , so . As are part of the module their neighborhood in is identical. We conclude that are true twins in as well. If contains false twins instead, the proof is identical.
Now, we use the above lemma to find a tree decomposition of the module graph by first identifying twins of , alternating between identifying true or false twins, and then invoking the algorithm to find the tree decomposition of the resulting graph.
Theorem 20.
Given a graph on vertices there is an algorithm that in time retrieves a graph and a mapping such that for every the induced subgraph is a cograph.
Proof.
We define a sequence of graphs where and for each the graph and ; let be the minimum such that . Note that as by the definition for each the graphs and are distinct; by the construction we have . I.e., in the above we constructed a sequence of quotient graphs over alternating partitions and which ends at a point where the application does not change the graph, i.e., all vertices have distinct open neighborhoods and distinct closed neighborhoods. All of this takes at most time as , and each step takes at most polynomial-time.
Note that due to Lemma 17 graph should not contain twins; the above process gets rid of them. Moreover, due to Lemma 19, if there is a module that induces a cograph then the process eventually reduces it to a single vertex. We set which is a module graph of and can be constructed according to Lemma 17 in a straight-forward manner.
To finish, we apply the algorithm of Korhonen [24] which either returns a tree-decomposition of of width or concludes that the treewidth of is more than in time. We return as the independent-modular tree-decomposition.
Corollary 21.
Given an integer and a graph on vertices there is an algorithm that retrieves an independent-modular tree-decomposition of of width or determines that the independent-modular-treewidth of is more than in time.
Corollary 22.
Given an integer and a graph on vertices there is an algorithm that retrieves a cograph-modular tree-decomposition of of width or determines that the cograph-modular-treewidth of is more than in time.
Note that in the proof of Theorem 20 the labels assigned to vertices correspond to cotrees of the particular modules. This could be utilized to retrieve cotrees immediately, but for simplicity we will retrieve the cotrees of for each independently using [6].
4 Isomorphism/ is FPT
In short, to tackle Isomorphism parameterized by we first retrieve the cograph-modular tree-decompositions. As every cograph is uniquely determined by its cotree (see Definition 10) we use the idea from the tree isomorphism checking algorithm to attach to each tree a unique number that represents its shape – two of these numbers are equal if and only if the two represented cotrees (and so their respective cographs) are isomorphic. Then, to each vertex of the module graphs we attach a tree that represents the number for the cotree of . These attached trees are shown not to occur in the module graph so we can safely use them to uniquely represent the cograph modules. In the end, we show that the attached trees are isomorphic if and only if the represented cographs are isomorphic. As attaching trees does not change treewidth of the graph it then suffices to check isomorphism of the two altered module graphs. Let us build these tools more formally now.
Let us first recall that isomorphism of rooted trees with unordered children.
Lemma 23 (see e.g. [1, Theorem 3.3]).
There is a procedure that assigns integers to each tree in a set of rooted trees (with unordered children) so that two trees are isomorphic if and only if their integers are equal .
Proof.
The procedure assigns to every root of every subtree (i.e., every vertex of every tree) so that two subtrees are isomorphic if and only if their are equal. We can assume that the roots of all the trees in the set are children of a new dummy root so we can focus on processing a single tree. In essence, the vertices of the rooted tree are labelled bottom-up as follows. Each leaf gets label 0 and each inner vertex gets a label determined from the sorted labels of its children. More precisely, if label combination was never seen before it assigns the lowest unused ; hence, the maximum integer used for a label is no more than the total number of vertices. It follows that isomorphic subtrees get the same label, and that the used labels are upper bound by the number of processed vertices. To compare two different trees one needs to preserve the label assigning function from one tree and use it to label the other tree – two trees are deemed isomorphic if they end up having the same-labelled root.
We will use Lemma 23 to get integers for cotrees of cographs that make up modules of our graph. These numbers will be used as labels and we solve the labeled instance using transformation from the following lemma.
Lemma 24.
Given a pair of graphs and a labeling function there is an algorithm that in time transforms graphs into graphs so that , i.e., has a -label-preserving isomorphism to if and only if , i.e., is isomorphic to .
Proof.
Let us create from by first subdiving all edges once and then to every vertex attaching new leaves. We create from in the same way. This transformation runs in time. Due to the subdivision the transformation creates a bipartite graph. All of the new leaves are in one part of the bipartition. On the other hand, the old leaves (those in ) are not leaves in as to each of them we attached at least 2 new leaves. Note that the transformation is label agnostic and so if then . In the other direction, assuming we know that the parts with the leaves need to be mapped to each other. The number of adjacent leaves of a vertex is invariant under isomorphism and structure of the graph is clearly reflected in subdivision vertices, so it is straight-forward to lift the isomorphism to .
Theorem 25.
Given a pair of graphs and an integer in time we can either decide Isomorphism of and or conclude that either or has cograph-modular-treewidth more than .
Proof.
By Corollary 22 we either get cograph-modular tree-decomposition of and of , each of width at most , or conclude that one of the graphs has cograph-modular-treewidth more than . Then, for each vertex we take the induced subgraph and retrieve its cotree ; similarly we retrieve cotrees of all the vertices in . Now we create a labeling . Then, for every subgraph we retrieve its cotree [6]; similarly for we get cotrees . Now we run Lemma 23 for the set of all retrieved cotrees , let , i.e., we set to be the label that uniquely identifies the cotree and subsequently also uniquely identifies the respective cograph. Note that has no values bigger than . Next, we invoke Lemma 24 to transform to . Last, we use [26] to determine whether is isomorphic to in time.
We claim that the answer to whether is isomorphic to is equivalent to answering whether is isomorphic to . Indeed, observe that Corollary 22 obtains the cograph-modular tree-decomposition in a label-agnostic way so if and only if the bijection that witnesses maps to each other vertices that represent the same underlying cographs, i.e., a bijection must satisfy for every . We modeled this requirement by using bijection between cographs and cotrees, then using Lemma 23 to get the auxiliary labeling , and requiring -preserving isomorphism. Last, we used a transformation Lemma 24 which produces an equivalent instance.
5 CHROMATIC NUMBER/ is W-hard
A coloring of a graph is an assignment of a positive integer (color) to each vertex of . The coloring is proper if adjacent vertices receive distinct colors. The chromatic number of a graph is the smallest number of colors of a proper coloring of . The Chromatic Number problem asks whether of . Note that Chromatic Number is not expressible in monadic second order logic. However, for every fixed , checking whether can be expressed in monadic second order logic even without edge set quantification. Since graphs of tree-width at most are colorable, this implies that Chromatic Number can be solved in linear time on graph classes of bounded treewidth. Moreover, this problem admits FPT algorithm when parameterized by , although it becomes W-hard when parameterized by [20]. In this section, we show that the Chromatic Number problem is W[1]-hard when the parameter is cograph-modular-treewidth. This hardness persists even when every cograph in the underlying decomposition is a clique. However, it admits an FPT algorithm when parameterized by independent-modular-treewidth [25]. In summary, we present the following result.
Theorem 26.
Chromatic Number is W-hard.
Proof.
Our proof is based on a construction similar to that of [20], with specific modifications – namely, the addition of further gadget structures, which establishes the W[1]-hardness of the Chromatic Number when parameterized by clique-width. We give a reduction from Equitable Coloring/ which is known to be W-hard [18]. In the Equitable Coloring problem one is given a graph on vertices and integer and asked whether can be properly -colored in such a way that the number of vertices in any two color classes differs by at most 1 (such coloring is called an equitable -coloring). Notice that if is divisible by this implies that all color classes must contain the same number of vertices. In our reduction, we will assume that in the instance we reduce from, is divisible by . For a justification of this assumption, if does not divide we can add a clique of size to . We reduce from the exact version of Equitable Coloring, that is, the version where we are looking for an equitable coloring of with exactly colors.
Reduction.
Given an input to Equitable Coloring, we construct an instance of Chromatic Number as follows (see Figure 3). Let and . We start with a copy of . We add a clique of size and connect every vertex of to every vertex of by an edge. We add a clique of size to , called palette. The set is partitioned into parts: , where , (for ). The vertices of are denoted by . For each vertex and each vertex , we add the edge . For each , we add a set of vertices which contains copies of all vertices of . For each vertex and each , we assign vertices and . For each vertex and each , we add the edge . For every vertex and each , we make adjacent to and the entire palette except for and . For each , we add a clique of vertices and make every vertex of adjacent to all the vertices of and the entire palette except for . Now we show the correctness of the reduction.
Claim 27.
If has an equitable -coloring , then has a proper -coloring .
Claim 28.
If has a proper -coloring , then has an equitable -coloring .
Claim 29.
Claims 27, 28 and 29 together give a parameterized reduction from Equitable Coloring for into Chromatic Number/. Moreover, as per our construction, this hardness holds even when every cograph in the underlying decomposition is a clique or an independent set. This completes the proof of Theorem 26.
6 EDGE DOMINATING SET is W-hard
An edge dominating set of a graph is a set such that every edge of is either in or adjacent to at least one edge of . Edge Dominating Set problem asks to find an edge dominating set of size at most . This problem admits an FPT algorithm parameterized by by Courcelle’s Theorem since it is MSO2 expressible but it is W-hard when parameterized by [20]. We show that this problem remains W-hard when parameterized by .
6.1 Exact Saturated Dominating Set
We first introduce a problem from which we will reduce. A capacitated graph is a pair , where is a graph and is a capacity function such that for every vertex (sometimes we simply say that is a capacitated graph if the capacity function is clear from the context). A set is called a capacitated dominating set if there is a domination mapping which maps every vertex in to one of its neighbors in in such a way that the total number of vertices mapped by to any vertex does not exceed its capacity , i.e., . For a vertex we say that vertices in are dominated by . In Capacitated Dominating Set, given a capacitated graph and a positive integer , the objective is to check whether has a capacitated dominating set of size at most for . In the Exact Capacitated Dominating Set problem, the size of such a set needs to be exactly . It is known that both Capacitated Dominating Set and Exact Capacitated Dominating Set are W-hard when parameterized by the treewidth of the input graph and the solution size [17, 20].
For a capacitated graph , a capacitated dominating set is called a saturated dominating set if there is a domination mapping such that for each vertex . Below we define the Exact Saturated Dominating Set problem.
| Exact Saturated Dominating Set | |
|---|---|
| Input: | A capacitated graph , a positive integer . |
| Question: | Does have a saturated dominating set with exactly vertices? |
It is known that Exact Saturated Dominating Set is W-hard [20]. We expand the aforementioned result and show that Exact Saturated Dominating Set is W-hard.
Theorem 30.
The Exact Saturated Dominating Set is W-hard.
6.2 Edge Dominating Set
In this section we show the following result.
Theorem 31.
Edge Dominating Set is W-hard.
Proof.
We give a reduction from Exact Saturated Dominating Set. Our proof follows a construction similar to that in [20], with minor modifications, which establishes the W[1]-hardness of the Edge Dominating Set problem when parameterized by clique-width. We start with a description of an auxiliary gadget.
Auxiliary gadget.
Let be positive integers. We construct a graph with the vertex set and edges for , and for . Basically, we have a complete bipartite graph between the ’s and the ’s as well as between the ’s and the ’s. The vertices are called the roots of , see Figure 4.
Reduction.
Let be a capacitated graph with the vertex set , and be a positive integer. We introduce three vertex sets , , and . Then for each , we add the edges and . Now for every vertex , we introduce a set with vertices. For every edge , we connect all vertices of with and all vertices of to . We introduce vertex sets and . Vertices are made adjacent to all vertices of , , and . For every vertex we add a set of vertices and make adjacent to all the vertices of . Then for each , , we add vertex sets and both of size and we make a complete bipartite graph between the vertices of and as well as and . Let . We denote the obtained graph by , see Figure 5. Let . Finally, we introduce three copies of : (i) a copy of with roots , (ii) a copy of with roots , and (iii) a copy of with roots in . Let be this final resulting graph.
Claim 32.
Any set of edges incident with vertices forms an edge dominating set in . Furthermore, let be a graph obtained by the union of with some other graph such that . Then every edge dominating set of contains at least edges from .
The proof of Claim 32 follows from the fact that every edge dominating set includes at least one edge from for where denotes the set of edges with one endpoint at .
Claim 33.
If the capacitated graph has an exact saturated dominating set of size then has an edge dominating set of cardinality .
Claim 34.
If has an edge dominating set of cardinality at most then has an exact saturated dominating set of size .
Claim 35.
Claims 33, 34 and 35 together give a parameterized reduction from Exact Saturated Dominating Set/ to Edge Dominating Set/. This completes the proof of Theorem 31.
7 HAMILTONIAN CYCLE is W-hard
A Hamiltonian cycle in a graph is defined as a cycle that includes every vertex of . The Hamiltonian Cycle problem asks finding such a cycle in . Although the problem can be solved using an FPT algorithm with the parameterization by (which is expressible in MSO2), it becomes W-hard when parameterized by [20]. We demonstrate that the problem also remains W-hard with the parameterization, and even W-hard when using as a parameter. In this section, we present the following finding.
Theorem 36.
Hamiltonian Cycle is W-hard.
Proof.
In the proof of W[1]-hardness of Hamiltonian Cycle/ by Fomin et al. [20], the constructed gadget contains large independent modules. These modules have the property that, if each were contracted into a single vertex, the resulting graph would have bounded treewidth. We exhibit this property towards proving Theorem 36. For the sake of completeness, we present the same construction below, omitting the proof of the reduction (as it remains identical), but we include a proof demonstrating that the underlying graph has bounded treewidth.
We give a reduction from Capacitated Dominating Set which is known to be W-hard [20]. We start with descriptions of auxiliary gadgets.
First auxiliary gadget .
The first auxiliary gadget is the graph with the vertex set and the edge set . Let be the path and .
Second auxiliary gadget .
The second auxiliary gadget is the graph with the vertex set . Initially, the edges in are added to its edge set. Then an - path of length 10 is added, and edges , , , are included in the set of edges. Let , , and .
Reduction.
Let be a capacitated graph with the vertex set and edges, and let be a positive integer. The construction of is as follows:
-
For every vertex , four vertices , , , and are introduced, and the vertices and are joined by paths of length two. Let denote the set of middle vertices of these paths, and . Then a copy of the graph with is added, and vertices and of this gadget are joined by edges to and , respectively. By and we denote the vertices and , respectively, of . The paths corresponding to in is called .
-
For every edge with , a copy of is attached with and vertices and made adjacent to all the vertices of . The vertices corresponding to and are called and , respectively, in . Furthermore, let and denote the vertices corresponding to and , respectively, in . The paths corresponding to , , and are called , , and , respectively, in .
-
Next we add two vertices and which are joined by paths of length two. Let be the set of middle vertices of these paths. All vertices , , , and are joined by edges with all vertices of . For every vertex , , a copy of with is attached and the vertices and of this gadget are joined to all vertices of . We let and denote the vertices corresponding to and , respectively, in . Similarly, and denote paths in corresponding to and , respectively.
-
Finally, we add vertices, namely , and make them adjacent to all the vertices and to and .
Claim 37 ([20, Lemma 10]).
has a capacitated dominating set of size at most if and only if has a Hamiltonian cycle.
Claim 38.
Claims 37 and 38 together give a parameterized reduction from Capacitated Dominating Set/ to Edge Dominating Set/. This completes the proof of Theorem 36.
8 Conclusion
We introduced -modular-treewidth, a new graph parameter generalizing classical treewidth by leveraging structure from a fixed graph class . We established the parameterized complexity of several problems: both Hamiltonian Cycle and Edge Dominating Set are W[1]-hard for independent-modular-treewidth, while Graph Isomorphism is FPT for cograph-modular-treewidth. We also showed that Chromatic Number is W[1]-hard for cograph-modular-treewidth. Future work includes studying these and related problems under clique-modular-treewidth and exploring how different choices of the base class affect the algorithmic tractability of classic problems.
References
- [1] Alfred V. Aho, John E. Hopcroft, and Jeffrey D. Ullman. The Design and Analysis of Computer Algorithms. Addison-Wesley, 1st edition, 1974.
- [2] Stefan Arnborg, Jens Lagergren, and Detlef Seese. Easy problems for tree-decomposable graphs. J. Algorithms, 12(2):308–340, 1991. doi:10.1016/0196-6774(91)90006-K.
- [3] Hans L. Bodlaender. A partial k-arboretum of graphs with bounded treewidth. Theor. Comput. Sci., 209(1-2):1–45, 1998. doi:10.1016/S0304-3975(97)00228-4.
- [4] Hans L. Bodlaender and Klaus Jansen. On the complexity of the maximum cut problem. Nord. J. Comput., 7(1):14–31, March 2000.
- [5] Hans L. Bodlaender and Arie M.C.A. Koster. Combinatorial optimization on graphs of bounded treewidth. Comput. J., 51(3):255–269, 2008. doi:10.1093/COMJNL/BXM037.
- [6] Anna Bretscher, Derek Corneil, Michel Habib, and Christophe Paul. A simple linear time LexBFS cograph recognition algorithm. SIAM Journal on Discrete Mathematics, 22(4):1277–1296, 2008. doi:10.1137/060664690.
- [7] Derek G. Corneil, Michel Habib, Christophe Paul, and Marc Tedder. A recursive linear time modular decomposition algorithm via LexBFS, 2024. arXiv:0710.3901.
- [8] Derek G. Corneil and Udi Rotics. On the relationship between clique-width and treewidth. SIAM J. Comput., 34(4):825–847, 2005. doi:10.1137/S0097539701385351.
- [9] D.G. Corneil, H. Lerchs, and L. Stewart Burlingham. Complement reducible graphs. Discrete Applied Mathematics, 3(3):163–174, 1981. doi:10.1016/0166-218X(81)90013-5.
- [10] Bruno Courcelle. The monadic second-order logic of graphs. I. Recognizable sets of finite graphs. Inf. Comput., 85(1):12–75, 1990. doi:10.1016/0890-5401(90)90043-H.
- [11] Bruno Courcelle. The monadic second-order logic of graphs III: tree-decompositions, minor and complexity issues. RAIRO Theor. Informatics Appl., 26:257–286, 1992. doi:10.1051/ITA/1992260302571.
- [12] Bruno Courcelle, Johann A. Makowsky, and Udi Rotics. Linear time solvable optimization problems on graphs of bounded clique-width. Theory Comput. Syst., 33(2):125–150, 2000. doi:10.1007/S002249910009.
- [13] Bruno Courcelle and Mohamed Mosbah. Monadic second-order evaluations on tree-decomposable graphs. Theor. Comput. Sci., 109(1&2):49–82, 1993. doi:10.1016/0304-3975(93)90064-Z.
- [14] Bruno Courcelle and Stephan Olariu. Upper bounds to the clique width of graphs. Discrete Applied Mathematics, 101(1):77–114, 2000. doi:10.1016/S0166-218X(99)00184-5.
- [15] Marek Cygan, Fedor V. Fomin, Łukasz Kowalik, Daniel Lokshtanov, Dániel Marx, Marcin Pilipczuk, Michał Pilipczuk, and Saket Saurabh. Parameterized algorithms, volume 5. Springer, 2015. doi:10.1007/978-3-319-21275-3.
- [16] Marek Cygan, Jesper Nederlof, Marcin Pilipczuk, Michal Pilipczuk, Johan M. M. van Rooij, and Jakub Onufry Wojtaszczyk. Solving connectivity problems parameterized by treewidth in single exponential time. ACM Trans. Algorithms, 18(2):17:1–17:31, 2022. doi:10.1145/3506707.
- [17] Michael Dom, Daniel Lokshtanov, Saket Saurabh, and Yngve Villanger. Capacitated domination and covering: A parameterized perspective. In Parameterized and Exact Computation, Third International Workshop, IWPEC, volume 5018 of Lecture Notes in Computer Science, pages 78–90. Springer, 2008. doi:10.1007/978-3-540-79723-4_9.
- [18] Michael R. Fellows, Fedor V. Fomin, Daniel Lokshtanov, Frances A. Rosamond, Saket Saurabh, Stefan Szeider, and Carsten Thomassen. On the complexity of some colorful problems parameterized by treewidth. Inf. Comput., 209(2):143–153, 2011. doi:10.1016/J.IC.2010.11.026.
- [19] Jacob Focke, Dániel Marx, and Pawel Rzazewski. Counting list homomorphisms from graphs of bounded treewidth: Tight complexity bounds. ACM Trans. Algorithms, 20(2):11, 2024. doi:10.1145/3640814.
- [20] Fedor V. Fomin, Petr A. Golovach, Daniel Lokshtanov, and Saket Saurabh. Intractability of clique-width parameterizations. SIAM J. Comput., 39(5):1941–1956, 2010. doi:10.1137/080742270.
- [21] Fedor V. Fomin, Petr A. Golovach, Daniel Lokshtanov, and Saket Saurabh. Almost optimal lower bounds for problems parameterized by clique-width. SIAM J. Comput., 43(5):1541–1563, 2014. doi:10.1137/130910932.
- [22] Martin Grohe and Pascal Schweitzer. Isomorphism testing for graphs of bounded rank width. In Venkatesan Guruswami, editor, IEEE 56th Annual Symposium on Foundations of Computer Science (FOCS), pages 1010–1029. IEEE Computer Society, 2015. doi:10.1109/FOCS.2015.66.
- [23] Falko Hegerfeld and Stefan Kratsch. Tight algorithms for connectivity problems parameterized by modular-treewidth. In Daniël Paulusma and Bernard Ries, editors, Graph-Theoretic Concepts in Computer Science - 49th International Workshop, WG 2023, Fribourg, Switzerland, June 28-30, 2023, Revised Selected Papers, volume 14093 of Lecture Notes in Computer Science, pages 388–402. Springer, 2023. doi:10.1007/978-3-031-43380-1_28.
- [24] Tuukka Korhonen. A single-exponential time 2-approximation algorithm for treewidth. In 2021 IEEE 62nd Annual Symposium on Foundations of Computer Science (FOCS), pages 184–192, 2022. doi:10.1109/FOCS52979.2021.00026.
- [25] Michael Lampis. Finer tight bounds for coloring on clique-width. SIAM Journal on Discrete Mathematics, 34(3):1538–1558, 2020. doi:10.1137/19M1280326.
- [26] Daniel Lokshtanov, Marcin Pilipczuk, Michał Pilipczuk, and Saket Saurabh. Fixed-parameter tractable canonization and isomorphism test for graphs of bounded treewidth. SIAM J. Comput., 46(1):161–189, 2017. doi:10.1137/140999980.
- [27] Stefan Mengel. Parameterized compilation lower bounds for restricted cnf-formulas. In Nadia Creignou and Daniel Le Berre, editors, Theory and Applications of Satisfiability Testing - SAT 2016 - 19th International Conference, Bordeaux, France, July 5-8, 2016, Proceedings, volume 9710 of Lecture Notes in Computer Science, pages 3–12. Springer, 2016. doi:10.1007/978-3-319-40970-2_1.
- [28] Karolina Okrasa, Marta Piecyk, and Pawel Rzazewski. Full complexity classification of the list homomorphism problem for bounded-treewidth graphs. In Fabrizio Grandoni, Grzegorz Herman, and Peter Sanders, editors, 28th Annual European Symposium on Algorithms, ESA, volume 173 of LIPIcs, pages 74:1–74:24. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2020. doi:10.4230/LIPICS.ESA.2020.74.
- [29] Daniël Paulusma, Friedrich Slivovsky, and Stefan Szeider. Model counting for CNF formulas of bounded modular treewidth. Algorithmica, 76(1):168–194, 2016. doi:10.1007/S00453-015-0030-X.
- [30] Sigve Hortemo Sæther and Jan Arne Telle. Between treewidth and clique-width. Algorithmica, 75(1):218–253, 2016. doi:10.1007/S00453-015-0033-7.
- [31] Marc Tedder, Derek G. Corneil, Michel Habib, and Christophe Paul. Simpler linear-time modular decomposition via recursive factorizing permutations. In Automata, Languages and Programming, pages 634–645, Berlin, Heidelberg, 2008. Springer Berlin Heidelberg. doi:10.1007/978-3-540-70575-8_52.
- [32] Johan M. M. van Rooij, Hans L. Bodlaender, and Peter Rossmanith. Dynamic programming on tree decompositions using generalised fast subset convolution. In Algorithms – ESA 2009, volume 5757 of Lecture Notes in Computer Science, pages 566–577. Springer, 2009. doi:10.1007/978-3-642-04128-0_51.
