String Rearrangement Inequalities and a Total Order Between Primitive Words

04/24/2022
by   Ruixi Luo, et al.
0

We study the following rearrangement problem: Given n 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 A refers to the infinite string AAA…. Moreover, for fixed size alphabet Σ, we design an O(L) time sorting algorithm of the words (in the mentioned orders), where L denotes the total length of the input words. Hence we obtain an O(L) 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).

READ FULL TEXT

page 1

page 2

page 3

page 4

research
03/31/2022

Suffix tree-based linear algorithms for multiple prefixes, single suffix counting and listing problems

Given two strings T and S and a set of strings P, for each string p ∈ P,...
research
01/07/2020

Quantum Algorithms for the Most Frequently String Search, Intersection of Two String Sequences and Sorting of Strings Problems

We study algorithms for solving three problems on strings. The first one...
research
02/27/2023

String attractors of fixed points of k-bonacci-like morphisms

Firstly studied by Kempa and Prezza in 2018 as the cement of text compre...
research
06/03/2020

LCP-Aware Parallel String Sorting

When lexicographically sorting strings, it is not always necessary to in...
research
07/16/2018

Combining a Context Aware Neural Network with a Denoising Autoencoder for Measuring String Similarities

Measuring similarities between strings is central for many established a...
research
05/24/2023

Learning the String Partial Order

We show that most structured prediction problems can be solved in linear...
research
06/25/2018

Handling Massive N-Gram Datasets Efficiently

This paper deals with the two fundamental problems concerning the handli...

Please sign up or login with your details

Forgot password? Click here to reset