Revisiting the Folklore Algorithm for Random Access to Grammar-Compressed Strings
Alan M. Cleary, Joseph Winjum, Jordan Dood, Shunsuke Inenaga

TL;DR
This paper improves and adapts a classic random access algorithm for grammar-compressed strings, making it more practical and efficient for general grammars, thus enhancing real-world string manipulation capabilities.
Contribution
It revises a traditional folklore algorithm to work on general grammars and demonstrates its practical efficiency and speed in real-world scenarios.
Findings
Modified folklore algorithm is fast in practice
Works directly on general grammars
Memory-efficient implementation
Abstract
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 \emph{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 \emph{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.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsAlgorithms and Data Compression · Natural Language Processing Techniques · DNA and Biological Computing
