CS Paper Radar

Faster polynomial-space algorithms for poset problems

László Kozma, Junqi Tan

cs.DS math.CO ·submitted 2026-11-18 00:18 UTC · v1

Abstract

We give a polynomial-space, deterministic, exact algorithm for counting linear extensions of partial orders over $n$ elements, with running time $O^*((2\sqrt{2})^{n}) \subseteq O(2.829^n)$. This improves upon the long-standing bound of $O^*(4^{n})$ attainable by standard divide and conquer (Savitch 1970, Gurevich and Shelah 1987). Our algorithm uses a similar balanced splitting approach as the classical algorithm, but applies it only to the elements outside a largest antichain. For the elements of the antichain itself we develop a formula based on inclusion-exclusion that accounts for the ways in which they can appear in a linear extension. The technique is also applicable to other problems on posets, which we illustrate by solving the well-studied jump number problem in a similar running time of $O^*((2\sqrt{2})^{n})$ and polynomial space. To our knowledge, these are the first polynomial-space algorithms with a running time below $4^n$ for both problems.

Closest papers

Nearest neighbours by meaning across the whole index.

Counting Linear Extensions Faster than $2^n$

cs.DS ·2026-08-19 ·Keigo Oka
similarity 0.65
Abstract

We give a deterministic algorithm that counts the linear extensions of any $n$-element poset in $O^*(33^{n/6}) \le O^*(1.791^n)$ time and space, breaking the $O^*(2^n)$ barrier of standard order-ideal dynamic programming without assumptions on height, width, or dimension. Our algorithm fixes an antichain $B$ and tracks order ideals only on the remaining core $V \setminus B$. For each element $v \in B$ that has successors in the core, we guess which of those successors appears first in the linear extension, reducing all upper constraints on $v$ to a single deadline. An element $v \in B$ becomes available once all of its core predecessors have been placed; available elements with the same deadline then face identical remaining constraints, so the dynamic program only needs to record how many available elements have each deadline and weight transitions by the number of choices for the next element. Taking $B$ to be a maximum antichain and balancing this dynamic program against a Dilworth chain partition yields an $O^*(1.89^n)$ algorithm. To obtain our main bound, we use a minimum-cut computation in an auxiliary bipartite network to find an antichain $B$ whose comparability neighborhood $R$ satisfies $|B| \ge 5|R|$ while the remainder $V \setminus (B \cup R)$ partitions into stars with at most five leaves. Since a $j$-leaf star has $2^j+1$ independent sets and $(2^j+1)^{1/(j+1)} \le 33^{1/6}$ for $1 \le j \le 5$, combining the star bound on the remainder with our state bound on $B \cup R$ gives $O^*(33^{n/6})$ time and space.

0.22

Enumeration Complexity of Permutation Classes

cs.CC math.CO ·2026-10-27 ·Manuel Bodirsky, Mohamed Elsheikh
theory similarity 0.62
Abstract

We study classes of permutations that are defined by avoidance of forbidden patterns. For each fixed finite set $B$ of forbidden patterns, we study the \emph{avoider enumeration problem}: given an integer $n$, output all $B$-avoiding permutations of length $n$. Avoider enumeration is output-polynomial for every fixed $B$. However, our main notion of efficiency is polynomial delay. We use the insert-maximum tree as a search tree, in which permutations are built by repeatedly inserting a new maximum while preserving pattern avoidance. This leads to the \emph{insert-maximum extension problem}, which asks if a given permutation has an avoiding descendant at a specified depth. An algorithm for this problem can prune branches that cannot reach the target length. Hence, if this problem is in P, we obtain polynomial-delay enumeration. To investigate this problem, we introduce and study \emph{pockets}, the maximal finite subtrees of the insert-maximum tree. For fixed $B$, if there is a polynomial $p$ such that every pocket rooted at $ρ$ has at most $p(|ρ|)$ nodes, then the extension problem is solvable in polynomial time and enumeration has polynomial delay. In particular, a bound on pocket depth depending only on $B$ suffices. We prove such a bound if the class is well-quasi-ordered, has a regular insertion encoding, or if $B$ omits one of the three maximum-position types: leftmost, interior, or rightmost. We also prove that extension is in NP for every fixed $B$, even with binary-encoded target depth. On the negative side, we construct a fixed set of $55$ forbidden patterns for which extension is NP-complete. Consequently, enumerating valid extensions from a given starting permutation cannot have polynomial delay unless P=NP. This also answers a question of Hanika by showing that the forbidden permutation constraint satisfaction problem can be NP-complete for a fixed forbidden set.

0.08

The Classical Weisfeiler-Leman Algorithm Stabilizes in $O(n)$ Rounds

cs.DS cs.DMcs.LO ·2026-09-15 ·Simon Döring, Daniel Neuen
theory similarity 0.58
Abstract · 29 pages

The classical Weisfeiler-Leman algorithm (also known as the $2$-dimensional Weisfeiler-Leman algorithm) is a simple combinatorial algorithm that was originally designed as a heuristic for the graph isomorphism problem. However, it has also numerous connections to other areas such as algebraic graph theory, logics, proof complexity, combinatorial optimization and machine learning. We prove that the classical Weisfeiler-Leman algorithm terminates after $5(n-1)$ iterations. This improves over the previous best upper bound of $O(n \log n)$ by Lichter, Ponomarenko and Schweitzer [LICS 2019], and asymptotically matches the known lower bound of $Ω(n)$ by Fürer [ICALP 2001]. Additionally, building on our results for the $2$-dimensional case, we obtain an improved upper bound of $O(n^{k-1}/(k-2)! + n^{k-2})$ on the number of iterations performed by the $k$-dimensional Weisfeiler-Leman algorithm, for every $k \geq 3$. Our arguments actually hold for a larger class of sequences of colorings of $k$-tuples; in this larger class our upper bounds are essentially tight for all $k \geq 3$.

0.17

Counting over Unbreakable Decompositions: A Single-Exponential Parameterized Algorithm for Minimum Bisection

cs.DS ·2026-11-05 ·Aditya Anand, Evangelos Kipouridis, Karol Węgrzycki
similarity 0.58
Abstract

The Minimum Bisection problem asks whether an $n$-vertex graph can be split into two halves with at most $k$ edges between them. We give a single exponential time algorithm for minimum bisection, running in time $2^{O(k)}n^{O(1)}$. This improves the previous bound of $2^{O(k\log k)}n^{O(1)}$ due to Cygan, Komosa, Lokshtanov, Pilipczuk, Pilipczuk, Saurabh, and Wahlström (TALG 2021). Our algorithm counts solutions instead of only finding if one exists. We show that our dynamic program can be implemented on top of an unbreakable decomposition using algebraic techniques. Along the way, we compute in time $2^{O(k)}n^{O(1)}$ a tree decomposition with adhesions of size at most $2k$ whose bags are $(3k,k)$-edge-unbreakable inside their own subtrees.

0.19

Protected tails and polynomial-time enumeration of permutations avoiding a direct sum of an increasing pattern and 231

cs.DM math.COcs.DScs.LO ·2026-09-14 ·Henning Arnór Skeggi Úlfarsson
code/data similarity 0.56
Abstract · 36 pages, 4 figures, 1 table. v2: revised and shortened exposition, corrected account of prior work, the first 151 terms tabulated, a proved…

We give an algorithm counting the permutations that avoid a fixed pattern of the following form: the direct sum of an increasing pattern and 231. The first members of the family are 1342 and 12453. For each member the algorithm uses polynomially many operations and stored integers, with degrees that grow linearly in the length of the pattern. It comes from a recurrence that reads a permutation from left to right and records the constraints that the letters read so far impose on those still unread. This recurrence has exponentially many states, but part of each state is protected: later steps carry it along unchanged and do not depend on it, and factoring the protected part out leaves a dynamic program of polynomial size. For 12453 a translation symmetry sharpens the bounds to degree seven for the operations and degree four for the storage. We also compute the number of 12453-avoiding permutations of every length up to 150. The previously published series, due to Biers-Ariel (2019), reached length 38. We also give a sampler of uniformly random avoiders. A floating-point implementation of it, proved to be within total variation distance $3.5\cdot10^{-5}$ of uniform for ideal random bits, draws the one million 12453-avoiding permutations of length 300 shown in a heatmap. The literal and kernel recurrences for 1342 and 12453 are verified in the Lean 4 proof assistant.

0.32

Fast Evaluation of Polynomials with Rational Preprocessing

cs.DS ·2026-09-05 ·Thomas D. Ahle, Jakob B. T. Knudsen
theory similarity 0.56
Abstract

Horner's rule evaluates a monic degree-$n$ polynomial using $n-1$ multiplications. We show that with rational preprocessing of the coefficients, any such polynomial can be evaluated using only $\lfloor n/2 \rfloor + 1$ multiplications over fields of characteristic zero or of characteristic $p>n$. This resolves the multiplication side of a conjecture of Rabin and Winograd (Comm. Pure Appl. Math 1972), who achieved $n/2 + 2\lceil\log_2 n\rceil$ multiplications and conjectured the logarithmic overhead was necessary. We show that this multiplication count can't be beaten in general, proving that three multiplications do not suffice for degree~$6$. This strengthens the lower bound of Pan (STOC 1978), who proved a tight bound for general, complex preprocessing. In characteristic~2, for every $n>1$ and every finite field of size at least $2n$, we prove that an $n$-multiplication chain cannot parametrize all value vectors at $2n$ distinct evaluation points, even with arbitrary preprocessing. We give $\lfloor n/2 \rfloor + 1$ multiplication schedules over characteristic~2, each with an explicit inverse, for every odd degree $n\le 25$ and conjecture that this is possible for all $n$. We also give an injective polynomial construction for universal hashing that uses $N$ multiplications to hash $2N$ values with a single random key. This improves the best previous construction by Daniel J. Bernstein (cryp.to).

0.09

On the Gap of Finite Posets

cs.DM math.CO ·2026-08-13 ·Alireza Haqi
theory similarity 0.56
Abstract · 25 pages, 4 figures

Let $P$ be a finite nonempty poset with $n$ elements, let $f:P\to\{1,\ldots,n\}$ be a uniformly random order-preserving bijection, and put $h_P(x)=\mathbb{E}[f(x)]$. Aires and Kahn (2025) introduced $\operatorname{gap}(P)$ as the largest difference between consecutive values in the ordered list consisting of $0$, $n+1$, and all the expected ranks $h_P(x)$. Write ${w}(P)$ for the largest size of a pairwise incomparable subset. We prove three results. First, we prove a weighted strengthening of an ideal inequality conjectured by Kahn and obtain the explicit gap-width bound $\operatorname{gap}(P)\le 2 {w}(P)-1$. Second, for every $L>0$ we construct a width-two poset such that the expected-rank list of every maximal chain has a gap of at least $L$, with $0$ and $|P|+1$ added as endpoints. Finally, for every $r\in\mathbb{N}$, we construct a poset $P_r$ for which the relative order induced on every nonempty selected set $X$ has base-two entropy below $3|X|$, while $\operatorname{gap}(P_r)\ge(3/2)^r$. Thus the gap can be arbitrarily large while the induced order on every selected set has relatively small entropy. The key ideas behind all three results were found by ChatGPT 5.6 Sol.

0.46

A Binary Search Tree with the Unified Bound

cs.DS ·2026-11-12 ·Yang Cao, Haoran Qi, Hanzhi Wang
theory similarity 0.56
Abstract

We give a deterministic online binary search tree (BST) that satisfies the unified bound of Iacono [SODA 2001], which subsumes the working-set and dynamic-finger bounds: it serves every sequence $X$ of $m$ searches on $n$ keys at total cost $O(m+\mathrm{UB}(X))$, and every single search at cost $O(\log n)$. Previously, no BST was known to satisfy the unified bound, even offline. As a consequence, the dynamic optimality conjecture implies Iacono's conjecture that splay trees satisfy the unified bound. We also show that the unified bound is $O((m+n)(1+\log c_σ))$ on every sequence of searches that avoids a fixed permutation $σ$, where $c_σ$ is the Füredi-Hajnal limit of $σ$. Hence every BST that satisfies the unified bound, including ours, serves such sequences at this cost. For permutations this bound is tight, and it improves the previous upper bound $O(nc_σ^2)$ on the optimal cost, due to Berendsohn, Kozma and Opler [STOC 2024]. Finally, we extend the tree to support insertions and deletions: a sequence $X$ of $m$ operations, starting from $n_0$ keys, costs $O(n_0+m+\mathrm{UB}(X))$ in total, where $\mathrm{UB}$ is now the extension of the unified bound to insertions and deletions by Bădoiu, Cole, Demaine and Iacono [TCS 2007]. Hence, if splay trees are dynamically optimal for searches, insertions and deletions, then they serve every such sequence at this total cost as well.

0.25