TY - GEN
T1 - Computing Palindromes on a Trie in Linear Time
AU - Mieno, Takuya
AU - Funakoshi, Mitsuru
AU - Inenaga, Shunsuke
N1 - Publisher Copyright:
© Takuya Mieno, Mitsuru Funakoshi, and Shunsuke Inenaga.
PY - 2022/12/1
Y1 - 2022/12/1
N2 - A trie T is a rooted tree such that each edge is labeled by a single character from the alphabet, and the labels of out-going edges from the same node are mutually distinct. Given a trie T with n edges, we show how to compute all distinct palindromes and all maximal palindromes on T in O(n) time, in the case of integer alphabets of size polynomial in n. This improves the state-of-the-art O(n log h)-time algorithms by Funakoshi et al. [PSC 2019], where h is the height of T . Using our new algorithms, the eertree with suffix links for a given trie T can readily be obtained in O(n) time. Further, our trie-based O(n)-space data structure allows us to report all distinct palindromes and maximal palindromes in a query string represented in the trie T , in output optimal time. This is an improvement over an existing (naïve) solution that precomputes and stores all distinct palindromes and maximal palindromes for each and every string in the trie T separately, using a total O(n2) preprocessing time and space, and reports them in output optimal time upon query.
AB - A trie T is a rooted tree such that each edge is labeled by a single character from the alphabet, and the labels of out-going edges from the same node are mutually distinct. Given a trie T with n edges, we show how to compute all distinct palindromes and all maximal palindromes on T in O(n) time, in the case of integer alphabets of size polynomial in n. This improves the state-of-the-art O(n log h)-time algorithms by Funakoshi et al. [PSC 2019], where h is the height of T . Using our new algorithms, the eertree with suffix links for a given trie T can readily be obtained in O(n) time. Further, our trie-based O(n)-space data structure allows us to report all distinct palindromes and maximal palindromes in a query string represented in the trie T , in output optimal time. This is an improvement over an existing (naïve) solution that precomputes and stores all distinct palindromes and maximal palindromes for each and every string in the trie T separately, using a total O(n2) preprocessing time and space, and reports them in output optimal time upon query.
UR - http://www.scopus.com/inward/record.url?scp=85144234093&partnerID=8YFLogxK
UR - http://www.scopus.com/inward/citedby.url?scp=85144234093&partnerID=8YFLogxK
U2 - 10.4230/LIPIcs.ISAAC.2022.15
DO - 10.4230/LIPIcs.ISAAC.2022.15
M3 - Conference contribution
AN - SCOPUS:85144234093
T3 - Leibniz International Proceedings in Informatics, LIPIcs
BT - 33rd International Symposium on Algorithms and Computation, ISAAC 2022
A2 - Bae, Sang Won
A2 - Park, Heejin
PB - Schloss Dagstuhl- Leibniz-Zentrum fur Informatik GmbH, Dagstuhl Publishing
T2 - 33rd International Symposium on Algorithms and Computation, ISAAC 2022
Y2 - 19 December 2022 through 21 December 2022
ER -