arrow
Return

On Strings Having the Same Length-k Substrings

delete2026-04-01
delete0
PRE
AI
B
Bernardini, Giulia
C
Conte, Alessio
G
Grossi, Roberto
P
Pissis, Solon P.
P
Punzi, Giulia
S
Sweering, Michelle *
DOI:10.1007/s00224-025-10240-zdelete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
Let Substr(k)(X)denote the set of length-k substrings of a given string X for a given integer k>0. We study the following basic string problem, called z-Shortest S-k-Equivalent Strings: Given a set S-k of n length-k strings and an integer z>0, list z shortest distinct strings T-1,...,T-z such that Substr(k)(Ti)=S-k, for all i is an element of[1,z].The z-Shortest S-k-Equivalent Strings problem arises naturally as an encoding problem in many real-world applications; e.g. in data privacy, data compression, and bioinformatics. The1-ShortestSk- Equivalent Strings, referred to as Shortest S-k-Equivalent String, asks for a shortest string X such that Substr(k)(X)=S-k.Our main contributions are as follows. Given a directed graph G=(V,E),the Directed Chinese Postman(DCP) problem asks for a shortest closed walk that visits every edge of G at least once. DCP can be solved using an algorithm for min-costflow. We show, via a non-trivial reduction, that if Shortest S-k-Equivalent String over abinary alphabet has a near-linear-time solution then so does DCP. Secondly, we show that the length of a shortest string output by Shortest S-k-Equivalent String is in O(k+n(2)). We generalize this bound by showing that the total length of z shortest strings is in O(zk+zn(2)+z(2)n). We derive these upper bounds by showing(asymptotically tight) bounds on the total length of z shortest Eulerian walks in general directed graphs. Furthermore, we present an algorithm for solving z-Shortest S-k-Equivalent Strings in O(nk+n(2)log(2)n+zn(2)logn+|output|)time. If z=1, the time becomes O(nk+n(2)log(2)n)by the fact that the size of the input is (sic)(nk)and the size of the output is O(k+n(2)). Finally, we also provide a direct technical application of our algorithms on strings in an existing data privacy framework. A preliminary version of this paper was announced at CPM 2022.
Keywords:
Directed Chinese postman
Eulerian walk
de Bruijn graph
Listing

Journal

T
Theory of Computing Systems
IF:
0.4
Papers:
43
Citations:
0

Organization

U
university of palermo
Scholars:
2.7K
Papers: 994
Citations: 0
K
king's college london
Scholars:
5.2K
Papers: 2.6K
Citations: 0
U
university of london
Scholars:
21.5W
Papers: 19.7W
Citations: 305
U
university of pisa
Scholars:
4.1K
Papers: 1.6K
Citations: 0
U
University of Milan
Scholars:
5.1W
Papers: 3.9W
Citations: 5.0W
researcher View more organizations