arXiv++ Combinatorics

Browse math.CO papers from arXiv

polynomial time

1250 papers tagged with this keyword
Some polynomial classes for the acyclic orientation with parity constraint problem
We study the problem of finding an acyclic orientation of an undirected graph with constrained in-degree parities specified by a subset T of vertices. An orientation is called T -odd if a vertex v has odd in-degree if and only if v P T . While the unconstrained parity orientation problem is polynomial (Chevalier et al. (1983)), imposing acyclicity makes it more challenging, and its complexity remains an open question. Szegedy and Szegedy ( 2006) proposed a randomized polynomial-time algorithm for this problem, but it is not known whether it belongs to co-NP. Furthermore, Gravier et al. (2025) showed the problem becomes NP-complete on partially directed graphs, even when restricted to planar cubic graphs. We identify three necessary conditions for the existence of acyclic T -odd orientation: a global parity condition P, and two conditions S and S ensuring the existence of potential sources and sinks. Following the work of Frank and Kiraly (2002), we define graph classes containing the graphs for which a given subset of the necessary conditions P, S and S is also sufficient for the existence of an acyclic T -odd orientation. We establish the inclusion relationships between these classes. We complete the study of these classes by a characterization of the solvable instances for Cartesian products of paths and cycles. The proofs of these results are all constructive, so that acyclic T -odd orientations can be built in polynomial time whenever they exist. We use these families, along with cliques, to demonstrate the strictness of the class inclusions in our hierarchy.
A Class of Unrooted Phylogenetic Networks Inspired by the Properties of Rooted Tree-Child Networks
A directed phylogenetic network is tree-child if every non-leaf vertex has a child that is not a reticulation. As a class of directed phylogenetic networks, tree-child networks are very useful from a computational perspective. For example, several computationally difficult problems in phylogenetics become tractable when restricted to tree-child networks. At the same time, the class itself is rich enough to contain quite complex networks. Furthermore, checking whether a directed network is tree-child can be done in polynomial time. In this paper, we seek a class of undirected phylogenetic networks that is rich and computationally useful in a similar way to the class tree-child directed networks. A natural class to consider for this role is the class of tree-child-orientable networks which contains all those undirected phylogenetic networks whose edges can be oriented to create a tree-child network. However, we show here that recognizing such networks is NP-hard, even for binary networks, and as such this class is inappropriate for this role. Towards finding a class of undirected networks that fills a similar role to directed tree-child networks, we propose new classes called $q$-cuttable networks, for any integer $q\geq 1$. We show that these classes have many of the desirable properties, similar to tree-child networks in the rooted case, including being recognizable in polynomial time, for all $q\geq 1$. Towards showing the computational usefulness of the class, we show that the NP-hard problem Tree Containment is polynomial-time solvable when restricted to $q$-cuttable networks with $q\geq 3$.
2026-03-05
Finding Short Paths on Simple Polytopes
We prove that computing a shortest monotone path to the optimum of a linear program over a simple polytope is NP-hard, thus resolving a 2022 open question of De Loera, Kafer, and Sanità. As a consequence, finding a shortest sequence of pivots to an optimal basis with the simplex method is NP-hard. In fact, we show this is NP-hard already for fractional knapsack polytopes. By applying an additional polyhedral construction, we show that computing the diameter of a simple polytope is NP-hard, resolving a 2003 open problem by Kaibel and Pfetsch. Finally, on the positive side we show that every polytope has a small, simple extended formulation for which a linear length path may be found between any pair of vertices in polynomial time building upon a result of Kaibel and Kukharenko.
Cosigning Crossing Families and Outer-Planar Gadgets
Let $F$ be a crossing family over ground set $V$, that is, for any two sets $U,W\in{F}$ with nonempty intersection and proper union, both sets $U\cap{W},U\cup{W}$ are in $F$. Let $σ:V\to \{+,-\}$ be a signing. We call $σ$ a "cosigning" if every set includes a positive element and excludes a negative element. It is "$\cap\cup$-closed" if every pairwise nonempty intersection and co-intersection include positive and negative elements, respectively. We characterize the existence of ($\cap\cup$-closed) cosignings $σ$ through necessary and sufficient conditions. Our proofs are algorithmic and lead to elegant `forcing' algorithms for finding $σ$, reminiscent of the Cameron-Edmonds algorithm for bicoloring balanced hypergraphs. We prove that the algorithms run in polynomial time, and further, the cosigning algorithm can be run in oracle polynomial time through an application of submodular function minimization. Cosigned crossing families arise naturally in digraphs with vertex set $V$ comprised of sources and sinks, where every set in $F$ is "covered" by an incoming arc. Under mild and necessary conditions, we build an outer-planar arc covering of $F$ when the vertices are placed around a circle. These gadgets are then used to find disjoint dijoins in $0,1$-weighted planar digraphs when the weight-$1$ arcs form a connected component that is not necessarily spanning.
Steiner Forest for $H$-Subgraph-Free Graphs
Our main result is a full classification, for every connected graph $H$, of the computational complexity of Steiner Forest on $H$-subgraph-free graphs. To obtain this dichotomy, we establish the following new algorithmic, hardness, and combinatorial results: Algorithms: We identify two new classes of graph-theoretical structures that make it possible to solve Steiner Forest in polynomial time. Roughly speaking, our algorithms handle the following cases: (1) a set $X$ of vertices of bounded size that are pairwise connected by subgraphs of treewidth $2$ or bounded size, possibly together with an independent set of arbitrary size that is connected to $X$ in an arbitrary way; (2) a set $X$ of vertices of arbitrary size that are pairwise connected in a cyclic manner by subgraphs of treewidth $2$ or bounded size. Hardness results: We show that Steiner Forest remains NP-complete for graphs with 2-deletion set number $3$. (The $c$-deletion set number is the size of a smallest cutset $S$ such that every component of $G-S$ has at most $c$ vertices.) Combinatorial results: To establish the dichotomy, we perform a delicate graph-theoretic analysis showing that if $H$ is a path or a subdivided claw, then excluding $H$ as a subgraph either yields one of the two algorithmically favourable structures described above, or yields a graph class for which NP-completeness of Steiner Forest follows from either our new hardness result or a previously known one. Along the way to classifying the hardness for excluded subgraphs, we establish a dichotomy for graphs with $c$-deletion set number at most $k$. Specifically, our results together with pre-existing ones show that Steiner Forest is polynomial-time solvable if (1) $c=1$ and $k\geq 0$, or (2) $c=2$ and $k\leq 2$, or (3) $c\geq 3$ and $k=1$, and is NP-complete otherwise.
Characterization of Well-Totally Dominated Trees
Let $G$ be a graph with no isolated vertices. A set of vertices $S$ is a total dominating set (TDS) if every vertex in $G$ is adjacent to at least one vertex in $S$. We say $G$ is well-totally dominated (WTD) if every minimal TDS has the same size. In this paper, we present two characterizations of well-totally dominated trees, one being descriptive and the other being constructive. In particular, our characterizations imply that it takes only polynomial time to verify whether a given tree is WTD.
The Complexity of Homomorphism Reconstruction Revisited
We revisit the algorithmic problem of reconstructing a graph from homomorphism counts that has first been studied in (Böker et al., STACS 2024): given graphs $F_1,\ldots,F_k$ and counts $m_1,\ldots,m_k$, decide if there is a graph $G$ such that the number of homomorphisms from $F_i$ to $G$ is $m_i$, for all $i$. We prove that the problem is NEXP-hard if the counts $m_i$ are specified in binary and $Σ_2^p$-complete if they are in unary. Furthermore, as a positive result, we show that the unary version can be solved in polynomial time if the constraint graphs are stars of bounded size.
Optimal Path Partitions in Subcubic and Almost-subcubic Graphs
We consider the problem of partitioning the edges of a graph into as few paths as possible. This is a~subject of the classic conjecture of Gallai and a recurring topic in combinatorics. Regarding the complexity of partitioning a graph optimally, Peroché [Discret. Appl. Math., 1984] proved that it is NP-hard already on graphs of maximum degree four, even when we only ask if two paths suffice. We show that the problem is solvable in polynomial time on subcubic graphs and then we present an efficient algorithm for ``almost-subcubic'' graphs. Precisely, we prove that the problem is fixed-parameter tractable when parameterized by the edge-deletion distance to a subcubic graph. To this end, we reduce the task to model checking in first-order logic extended by disjoint-paths predicates ($\mathsf{FO}\text{+}\mathsf{DP}$) and then we employ the recent tractability result by Schirrmacher, Siebertz, Stamoulis, Thilikos, and Vigny [LICS 2024].
2026-02-10
On the complexity of Sandwich Problems for $M$-partitions
We present a structural classification of constraint satisfaction problems (CSP) described by reflexive complete $2$-edge-coloured graphs. In particular, this classification extends the structural dichotomy for graph homomorphism problems known as the Hell--Nešetřil theorem (1990). Our classification is also efficient: we can check in polynomial time whether the CSP of a reflexive complete $2$-edge-coloured graph is in P or NP-complete, whereas for arbitrary $2$-edge-coloured graphs, this task is NP-complete. We then apply our main result in the context of matrix partition problems and sandwich problems. Firstly, we obtain one of the few algorithmic solutions to general classes of matrix partition problems. And secondly, we present a P vs. NP-complete classification of sandwich problems for matrix partitions.
2026-02-07
Determining the Outerthickness of Graphs Is NP-Hard
We give a short, self-contained, and easily verifiable proof that determining the outerthickness of a general graph is NP-hard. This resolves a long-standing open problem on the computational complexity of outerthickness. Moreover, our hardness result applies to a more general covering problem $P_F$, defined as follows. Fix a proper graph class $F$ whose membership is decidable. Given an undirected simple graph $G$ and an integer $k$, the task is to cover the edge set $E(G)$ by at most $k$ subsets $E_1,\ldots,E_k$ such that each subgraph $(V(G),E_i)$ belongs to $F$. Note that if $F$ is monotone (in particular, when $F$ is the class of all outerplanar graphs), any such cover can be converted into an edge partition by deleting overlaps; hence, in this case, covering and partitioning are equivalent. Our result shows that for every proper graph class $F$ whose membership is decidable and that satisfies all of the following conditions: (a) $F$ is closed under topological minors, (b) $F$ is closed under $1$-sums, and (c) $F$ contains a cycle of length $3$, the problem $P_F$ is NP-hard for every fixed integer $k\ge 3$. In particular: For $F$ equal to the class of all outerplanar graphs, our result settles the long-standing open problem on the complexity of determining outerthickness. For $F$ equal to the class of all planar graphs, our result complements Mansfield's NP-hardness result for the thickness, which applies only to the case $k=2$. It is also worth noting that each of the three conditions above is necessary. If $F$ is the class of all eulerian graphs, then cond. (a) fails. If $F$ is the class of all pseudoforests, then cond. (b) fails. If $F$ is the class of all forests, then cond. (c) fails. For each of these three classes $F$, the problem $P_F$ is solvable in polynomial time for every fixed integer $k\ge 3$, showing that none of the three conditions can be dropped.
2026-02-05
Matrices of nonnegative integer rank two
The nonnegative integer rank of a matrix is a variant of the classical nonnegative rank, introduced in the 1980s, where factorizations are required to have integer entries. While computing nonnegative integer rank is generally very hard, we focus on a fundamental special case: determining when a rank 2 nonnegative integer matrix has nonnegative integer rank equal to 2 (the "rank2 problem"). Although this problem is trivial in the continuous case, in this context it is surprisingly rich. We provide a geometric reformulation in terms of affine semigroups and rational cones in the plane, which yields new structural insights. We show that any rank 2 integer matrix can be reduced to a $3\times 3$ matrix which has nonnegative integer rank $2$ if and only if the original one also has nonnegative integer rank $2$, with the reduction computable in polynomial time. This reduction reveals that the difficulty of the rank2 problem is already captured by small matrices. Building on this geometric framework, we also develop an algorithm that solves the rank2 problem by strategically searching for integer generators within bounded regions of the associated cone. Although the theoretical worst-case complexity remains high, numerical experiments demonstrate that the algorithm performs efficiently in practice.
2026-01-17
Greedily Constructing Small Quasi-Kernels
In a digraph $D$,a quasi-kernel is an independent set $Q$ such that for every vertex $u$, there is a vertex $v \in Q$ satisfying $\text{dist}(v,u)\leq 2$. In 1974 Chvátal and Lovász showed every digraph contains a quasi-kernel. In 1976, P. L. Erdős and Székely conjectured that every sourceless digraph has a quasi-kernel of order at most $\frac{n}{2}$. Despite significant recent attention by the community the problem remains far from solved, with no bound of the form $(1-ε)n$ known. We introduce a polynomial time algorithm which greedily constructs a small quasi-kernel. Using this algorithm we show that if $D$ is a $\vec{K}_{1,d}$-free digraph, then $D$ has a quasi-kernel of order at most $\frac{(d^2 - 2d + 2)n}{d^2-d+1}$. By refining this argument we prove that for any $D$ with maximum out-degree $3$ this algorithm constructs a quasi-kernel of order at most ${4n}/{7}$. Finally, we consider the problem in digraphs forbidding certain orientation of short cycles as subgraphs, concluding that all orientations $D$ of a graph $G$ with girth at least $7$ have a quasi-kernel of order at most $\frac{(d^2+4)n}{(d+2)^2}$, where $d$ is the maximum out-degree of $D$.
Computational Complexity of Swish
Swish is a card game in which players are given cards having symbols (hoops and balls), and find a valid superposition of cards, called a "swish." Dailly, Lafourcade, and Marcadet (FUN 2024) studied a generalized version of Swish and showed that the problem is solvable in polynomial time with one symbol per card, while it is NP-complete with three or more symbols per card. In this paper, we resolve the previously open case of two symbols per card, which corresponds to the original game. We show that Swish is NP-complete for this case. Specifically, we prove the NP-hardness when the allowed transformations of cards are restricted to a single (horizontal or vertical) flip or 180-degree rotation, and extend the results to the original setting allowing all three transformations. In contrast, when neither transformation is allowed, we present a polynomial-time algorithm. Combining known and our results, we establish a complete characterization of the computational complexity of Swish with respect to both the number of symbols per card and the allowed transformations.
2026-01-10
On the Number of Subsequences in the Nonbinary Deletion Channel
Published • View Publication • BIB
In the deletion channel, an important problem is to determine the number of subsequences derived from a string $U$ of length $n$ when subjected to $t$ deletions. It is well-known that the number of subsequences in the setting exhibits a strong dependence on the number of runs in the string $U$, where a run is defined as a maximal substring of identical characters. In this paper we study the number of subsequences of a non-binary string in this scenario, and propose some improved bounds on the number of subsequences of $r$-run non-binary strings. Specifically, we characterize a family of $r$-run non-binary strings with the maximum number of subsequences under any $t$ deletions, and show that this number can be computed in polynomial time.
2026-01-05
On computational complexity of Khovanov homology
Computing the Jones polynomial of general link diagrams is known to be $\#$P-hard, while restricting the computation to braid closures on fixed number of strands allows for a polynomial time algorithm. We investigate polynomial time algorithms for Khovanov homology of braids and show that for $3$-braids there is one. In contrast, we show that Bar-Natan's scanning algorithm runs in exponential time when restricted to simple classes of $3$-braids. For more general braids, we obtain that a variation of the scanning algorithm computes the Khovanov homology for a bounded set of homological degrees in polynomial time. We also prove upper and lower bounds on the ranks of Khovanov homology groups.
2026-01-04
From Historical Puzzles to Grammatical Constraints: Circular Partitions, Generalized Run-Length Encodings, and Polynomial-Time Decidability
Motivated by a historical combinatorial problem that resembles the well-known Josephus problem, we investigate circular partition algorithms and formulate problems in deterministic finite automata with practical algorithms. The historical problem involves arranging individuals on a circle and eliminating every k-th person until a desired group remains. We analyze both removal and non-removal approaches to circular partitioning, establishing conditions for balanced partitions and providing explicit algorithms. We introduce generalized run-length encodings over partitioned alphabets to capture alternating letter patterns, computing their cardinalities using Stirling numbers of the second kind. Connecting these combinatorial structures to formal language theory, we formulate an existence problem: given a context-free grammar over a dictionary and block-pattern constraints on letters, does a valid sentence exist? We prove decidability in polynomial time by showing block languages are regular and applying standard parsing techniques. Complete algorithms with complexity analysis are provided and validated through implementation on both historical and synthetic instances.
2025-12-31
On Circular Threshold Words and Other Stronger Versions of Dejean's conjecture
Let the root of the word $w$ be the smallest prefix $v$ of $w$ such that $w$ is a prefix of $vvv...$. $per(w)$ is the length of the root of $w$. For any $n\ge5$, an $n$-ary threshold word is a word $w$ such that for any factor (subword) $v$ of $w$ the condition $\frac{|v|}{per(v)}\le\frac{n}{n-1}$ holds. Dejean conjecture (completely proven in 2009) states for $n\ge5$ that exists infinitely many of $n$-ary TWs. This manuscript is based on the author's student works (diplomas of 2011 (bachelor's thesis) and 2013 (master's thesis) years) and presents an edited version (in Russian) of these works with some improvements. In a 2011 work proposed new methods of proving of the Dejean conjecture for some odd cases $n\ge5$, using computer verification in polynomial time (depending on $n$). Moreover, the constructed threshold words (TWs) are ciclic/ring TWs (any cyclic shift is a TW). In the 2013 work, the proof method (of 2011) was improved by reducing the verification conditions. A solution for some even cases $n\ge6$ is also proposed. A 2013 work also proposed a method to construct stronger TWs, using a TW tree with regular exponential growth. Namely, the TWs, where all long factors have an exponent close to 1.
2025-12-29
The Minimum Subgraph Complementation Problem
Subgraph complementation is an operation that toggles all adjacencies inside a selected vertex set. Given a graph \(G\) and a target class \(\mathcal{C}\), the Minimum Subgraph Complementation problem asks for a minimum-size vertex set \(S\) such that complementing the subgraph induced by \(S\) transforms \(G\) into a graph belonging to \(\mathcal{C}\). While the decision version of Subgraph Complementation has been extensively studied and is NP-complete for many graph classes, the algorithmic complexity of its optimization variant has remained largely unexplored. In this paper, we study MSC from an algorithmic perspective. We present polynomial-time algorithms for MSC in several nontrivial settings. Our results include polynomial-time solvability for transforming graphs between bipartite, co-bipartite, and split graphs, as well as for complementing bipartite regular graphs into chordal graphs. We also show that MSC to the class of graphs of fixed degeneracy can be solved in polynomial time when the input graph is a forest. Moreover, we investigate MSC with respect to connectivity and prove that MSC to the class of disconnected graphs and to the class of 2-connected graphs can be solved in polynomial time for arbitrary inputs.
2025-12-19 v2
On the Complexity of Bipartite Degree Realizability
We study the \emph{Bipartite Degree Realization} (BDR) problem: given a graphic degree sequence $D$, decide whether it admits a realization as a bipartite graph. While bipartite realizability for a fixed vertex partition can be decided in polynomial time via the Gale--Ryser theorem, the computational complexity of BDR without a prescribed partition remains unresolved. We address this question through a parameterized analysis. For constants $0 \le c_1 \le c_2 \le 1$, we define $\mathrm{BDR}_{c_1,c_2}$ as the restriction of BDR to degree sequences of length $n$ whose degrees lie in the interval $[c_1 n, c_2 n]$. Our main result shows that $\mathrm{BDR}_{c_1,c_2}$ is solvable in polynomial time whenever $0 \le c_1 \le c_2 \le \frac{\sqrt{c_1(c_1+4)}-c_1}{2}$, as well as for all $c_1 > \tfrac12$. The proof relies on a reduction to extremal \emph{least balanced degree sequences} and a detailed verification of the critical Gale--Ryser inequalities, combined with a bounded subset-sum formulation. We further show that, assuming the NP-completeness of unrestricted BDR, the problem $\mathrm{BDR}_{c_1,c_2}$ remains NP-complete for all $0 < c_2 < \frac{1}{2}$ and $c_1 < 1 - c_2 - \sqrt{1-2c_2}$. % This establishes a sharp conditional boundary between tractable and intractable parameter regimes. Our results clarify the algorithmic landscape of bipartite degree realization and contribute to the broader study of potentially bipartite graphic degree sequences.
2025-12-05 v2
A poset representation for stable contracts in a two-sided market generated by integer choice functions
Generalizing a variety of earlier problems on stable contracts in two-sided markets, Alkan and Gale introduced in 2003 a general stability model on a bipartite graph $G=(V,E)$ in which the vertices are interpreted as ``agents'', and the edges as possible ``contract'' between pairs of ``agents''. The edges are endowed with nonnegative capacities $b$ giving upper bounds on ``contract intensities'', and the preferencies of each ``agent'' $v\in V$ depend on a \emph{choice function} (CFs) that acts on the set of ``contracts'' involving $v$, obeying three well motivated axioms of \it{consistence}, \it{substitutability} and \it{cardinal monotonicity}. In their model, the capacities and choice functions can take reals or discrete values and, extending well-known earlier results on particular cases, they proved that systems of \it{stable} contracts always exist and, moreover, their set $\cal S$ constitutes a distributive lattice under a natural comparison relation $\prec$. In this paper, we study Alkan--Gale's model when all capacities and choice functions take integer values. We characterize the set of rotations -- augmenting cycles linking neighboring stable assignments in the lattice $(\cal S,\prec)$, explain how to construct the rotations efficiently, and devise a weighted poset in which the lattice of closed functions is isomorphic to $(\cal S,\prec)$, thus obtaining an explicit representation for the latter. We show that in general the size of the poset is at most $b^{\rm max}|E|$, where $b^{\rm max}$ is the maximal capacity, and the poset can be constructed in pseudo polynomial time. Then we explain that by imposing an additional condition on CFs, the size of the poset becomes polynomial in $|V|$, and the total time reduces to a polynomial in $|V|,\log b^{\rm max}$.