请输入您要查询的百科知识:

 

词条 Grammar-based code
释义

  1. Examples and characteristics

  2. Practical algorithms

  3. See also

  4. References

  5. External links

Grammar-based codes or Grammar-based compression are compression algorithms based on the idea of constructing a context-free grammar (CFG) for the string to be compressed. Examples include universal lossless data compression algorithms.[1] To compress a data sequence , a grammar-based code transforms into a context-free grammar .

The problem of finding a smallest grammar for an input sequence is known to be NP-hard,[2] so many grammar-transform algorithms are proposed from theoretical and practical viewpoints.

Generally, the produced grammar is further compressed by statistical encoders like arithmetic coding.

Examples and characteristics

The class of grammar-based codes is very broad. It includes block codes, variations of the incremental parsing Lempel-Ziv code,[3] the multilevel pattern matching (MPM) algorithm,[4] and many other new universal lossless compression algorithms.

Grammar-based codes are universal in the sense that they can achieve asymptotically the entropy rate of any stationary, ergodic source with a finite alphabet.

Practical algorithms

The compression programs of the following are available from external links.

  • Sequitur[5] is a classical grammar compression algorithm that sequentially translates an input text into a CFG, and then the produced CFG is encoded by an arithmetic coder.
  • Re-Pair[6] is a greedy algorithm using the strategy of most-frequent-first substitution. The compressive performance is powerful, although the main memory space requirement is very large.
  • GLZA,[7] which constructs a grammar that may be reducible, i.e., contain repeats, where the entropy-coding cost of "spelling out" the repeats is less than the cost creating and entropy-coding a rule to capture them. (In general, the compression-optimal SLG is not irreducible, and the Smallest Grammar Problem is different from the actual SLG compression problem.)

See also

  • Smallest grammar problem
  • Straight-line grammar

References

1. ^{{Citation | last = Kieffer | first = J. C. | last2 = Yang | first2 = E.-H. | title = Grammar-based codes: A new class of universal lossless source codes | journal = IEEE Trans. Inf. Theory | volume = 46 | pages = 737–754 | year = 2000 | doi = 10.1109/18.841160 | issue = 3 }}
2. ^{{Citation | last = Charikar | first = M. | last2 = Lehman | first2 = E. | last3 = Liu | first3 = D. | last4 = Panigrahy | first4 = R. | last5 = Prabharakan | first5 = M. | last6 = Sahai | first6 = A. | last7 = Shelat | first7 = A. | title = The Smallest Grammar Problem | journal = IEEE Trans. Inf. Theory | volume = 51 | pages = 2554–2576 | year = 2005 | issue = 7 | doi=10.1109/tit.2005.850116}}
3. ^{{Citation | last = Kieffer | first = J. C. | last2 = Yang | first2 = E.-H. | last3 = Nelson | first3 = G. | last4 = Cosman | first4 = P. | title = Universal lossless compression via multilevel pattern matching | journal = IEEE Trans. Inf. Theory | volume = 46 | pages = 1227–1245 | year = 2000 | doi = 10.1109/18.850665 | issue = 4 }}
4. ^{{Citation | last = Ziv | first = J. | last2 = Lempel | first2 = A. | title = Compression of individual sequences via variable rate coding | journal = IEEE Trans. Inf. Theory | volume = 24 | pages = 530–536 | year = 1978 | doi = 10.1109/TIT.1978.1055934 | issue = 5 }}
5. ^{{Citation | last = Nevill-Manning | first = C. G. | last2 = Witten | first2 = I. H. | title = Identifying Hierarchical Structure in Sequences: A linear-time algorithm | journal = Journal of Artificial Intelligence Research | volume = 7 | pages = 67–82 | year = 1997 | doi = | issue = 4 | hdl=10289/1186}}
6. ^{{Citation | last = Larsson | first = N. J. | last2 = Moffat | first2 = A. | title = Offline Dictionary-Based Compression | journal = IEEE | volume = 88 | pages = 1722–1732| year = 2000 | issue = 11 | doi=10.1109/5.892708}}
7. ^{{Citation | last = Conrad | first = Kennon J. | last2 = Wilson | first2 = Paul R. | title = Grammatical Ziv-Lempel Compression: Achieving PPM-Class Text Compression Ratios with LZ-Class Decompression Speed | journal = IEEE Data Compression Conference | year = 2016 | doi=10.1109/DCC.2016.119}}

External links

  • [https://encode.ru/threads/2427-GLZA GLZA discussion and paper]
  • Description of grammar-based codes with example
  • Sequitur codes
  • Re-Pair codes
  • Re-Pair codes a version of Gonzalo Navarro.
  • [https://github.com/GrammarViz2/grammarviz2_src GrammarViz 2.0] - implementation of Sequitur, Re-Pair, and parallel Re-Pair in Java.

3 : Data compression|Coding theory|Information theory

随便看

 

开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。

 

Copyright © 2023 OENC.NET All Rights Reserved
京ICP备2021023879号 更新时间:2024/11/15 19:03:09