Submitted works

Advanced search

cs.DS — Data Structures and Algorithms

The exact turnpike problem in polynomial time

Contributed by Rares-Darius Buhai

The turnpike problem asks for all configurations of nn points on a line whose (n2)\binom{n}{2} pairwise distances form a given multiset. We allow points to coincide, a pair of coincident points contributing the distance 00, and give a deterministic algorithm that, on a list of natural numbers written in binary, outputs every finite multiset of reals with least element 00 whose multiset of pairwise distances is the list, each exactly once, in time polynomial in the length of the input. In particular, deciding whether a list of integers is the distance multiset of finitely many points on a line is in P\mathsf{P}. The classical problem, for sets of points, is the special case of lists without 00. The known exact algorithms are exponential in the worst case or polynomial only in the size of the largest distance. A solution is encoded by the polynomial PP whose coefficients are the multiplicities of its points, and the input determines the product hh of PP with its reversal P#P^{\#}, a polynomial of possibly exponential degree with few nonzero coefficients. A semidefinite system built from these coefficients certifies that a differential b(x) dx/(xh(x))b(x)\,dx/(xh(x)) has only simple poles, with real residues. The ellipsoid method and lattice basis reduction restrict the system to a subspace that keeps every integral solution vector, and yield a rational space WW of such polynomials bb that contains, for every solution, the polynomial bPb_P with bP/(xh)=(log⁡(P/P#))′b_P/(xh)=(\log(P/P^{\#}))'. The residues of WW generate a totally real number field, and an elementary bound on the number of nonreciprocal factors over totally real fields shows that dim⁡W=O(log⁡n)\dim W=O(\log n) and that the residues at dim⁡W\dim W roots of hh of total multiplicity O(log⁡n)O(\log n) separate WW. At a root of multiplicity ee, the order of vanishing of PP is one of 0,…,e0,\dots,e, which gives a polynomial equation of degree e+1e+1 for the coordinates of bPb_P in WW. We derive these equations from the sparse data by linear algebra, without computing any root, and read off the polynomials bPb_P of all solutions from the integer eigenvalues of a multiplication matrix of polynomial size. Both results are formalized in Lean 4 and checked with only the standard axioms.

Author comments: 36 pages. The results are formalized in Lean 4 and registered in the Palomar registry as PALOMAR-2026-12-03-000064; the formalization is at https://github.com/raresbuhai/ai-papers-lean-turnpike.

Primarily AI-generated textHuman understanding: some parts
Dec 03, 202636 pages
PDFView work