Computing runs on a trie

Research output: Chapter in Book/Report/Conference proceedingConference contribution

Abstract

A maximal repetition, or run, in a string, is a maximal periodic substring whose smallest period is at most half the length of the substring. In this paper, we consider runs that correspond to a path on a trie, or in other words, on a rooted edge-labeled tree where the endpoints of the path must be a descendant/ancestor of the other. For a trie with n edges, we show that the number of runs is less than n. We also show an O(n√log n log log n) time and O(n) space algorithm for counting and finding the shallower endpoint of all runs. We further show an O(n log n) time and O(n) space algorithm for finding both endpoints of all runs. We also discuss how to improve the running time even more.

Original languageEnglish
Title of host publication30th Annual Symposium on Combinatorial Pattern Matching, CPM 2019
EditorsNadia Pisanti, Solon P. Pissis
PublisherSchloss Dagstuhl- Leibniz-Zentrum fur Informatik GmbH, Dagstuhl Publishing
ISBN (Electronic)9783959771030
DOIs
Publication statusPublished - Jun 1 2019
Event30th Annual Symposium on Combinatorial Pattern Matching, CPM 2019 - Pisa, Italy
Duration: Jun 18 2019Jun 20 2019

Publication series

NameLeibniz International Proceedings in Informatics, LIPIcs
Volume128
ISSN (Print)1868-8969

Conference

Conference30th Annual Symposium on Combinatorial Pattern Matching, CPM 2019
CountryItaly
CityPisa
Period6/18/196/20/19

All Science Journal Classification (ASJC) codes

  • Software

Cite this

Sugahara, R., Nakashima, Y., Inenaga, S., Bannai, H., & Takeda, M. (2019). Computing runs on a trie. In N. Pisanti, & S. P. Pissis (Eds.), 30th Annual Symposium on Combinatorial Pattern Matching, CPM 2019 [23] (Leibniz International Proceedings in Informatics, LIPIcs; Vol. 128). Schloss Dagstuhl- Leibniz-Zentrum fur Informatik GmbH, Dagstuhl Publishing. https://doi.org/10.4230/LIPIcs.CPM.2019.23

Computing runs on a trie. / Sugahara, Ryo; Nakashima, Yuto; Inenaga, Shunsuke; Bannai, Hideo; Takeda, Masayuki.

30th Annual Symposium on Combinatorial Pattern Matching, CPM 2019. ed. / Nadia Pisanti; Solon P. Pissis. Schloss Dagstuhl- Leibniz-Zentrum fur Informatik GmbH, Dagstuhl Publishing, 2019. 23 (Leibniz International Proceedings in Informatics, LIPIcs; Vol. 128).

Research output: Chapter in Book/Report/Conference proceedingConference contribution

Sugahara, R, Nakashima, Y, Inenaga, S, Bannai, H & Takeda, M 2019, Computing runs on a trie. in N Pisanti & SP Pissis (eds), 30th Annual Symposium on Combinatorial Pattern Matching, CPM 2019., 23, Leibniz International Proceedings in Informatics, LIPIcs, vol. 128, Schloss Dagstuhl- Leibniz-Zentrum fur Informatik GmbH, Dagstuhl Publishing, 30th Annual Symposium on Combinatorial Pattern Matching, CPM 2019, Pisa, Italy, 6/18/19. https://doi.org/10.4230/LIPIcs.CPM.2019.23
Sugahara R, Nakashima Y, Inenaga S, Bannai H, Takeda M. Computing runs on a trie. In Pisanti N, Pissis SP, editors, 30th Annual Symposium on Combinatorial Pattern Matching, CPM 2019. Schloss Dagstuhl- Leibniz-Zentrum fur Informatik GmbH, Dagstuhl Publishing. 2019. 23. (Leibniz International Proceedings in Informatics, LIPIcs). https://doi.org/10.4230/LIPIcs.CPM.2019.23
Sugahara, Ryo ; Nakashima, Yuto ; Inenaga, Shunsuke ; Bannai, Hideo ; Takeda, Masayuki. / Computing runs on a trie. 30th Annual Symposium on Combinatorial Pattern Matching, CPM 2019. editor / Nadia Pisanti ; Solon P. Pissis. Schloss Dagstuhl- Leibniz-Zentrum fur Informatik GmbH, Dagstuhl Publishing, 2019. (Leibniz International Proceedings in Informatics, LIPIcs).
@inproceedings{a8249056e9904018b505d49c2f852b83,
title = "Computing runs on a trie",
abstract = "A maximal repetition, or run, in a string, is a maximal periodic substring whose smallest period is at most half the length of the substring. In this paper, we consider runs that correspond to a path on a trie, or in other words, on a rooted edge-labeled tree where the endpoints of the path must be a descendant/ancestor of the other. For a trie with n edges, we show that the number of runs is less than n. We also show an O(n√log n log log n) time and O(n) space algorithm for counting and finding the shallower endpoint of all runs. We further show an O(n log n) time and O(n) space algorithm for finding both endpoints of all runs. We also discuss how to improve the running time even more.",
author = "Ryo Sugahara and Yuto Nakashima and Shunsuke Inenaga and Hideo Bannai and Masayuki Takeda",
year = "2019",
month = "6",
day = "1",
doi = "10.4230/LIPIcs.CPM.2019.23",
language = "English",
series = "Leibniz International Proceedings in Informatics, LIPIcs",
publisher = "Schloss Dagstuhl- Leibniz-Zentrum fur Informatik GmbH, Dagstuhl Publishing",
editor = "Nadia Pisanti and Pissis, {Solon P.}",
booktitle = "30th Annual Symposium on Combinatorial Pattern Matching, CPM 2019",

}

TY - GEN

T1 - Computing runs on a trie

AU - Sugahara, Ryo

AU - Nakashima, Yuto

AU - Inenaga, Shunsuke

AU - Bannai, Hideo

AU - Takeda, Masayuki

PY - 2019/6/1

Y1 - 2019/6/1

N2 - A maximal repetition, or run, in a string, is a maximal periodic substring whose smallest period is at most half the length of the substring. In this paper, we consider runs that correspond to a path on a trie, or in other words, on a rooted edge-labeled tree where the endpoints of the path must be a descendant/ancestor of the other. For a trie with n edges, we show that the number of runs is less than n. We also show an O(n√log n log log n) time and O(n) space algorithm for counting and finding the shallower endpoint of all runs. We further show an O(n log n) time and O(n) space algorithm for finding both endpoints of all runs. We also discuss how to improve the running time even more.

AB - A maximal repetition, or run, in a string, is a maximal periodic substring whose smallest period is at most half the length of the substring. In this paper, we consider runs that correspond to a path on a trie, or in other words, on a rooted edge-labeled tree where the endpoints of the path must be a descendant/ancestor of the other. For a trie with n edges, we show that the number of runs is less than n. We also show an O(n√log n log log n) time and O(n) space algorithm for counting and finding the shallower endpoint of all runs. We further show an O(n log n) time and O(n) space algorithm for finding both endpoints of all runs. We also discuss how to improve the running time even more.

UR - http://www.scopus.com/inward/record.url?scp=85068064626&partnerID=8YFLogxK

UR - http://www.scopus.com/inward/citedby.url?scp=85068064626&partnerID=8YFLogxK

U2 - 10.4230/LIPIcs.CPM.2019.23

DO - 10.4230/LIPIcs.CPM.2019.23

M3 - Conference contribution

AN - SCOPUS:85068064626

T3 - Leibniz International Proceedings in Informatics, LIPIcs

BT - 30th Annual Symposium on Combinatorial Pattern Matching, CPM 2019

A2 - Pisanti, Nadia

A2 - Pissis, Solon P.

PB - Schloss Dagstuhl- Leibniz-Zentrum fur Informatik GmbH, Dagstuhl Publishing

ER -