\documentclass[11pt]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage[a4paper,margin=1in]{geometry} \usepackage{amsmath,amssymb,amsthm,mathtools} \usepackage{enumitem} \usepackage{microtype} \usepackage{hyperref} \hypersetup{ hidelinks, pdftitle={Ulam Metric k-Center in Parameterized Linear Time}, pdfauthor={Matěj Kripner, Václav Rozhoň, Robert Šámal, Martin Šindelář, Adrián Zámečník}, pdfsubject={Parameterized algorithms and radius lower bounds for continuous Ulam Metric k-Center}, pdfkeywords={Ulam distance, rank aggregation, parameterized algorithms, closest string} } \newtheorem{theorem}{Theorem} \newtheorem{lemma}[theorem]{Lemma} \newtheorem{corollary}[theorem]{Corollary} \theoremstyle{definition} \newtheorem{definition}[theorem]{Definition} \newtheorem{question}[theorem]{Question} \theoremstyle{remark} \newtheorem{observation}[theorem]{Observation} \newtheorem{example}[theorem]{Example} \newcommand{\distU}{\operatorname{dist}_{\mathrm U}} \newcommand{\pos}{\operatorname{pos}} \newcommand{\vc}{\tau} \newcommand{\lcs}{\operatorname{LCS}} \newcommand{\restr}[2]{#1|_{#2}} \title{Ulam Metric \(k\)-Center in Parameterized Linear Time\thanks{This work was produced within the Bolzano project (\url{https://bolzano.app}), using AI systems for mathematical research and manuscript preparation. The listed authors contributed to the project and the preparation of this release. The manuscript received only limited human checking.}} \author{Mat\v{e}j Kripner \qquad V\'{a}clav Rozho\v{n} \qquad Robert \v{S}\'{a}mal\\[0.4em] Martin \v{S}indel\'{a}\v{r} \qquad Adri\'{a}n Z\'{a}me\v{c}n\'{i}k} \date{} \usepackage{xcolor} % Collection typography. \geometry{a4paper,hmargin=23mm,vmargin=25mm} \definecolor{BolzanoInk}{HTML}{24445C} \hypersetup{colorlinks=true,linkcolor=BolzanoInk,citecolor=BolzanoInk, urlcolor=BolzanoInk,pdfauthor={Matěj Kripner, Václav Rozhoň, Robert Šámal, Martin Šindelář, Adrián Zámečník},pdflang={en-US}} \urlstyle{same} \setlength{\emergencystretch}{1em} \let\BolzanoBibliography\thebibliography \renewcommand{\thebibliography}[1]{\BolzanoBibliography{#1}\raggedright} \begin{document} \maketitle \begin{abstract} Continuous Ulam Metric \(k\)-Center asks for at most \(k\) permutations whose radius-\(d\) balls cover the input rankings. For \(m\) rankings of \(n\) symbols, a deterministic algorithm takes \(2^{O(kd\log(k+d+2))}mn\) word operations. Permanent reference rankings, short insertion lists, and small obstructions obtained by patience sorting control the search. For one center, this answers a question of Bai, Fomin, Golovach, More, and Wietheger with linear input dependence. An arbitrary-alphabet Hamming embedding with a nonexpansive retraction also gives the matching \(2^{o(d\log d)}\) exclusion under the Exponential Time Hypothesis. \end{abstract} \section{Introduction} \subsection{Background and the source problem} A consensus ranking should remain close to the rankings it summarizes. Data with several distinct groups may require several centers. Ulam distance measures how many symbols must be moved while the other symbols retain their relative order. The radius is a useful parameter when each ranking disagrees with its group's consensus on only a few items. For example, moving the symbol \(3\) in \(12345\) gives \(13245\), so these rankings have Ulam distance one. Let \(m,n\ge1\) and let \(\Sigma\) be an \(n\)-symbol alphabet. For permutations \(\pi,\sigma\) of \(\Sigma\), define \[ \distU(\pi,\sigma)=n-\lcs(\pi,\sigma), \] where \(\lcs\) denotes longest common subsequence length. Given \(m\) input permutations \(\pi_1,\ldots,\pi_m\) and integers \(k\ge1\), \(d\ge0\), continuous \textsc{Ulam Metric \(k\)-Center} asks for at most \(k\) permutations \(\sigma_1,\ldots,\sigma_k\) such that \[ \max_{1\le i\le m}\min_{1\le j\le k}\distU(\pi_i,\sigma_j)\le d. \] The centers may be arbitrary permutations; they need not be inputs. This is the convention of Bai, Fomin, Golovach, More, and Wietheger~\cite[Section~1.1]{BaiFominGolovachMoreWietheger2026}. Bai et al. prove NP-hardness even for \(d=1\) when \(k\) is part of the input, and give an exact algorithm in time \[ 2^{O(d^2k(d+k))}mn^{1+o(1)} \] \cite[Theorems~1 and~2]{BaiFominGolovachMoreWietheger2026}. For one center, the parameter dependence is \(2^{O(d^3)}\). By comparison, the Hamming-distance consensus problem \textsc{Closest String} has \(d^{O(d)}\) dependence over arbitrary alphabets, by the bounded-search-tree algorithm of Gramm, Niedermeier, and Rossmanith~\cite[Theorem~1]{GrammNiedermeierRossmanith2003}. Bai et al. ask whether the Ulam problem has the same dependence \cite[Section~5, p.~19:21]{BaiFominGolovachMoreWietheger2026}. \begin{question}[Bai--Fomin--Golovach--More--Wietheger]\label{question:source} Can continuous \textsc{Ulam Metric 1-Center} be solved in time \(d^{O(d)}(mn)^{O(1)}\)? \end{question} \subsection{Contribution} \begin{theorem}\label{thm:main} For \(k,d\ge1\), continuous \textup{\textsc{Ulam Metric \(k\)-Center}} can be decided deterministically in \begin{equation}\label{eq:main-time} 2^{O(kd\log(k+d+2))}mn \end{equation} word operations, and a set of centers can be returned on every yes-instance. The permutations are given explicitly as arrays of symbols in \([n]\); a word holds an input address or a symbol. \end{theorem} For \(k=1\), this is \(2^{O(d\log(d+2))}mn\), answering Question~\ref{question:source} while retaining linear dependence on the explicit input size. The boundary case \(d=0\) amounts to counting distinct input permutations and can be solved by direct comparisons to at most \(k+1\) representatives in \(O(kmn)\) time. The radius dependence for one center is also optimal in the following standard conditional sense. \begin{theorem}\label{thm:lower} Unless the Exponential Time Hypothesis fails, continuous \textup{\textsc{Ulam Metric 1-Center}} has no algorithm with running time \(2^{o(d\log d)}(mn)^{O(1)}\). \end{theorem} Theorem~\ref{thm:lower} does not assert optimal dependence on \(k\). The lower-bound statement was already made in the conclusion of Bai et al.; Section~\ref{sec:lower} supplies an arbitrary-alphabet reduction that justifies its use of the \textsc{Closest String} lower bound. The main obstacle to the algorithm is that a radius-\(d\) ball can contain \(n^{\Omega(d)}\) permutations. Guessing the moved symbols and their new positions would put the parameter in the exponent of the input size. Three ingredients avoid that enumeration. \begin{enumerate}[label=\arabic*.,leftmargin=2.2em] \item A failed candidate has an obstruction on at most \(2d+2\) symbols. Stopping patience sorting after \(d+1\) replacements produces this obstruction within \(O(n+(d+1)\log(n+1))\) operations (Lemma~\ref{lem:threshold}). \item Relative to a fixed reference ranking, a symbol has at most \(4d+2\) relevant insertion cuts. Canonical cuts ensure that partial placements continue to agree with one fixed solution outside the still unguessed moved symbols (Lemmas~\ref{lem:small-cut-lists}--\ref{lem:reconstruction}). \item Each center keeps its own permanent reference. An uncovered input either supplies a reference for a new cluster or exposes a new moved symbol for an existing center. At most \(k\) references and \(kd\) moved symbols are introduced (Section~\ref{sec:search-tree}). \end{enumerate} The source already uses a search that creates candidate centers from uncovered inputs. Its local steps use permutation graphs, short lists of one-symbol moves, and suitable two-colorings; the full version constructs a coloring family of size \(2^{O(d^2)}\log n\) \cite[Lemmas~11, 13, 16 and Algorithm~1]{BaiFominGolovachMoreWietheger2026Full}. Here the references remain fixed while partial placements accumulate. A small obstruction selects a new symbol directly, avoiding the coloring family. The compatibility argument preserves the association of each reference with a distinct true cluster, so the input partition need not be guessed. Intermediate candidates need not cover the same inputs at every stage; the final coverage test certifies the solution. The linear input factor uses only a threshold version of the classical patience-sorting algorithm, not a faster unrestricted longest-increasing- subsequence algorithm. Almost all scanned symbols extend the list of pile tops in constant time; only \(d+1\) operations can require binary search before either success or an obstruction is known. \subsection{Related work} Bachmaier, Brandenburg, Glei\ss ner, and Hofmeier proved NP-completeness of maximum rank aggregation under Ulam distance, among other metrics \cite[Theorem~3]{BachmaierBrandenburgGleissnerHofmeier2015}. Their bounded-modification-set framework also gives fixed-parameter algorithms for Kendall tau, Hamming, and Minkowski distances; Ulam distance is not among those algorithmic instantiations \cite[Section~6]{BachmaierBrandenburgGleissnerHofmeier2015}. Choosing an input permutation gives the familiar factor-\(2\) metric approximation. For \(m\) input rankings, Chakraborty, Gajjar, and Jha obtain a deterministic \((3/2-1/(3m))\)-approximation in time \(n^{O(m^2\log m)}\) \cite[Theorem~1]{ChakrabortyGajjarJha2021}. More recently, Azgor, Chakraborty, Cuong, Das, Habib, and Nguyen prove that, for each \(0<\varepsilon<1/34\), approximating the continuous center within \(35/34-\varepsilon\) is NP-hard even for four rankings \cite[Theorem~1.3]{AzgorEtAl2026}. This rules out polynomial-time exact optimization for fixed \(m=4\), unless P equals NP; it is compatible with an exact algorithm parameterized by the radius. The \emph{discrete} center problem restricts the center to an input permutation. Abboud, Bateni, Cohen-Addad, Karthik C.~S., and Seddighin study its fine-grained complexity and give a \((1+\varepsilon)\)-approximation \cite[Theorems~1 and~3]{AbboudEtAl2023}. Fischer, Goldenberg, Habib, and Karthik C.~S. subsequently establish conditional optimality, up to subpolynomial factors, of the pairwise-distance algorithm when the permutation length is polynomially related to the number of inputs \cite[Theorem~2]{FischerEtAl2025}. Those results concern a different solution space and polynomial input-size dependence, rather than the radius dependence of the continuous problem considered here. The lower-bound comparison requires attention to the alphabet. Lokshtanov, Marx, and Saurabh exclude \(2^{o(d\log d)}\) dependence for \textsc{Closest String} over unrestricted alphabets \cite[Theorem~3.1]{LokshtanovMarxSaurabh2018}. The proof of Lemma~18 in Bai et al.'s full version uses a binary pair encoding \cite[Section~3.3]{BaiFominGolovachMoreWietheger2026Full}. Fixed-alphabet \textsc{Closest String} has single-exponential algorithms \cite[Section~3]{LokshtanovMarxSaurabh2018}; for the binary case, Fischer and Habib give a randomized \(O^*(4^d)\)-time algorithm \cite[Theorem~1]{FischerHabib2026}. Thus the binary encoding alone does not transfer the unrestricted-alphabet lower bound. The marker construction in Section~\ref{sec:lower} handles any alphabet size and projects arbitrary permutation centers back to strings without increasing distances. It therefore completes the lower-bound argument anticipated in the source. \section{Deletion witnesses and small obstructions} For \(S\subseteq\Sigma\), write \(\pi|_S\) for the subsequence induced by \(S\). A \emph{deletion witness} between \(\alpha\) and \(\beta\) is a set \(D\subseteq\Sigma\) such that \[ \alpha|_{\Sigma\setminus D}=\beta|_{\Sigma\setminus D}. \] Equivalently, \(\distU(\alpha,\beta)\le d\) if and only if such a witness of size at most \(d\) exists. In particular, a reference ranking \(\rho\) within distance \(d\) of a center \(\sigma^\star\) agrees with that center outside some set \(X\) of at most \(d\) symbols. No uniqueness of \(X\) is assumed. The following algorithm gives both the distance test and the obstruction needed for branching. The elementary patience-sorting principle is classical; see Aldous and Diaconis~\cite{AldousDiaconis1999}. \begin{lemma}[Threshold test and obstruction]\label{lem:threshold} Given permutations \(\alpha,\beta\), the inverse-position array of \(\beta\), and \(d\ge0\), one can either certify \(\distU(\alpha,\beta)\le d\) or find \(H\subseteq\Sigma\) such that \begin{equation}\label{eq:obstruction} |H|\le2d+2, \qquad \distU(\alpha|_H,\beta|_H)>d. \end{equation} This takes \(O(n+(d+1)\log(n+1))\) operations and \(O(n)\) memory. \end{lemma} \begin{proof} Read the symbols of \(\alpha\) and replace each by its position in \(\beta\). A common subsequence of the permutations is exactly an increasing subsequence of this sequence of distinct ranks. Maintain piles whose tops \(t_1<\cdotst_\ell\) starts a new pile on the right; otherwise place \(r\) on the leftmost pile whose top exceeds \(r\). Call the latter operation a replacement. For an empty list, the first rank starts the first pile. After any prefix, \(t_j\) is the smallest possible final rank of an increasing subsequence of length \(j\). To verify the invariant, suppose \(r\) replaces \(t_j\). If \(j>1\), an increasing subsequence ending at \(t_{j-1}