TY - GEN
T1 - Revisiting the Folklore Algorithm for Random Access to Grammar-Compressed Strings
AU - Cleary, Alan M.
AU - Winjum, Joseph
AU - Dood, Jordan
AU - Inenaga, Shunsuke
N1 - Publisher Copyright:
© The Author(s), under exclusive license to Springer Nature Switzerland AG 2025.
PY - 2025
Y1 - 2025
N2 - Grammar-based compression is a widely-accepted model of string compression that allows for efficient and direct manipulations on the compressed data. Most, if not all, such manipulations rely on the primitive random access queries, a task of quickly returning the character at a specified position of the original uncompressed string without explicit decompression. While there are advanced data structures for random access to grammar-compressed strings that guarantee theoretical query time and space bounds, little has been done for the practical perspective of this important problem. In this paper, we revisit a well-known folklore random access algorithm for grammars in the Chomsky normal form, modify it to work directly on general grammars, and show that this modified version is fast and memory efficient in practice.
AB - Grammar-based compression is a widely-accepted model of string compression that allows for efficient and direct manipulations on the compressed data. Most, if not all, such manipulations rely on the primitive random access queries, a task of quickly returning the character at a specified position of the original uncompressed string without explicit decompression. While there are advanced data structures for random access to grammar-compressed strings that guarantee theoretical query time and space bounds, little has been done for the practical perspective of this important problem. In this paper, we revisit a well-known folklore random access algorithm for grammars in the Chomsky normal form, modify it to work directly on general grammars, and show that this modified version is fast and memory efficient in practice.
KW - grammar-based compression
KW - random access
KW - straight-line programs
UR - http://www.scopus.com/inward/record.url?scp=85205359378&partnerID=8YFLogxK
UR - http://www.scopus.com/inward/citedby.url?scp=85205359378&partnerID=8YFLogxK
U2 - 10.1007/978-3-031-72200-4_7
DO - 10.1007/978-3-031-72200-4_7
M3 - Conference contribution
AN - SCOPUS:85205359378
SN - 9783031721991
T3 - Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
SP - 88
EP - 101
BT - String Processing and Information Retrieval - 31st International Symposium, SPIRE 2024, Proceedings
A2 - Lipták, Zsuzsanna
A2 - Moura, Edleno
A2 - Figueroa, Karina
A2 - Baeza-Yates, Ricardo
PB - Springer Science and Business Media Deutschland GmbH
T2 - 31st International Symposium on String Processing and Information Retrieval, SPIRE 2024
Y2 - 23 September 2024 through 25 September 2024
ER -