cs.DS — Data Structures and Algorithms
The exact turnpike problem in polynomial time
The turnpike problem asks for all configurations of points on a line whose pairwise distances form a given multiset. We allow points to coincide, a pair of coincident points contributing the distance , and give a deterministic algorithm that, on a list of natural numbers written in binary, outputs every finite multiset of reals with least element 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 . The classical problem, for sets of points, is the special case of lists without . 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 whose coefficients are the multiplicities of its points, and the input determines the product of with its reversal , a polynomial of possibly exponential degree with few nonzero coefficients. A semidefinite system built from these coefficients certifies that a differential 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 of such polynomials that contains, for every solution, the polynomial with . The residues of generate a totally real number field, and an elementary bound on the number of nonreciprocal factors over totally real fields shows that and that the residues at roots of of total multiplicity separate . At a root of multiplicity , the order of vanishing of is one of , which gives a polynomial equation of degree for the coordinates of in . We derive these equations from the sparse data by linear algebra, without computing any root, and read off the polynomials 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.