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 has a grammar of length , 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 where is the length of the given string and 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 would also improve certain algorithms for approximate addition chains.[5]
^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. ISBN 978-1-4503-1963-8 doi:10.1145/2463372.2463441
^ abLohrey, Markus (2012). "Algorithmics on SLP-compressed strings: A survey" (PDF). Groups Complexity Cryptology. 4 (2): 241–299. doi:10.1515/GCC-2012-0016.
^Charikar, Moses; Lehman, Eric; Liu, Ding; Panigrahy, Rina; Prabhakaran, Manoj; Rasala, April; Sahai, Amit; Shelat, Abhi (2002). "Approximating the Smallest Grammar: Kolmogorov Complexity in Natural Models" (PDF). Proceedings of the thirty-fourth annual ACM symposium on theory of computing (STOC 2002), Montreal, Quebec, Canada, May 19–21, 2002. New York, NY: ACM Press. pp. 792–801. doi:10.1145/509907.510021. ISBN 978-1-581-13495-7. S2CID 282489. Zbl 1192.68397.
and 24 Related for: Smallest grammar problem information
methods, the boundary conditions are directly specified as a part of the problem being solved. Or, for the MDCT (based on the type-IV DCT), the boundary...
where zero is considered neither positive nor negative, 1 is the first and smallest positive integer. It is also sometimes considered the first of the infinite...
words) of the accusative case in modern Finnish. The recent, authoritative grammar Iso suomen kielioppi takes the position that only the personal pronouns...
syntax/semantics but also grammar/lexis, language/thought, competence/performance. Once these dichotomies had been set up, the problem arose of locating and...
other cases recursively in terms of the simple one. A recursive grammar is a formal grammar that contains recursive production rules. Recursion is sometimes...
_{0}<|S|<2^{\aleph _{0}}} . Assuming the axiom of choice, there is a unique smallest cardinal number ℵ 1 {\displaystyle \aleph _{1}} greater than ℵ 0 {\displaystyle...
classification, multiclass classification or multinomial classification is the problem of classifying instances into one of three or more classes (classifying...
The grammar of Old English differs a lot from Modern English, predominantly being much more inflected. As a Germanic language, Old English has a morphological...
class of cardinal numbers is totally ordered, and thus ℵ1 is the second-smallest infinite cardinal number. One can show one of the most useful properties...
statistics, the multiple comparisons, multiplicity or multiple testing problem occurs when one considers a set of statistical inferences simultaneously...
a shift in focus in the 20th century towards formalism and generative grammar, which studies the universal properties of language, historical research...
such as Dik's functional grammar (FG, or as now often termed, functional discourse grammar) and role and reference grammar. To avoid confusion, the full...
Meillet Among Indo-European languages, Lithuanian is conservative in its grammar and phonology, retaining archaic features otherwise found only in ancient...
intonation/pitch is pivotal in spoken grammar and is the basic information used by children to learn the grammar of whatever language. Language users have...
conservative, and may incorporate older or more formal vocabulary and grammar. The "low variety", often the spoken language, is used in everyday conversation...
finding antiderivatives) Closest pair problem: find the pair of points (from a set of points) with the smallest distance between them Collision detection...
effectiveness remain under discussion. It was believed that it can mitigate the problem of internal covariate shift, where parameter initialization and changes...
expectations over the whole state-space, which is impractical for all but the smallest (finite) Markov decision processes. In reinforcement learning methods,...
numbers and return a single natural number (just as above). They are the smallest class of partial functions that includes the constant, successor, and projection...