Finger Search in Grammar-Compressed Strings
Autor: | Inge Li Gørtz, Philip Bille, Patrick Hagge Cording, Anders Roy Christiansen |
---|---|
Rok vydání: | 2018 |
Předmět: |
FOS: Computer and information sciences
0102 computer and information sciences 02 engineering and technology 01 natural sciences Theoretical Computer Science Combinatorics Position (vector) Compression (functional analysis) Computer Science - Data Structures and Algorithms 0202 electrical engineering electronic engineering information engineering Data Structures and Algorithms (cs.DS) Mathematics 000 Computer science knowledge general works Linear space String (computer science) Compression Binary logarithm Finger search Grammars Computational Theory and Mathematics 010201 computation theory & mathematics Computer Science Theory of computation 020201 artificial intelligence & image processing Algorithms Random access |
Zdroj: | Bille, P, Christiansen, A R, Cording, P H & Gørtz, I L 2016, Finger Search in Grammar-Compressed Strings . in Proceedings of the 36th IARCS Annual Conference on Foundations of Software Technology and Theoretical Computer Science (FSTTCS 2016) ., 36, Schloss Dagstuhl-Leibniz-Zentrum für Informatik, Leibniz International Proceedings in Informatics, vol. 65, 36th IARCS Annual Conference on Foundations of Software Technology and Theoretical Computer Science (FSTTCS 2016), Chennai, India, 13/12/2016 . https://doi.org/10.4230/LIPIcs.FSTTCS.2016.36 Bille, P, Christiansen, A R, Cording, P H & Gørtz, I L 2018, ' Finger Search in Grammar-Compressed Strings ', Theory of Computing Systems, vol. 62, no. 8, pp. 1715-1735 . https://doi.org/10.1007/s00224-017-9839-9 |
ISSN: | 1433-0490 1432-4350 |
DOI: | 10.1007/s00224-017-9839-9 |
Popis: | Grammar-based compression, where one replaces a long string by a small context-free grammar that generates the string, is a simple and powerful paradigm that captures many popular compression schemes. Given a grammar, the random access problem is to compactly represent the grammar while supporting random access, that is, given a position in the original uncompressed string report the character at that position. In this paper we study the random access problem with the finger search property, that is, the time for a random access query should depend on the distance between a specified index $f$, called the \emph{finger}, and the query index $i$. We consider both a static variant, where we first place a finger and subsequently access indices near the finger efficiently, and a dynamic variant where also moving the finger such that the time depends on the distance moved is supported. Let $n$ be the size the grammar, and let $N$ be the size of the string. For the static variant we give a linear space representation that supports placing the finger in $O(\log N)$ time and subsequently accessing in $O(\log D)$ time, where $D$ is the distance between the finger and the accessed index. For the dynamic variant we give a linear space representation that supports placing the finger in $O(\log N)$ time and accessing and moving the finger in $O(\log D + \log \log N)$ time. Compared to the best linear space solution to random access, we improve a $O(\log N)$ query bound to $O(\log D)$ for the static variant and to $O(\log D + \log \log N)$ for the dynamic variant, while maintaining linear space. As an application of our results we obtain an improved solution to the longest common extension problem in grammar compressed strings. To obtain our results, we introduce several new techniques of independent interest, including a novel van Emde Boas style decomposition of grammars. |
Databáze: | OpenAIRE |
Externí odkaz: | |
Nepřihlášeným uživatelům se plný text nezobrazuje | K zobrazení výsledku je třeba se přihlásit. |