Smallest grammar problem

From Wikipedia, the free encyclopedia
Revision as of 18:32, 16 October 2024 by imported>SimLibrarian (add navbox that links here)
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

In data compression and the theory of formal languages, the smallest grammar problem is the problem of finding the smallest context-free grammar that generates a given string of characters (but no other string). The size of a grammar is defined by some authors as the number of symbols on the right side of the production rules.[1] Others also add the number of rules to that.[2] A grammar that generates only a single string, as required for the solution to this problem, is called a straight-line grammar.[3]

Every binary string of length n has a grammar of length O(n/logn), as expressed using big O notation.[3] For binary de Bruijn sequences, no better length is possible.[4]

The (decision version of the) smallest grammar problem is NP-complete.[1] It can be approximated in polynomial time to within a logarithmic approximation ratio; more precisely, the ratio is O(logng) where n is the length of the given string and g is the size of its smallest grammar. It is hard to approximate to within a constant approximation ratio. An improvement of the approximation ratio to o(logn/loglogn) would also improve certain algorithms for approximate addition chains.[5]

See also

References

Template:Reflist

External links

  • Script error: No such module "citation/CS1".

Template:Compression methods


Template:Algorithm-stub

  1. a b Script error: No such module "Citation/CS1".
  2. Florian Benz and Timo Kötzing, “An effective heuristic for the smallest grammar problem,” Proceedings of the fifteenth annual conference on Genetic and evolutionary computation conference - GECCO ’13, 2013. Template:Isbn Script error: No such module "doi".
  3. a b Script error: No such module "Citation/CS1".
  4. Script error: No such module "Citation/CS1".
  5. Script error: No such module "citation/CS1".