License: Creative Commons Attribution 4.0 International license (CC BY 4.0)
When quoting this document, please refer to the following
DOI: 10.4230/LIPIcs.CPM.2022.26
URN: urn:nbn:de:0030-drops-161530
URL: http://dagstuhl.sunsite.rwth-aachen.de/volltexte/2022/16153/
Mieno, Takuya ;
Inenaga, Shunsuke ;
Horiyama, Takashi
{RePair} Grammars Are the Smallest Grammars for Fibonacci Words
Abstract
Grammar-based compression is a loss-less data compression scheme that represents a given string w by a context-free grammar that generates only w. While computing the smallest grammar which generates a given string w is NP-hard in general, a number of polynomial-time grammar-based compressors which work well in practice have been proposed. RePair, proposed by Larsson and Moffat in 1999, is a grammar-based compressor which recursively replaces all possible occurrences of a most frequently occurring bigrams in the string. Since there can be multiple choices of the most frequent bigrams to replace, different implementations of RePair can result in different grammars. In this paper, we show that the smallest grammars generating the Fibonacci words F_k can be completely characterized by RePair, where F_k denotes the k-th Fibonacci word. Namely, all grammars for F_k generated by any implementation of RePair are the smallest grammars for F_k, and no other grammars can be the smallest for F_k. To the best of our knowledge, Fibonacci words are the first non-trivial infinite family of strings for which RePair is optimal.
BibTeX - Entry
@InProceedings{mieno_et_al:LIPIcs.CPM.2022.26,
author = {Mieno, Takuya and Inenaga, Shunsuke and Horiyama, Takashi},
title = {{\{RePair\} Grammars Are the Smallest Grammars for Fibonacci Words}},
booktitle = {33rd Annual Symposium on Combinatorial Pattern Matching (CPM 2022)},
pages = {26:1--26:17},
series = {Leibniz International Proceedings in Informatics (LIPIcs)},
ISBN = {978-3-95977-234-1},
ISSN = {1868-8969},
year = {2022},
volume = {223},
editor = {Bannai, Hideo and Holub, Jan},
publisher = {Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
address = {Dagstuhl, Germany},
URL = {https://drops.dagstuhl.de/opus/volltexte/2022/16153},
URN = {urn:nbn:de:0030-drops-161530},
doi = {10.4230/LIPIcs.CPM.2022.26},
annote = {Keywords: grammar based compression, Fibonacci words, RePair, smallest grammar problem}
}
Keywords: |
|
grammar based compression, Fibonacci words, RePair, smallest grammar problem |
Collection: |
|
33rd Annual Symposium on Combinatorial Pattern Matching (CPM 2022) |
Issue Date: |
|
2022 |
Date of publication: |
|
22.06.2022 |