A Finer View of the Parameterized Landscape of Labeled Graph Contractions
Abstract
We study the Labeled Contractibility problem, where the input consists of two vertex-labeled graphs and , and the goal is to determine whether can be obtained from via a sequence of edge contractions.
Lafond and Marchand [WADS 2025] initiated the parameterized complexity study of this problem, showing it to be -hard when parameterized by the number of allowed contractions. They also proved that the problem is fixed-parameter tractable when parameterized by the tree-width tw of , via an application of Courcelle’s theorem resulting in a non-constructive algorithm.
In this work, we present a constructive fixed-parameter algorithm for Labeled Contractibility with running time . We also prove that unless the Exponential Time Hypothesis (ETH) fails, it does not admit an algorithm running in time . This result adds Labeled Contractibility to a small list of problems that admit such a lower bound and matching algorithm.
We further strengthen existing hardness results by showing that the problem remains -complete even when both input graphs have bounded maximum degree. We also investigate parameterizations by where denotes the degeneracy of , and rule out the existence of subexponential-time algorithms. This answers question raised in Lafond and Marchand [WADS 2025]. We additionally provide an improved algorithm with better dependence on than previously known. Finally, we analyze a brute-force algorithm for Labeled Contractibility with running time , and show that this running time is optimal under ETH.
Keywords and phrases:
Labeled Contraction, ETH Lower-bound, Treewidth, NP-hardFunding:
Prafullkumar Tale: INSPIRE Faculty Fellowship by DST, Govt of India.Copyright and License:
2012 ACM Subject Classification:
Theory of computation Fixed parameter tractabilityEditors:
C. Aiswarya, Ruta Mehta, and Subhajit RoySeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
1 Introduction
Graph modification problems are a foundational topic in algorithmic graph theory. A general formulation of the -M-Modification problem asks: given a graph and a fixed set M of allowed modification operations (such as vertex deletion, edge addition/deletion, or edge contraction), can be transformed into a graph in class using at most operations from M.
It is well known that the -M-Modification problem is -hard for many natural graph classes when M consists of vertex or edge deletions [54, 42]. Hardness results for edge contraction were first shown by Watanabe et al. [53] and Asano and Hirata [4]. It is noteworthy that while the problem becomes trivially solvable when M includes only vertex or edge deletions and is a singleton, this is not the case for edge contractions. In fact, Brouwer and Veldman [9] established that the problem remains -complete even when is a singleton containing a small graph, such as a cycle or a four-vertex path. This difference highlights the increased algorithmic complexity introduced by edge contractions compared to vertex or edge deletions.
Graph modification problems have played a central role in the development of parameterized complexity and the design of key algorithmic techniques. A representative list of relevant works includes [7, 8, 11, 12, 13, 14, 17, 23, 24, 25, 27, 29]. For a comprehensive overview, the survey by Crespelle et al. [18] provides an in-depth discussion of modification problems involving edge deletion, editing, and completion.
A series of recent papers have studied the parameterized complexity of -Contraction for various graph classes , including paths and trees [35], generalizations and restrictions of trees [1, 2], cactus graphs [40], bipartite graphs [34, 36], planar graphs [33], grids [50], cliques [10], split graphs [3], chordal graphs [44], bicliques [47], and degree-constrained graph classes [5, 32, 51].
Recently, Lafond and Marchand [41] initiated the parameterized study of edge contraction problems in uniquely labeled graphs, where each vertex has a different label. They introduced the following problem:
| Labelled Contractibility |
Input: Two vertex-labeled graphs and with .
Question: Is a labeled contraction of ?
They also introduced a generalization, motivated by applications in phylogenetic networks [46], which are rooted acyclic directed graphs with labeled leaves representing evolutionary histories:
| Maximum Common Labeled Contraction |
Input: Two vertex-labeled graphs and , and an integer .
Question: Do there exist labeled contraction sequences and such that and ?
This second problem is closely related to the first. As shown in [41], is a labeled contraction of if and only if there exists a common contraction of both and to a labeled graph of size at least . This equivalence allows complexity results to be transferred between the two problems. The same work provides additional applications and results.
Lafond and Marchand [41] showed that Labeled Contractibility is -hard when parameterized by the natural parameter , the number of allowed edge contractions. This motivates the exploration of structural parameters. They established that the problem admits a fixed-parameter tractable () algorithm when parameterized by the treewidth tw of the input graph by invoking a variation of Courcelle’s theorem [26, Theorem 11.73]. However, this approach yields a non-elementary dependence on the parameter.
Our first contribution is a constructive dynamic programming algorithm with a running time that is singly exponential in . We complement this with a matching lower bound under the Exponential Time Hypothesis (ETH):
Theorem 1.
Labeled Contractibility
-
admits an algorithm running in time ; but
-
does not admit an algorithm running in time , unless the ETH fails.
We note that this lower bound also holds when parameterized by the pathwidth, which is a larger parameter. Most known -algorithms that use dynamic programming on tree decompositions have running times, and matching lower bounds, of the form [19, Chapters 7,13] or [43, 21]. For a relatively rare set of problems exhibits a double-exponential dependence on treewidth, see [30, 52, 16] and references within. To our knowledge, the only problems with single-exponential-but-polynomial dependencies on pathwidth are mentioned in [20, 48, 49]. Similar results parameterized by vertex cover number can be found in [3, 31, 6, 15].
Lafond and Marchand [41] observed that smaller parameters such as degeneracy do not yield tractable results. Specifically, it is known that the Maximum Common Labeled Contraction problem is -hard even when both input graphs have constant maximum degree (and thus constant degeneracy), and that Labeled Contractibility is -hard for graphs of bounded degeneracy [45, Theorem 8]. We strengthen this latter result by proving hardness under an even stricter constraint:
Theorem 2.
Labeled Contractibility is -hard even when both and have bounded maximum degree.
These results suggest that tractability is unlikely when parameterizing solely by the solution size or the degeneracy . Nevertheless, Lafond and Marchand [41] showed the problem becomes tractable for the combined parameter , yielding an algorithm with a running time of . They asked whether a subexponential-time algorithm exists for this parameterization, a question we resolve negatively:
Theorem 3.
Labeled Contractibility does not admit an algorithm running in time even when both and have bounded degeneracy, unless the ETH fails.
This theorem rules out the possibility of a subexponential-time algorithm parameterized by under the assumption of the ETH. We also provide the following algorithm, which improves upon previous work:
Theorem 4.
Labeled Contractibility can be solved in time , where is the solution size and is the degeneracy of .
This algorithm improves upon the algorithm from [41, Section 3.3]. The previous result relied on the bound . We refine this with a tighter upper bound: . For cases where , this bound yields , where and are absolute constants. This substantially improves the previous analysis, leading to a more efficient algorithm under these conditions.
Finally, as our last contribution, we analyze a brute-force algorithm for Labeled Contractibility and establish its optimality under the ETH. Notably, our analysis also applies to the more general Maximum Common Labeled Contraction problem.
Theorem 5.
Labeled Contractibility
-
admits an algorithm running in time ; but
-
does not admit an algorithm running in time , unless the ETH fails.
Organization.
We adopt standard notation from graph theory and parameterized complexity, as outlined in Section 2. In Section 3, we present a dynamic programming algorithm based on tree decompositions and establish a matching lower bound. Specifically, we provide a parameter-preserving reduction from the Sub-Cubic Partitioned Vertex Cover problem [3], which proves Theorem 1. Section 4 proves Theorem 2 by a reduction from Positive-Not-All-Equal-SAT, showing -hardness even for graphs of bounded maximum degree. Section 5 is dedicated to a conditional lower bound under the ETH. Using a reduction from 1-in-3-SAT, we prove this result even when both input graphs have bounded degeneracy. We also present an improved algorithm for the combined parameter . These results together establish Theorems 3 and 4. Section 6 analyzes a brute-force algorithm and establishes its optimality under the ETH. This is achieved via a reduction from the Cross Matching problem [28] and establishes Theorem 5.
For more comprehensive details, including the full proofs and additional technical arguments, we refer the reader to the longer version of this paper.
2 Preliminaries
Throughout this work, we consider uniquely labeled graphs. Following the convention in [41], we refer to vertices directly by their labels rather than using explicit labeling functions. Two labeled graphs and are considered equal, denoted , if and only if and . This is distinct from the standard notion of graph isomorphism, where a bijection exists such that if and only if . In our setting, we assume that the labels of are a subset of those of .
Definition 6.
Let be a labeled graph and . The labeled contraction of the edge is an operation that transforms by:
-
For every vertex , adding the edge to .
-
Removing the vertex and all incident edges.
The resulting graph is denoted by .
Note that in general, , as the vertex that is retained after the contraction (and thus the label) is different. The two resulting graphs are, however, isomorphic under the standard unlabeled notion. For simplicity, in the remainder of this paper, we assume all contractions are labeled and refer to them simply as contractions.
A labeled contraction sequence on a graph is a sequence of vertex pairs such that for each , if is the graph obtained after the first contractions (with ), then and . The graph obtained after the full sequence is denoted by . If is not a valid contraction sequence on , then is undefined. We say that a graph is a labeled contraction of if there exists a contraction sequence such that . A graph is a common labeled contraction of graphs and if it is a labeled contraction of both. A maximum common labeled contraction of and is a common labeled contraction with the largest possible number of vertices.
Consider two graphs and such that .
Definition 7.
A witness structure of into is a partition of into non-empty sets satisfying:
-
For each , the induced subgraph is connected.
-
Each contains exactly one vertex from , called its representative vertex.
-
For any distinct , the edge if and only if the sets in containing and are adjacent in .
There is a natural bijection between the sets in and the vertices of via their representatives. It is known that is a labeled contraction of if and only if a witness structure of into exists (see Observation 2 in [41]). Furthermore, contractions within a single witness set can be performed in any order as long as the representative vertex is preserved (Observation 3 in the same work). For any vertex , we denote by the unique set that contains .
3 Parameterized by Treewidth
In this section, we present the proof of Theorem 1 which we restate.
Theorem 1. [Restated, see original statement.]
Labeled Contractibility
-
admits an algorithm running in time ; but
-
does not admit an algorithm running in time , unless the ETH fails.
In the first subsection, we describe the algorithmic result by presenting a dynamic programming algorithm on tree decomposition. In the second subsection, we establish a matching conditional lower bound.
3.1 Algorithmic Result
In this subsection we will present a dynamic programming (DP) based algorithm for the Labeled Contraction problem when parameterized by treewidth of the input graph. For the sake of completeness, we start with the standard definitions.
Definition 8 ([19]).
A tree decomposition of a graph is a pair , where is a rooted tree and each node is associated with a set , referred to as a bag, satisfying the following conditions:
-
For every vertex , the set is nonempty and induces a connected subtree of ;
-
For every edge , there exists a node such that .
The width of a tree decomposition is . The treewidth of , denoted , is the minimum width over all valid tree decompositions of .
Definition 9 ([19]).
A nice tree-decomposition of a graph is a rooted tree-decomposition where is rooted at with , and each node of belongs to one of the following types:
-
A leaf node is a leaf of with .
-
An introduce vertex node has one child such that , for some .
-
A forget node has one child such that , where .
-
An introduce edge node has one child with , and is labeled with an edge such that . We say that the edge is introduced at ;
-
A join node has two children and such that .
Without loss of generality, we assume that a nice tree-decomposition of width tw is provided. If not, one can construct an optimum tree decomposition in time [39].
Recall that we denote as the graph with vertex set and edge set . The following lemma enables us to work with tree decompositions of instead of just , which is crucial for our formulation.
Lemma 10 ([41], Lemma 13).
If is a contraction of , then .
Henceforth, we fix a nice tree decomposition of . This choice is crucial because it ensures that for any edge , there exists some bag such that , a condition that is not guaranteed in a tree decomposition of alone. For each node , we define and to be the subgraphs of and , respectively, induced by the union of all bags in the sub-tree of rooted at .
We now introduce the key definitions for the DP-state at a node of the tree-decomposition to convey the main ideas of the algorithm. The formal proof follows.
3.1.1 Witness Structures and Functional Representation
Assume that is a contraction of , and let denote a witness structure for this contraction. We represent functionally using a pair of auxiliary functions: a parent function and an originator function.
Definition 11 (Parent function).
Given a witness structure , a function is a parent function with respect to if there exists a collection of rooted trees , where each is a spanning tree of rooted at the unique vertex of , such that:
-
1.
For all , is the parent of in ; and
-
2.
For the unique vertex , .
Definition 12 (Originator function).
Given a witness structure , a function is an originator function with respect to if for every , is the unique vertex in .
Note that any valid originator function defines a partition of into the witness sets . Also, for any vertex , there exists a bag that contains both and , but not necessarily .
A pair is said to be consistent if for every , i.e. and its parent belong to the same witness set. In the remainder of the discussion, we assume all parent-originator pairs to be consistent unless stated otherwise. Although can be derived from by following parent pointers up to a vertex in , we maintain both functions explicitly for algorithmic clarity.
Definition 13 (Witness impression).
Every witness structure corresponds to pair , called its witness-impression, where is a parent function and is the corresponding originator function.
Definition 14 (Seed impression).
Let be an impression of a witness structure. A pair of partial functions , with and , is a seed impression of at if:
-
For every vertex , and .
-
For a vertex , if then otherwise . The function is derived from by following parent pointers up to either a vertex in or .
Note that is not merely the restriction of to , since a vertex such that might satisfy , but we still assign . Note that in Figure 1, but since we assign .
We now classify each vertex in the bag into one of three types, according to the seed impression :
Definition 15 (Types of vertices).
Let be a node with bag , and let be a seed impression at . Then each vertex is assigned one of the following types:
-
Requester: and (i.e., both are defined); is ready to request adjacency requirements in .
-
Dependent: but ; has been contracted into its parent and depends on the parent node’s decision regarding the partition.
-
Explorer: (implying ); is still exploring who its parent will be.
We classify the pair of requester vertices into the following three parts.
Definition 16 (Requester pair classification).
Let be requester vertices with , . We say the pair is
-
invalid (inv) if but are adjacent in ,
-
unsatisfied (unsat) if and are not adjacent in , and
-
satisfied (sat), otherwise.
For a vertex , we define the set of descendants of with respect to a function as follows:
where , and for , . That is, consists of all vertices for which repeated applications of eventually reach , including itself.
Definition 17 (Pseudo-adjacency).
Let be two vertices in . Then, we say and are pseudo-adjacent if sets and are adjacent in .
3.1.2 Signatures and Dynamic Programming States
Suppose the graph admits an -witness structure , and let be the corresponding witness-impression as specified in Definition 13. Let be a tree decomposition of the graph , and let be a node of .
Definition 18 (Partial Solution).
We define a partial solution at node as a tuple with the following components:
We now refer to Figure 1 to provide intuition for the above definitions. The figure shows the graph together with a part of the tree decomposition of (we do not explicitly draw ). The rounded outlines indicate the witness structure for the contraction, whenever it exists: each group contains exactly one node of , representing the collection of vertices that contract to it. Note that , , and . Since the edge is an edge we processed earlier in the DP, we may store for . On the other hand, because the edge has not yet been introduced, the edge does not appear in the current structure, so we have . Furthermore, observe that and belong to , whereas . In this way, all relevant sets are defined for the dynamic programming.
We now provide a formal definition for the same.
Note that, as it is standard in the case of dynamic programming on tree decomposition, we will not compute all the partial solution at node but rather just store unique signatures of all the partial solutions at . The signature of a partial solution is .
States of the Dynamic Programming Algorithms
Definition 19 (Signature).
A state of dynamic programming table will be a tuple such that
-
(which will emulate a parent function),
-
(which will emulate an originator function),
-
is a set of labeled pairs representing a label assigned to the pair , as per Definition 16, and
-
is the collection of pair of vertices in that are pseudo-adjacent with each other.
The condition on functions ensures that at present and are valid candidate to be a parent function and an originator function.
For a node in tree decomposition , we construct a dynamic-programming algorithm that sets the value to True if and only if is a signature of some partial solution at node . Otherwise, we set it to False. Initially, all entries are set to False. For any signature , if contains an entry of the type then is set to False and it will never be changed.
We remark that the technical challenge in designing the dynamic programming algorithm was to find an appropriate, concise expression for the partial solution, which was discussed above. At any node of the tree decomposition, the number of distinct signatures that can be stored is bounded by , where tw denotes the width of the decomposition. This bound arises from the fact that the signature must encode information pertaining to all pairs of vertices in the bag . The specific process to update the dynamic programming table is a standard exhaustive enumeration over compatible signatures at the child node(s) and applying the corresponding update rule. For full details on the update rules and their proof of correctness, we refer the reader to the longer version of this paper. The time required to process each node is polynomial in the number of signatures. Consequently, the overall running time of the algorithm is bounded by . This concludes the proof of the algorithmic result mentioned in Theorem 1.
3.2 Conditional Lower Bound
In this section, we demonstrate that unless (ETH) fails, Labeled Contraction does not admit an algorithm running in time , where tw is the treewidth of the input graph . To obtain the lower bound, we reduce from a special case of Vertex Cover on sub-cubic graphs, defined in [3] as follows:
| Sub-Cubic Partitioned Vertex Cover (Sub-Cubic PVC) |
Input: A sub-cubic graph ; an integer ; for , an integer ; a partition of such that and for all , is an independent set and . Furthermore, for , , .
Question: Does have a vertex cover such that for all , ?
Proposition 20 (Theorem 3.9 in [3]).
Sub-Cubic PVC does not admit an algorithm running in time , unless the ETH fails.
We now prove the lower bound in Theorem 1.
Let be an instance of the Sub-Cubic PVC problem, where . We construct an instance of the Labeled Contraction problem as follows.
Construction of .
We begin by setting , i.e., all vertices of are copied into (without copying any edges). For each partition , we introduce a set consisting of new vertices in , where each vertex corresponds uniquely to a subset of size exactly . For each such vertex , we add edges between and every vertex in the subset . Additionally, for every , we introduce three auxiliary vertices in . Each of these vertices is connected to every vertex in . Moreover, we add edges and . Each vertex is connected to the corresponding vertex .
We now encode the edges in . Consider a pair and an edge with and . By the problem definition, such an edge exists. We add edges and to .
Finally, the set is made into a clique by adding all possible edges between them, and for every , we add the edge in .
Construction of .
We start constructing from by deleting all vertices in in it. Formally, , that is, it includes all newly introduced vertices from the sets and the auxiliary vertices for each , but does not include any vertex from the original graph . The edge set of is defined as follows. First, a clique is formed on the vertex set , adding all edges between these vertices. Additionally, for every , we include the edges and . Finally, for every and each vertex , we add the edge .
This concludes the construction. We refer the reader to Figure 2 for an illustration of the reduction. We now prove the correctness of the reduction.
Suppose we are given a solution to the Sub-Cubic PVC instance, that is, a vertex cover such that for every , it holds that . We now describe a contraction sequence on that yields . For each partition , we proceed as follows: For every vertex , we contract the edge . For every vertex , we contract the edge .
Observe that since is a vertex cover of , for each pair , there exists exactly one edge in between and , say , with and . The contractions described above will result in being contracted to or , and to or . Since or , at least one of the endpoints is contracted to an -vertex, ensuring that each pair becomes adjacent in the resulting graph, thereby forming a clique on the set .
Furthermore, for each , since ,
it follows that no subset of of size
is entirely mapped to .
Therefore, for every vertex , which
corresponds to a subset of of size ,
at least one vertex in that subset is contracted to .
Consequently, the edge appears in the
resulting graph, as required by .
The edges and are preserved directly from the original construction.
Thus, the contraction process yields graph , completing
the forward direction of the reduction.
Suppose we are given a solution to the
Labeled Contraction instance, i.e., a sequence of
edge contractions that transforms into .
We construct a corresponding solution
to the original Sub-Cubic PVC instance as follows.
Recall that the vertex set of is precisely , which implies that every contracted edge in the solution involves a vertex from , more precisely vertices in for each . Furthermore, observe that for each , the vertices and those in do not share edges with each other or with vertices in outside of neither in nor in . In particular, the absence of edges of the form for any , and the absence of edges or for , implies that vertices in can only be either contracted to or .
Now, for each vertex , we note that is adjacent to in . In the construction of , the vertex was made adjacent to a subset of size . In order for to remain adjacent to in , it is necessary that at least one vertex in is contracted to . Thus, no subset of of size can be entirely contracted to . This ensures that at most vertices from are contracted to . Based on this observation, we define the vertex set by including, for each , all vertices in that are contracted to . From the argument above, we have for all .
It remains to show that is a vertex cover of . Observe that in the construction of , for each pair , , such that with , , we added edges and to . Since and are adjacent in , and since no edge directly connects and in , at least one of the vertices or must be contracted to or , respectively. This implies that either or , and hence intersects every edge in . Therefore, is a valid vertex cover of . This completes the proof of correctness for the reduction.
To upper bound the treewidth of the graph , define the set . Observe that the graph consists of vertex-disjoint subgraphs, each corresponding to a complete bipartite graph between and . For each , the set is of size . This implies that the treewidth of each is . Therefore, treewidth of is at most .
Now suppose, for the sake of contradiction, that there exists an algorithm that solves Labeled Contraction in time . We use as a subroutine to construct an algorithm for solving Sub-Cubic PVC. On input an instance of Sub-Cubic PVC with , algorithm performs the following steps: It constructs the corresponding instance of Labeled Contraction as described in the reduction. This step takes time . Then, it invoke algorithm on the instance and return the result produced by .
4 NP-hardness When Maximum Degree is Bounded
In this section, we establish the -hardness of the Labeled Contractibility problem, even when both the input graphs and have constant maximum degree. Specifically, we present a polynomial-time reduction from a variation of Positive-Not-All--SAT problem to the Labeled Contractibility problem, thereby proving Theorem 2. We begin by formally defining the source problem, which is proved to be -complete in [22].
| Positive-Not-All--SAT |
Input: A -CNF Boolean formula in which every literal in each clause is positive and every variable appears in at most clauses.
Question: Does there exist a truth assignment to the variables such that every clause is satisfied and, in each clause, not all three literals are assigned True?
Let denote the set of variables, and let denote the set of clauses in the formula . Without loss of generality, assume that the number of clauses satisfies for some integer ; let (note that is even).
We now describe the construction of two vertex-labeled graphs and corresponding to the given formula.
Construction of .
Graph is a simple path on vertices .
Construction of .
We begin by constructing a complete binary tree of depth rooted at vertex , and later add some edges among its vertices. Note that the number of leaves of this binary tree is . All but two leaves of this tree are labeled as , alternating between clause vertices and auxiliary vertices . We label it such that and shares a parent. Consider the remaining two leaves which share a parent. Add an edge between these two leaves, label one of them as and other leave with any other label (as it will be irrelevant to the construction). We additionally add edges for all . Now, consider the internal vertices of the constructed binary tree rooted at . Finally, along the shorted path between and , label the vertices as respectively. For every , let be the collection of vertices that are at exactly distance from . Alternately, these are all many vertices in -level of the complete binary tree. We add a path connecting these vertices. The internal structure of the tree, including its dummy vertices and edges, is constructed as illustrated in Figure 3.
A mirrored copy of this tree is constructed symmetrically, rooted at vertex , with the corresponding leaf labels , such that each primed vertex is associated with its unprimed counterpart. Additionally, we add the labels along the shortest path from to . Furthermore, we add an edge for each , and an edge , thereby connecting the two binary trees via the central edge of the path. Finally, we add the edges and .
Variable Gadgets.
For each variable with , introduce a new vertex . For each clause in which appears, connect to the vertices .
This concludes the description of the reduction. Note that in the final graph , each vertex has degree at most .
For proof of the correctness, we refer the reader to the full version of this paper.
5 Parameterized by Solution Size Plus Degeneracy
5.1 Conditional Lower Bound
We remark that most of the previous reduction about Labeled Contraction are from the variation of 3-SAT problem called Not-All-Equal-3-SAT. In this variation, the input is a -CNF formula and the objective is to find an assignment that sets at least one but not all literals in every clause to set to True. We consider the following, different version of -SAT as starting point of our reduction and present a simple proof from 3-SAT to get desired conditional lower bound.
| -in--SAT |
Input: A Boolean formula in 3-CNF
Question: Does there exist a satisfying assignment such that exactly one literal is set to true in each clause?
Consider the following polynomial-time reduction from 3-SAT to 1-in-3-SAT where each clause in the original formula is replaced by three clauses:
where are fresh variables unique to the clause . This reduction introduces a linear blow-up in the number of variables and clauses. Combining this reduction with the (ETH) [37] and the Sparsification Lemma [38], we obtain the following:
Proposition 21.
Unless the ETH fails, -in--SAT cannot be solved in time , where and are the number of variables and clauses in the input formula, respectively.
We now reduce -in--SAT to Labeled Contraction, ensuring that the number of vertices in and is linearly bounded by the number of variables and clauses in and instance of -in--SAT.
We now proceed with the proof of Theorem 3.
Proof.
Let be an instance of -in--SAT with variable set and clause set . We construct a corresponding instance of Labeled Contraction such that is satisfiable if and only if is a labeled contraction of .
We simultaneously define the graphs and as follows (See Figure 4 for an illustration.):
-
Global vertices: Add two special vertices and to both and , connected by the edge . These represent the “true” and “false” assignments, respectively, for literals.
-
Variable gadget: For each variable , :
-
–
Add a vertex to both and , representing variable .
-
–
Add two vertices and to , corresponding to literals and , respectively.
-
–
In , connect to both and . Also connect both and to and .
-
–
In , add edges , , and retain .
-
–
-
Clause gadget: For each clause , let denote if , and if .
-
–
Add four vertices to both and .
-
–
In , connect to and .
-
–
In , connect to , , and .
-
–
For each , add edge to both and , and edge only to .
-
–
Finally, form a 6-cycle in by connecting the three ’s with the three ’s in an alternating cycle such that no two ’s nor any two ’s are adjacent.
-
–
This completes the reduction. It is easy to see that it takes polynomial time, and both graphs and have degeneracy at most .
We now show the equivalence between satisfiability of and labeled
contractibility of into .
() Suppose there exists a satisfying assignment
such that exactly
one literal is true in each clause. Define the contraction sequence
as follows:
-
For each , if , then add edges , to ; and if , then add edges , to .
This ensures the correct neighborhood for in , as it will have edges to both and .
Now consider any clause . Since exactly one literal is true under , exactly one is contracted into , and the remaining two are contracted into . The contraction of the -triangle via the 6-cycle then ensures:
-
The edge is introduced by the literal assigned true;
-
The edge is introduced by the literals assigned false;
-
All three edges are created.
Hence, the resulting graph after the contraction is precisely .
() Conversely, suppose is a labeled contraction of . We argue that this implies a satisfying assignment for .
The only way to create both edges and in is by contracting and into and , respectively, or vice versa. This naturally defines a valid assignment:
Next, observe that to produce all three edges , at least two of the literals in clause must contract to , while one contracts to . Thus, in each clause, exactly one literal must be set to true under . Therefore, satisfies as a 1-in-3-SAT assignment.
Each vertex in the variable and clause gadgets has degree at most 3 in and at most 2 in , so the degeneracy of both graphs is bounded by a constant. The size of is linear in , and the construction can be completed in polynomial time. Hence, if Labeled Contraction can be solved in time , then 1-in-3-SAT can be solved in time , which contradicts ETH according to Proposition 21. This completes the proof of Theorem 3.
5.2 Algorithmic Result
We first present proof of Theorem 4 establishing an alternate algorithm and later mention its consequences. Recall that the theorem states that the Labeled Contraction problem admits an algorithm with running time , where .
Let be an instance of the Labeled Contraction problem. With sanity check, we can assume that .
The goal is to decide whether there exists a valid witness structure such that contracting each into the vertex yields the graph .
Let denote the number of vertices in that are not in , and hence must be contracted. Each such vertex must be assigned to exactly one vertex , corresponding to the witness set into which will be contracted.
Define a mapping as follows: For each , set ; For each , denotes the vertex in to which is assigned (i.e., the representative vertex of the witness set containing ). A mapping defines a candidate witness structure, and we wish to determine whether it corresponds to a valid contraction of into .
To bound the number of candidate functions , we exploit structural properties of the graph . Let denote the degeneracy of . By definition, admits an ordering such that each vertex has at most neighbors among its predecessors. This implies that is -colorable, and such a coloring can be computed in polynomial time.
Fix a proper coloring . For each vertex , let . If two vertices belong to the same color class (i.e., ) and , then assigning to either or would result in the edge being introduced during the contraction process – contradicting the assumption that is the target graph. Therefore, for each , there are at most valid choices for . These choices corresponds at most one vertex in each color class. Thus, the total number of candidate assignments is bounded by . For each such assignment, we can verify in polynomial time whether the induced contraction yields , by simulating the contraction and checking edge and label consistency. This yields an algorithm with running time . This completes the proof for Theorem 4
6 Brute-force Algorithm and its Optimality
We now prove Theorem 5. We establish a conditional lower bound showing that the brute-force algorithm described in the full version is essentially optimal, unless the Exponential Time Hypothesis (ETH) fails. For the full details of the brute-force algorithm and its exact running time analysis, we refer the reader to the longer version of this paper. We present the conditional lower bound proof here.
Our lower bound is derived via a polynomial-time reduction from the following problem, introduced by Fomin et al. [28], which has served as a hardness source for several contraction-based graph problems.
| Cross Matching |
Input: A graph together with a partition of such that .
Question: Does there exist a perfect matching such that each edge in connects one vertex from and one from , and the graph is a clique?
Proposition 22 (Lemma 4.1 in [28]).
Unless the ETH fails, Cross Matching cannot be solved in time , where .
We now present a polynomial-time reduction from Cross Matching to Labeled Contractibility, preserving the ETH-based lower bound under size-preserving transformation.
Lemma 23.
Unless the ETH fails, the Labelled Contractibility problem does not admit an algorithm running in time .
Proof.
Let be an instance of Cross Matching with . We construct an equivalent instance of Labeled Contractibility as follows.
The graph is obtained from by introducing two new vertices and , and adding edges between each of these new vertices and all vertices in . Formally, , and . The target graph is defined on vertex set , with the following edge set: all pairs are adjacent (i.e., induces a clique); and both and are adjacent to every vertex in . We remark that vertices and are not adjacent. Equivalently, is a complete graph on minus the edge . See Figure 5 for an illustration.
We prove that is a Yes-instance of Cross Matching if and only if is a Yes-instance of Labeled Contractibility.
() Suppose is a Yes-instance of Cross Matching. Then there exists a perfect matching between and such that the contracted graph is a clique.
We construct a labeled contraction sequence on by contracting each edge , with and , in arbitrary order. Since is a matching, all contracted edges are vertex-disjoint. After performing all contractions in , each vertex is removed, and the vertex set of becomes .
In , the subgraph induced by is a clique, since is a clique and the contractions only merged into . Furthermore, since and were connected to every , and each was contracted into some , the contraction introduces edges from both and to every . However, since and are not adjacent to each other in the original graph , and no contraction involved either of them, the edge is not introduced. Thus, the resulting graph is .
() Suppose is a Yes-instance of Labelled Contractibility, i.e., there exists a sequence of labeled contractions such that .
By construction, and . Therefore, all vertices in must be removed during the contraction sequence. In the labeled contraction model, a vertex is removed only when it is the second vertex in a contracted pair. Hence, each must appear as the second vertex in some contraction .
We now argue that each must be contracted into a distinct vertex . Suppose, for contradiction, that some does not serve as the representative of any contracted pair. Consider the edge in . Since and were not adjacent in , this edge must have been created through a contraction involving a common neighbor . The only way to generate such an edge is to contract into , i.e., perform . However, is also adjacent to in , and contracting into would create an edge , a contradiction, since . Therefore, for each , there must be a distinct such that . Since , this yields a perfect matching between and .
Finally, we argue that is a clique. Since , and the subgraph induced by in is a clique, the same must hold in (as contractions outside do not affect this subgraph). Thus, is a Yes-instance of Cross Matching.
The construction of from takes polynomial time. The sizes satisfy and , both in . Therefore, if Labeled Contractibility admitted an algorithm running in time , then Cross Matching could be solved in time , contradicting the ETH according to Proposition 22. This concludes the proof of the lemma.
References
- [1] Akanksha Agarwal, Saket Saurabh, and Prafullkumar Tale. On the parameterized complexity of contraction to generalization of trees. Theory of Computing Systems, 63(3):587–614, 2019. doi:10.1007/s00224-018-9892-z.
- [2] Akanksha Agrawal, Lawqueen Kanesh, Saket Saurabh, and Prafullkumar Tale. Paths to trees and cacti. Theoretical Computer Science, 860:98–116, 2021. doi:10.1016/j.tcs.2021.01.033.
- [3] Akanksha Agrawal, Daniel Lokshtanov, Saket Saurabh, and Meirav Zehavi. Split contraction: The untold story. ACM Transactions on Computation Theory, 11(3):1–22, 2019. doi:10.1145/3319909.
- [4] Takao Asano and Tomio Hirata. Edge-contraction problems. J. Comput. Syst. Sci., 26(2):197–208, 1983. doi:10.1016/0022-0000(83)90012-0.
- [5] Rémy Belmonte, Petr A. Golovach, Pim Hof, and Daniël Paulusma. Parameterized complexity of three edge contraction problems with degree constraints. Acta Informatica, 51(7):473–497, 2014. doi:10.1007/S00236-014-0204-Z.
- [6] Benjamin Bergougnoux, Tuukka Korhonen, and Jesper Nederlof. Tight lower bounds for problems parameterized by rank-width. arXiv preprint, 2210(02117), 2022. doi:10.48550/arXiv.2210.02117.
- [7] Ivan Bliznets, Fedor V. Fomin, Marcin Pilipczuk, and Michal Pilipczuk. A subexponential parameterized algorithm for proper interval completion. SIAM J. Discret. Math., 29(4):1961–1987, 2015. doi:10.1137/140988565.
- [8] Ivan Bliznets, Fedor V. Fomin, Marcin Pilipczuk, and Michal Pilipczuk. Subexponential parameterized algorithm for interval completion. ACM Trans. Algorithms, 14(3):35:1–35:62, 2018. doi:10.1145/3186896.
- [9] Andries E. Brouwer and Henk Jan Veldman. Contractibility and np-completeness. J. Graph Theory, 11(1):71–79, 1987. doi:10.1002/jgt.3190110111.
- [10] Leizhen Cai and Chengwei Guo. Contracting few edges to remove forbidden induced subgraphs. In Proc. of the 8th International Symposium on Parameterized and Exact Computation (IPEC), volume 8246 of LNCS, pages 97–109, 2013. doi:10.1007/978-3-319-03898-8_10.
- [11] Yixin Cao. Linear recognition of almost interval graphs. In Proceedings of the Twenty-Seventh Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2016, pages 1096–1115. SIAM, 2016. doi:10.1137/1.9781611974331.ch77.
- [12] Yixin Cao. Unit interval editing is fixed-parameter tractable. Inf. Comput., 253:109–126, 2017. doi:10.1016/j.ic.2017.01.008.
- [13] Yixin Cao and Dániel Marx. Interval deletion is fixed-parameter tractable. ACM Trans. Algorithms, 11(3):21:1–21:35, 2015. doi:10.1145/2629595.
- [14] Yixin Cao and Dániel Marx. Chordal editing is fixed-parameter tractable. Algorithmica, 75(1):118–137, 2016. doi:10.1007/s00453-015-0014-x.
- [15] Dibyayan Chakraborty, Oscar Defrain, Florent Foucaud, Mathieu Mari, and Prafullkumar Tale. Parameterized complexity of isometric path partition: treewidth and diameter. arXiv preprint, 2508(05448), 2025. doi:10.48550/arXiv.2508.05448.
- [16] Dipayan Chakraborty, Florent Foucaud, Diptapriyo Majumdar, and Prafullkumar Tale. Tight (double) exponential bounds for identification problems: Locating-dominating set and test cover. 35th International Symposium on Algorithms and Computation (ISAAC 2024), 322:19:1–19:18, 2024. doi:10.4230/LIPIcs.ISAAC.2024.19.
- [17] Christophe Crespelle, Pål Grønås Drange, Fedor V. Fomin, and Petr A. Golovach. A survey of parameterized algorithms and the complexity of edge modification. CoRR, abs/2001.06867, 2020. arXiv:2001.06867.
- [18] Christophe Crespelle, Pål Grønås Drange, Fedor V. Fomin, and Petr A. Golovach. A survey of parameterized algorithms and the complexity of edge modification, 2020. arXiv:2001.06867.
- [19] Marek Cygan, Fedor V. Fomin, Lukasz Kowalik, Daniel Lokshtanov, Dániel Marx, Marcin Pilipczuk, Michal Pilipczuk, and Saket Saurabh. Parameterized Algorithms. Springer, 2015. doi:10.1007/978-3-319-21275-3.
- [20] Marek Cygan, Dániel Marx, Marcin Pilipczuk, and Michal Pilipczuk. Hitting forbidden subgraphs in graphs of bounded treewidth. Inf. Comput., 256:62–82, 2017. doi:10.1016/J.IC.2017.04.009.
- [21] 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.
- [22] Andreas Darmann and Janosch Döcker. On a simple hard variant of not-all-equal 3-sat. Theor. Comput. Sci., 815:147–152, 2020. doi:10.1016/J.TCS.2020.02.010.
- [23] Pål Grønås Drange, Markus Fanebust Dregi, Daniel Lokshtanov, and Blair D. Sullivan. On the threshold of intractability. J. Comput. Syst. Sci., 124:1–25, 2022. doi:10.1016/j.jcss.2021.09.003.
- [24] Pål Grønås Drange, Fedor V. Fomin, Michal Pilipczuk, and Yngve Villanger. Exploring subexponential parameterized complexity of completion problems. In 31st International Symposium on Theoretical Aspects of Computer Science (STACS), volume 25 of LIPIcs, pages 288–299, 2014. doi:10.4230/LIPIcs.STACS.2014.288.
- [25] Pål Grønås Drange and Michal Pilipczuk. A polynomial kernel for trivially perfect editing. Algorithmica, 80(12):3481–3524, 2018. doi:10.1007/s00453-017-0401-6.
- [26] Jörg Flum and Martin Grohe. Parameterized Complexity Theory. Texts in Theoretical Computer Science. An EATCS Series. Springer, 2006. doi:10.1007/3-540-29953-X.
- [27] Fedor V. Fomin, Stefan Kratsch, Marcin Pilipczuk, Michal Pilipczuk, and Yngve Villanger. Tight bounds for parameterized complexity of cluster editing with a small number of clusters. J. Comput. Syst. Sci., 80(7):1430–1447, 2014. doi:10.1016/j.jcss.2014.04.015.
- [28] Fedor V. Fomin, Daniel Lokshtanov, Ivan Mihajlin, Saket Saurabh, and Meirav Zehavi. Computation of hadwiger number and related contraction problems: Tight lower bounds. ACM Trans. Comput. Theory, 13(2):10:1–10:25, 2021. doi:10.1145/3448639.
- [29] Fedor V. Fomin and Yngve Villanger. Subexponential parameterized algorithm for minimum fill-in. SIAM J. Comput., 42(6):2197–2216, 2013. doi:10.1137/11085390X.
- [30] Florent Foucaud, Esther Galby, Liana Khazaliya, Shaohua Li, Fionn Mc Inerney, Roohani Sharma, and Prafullkumar Tale. Problems in NP can admit double-exponential lower bounds when parameterized by treewidth or vertex cover. In 51st International Colloquium on Automata, Languages, and Programming, ICALP, volume 297 of LIPIcs, pages 66:1–66:19, 2024. doi:10.4230/LIPICS.ICALP.2024.66.
- [31] Florent Foucaud, Esther Galby, Liana Khazaliya, Shaohua Li, Fionn Mc Inerney, Roohani Sharma, and Prafullkumar Tale. Metric dimension and geodetic set parameterized by vertex cover. In 42nd International Symposium on Theoretical Aspects of Computer Science, STACS, volume 327 of LIPIcs, pages 33:1–33:20, 2025. doi:10.4230/LIPICS.STACS.2025.33.
- [32] Petr A. Golovach, Marcin Kaminski, Daniël Paulusma, and Dimitrios M Thilikos. Increasing the minimum degree of a graph by contractions. Theoretical Computer Science, 481:74–84, 2013. doi:10.1016/j.tcs.2013.02.030.
- [33] Petr A. Golovach, Pim van’t Hof, and Daniël Paulusma. Obtaining planarity by contracting few edges. Theoretical Computer Science, 476:38–46, 2013. doi:10.1016/j.tcs.2012.12.041.
- [34] Sylvain Guillemot and Dániel Marx. A faster FPT algorithm for Bipartite Contraction. Information Processing Letters, 113(22):906–912, 2013. doi:10.1016/j.ipl.2013.09.004.
- [35] Pinar Heggernes, Pim van ’t Hof, Benjamin Lévêque, Daniel Lokshtanov, and Christophe Paul. Contracting graphs to paths and trees. Algorithmica, 68(1):109–132, 2014. doi:10.1007/s00453-012-9670-2.
- [36] Pinar Heggernes, Pim van ’t Hof, Daniel Lokshtanov, and Christophe Paul. Obtaining a bipartite graph by contracting few edges. SIAM Journal on Discrete Mathematics, 27(4):2143–2156, 2013. doi:10.1137/130907392.
- [37] Russell Impagliazzo and Ramamohan Paturi. On the complexity of k-sat. J. Comput. Syst. Sci., 62(2):367–375, 2001. doi:10.1006/JCSS.2000.1727.
- [38] Russell Impagliazzo, Ramamohan Paturi, and Francis Zane. Which problems have strongly exponential complexity? J. Comput. Syst. Sci., 63(4):512–530, 2001. doi:10.1006/JCSS.2001.1774.
- [39] Tuukka Korhonen and Daniel Lokshtanov. An improved parameterized algorithm for treewidth. SIAM Journal on Computing, 0(0):STOC23–155–STOC23–214, 2023. doi:10.1137/23M1595059.
- [40] R. Krithika, Pranabendu Misra, and Prafullkumar Tale. A single exponential-time FPT algorithm for cactus contraction. Theor. Comput. Sci., 954:113803, 2023. doi:10.1016/J.TCS.2023.113803.
- [41] Manuel Lafond and Bertrand Marchand. The parameterized landscape of labeled graph contractions. In (To appear) in Algorithms and Data Structures Symposium WADS 2025, volume abs/2502.16096, 2025. doi:10.48550/arXiv.2502.16096.
- [42] John M. Lewis and Mihalis Yannakakis. The node-deletion problem for hereditary properties is np-complete. J. Comput. Syst. Sci., 20(2):219–230, 1980. doi:10.1016/0022-0000(80)90060-4.
- [43] Daniel Lokshtanov, Dániel Marx, and Saket Saurabh. Slightly superexponential parameterized problems. SIAM J. Comput., 47(3):675–702, 2018. doi:10.1137/16M1104834.
- [44] Daniel Lokshtanov, Neeldhara Misra, and Saket Saurabh. On the hardness of eliminating small induced subgraphs by contracting edges. In Proc. of the 8th International Symposium on Parameterized and Exact Computation (IPEC), volume 8246 of LNCS, pages 243–254, 2013. doi:10.1007/978-3-319-03898-8_21.
- [45] Bertrand Marchand, Nadia Tahiri, Olivier Tremblay Savard, and Manuel Lafond. Finding maximum common contractions between phylogenetic networks. In Solon P. Pissis and Wing-Kin Sung, editors, 24th International Workshop on Algorithms in Bioinformatics, WABI, volume 312 of LIPIcs, pages 16:1–16:24, 2024. doi:10.4230/LIPICS.WABI.2024.16.
- [46] Bertrand Marchand, Nadia Tahiri, Olivier Tremblay-Savard, and Manuel Lafond. Finding Maximum Common Contractions Between Phylogenetic Networks. In WABI, pages 16:1–16:24, 2024. doi:10.4230/LIPIcs.WABI.2024.16.
- [47] Barnaby Martin and Daniël Paulusma. The computational complexity of disconnected cut and -partition. Journal of Combinatorial Theory, Series B, 111:17–37, 2015. doi:10.1016/j.jctb.2014.09.002.
- [48] Michal Pilipczuk. Problems parameterized by treewidth tractable in single exponential time: A logical approach. In Mathematical Foundations of Computer Science 2011 - 36th International Symposium, MFCS, volume 6907 of Lecture Notes in Computer Science, pages 520–531. Springer, 2011. doi:10.1007/978-3-642-22993-0_47.
- [49] Ignasi Sau and Uéverton dos Santos Souza. Hitting forbidden induced subgraphs on bounded treewidth graphs. Inf. Comput., 281:104812, 2021. doi:10.1016/J.IC.2021.104812.
- [50] Saket Saurabh and Prafullkumar Tale. On the parameterized complexity of maximum degree contraction problem. arXiv preprint arXiv:2009.11793, 2020.
- [51] Saket Saurabh and Prafullkumar Tale. On the parameterized complexity of maximum degree contraction problem. In Proc. of the 15th International Symposium on Parameterized and Exact Computation (IPEC), volume 180 of LIPIcs, pages 26:1–26:16, 2020. doi:10.4230/LIPIcs.IPEC.2020.26.
- [52] Prafullkumar Tale. Double exponential lower bound for telephone broadcast, 2024. doi:10.48550/arXiv.2403.03501.
- [53] Toshimasa Watanabe, Tadashi Ae, and Akira Nakamura. On the removal of forbidden graphs by edge-deletion or by edge-contraction. Discret. Appl. Math., 3(2):151–153, 1981. doi:10.1016/0166-218X(81)90039-1.
- [54] Mihalis Yannakakis. Node- and Edge-Deletion NP-Complete Problems. In Proc. of the 10th Annual ACM Symposium on Theory of Computing (STOC), pages 253–264, 1978. doi:10.1145/800133.804355.
