polynomial time
1224 papers tagged with this keyword
Token sliding independent set reconfiguration on graphs with few $P_4$'s
We consider the INDEPENDENT SET RECONFIGURATION problem under the Token Sliding rule. Let $I$ be an independent set of a simple undirected graph $G$. Suppose that each vertex of $I$ has a token placed on it. The tokens are allowed to be moved, one at a time, by sliding along the edges of $G$, so that after each move, the vertices having tokens always form an independent set of $G$. The problem we deal is to decide if we can transform $I$ into $I'$ through a sequence of steps, each of which involves substituting a vertex in the current independent set with one of its neighbours to obtain another independent set. This problem of determining if one independent set of a graph "is reachable" from another independent set of it is known to be PSPACE-hard even for split graphs, planar graphs, and graphs of bounded treewidth. Polynomial time algorithms have been obtained for certain graph classes like trees, interval graphs, claw-free graphs, bipartite permutation graphs, block graphs, and cographs. We present a polynomial time algorithm for the problem on $P_4$-tidy graphs and $(q,q-4)$-graphs, both families of graphs generalizing cographs.
3-packings in Triangulations: Algorithms, bounds, and Complexity
We study $H$-packings in plane triangulations for the three-vertex graphs $H\in\{P_3,K_3,P_2\cup P_1\}$. For a graph $H$, let $λ_H(G)$ denote the maximum size of an $H$-packing in $G$, with the convention that for $H=P_2\cup P_1$ the copies are required to be induced. For $P_3$-packings, we prove that every triangulation $G$ on $n$ vertices satisfies $λ_{P_3}(G)\ge \left\lfloor \frac n5\right\rfloor$, and show that this lower bound is asymptotically tight. We also study triangle packings in triangulations and provide lower bounds for $λ_{K_3}(G)$ in terms of the maximum degree and the degree sequence. We give a face-path characterization of triangle factors in $4$-connected plane triangulations using a hamiltonian cycle and the weak duals of the two associated maximal outerplanar graphs. Finally, for induced packings by $P_2\cup P_1$, we prove that every plane triangulation $T$ on $n$ vertices satisfies $λ_{P_2\cup P_1}(T)\ge \left\lfloor \frac n3\right\rfloor-2$, and show that such a packing can be found in polynomial time.
On the Complexity of Counting Orderings in Graphs
We study the computational complexity of several counting problems on graphs. Each of these problems consists of counting orderings of the vertices or edges with adjacency constraints. We show $\#P$-completeness for all of them via a common new technique. Given a counting function $C$ of interest, we define a parameterized family of instances $G_q$, where the parameter $q$ controls the amplification of a simple gadget. After multiplying by an explicit factor $f(q)$, we show that the values of $f(q) \cdot C(G_q)$, for positive integers $q$, agree with a rational function in $q$ whose numerator and denominator can be interpolated in polynomial time. We then recover a $\#P$-hard function by evaluating this rational function symbolically at a limiting value $L \in \mathbb{Q} \cup \{\infty, -\infty\}$. With this methodology, we show $\#P$-completeness for the following counting problems: (a) successive vertex orderings of bipartite graphs, (b) st-numberings of graphs, (c) shellings of bipartite graphs, (d) linear extensions of N-free posets of height $3$, and (e) linear extensions of posets of height $2$. Result (d) settles a conjecture of Felsner and Manneville (2015). Although result (e) was first proved by Dittmer and Pak (2018), we include an alternative proof, using our technique, that does not rely on the result of Brightwell and Winkler (1991) about the hardness of counting linear extensions for general posets.
Maker-Breaker Sabotage Game
The Maker-Breaker sabotage game is played on a graph $G$ by Runner and Blocker. They play in turns, Runner first moves along a not yet traversed edge from her current position, afterwards Blocker removes one edge. The goal of Runner is to visit as many vertices of $G$ as possible, Blocker's goal is opposite. Assuming that both players use optimal strategies, the number of vertices visited by Runner determines an invariant called the sabotage number ${\rm sab}(G)$ of $G$. A formula for the sabotage number of an arbitrary tree is proved which can be evaluated in polynomial time. For a unicyclic graph $G$ it is proved that ${\rm sab}(G)\in \{{\rm sab}^-(G), {\rm sab}^-(G)+1\}$, where ${\rm sab}^-(G)$ is the lower sabotage number of $G$. The sabotage number of a bridgeless subcubic graph is sharply bounded from the above by the maximum girth. The sabotage number is also bounded for complete bipartite graphs and generalized Sierpiński graphs, and determined exactly in some special cases.
Encoding Phylogenetic Networks with Least Common Ancestor Constraints
Encoding phylogenetic networks by suitable substructures is a central problem in phylogenetic combinatorics. We study encodings based on least common ancestor (LCA) constraints. For a directed acyclic graph (DAG) $G$ with leaf set $X$, we consider the relation on pairs of leaves in which $(ab,xy)$ records that the LCAs of $a,b$ and $x,y$ are well-defined and that the former is a descendant of the latter.
We first identify precisely which part of $G$ is determined by this relation. To this end, we compare the canonical DAG constructed from the LCA relation with the 2-regularization of $G$, obtained by removing all vertices that are not LCAs of one or two leaves and then deleting shortcut edges. We prove that these two DAGs are isomorphic. Hence the obstruction to encoding a graph by its LCA relation is exactly the information lost under 2-regularization.
This yields a general reconstruction principle, which we apply to several natural classes of phylogenetic networks. In particular, we show that shortcut-free 2-LCA-relevant DAGs, phylogenetic trees, regular level-1 networks, regular networks with binary clustering systems, regular networks whose clustering systems are closed weak hierarchies, strong-phylogenetic normal networks, separated phylogenetic normal networks, and binary normal networks are encoded by their LCA relations.
We also introduce a sparse triple-like restriction consisting only of comparisons of the form $(ab,ac)$, where $a,b,c\in X$ are pairwise distinct. For graphs with the 2-LCA property, we show that this sparse relation, together with the leaf set, determines the full LCA relation after a natural closure operation. Consequently, several of the above classes can be reconstructed, up to isomorphism, from the sparse relation in polynomial time.
Designing Efficient and Reachable Routes: The $k$-Step-Central Shortest Path Problem
Designing rapid transportation routes requires balancing efficiency and reachability. Shortest-path models ensure direct, cost-efficient routes but ignore coverage, while centrality-based approaches maximize accessibility but do not enforce operational constraints. We study the problem of selecting a shortest path that maximizes reachability, measured as the number of nodes within a fixed distance of the path. To do this, we introduce the $k$-Step-Central Shortest Path problem and analyse its structural properties. We show that optimal solutions on unweighted graphs can be found in polynomial time and propose an algorithm with a novel pruning rule. We also prove that the problem becomes NP-hard when edge weights are introduced. Additionally, we show that our algorithm can be used to solve the NP-hard problem of finding the closeness-central shortest path in a graph. We demonstrate the efficiency and scalability of our algorithm on synthetic and real-world networks with up to 2,000 nodes. Our results show that improving reachability can substitute for route expansion: increasing the reach of transit lines drastically increases their coverage with shorter routes. This suggests that investments in active transport infrastructure that improve reachability can be more effective than extending primary routes, providing a data-driven basis for allocating resources in network design.
Tight Upper Bounds on Color Reversal by Local Inversions
A bicoloration of a graph $G=(V,E)$ is a map $β:V\to\{-1,1\}$. A local inversion at a vertex $v$ complements the subgraph induced by the neighbors of $v$ and simultaneously reverses the colors of all neighbors of $v$. Sabidussi (Discrete Mathematics, 1987) showed that every bicolored graph on $n$ vertices without isolated vertices admits a color reversal using at most $6n+3$ local inversions, and that any two bicolorings of such a graph can be transformed into each other using at most $9n$ local inversions. Recently, Porte, Sandeep, and Santra (CALDAM 2026) improved these bounds to $4n-3$ and $\lfloor(11n-3)/2\rfloor$, respectively. We prove the tight bound $3n$ by showing that, for every graph on $n$ vertices without isolated vertices, any bicoloring can be transformed into any other bicoloring using at most $3n$ local inversions. We also show that this bound is best possible: for complete graphs and stars on $n$ vertices, at least $3n$ local inversions are required to reverse the colors of all vertices. Moreover, the proof of the upper bound is constructive: given two bicolorings, it produces, in polynomial time, a sequence of at most $3n$ local inversions transforming one into the other.
Temporal Cliques Admit Linear Spanners
A temporal graph is a graph in which every edge carries a non-empty set of time labels, and it is temporally connected if for every two vertices $u$ and $v$, there exists a $u$-$v$-path with non-decreasing time labels. A spanner is a subset of its edges preserving temporal connectivity. Unlike static graphs, temporally connected graphs need not admit sparse spanners; nonetheless, minimizing spanner size is a central and widely studied problem. A particularly intriguing question is whether temporal cliques admit spanners of linear size. Despite considerable effort over the past years, the best known upper bound remained $O(n \log n)$. We finally resolve this question, proving that every temporal clique on $n$ vertices admits a spanner of size $7n$. Moreover, such a spanner can be computed in polynomial time.
Lean 4 Machine-Verified Proof of P = NP via the Pedigree Polytope Membership Problem
The Membership Problem for Pedigree Polytope (M3P) asks, given $X\in\mathbb{Q}^{\binom{n}{3}}$, whether $X\in\mathrm{conv}(P_n)$, where $P_n$ is the set of all pedigrees. A pedigree is a structured encoding of a Hamiltonian cycle construction in $K_n$. We establish that M3P is solvable in strongly polynomial time via a recursively constructed layered network $(N_k, R_k, μ)$ and a multicommodity flow problem MCF$(k)$. The necessary and sufficient condition for membership established is that the optimal total flow in MCF$(n-1)$ equals the maximum possible flow $z_{\max}$. The complexity analysis, grounded in Tardos's strongly polynomial algorithm for combinatorial linear programs (1986), shows that this condition can be checked in strongly polynomial time in the dimension of the matrix involved. By sufficiency, this implies M3P~$\in$~P. Since the Symmetric Travelling Salesman Problem (STSP) reduces to M3P via the Multistage Insertion (MI) formulation (Arthanari 1983), STSP is solvable in polynomial time, and the P vs.NP question is resolved. The proofs leading to this result are fully machine-verified in Lean~4/Mathlib4, with zero unresolved \texttt{sorry}s in the main proof chain. The main contribution is the Lean~4 machine verification of all proofs in the main chain, resulting in \texttt{theorem p\_equals\_np}: P = NP. The Lean~4 formal verification covers the sufficiency of MCF(n-1) for membership in $\mathrm{conv}(P_n)$, and the P = NP chain via Maurras (2002), Grötschel--Lovász--Schrijver (1988), Cook (1971), and Karp (1972). The complete lean project (36 Lean~4 files, 2968/2968 build targets clean) is available at https://github.com/TiruArt/Pedigree-Polytopes-Lean4.
Vertex-critical $(P_5,\text{chair})$-free and $(P_5,\text{cricket})$-free graphs
For graphs $G, F_1$ and $F_2$, we say that $G$ is $(F_1,F_2)$-free if neither $F_1$ nor $F_2$ is an induced subgraph of $G$. We say that $G$ is $k$-vertex-critical if the chromatic number of $G$ is $k$, but every proper induced subgraph of $G$ has chromatic number at most $k-1$. The $\textit{chair}$ graph is a $5$-vertex graph obtained by adding a pendant vertex to one of the two central vertices of a path on $4$ vertices. The $\textit{cricket}$ graph is a $5$-vertex graph obtained by adding two pendant vertices to a common vertex of a triangle. The path on $5$ vertices is denoted by $P_5$. We prove that for every $k \geq 1$, there are only finitely many $(P_5,\text{chair})$-free $k$-vertex-critical graphs. We also prove that the same conclusion holds if $\text{chair}$ is replaced by $\text{cricket}$. We further characterize all $5$-vertex-critical $(P_5,\text{chair})$-free graphs, all $5$-vertex-critical $(P_5,\text{cricket})$-free graphs and all $6$-vertex-critical $(P_5,\text{cricket})$-free graphs. Our proofs rely on bounding the size of antichains and developing Ramsey-theoretic ideas. For any fixed integer $k \geq 1$, our results imply the existence of a polynomial time algorithm to decide whether a $(P_5,\text{chair})$-free (or $(P_5,\text{cricket})$-free) graph is $(k-1)$-colourable such that this algorithm can also present a negative constant-size certificate in case the graph is not $(k-1)$-colourable.
The Symmetries of Three-Layer ReLU Networks
We develop a framework for analyzing parameter symmetries in deep ReLU networks and obtain a complete characterization of the generic parameter fibers for three-layer bottleneck architectures. Our approach provides explicit semi-algebraic descriptions of these fibers and yields a polynomial time algorithm for deciding functional equivalence of two parameters. The symmetries include discrete and continuous transformations arising from layer composition, and depend on whether deeper layers hide or preserve geometric structure from preceding layers. Finally, we show that some of these symmetries induce local conservation laws along gradient flow, while others do not.
The number of realisations of a random graph
Determining the number of realisations of a graph for a specific choice of edge lengths is a fundamental problem in discrete geometry. In this article we prove that the $d$-dimensional realisation number of an Erdős-Renyi random graph is either infinity or a power of 2 with exponent computable in polynomial time. We also determine a similar formula for the number of complex solutions to the generic rank-$d$ PSD matrix completion problem with randomly-selected non-diagonal unknown entries.
Exploration of $k$-edge-deficient temporal graphs in linear time
We study the Temporal Exploration problem, where an agent must visit all vertices of a temporal graph while traversing at most one available edge per time step. Unlike static graphs, which can be explored in linear time, temporal constraints can substantially increase exploration time even when every snapshot of the graph is connected.
To better understand the source of this complexity, we focus on a near-static setting and consider always-connected $k$-edge-deficient temporal graphs, in which each snapshot is connected and differs from a fixed underlying $n$-vertex graph by at most $k$ edges. Although such graphs are structurally close to static graphs, they can still exhibit non-trivial temporal behaviour. Prior work showed that these graphs can be explored in $O(kn \log n)$ time steps and established a lower bound of $Ω(n \log k)$, leaving open whether linear-time exploration in $n$ is possible.
We resolve this question by showing that any always-connected $k$-edge-deficient temporal graph admits an exploration schedule of length $O(nk \log k)$. Moreover, given such a temporal graph, the corresponding exploration schedule can be computed in polynomial time. The obtained bound is linear in the number of vertices up to a factor depending only on $k$, removes the extraneous logarithmic dependence on $n$, and is nearly optimal. In particular, for constant $k$, our result yields an order-optimal $Θ(n)$ exploration time, showing that temporal exploration in this near-static regime essentially retains the linear-time character of static graph traversal.
Two Results on Outer-String Graphs
An \emph{outer-string representation} of a graph $G$ is an intersection representation of $G$ where vertices are represented by curves (strings) inside the unit disk and each curve has exactly one endpoint on the boundary of the unit disk (the anchor of the curve). Additionally, if each two curves are allowed to cross at most once, we call this an \emph{outer-$1$-string representation} of $G$. If we impose a cyclic ordering on the vertices of $G$ and require the cyclic order of the anchors to respect this cyclic order, such a representation is called a \emph{constrained outer-string representation}. In this paper, we present two results about graphs admitting outer-string representations.
Firstly, we show that for a bipartite graph $G$ (and, more generally, for any $\{C_3,C_5\}$-free graph $G$) with a given cyclic order of vertices, we can decide in polynomial time whether $G$ admits a constrained outer-string representation. Our algorithm follows from a characterization by a single forbidden configuration, similar to that of Biedl et al. [GD 2024] for chordal graphs. Secondly, we answer an open question from the same authors and show that determining whether a given graph admits an outer-1-string representation is NP-hard. More generally, we show that it is NP-hard to determine if a given graph $G$ admits an outer-$k$-string representation for any fixed $k\ge1$.
A $μ$-distance for semidirected orchard phylogenetic networks
In evolutionary biology, phylogenetic networks are now widely used to represent the historical relationships between species and population, when this history includes reticulation events such as hybridization, gene flow and admixture between populations. Semidirected phylogenetic networks are appropriate models when the direction of some edges and the root position are not identifiable from data. Comparing semidirected networks is important in many applications. For rooted and directed networks, a $μ$-representation was originally introduced to distinguish tree-child networks, and has since been extended in two different directions: to the larger class of orchard directed networks by adding an extra component that counts paths to reticulations; and to semidirected networks, through an edge-based variant. However, the latter does not provide a distance between semidirected and orchard networks. We introduce here a new edge-based $μ$-representation capable of distinguishing distinct orchard binary semidirected networks. For this class, we provide a reconstruction algorithm and therefore obtain a true distance that is computable in polynomial time.
Optimization and complexity of inertia-type bounds on the independence and chromatic numbers of graph powers
The inertia bound, introduced by Cvetković in 1971, is a fundamental result in spectral graph theory that provides an upper bound for the independence number of a graph in terms of spectral information about a weighted adjacency matrix of the graph. Recently, this bound has been extended to the socalled inertia-type bounds for estimating the independence and chromatic numbers of graph powers ($k$-independence number and distance-$k$ chromatic number of a graph). These bounds have recently found applications in coding theory and quantum information theory.
The inertia-type bounds depend on the choice of a polynomial of degree $k$ and on the eigenvalues of the graph. Currently, optimizing these bounds requires solving several MILPs, which quickly becomes computationally demanding as the graph size or $k$ grows. This computational barrier is a major obstacle to the practical use of these bounds. Moreover, we have a limited theoretical understanding of their performance, even for small $k$. In this paper, we investigate their optimization and complexity. In particular, we improve the MILP formulations, reducing their computational burden and significantly decreasing the running time. Furthermore, we show that the optimization problems associated with the bounds are solvable in polynomial time for fixed $k$ and for small $k$.
Designing sparse temporal graphs satisfying connectivity requirements
Connectivity of temporal graphs has been widely studied both as graph theory and as gossip theory. In particular, it is well known that in order to connect every vertex to every other, a temporal graph needs to have at least $2n-4$ edges where $n$ is the number of vertices. This paper investigates the optimal number of edges required to satisfy partial connectivity requirements. We introduce the problem of Connectivity Request Satisfaction where we are given a directed graph that we call the request graph, where an arc from $u$ to $v$ means that we need to be able to go from $u$ to $v$. Our goal is to build a temporal graph on the same vertex set with as few temporal edges as possible that would satisfy all the requests. When the graph we build is directed, we prove that the number of temporal arcs required is $n-\mathrm{cc}+\mathrm{dfvs}$ where $\mathrm{cc}$ is the number of connected component of the request graph and $\mathrm{dfvs}$ is the size of its smallest directed feedback vertex set. It follows that the problem is NP-complete but inherits fixed parameter tractability properties of Directed Feedback Vertex Set. When the graph we build is undirected, we establish a characterization of strongly connected request graphs that admit a solution with $n-1$ edges: it is possible if and only if any set of pairwise non-vertex-disjoint closed walks all share a common vertex. We prove that this criteria can be tested in polynomial time.
Polynomial Time Enumeration of t-Stack-Sortable Permutations Ending in Their Least Entry
We study the behavior of West's stack-sorting map $s$ on permutations whose last entry is also their least. Let $S_{n}':=\{\pi0\mid π\in S_n\}$ where $\pi0$ denotes the concatenation of $π$ and $0$. For each permutation $π\in S_n'$, we introduce a new combinatorial object known as the stack-sorting tableau $T_π$, which ultimately serves as the key ingredient in the first polynomial time algorithm for counting the number of $t$-stack-sortable permutations in $S_n'$. We then establish a precise relationship between the behavior of $s$ on $S_{n}'$ and on $S_{n}$.
Strong modules and asynchronous attractors of Boolean networks
We consider Boolean networks with interaction graphs partitioned into strongly connected components, which we call strong modules. This type of network decomposition has been considered in the literature, primarily from the perspective of attractor detection algorithms. In this paper, we aim to provide an algebraic basis for this line of research in the case of asynchronous Boolean networks. We prove that the asynchronous attractors of a network can be described as a dependent sum construction: as products of attractors of its controlled strong modules. We then show that a representation of all attractors can be computed in polynomial time under two conditions: the strong modules are small, and either the network is sparse or its defining functions have small size circuits (in particular when they are nested canalizing). We illustrate these results on a published Boolean model.
The Quantum Walk Characteristic Polynomial Distinguishes All Strongly Regular Graphs of Prime Orde
Let $G$ be a strongly regular graph of prime order $p$ with connection degree $k \geq 6$. We prove that the \emph{quantum walk characteristic polynomial} $χ_q(G,λ) \coloneqq \det(λI - U_G)$, where $U_G$ is the coined quantum walk operator on $G$, completely determines $G$ up to isomorphism within the class of strongly regular graphs of the same order.
The proof proceeds in three steps. First, we show that $U_G$ block-diagonalizes under the discrete Fourier transform over $\Z_p$, yielding $p$ blocks $U_G^{(j)}$ of size $k \times k$. Second, we prove an explicit formula \[
χ_q\!\bigl(U_G^{(j)}, λ\bigr) =
(λ-1)^{(k-2)/2}(λ+1)^{(k-2)/2}
\!\left(λ^2 - \tfrac{2\widehat{A}_G(j)}{k}\,λ+ 1\right), \] from which the Fourier coefficient $\widehat{A}_G(j)$ is recovered as the unique real part of an eigenvalue of $U_G^{(j)}$ distinct from $\pm 1$. Third, the inverse discrete Fourier transform recovers the connection set $S$ of $G$, and Turner's theorem (1967) identifies $G$ up to isomorphism. As a consequence, graph isomorphism is decidable in polynomial time within this class using the quantum walk spectrum, without resorting to the general quasi-polynomial algorithm of Babai (2016).