Computing the LCP Array of a Labeled Graph (2404.14235v1)
Abstract: The LCP array is an important tool in stringology, allowing to speed up pattern matching algorithms and enabling compact representations of the suffix tree. Recently, Conte et al. [DCC 2023] and Cotumaccio et al. [SPIRE 2023] extended the definition of this array to Wheeler DFAs and, ultimately, to arbitrary labeled graphs, proving that it can be used to efficiently solve matching statistics queries on the graph's paths. In this paper, we provide the first efficient algorithm building the LCP array of a directed labeled graph with $n$ nodes and $m$ edges labeled over an alphabet of size $\sigma$. After arguing that the natural generalization of a compact-space LCP-construction algorithm by Beller et al. [J. Discrete Algorithms 2013] runs in time $\Omega(n\sigma)$, we present a new algorithm based on dynamic range stabbing building the LCP array in $O(n\log \sigma)$ time and $O(n\log\sigma)$ bits of working space.
- Replacing suffix trees with enhanced suffix arrays. Journal of discrete algorithms, 2(1):53β86, 2004.
- Regular Languages meet Prefix Sorting, pages 911β930. SIAM, 2020. URL: https://epubs.siam.org/doi/abs/10.1137/1.9781611975994.55, arXiv:https://epubs.siam.org/doi/pdf/10.1137/1.9781611975994.55, doi:10.1137/1.9781611975994.55.
- Longest common prefix arrays for succinct k-spectra. In FrancoΒ Maria Nardini, Nadia Pisanti, and Rossano Venturini, editors, String Processing and Information Retrieval - 30th International Symposium, SPIRE 2023, Pisa, Italy, September 26-28, 2023, Proceedings, volume 14240 of Lecture Notes in Computer Science, pages 1β13. Springer, 2023. doi:10.1007/978-3-031-43980-3_1.
- Small searchable ΞΊπ \kappaitalic_ΞΊ-spectra via subset rank queries on the spectral burrows-wheeler transform. In JonathanΒ W. Berry, DavidΒ B. Shmoys, Lenore Cowen, and Uwe Naumann, editors, SIAM Conference on Applied and Computational Discrete Algorithms, ACDA 2023, Seattle, WA, USA, May 31 - June 2, 2023, pages 225β236. SIAM, 2023. doi:10.1137/1.9781611977714.20.
- Sorting Finite Automata via Partition Refinement. In IngeΒ Li GΓΈrtz, Martin Farach-Colton, SimonΒ J. Puglisi, and Grzegorz Herman, editors, 31st Annual European Symposium on Algorithms (ESA 2023), volume 274 of Leibniz International Proceedings in Informatics (LIPIcs), pages 15:1β15:15, Dagstuhl, Germany, 2023. Schloss Dagstuhl β Leibniz-Zentrum fΓΌr Informatik. URL: https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.ESA.2023.15, doi:10.4230/LIPIcs.ESA.2023.15.
- Computing the longest common prefix array based on the BurrowsβWheeler transform. J. Discrete Algorithms, 18:22β31, 2013.
- Variable-order de bruijn graphs. In 2015 Data Compression Conference, pages 383β392, 2015. doi:10.1109/DCC.2015.70.
- M.Β Burrows and D.J. Wheeler. A Block Sorting data Compression Algorithm. Technical report, DEC Systems Research Center, 1994.
- Computing matching statistics on wheeler dfas. In 2023 Data Compression Conference (DCC), pages 150β159, 2023. doi:10.1109/DCC55655.2023.00023.
- Introduction to Algorithms (4th ed.). The MIT Press, 2022.
- Nicola Cotumaccio. Graphs can be succinctly indexed for pattern matching in oβ’(|e|2+|v|5/2)πsuperscriptπ2superscriptπ£52o(|e|^{2}+|v|^{5/2})italic_o ( | italic_e | start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT + | italic_v | start_POSTSUPERSCRIPT 5 / 2 end_POSTSUPERSCRIPT ) time. In 2022 Data Compression Conference (DCC), pages 272β281, 2022. doi:10.1109/DCC52660.2022.00035.
- Nicola Cotumaccio. Prefix Sorting DFAs: A Recursive Algorithm. In Satoru Iwata and Naonori Kakimura, editors, 34th International Symposium on Algorithms and Computation (ISAAC 2023), volume 283 of Leibniz International Proceedings in Informatics (LIPIcs), pages 22:1β22:15, Dagstuhl, Germany, 2023. Schloss Dagstuhl β Leibniz-Zentrum fΓΌr Informatik. URL: https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.ISAAC.2023.22, doi:10.4230/LIPIcs.ISAAC.2023.22.
- Nicola Cotumaccio. A Myhill-Nerode Theorem for Generalized Automata, with Applications to Pattern Matching and Compression. In Olaf Beyersdorff, MamadouΒ Moustapha KantΓ©, Orna Kupferman, and Daniel Lokshtanov, editors, 41st International Symposium on Theoretical Aspects of Computer Science (STACS 2024), volume 289 of Leibniz International Proceedings in Informatics (LIPIcs), pages 26:1β26:19, Dagstuhl, Germany, 2024. Schloss Dagstuhl β Leibniz-Zentrum fΓΌr Informatik. URL: https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.STACS.2024.26, doi:10.4230/LIPIcs.STACS.2024.26.
- Nicola Cotumaccio. Enhanced graph pattern matching, 2024. arXiv:2402.16205.
- Co-lexicographically ordering automata and regular languages - part i. J. ACM, 70(4), aug 2023. doi:10.1145/3607471.
- Space-time trade-offs for the LCP array of wheeler dfas. In FrancoΒ Maria Nardini, Nadia Pisanti, and Rossano Venturini, editors, String Processing and Information Retrieval - 30th International Symposium, SPIRE 2023, Pisa, Italy, September 26-28, 2023, Proceedings, volume 14240 of Lecture Notes in Computer Science, pages 143β156. Springer, 2023. doi:10.1007/978-3-031-43980-3_12.
- On Indexing and Compressing Finite Automata, pages 2585β2599. URL: https://epubs.siam.org/doi/abs/10.1137/1.9781611976465.153, arXiv:https://epubs.siam.org/doi/pdf/10.1137/1.9781611976465.153, doi:10.1137/1.9781611976465.153.
- P.Β Ferragina and G.Β Manzini. Opportunistic data structures with applications. In Proceedings 41st Annual Symposium on Foundations of Computer Science, pages 390β398, 2000. doi:10.1109/SFCS.2000.892127.
- Wheeler graphs: A framework for BWT-based data structures. Theoretical Computer Science, 698:67β78, 2017. doi:10.1016/j.tcs.2017.06.016.
- Range quantile queries: Another virtue of wavelet trees. In Jussi Karlgren, Jorma Tarhio, and Heikki HyyrΓΆ, editors, String Processing and Information Retrieval, pages 1β6, Berlin, Heidelberg, 2009. Springer Berlin Heidelberg.
- High-order entropy-compressed text indexes. In Proceedings of the Fourteenth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA β03, page 841β850, USA, 2003. Society for Industrial and Applied Mathematics.
- Faster Prefix-Sorting Algorithms for Deterministic Finite Automata. In Laurent Bulteau and Zsuzsanna LiptΓ‘k, editors, 34th Annual Symposium on Combinatorial Pattern Matching (CPM 2023), volume 259 of Leibniz International Proceedings in Informatics (LIPIcs), pages 16:1β16:16, Dagstuhl, Germany, 2023. Schloss Dagstuhl β Leibniz-Zentrum fΓΌr Informatik. URL: https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.CPM.2023.16, doi:10.4230/LIPIcs.CPM.2023.16.
- U.Β Manber and G.Β Myers. Suffix arrays: A new method for on-line string searches. SIAM J. Comput., 22(5):935β948, 1993. doi:10.1137/0222058.
- Yakov Nekrich. A Dynamic Stabbing-Max Data Structure with Sub-Logarithmic Query Time. In Proceedings of the 22nd International Symposium on Algorithms and Computations (ISAAC), pages 170β179, 2011. doi:10.1007/978-3-642-25591-5_19.
- Computational Geometry: An Introduction. Springer-Verlag, 1985.
- Space-efficient construction of compressed suffix trees. Theoretical Computer Science, 852:138β156, 2021.
- Succinct indexable dictionaries with applications to encoding k-ary trees, prefix sums and multisets. ACM Trans. Algorithms, 3(4):43βes, nov 2007. doi:10.1145/1290672.1290680.
- Bidirectional search in a string with wavelet trees and bidirectional matching statistics. Information and Computation, 213:13β22, 2012. Special Issue: Combinatorial Pattern Matching (CPM 2010). URL: https://www.sciencedirect.com/science/article/pii/S0890540112000235, doi:10.1016/j.ic.2011.03.007.
Collections
Sign up for free to add this paper to one or more collections.
Paper Prompts
Sign up for free to create and run prompts on this paper using GPT-5.