Degrees and Gaps: Tight Complexity Results of General Factor Problems Parameterized by Treewidth and Cutwidth

Dániel Marx, Govind S. Sankar, Philipp Schepper · DOI

Abstract

For the General Factor problem we are given an undirected graph $G$ and for each vertex $v\in V(G)$ a finite set $B_v$ of non-negative integers. The task is to decide if there is a subset $S\subseteq E(G)$ such that $deg_S(v)\in B_v$ for all vertices $v$ of $G$. The maxgap of a finite integer set $B$ is the largest $d\ge 0$ such that there is an $a\ge 0$ with $[a,a+d+1]\cap B=\{a,a+d+1\}$. Cornu'ejols (1988) showed that if the maxgap of all sets $B_v$ is at most 1, then the decision version of General Factor is poly-time solvable. Dudycz and Paluch (2018) extended this result for the minimization and maximization versions. Using convolution techniques from van Rooij (2020), we improve upon previous algorithms and present an algorithm counting the number of solutions of a certain size in time $O^*((M+1)^k)$, given a tree decomposition of width $k$, where $M=\max_v \max B_v$. We prove that this algorithm is essentially optimal for all cases that are not polynomial time solvable. Assuming the Strong Exponential Time Hypothesis (SETH), no algorithm can solve $B$-Factor in time $O^*((\max B+1-\epsilon)^k)$ for any $\epsilon>0$. We also investigate the parameterization by cutwidth, providing a $O^*(2^k)$ algorithm and a matching lower bound.

Introduction

The General Factor problem is a massive generalization of classic graph matching problems. It asks whether an edge subset exists such that every vertex's degree falls within a specified set of allowed integers $B_v$. This framework captures many fundamental problems: if $B_v = \{1\}$, it is Perfect Matching; if $B_v = \{1, 2, \dots, \Delta(G)\}$, it is Edge Cover.

While the problem is easy when the "gap" between allowed degrees is small ($\le 1$), it becomes NP-hard when the gap is 2 or more (e.g., $B = \{1, 3\}$). This paper explores the exact complexity of these hard cases when the graph structure is constrained by structural parameters like treewidth and cutwidth.

Algorithmic Advances

The authors provide two primary algorithmic contributions that push the boundaries of current graph theory techniques:

  1. Treewidth ($tw$): Previous algorithms for General Factor on graphs of treewidth $k$ ran in $O^*((M+1)^{3k})$ time. By applying fast convolution techniques (specifically from van Rooij, 2020) to standard dynamic programming, the authors reduced the base of the exponent to $(M+1)$. Their new algorithm runs in $O^*((M+1)^k)$ time and is capable of counting the number of solutions of a specific size.
  2. Cutwidth ($cutw$): For graphs with a linear layout of width $k$, they designed a dynamic program that runs in $O^*(2^k)$ time. Surprisingly, this bound is independent of the values in $B_v$, meaning the problem does not get harder as the allowed degrees increase, provided the cutwidth remains small.

Complexity Lower Bounds

To prove that these algorithms are optimal, the authors used reductions from the Satisfiability (SAT) problem. They constructed complex "gadgets" called realizations to show that any significant improvement in the running time would violate the Strong Exponential Time Hypothesis (SETH)—a standard assumption in complexity theory.

A chain of realizations $R_0, R_1, \dots, R_m$ used in the reduction to prove lower bounds under SETH.

The lower bounds establish that:

  • For treewidth, no algorithm can solve the $B$-Factor problem in $O^*((\max B+1-\epsilon)^k)$ for any $\epsilon > 0$.
  • For cutwidth, no algorithm can run in $O^*((2-\epsilon)^k)$ for any $\epsilon > 0$.

Key Insights and Ideas

The Power of the Gap

The complexity of General Factor is fundamentally tied to the "max-gap" of the sets $B_v$. If the gap is small, the problem is tractable. Once the gap reaches 2, the complexity jumps to the limits discovered in this paper. This "gap" property is the primary driver of NP-hardness in this problem class.

Treewidth vs. Cutwidth Divergence

A major finding is the difference in how these two parameters scale. Under treewidth, the complexity depends heavily on the values in the set $B$ (the base is $M+1$). Under cutwidth, the complexity is $2^k$ regardless of how large the integers in $B$ are. This suggests that cutwidth is a much more powerful constraint for this specific problem class, as it limits the interaction between vertices more strictly than treewidth.

Convolution as a Speedup

The jump from $(M+1)^{3k}$ to $(M+1)^k$ demonstrates that sophisticated algebraic techniques like fast subset convolution are essential for reaching the "tight" optimal bounds for fundamental graph problems. This improvement shows that algebraic speedups are not merely theoretical but define the optimal efficiency for these problems.

Conclusion

This paper provides the definitive complexity landscape for the General Factor problem under treewidth and cutwidth. By establishing matching upper and lower bounds, the authors show that their algorithms are mathematically optimal under SETH. Future work may explore the complexity under other parameters like cliquewidth or investigate the counting version for minimization problems.

Summary updated

BibTeX
@inproceedings{marx2021degrees,
  author = {Dániel Marx and Govind S. Sankar and Philipp Schepper},
  title = {{Degrees and Gaps: Tight Complexity Results of General Factor Problems Parameterized by Treewidth and Cutwidth}},
  booktitle = {ICALP},
  year = {2021},
  url = {https://openreview.net/forum?id=9IbB0JOv9J},
}
Figure