Simple linear time algorithm for sorting strings in omega-order with applications

We present a simple linear time algorithm for the following sorting problem: Given n words $$A_1,\ldots ,A_n$$ , find a permutation $$\{\pi _1,\ldots ,\pi _n\}$$ of $$1,\ldots ,n$$ so that $$(A_{\pi _1})^\omega \le \ldots \le (A_{\pi _n})^\omega$$ , where $$(A)^\omega$$ denotes the infinitely repeating string $$AAA\ldots$$ . Let L denote the total length of the given strings. We note that the running time of our algorithm is O(L) even if the size of alphabet is beyond O(1). We also present an $$O(L+n \log n)$$ time algorithm for the restricted model where we are only allowed to compare symbols. In other words, the main result of this paper is that the time complexity of sorting $$A_1,\ldots, A_n$$ in omega-order is the same as that of sorting them in lexicographic order under all common models (bounded alphabet, unbounded alphabet, compare-based model). Our main results find applications in related problems such as rearranging and concatenating given words so that the result is lexicographically smallest or largest.

Authors

Institutions

Publication Details

Journal
Acta Informatica
Published
2026-04-15
DOI
https://doi.org/10.1007/s00236-026-00530-5
Primary Topic
Genome Rearrangement Algorithms
Type
article
Field-Weighted Citation Impact
0.00

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Simple linear time algorithm for sorting strings in omega-order with applications

Taikun Zhu, Ruixi Luo, Kai Jin
Acta Informatica
Genome Rearrangement Algorithms
article

Simple linear time algorithm for sorting strings in omega-order with applications

Taikun Zhu, Ruixi Luo, Kai Jin
article en

Abstract

We present a simple linear time algorithm for the following sorting problem: Given n words $$A_1,\ldots ,A_n$$ , find a permutation $$\{\pi _1,\ldots ,\pi _n\}$$ of $$1,\ldots ,n$$ so that $$(A_{\pi _1})^\omega \le \ldots \le (A_{\pi _n})^\omega$$ , where $$(A)^\omega$$ denotes the infinitely repeating string $$AAA\ldots$$ . Let L denote the total length of the given strings. We note that the running time of our algorithm is O(L) even if the size of alphabet is beyond O(1). We also present an $$O(L+n \log n)$$ time algorithm for the restricted model where we are only allowed to compare symbols. In other words, the main result of this paper is that the time complexity of sorting $$A_1,\ldots, A_n$$ in omega-order is the same as that of sorting them in lexicographic order under all common models (bounded alphabet, unbounded alphabet, compare-based model). Our main results find applications in related problems such as rearranging and concatenating given words so that the result is lexicographically smallest or largest.

Acta InformaticaVol. 63(2)
Shenzhen University (CN)
National Natural Science Foundation of China, Guangdong Science and Technology Department
Openalex Percentile: Top 8%
Genome Rearrangement Algorithms
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.