TY - JOUR
T1 - Factorizing Strings into Repetitions
AU - Inoue, Hiroe
AU - Matsuoka, Yoshiaki
AU - Nakashima, Yuto
AU - Inenaga, Shunsuke
AU - Bannai, Hideo
AU - Takeda, Masayuki
N1 - Publisher Copyright:
© 2022, The Author(s), under exclusive licence to Springer Science+Business Media, LLC, part of Springer Nature.
PY - 2022/4
Y1 - 2022/4
N2 - A factorization f1,…,fm of a string w is called a repetition factorization of w if each factor fi is a repetition, namely, fi= xkx′ for some non-empty string x, an integer k ≥ 2, and x′ being a proper prefix of x. Dumitran et al. (Proc. SPIRE 2015) proposed an algorithm which computes an arbitrary repetition factorization of a given string w in O(n) time, where n is the length of w. The number of factors (i.e. repetitions) contained in the output of their algorithm is not known or guaranteed. In this paper, we propose two algorithms for computing smallest/largest repetition factorizations in O(nlogn) time, which respectively consist of the smallest/largest number of factors. The first algorithm is a simple O(nlogn) -space algorithm based on a reduction of the problem to the shortest/longest path problem on the DAG of size O(nlogn). The second one simulates the dynamic programming algorithm for shortest/longest path problem within O(n) space based on the idea of the first algorithm. Moreover, we discuss combinatorial structures of smallest/largest repetition factorizations of Fibonacci strings.
AB - A factorization f1,…,fm of a string w is called a repetition factorization of w if each factor fi is a repetition, namely, fi= xkx′ for some non-empty string x, an integer k ≥ 2, and x′ being a proper prefix of x. Dumitran et al. (Proc. SPIRE 2015) proposed an algorithm which computes an arbitrary repetition factorization of a given string w in O(n) time, where n is the length of w. The number of factors (i.e. repetitions) contained in the output of their algorithm is not known or guaranteed. In this paper, we propose two algorithms for computing smallest/largest repetition factorizations in O(nlogn) time, which respectively consist of the smallest/largest number of factors. The first algorithm is a simple O(nlogn) -space algorithm based on a reduction of the problem to the shortest/longest path problem on the DAG of size O(nlogn). The second one simulates the dynamic programming algorithm for shortest/longest path problem within O(n) space based on the idea of the first algorithm. Moreover, we discuss combinatorial structures of smallest/largest repetition factorizations of Fibonacci strings.
KW - Dynamic programming
KW - Fibonacci strings
KW - Repetition factorizations
KW - Squares
UR - http://www.scopus.com/inward/record.url?scp=85128097663&partnerID=8YFLogxK
UR - http://www.scopus.com/inward/citedby.url?scp=85128097663&partnerID=8YFLogxK
U2 - 10.1007/s00224-022-10070-3
DO - 10.1007/s00224-022-10070-3
M3 - Article
AN - SCOPUS:85128097663
SN - 1432-4350
VL - 66
SP - 484
EP - 501
JO - Theory of Computing Systems
JF - Theory of Computing Systems
IS - 2
ER -