String Rearrangement Inequalities and a Total Order Between Primitive Words
Abstract
We study the following rearrangement problem: Given words, rearrange and concatenate them so that the obtained string is lexicographically smallest (or largest, respectively). We show that this problem reduces to sorting the given words so that their repeating strings are non-decreasing (or non-increasing, respectively), where the repeating string of a word refers to the infinite string . Moreover, for fixed size alphabet , we design an time sorting algorithm of the words (in the mentioned orders), where denotes the total length of the input words. Hence we obtain an time algorithm for the rearrangement problem. Finally, we point out that comparing primitive words via comparing their repeating strings leads to a total order, which can further be extended to a total order on the finite words (or all words).
Keywords
Cite
@article{arxiv.2204.11213,
title = {String Rearrangement Inequalities and a Total Order Between Primitive Words},
author = {Ruixi Luo and Taikun Zhu and Kai Jin},
journal= {arXiv preprint arXiv:2204.11213},
year = {2022}
}