Citizendia
Your Ad Here

In computer science, a formal grammar is said to be in Chomsky normal form if all of its production rules are of the form:

ABC or
A → α or
S → λ

where A, B and C are nonterminal symbols, α is a terminal symbol (a symbol that represents a constant value), S is the start symbol, and λ is the empty string. Computer science (or computing science) is the study and the Science of the theoretical foundations of Information and Computation and their In Formal semantics, Computer science and Linguistics, a formal grammar (also called formation rules) is a precise description of a Formal In Computer science, terminal and nonterminal symbols are those symbols that are used to construct production rules in a Formal grammar. In Computer science and Formal language theory, the empty string is the unique string of length Zero. Also, neither B nor C may be the start symbol.

Every grammar in Chomsky normal form is context-free, and conversely, every context-free grammar can be efficiently transformed into an equivalent one which is in Chomsky normal form. In Formal language theory, a context-free grammar ( CFG) is a grammar in which every production rule is of the form V &rarr

With the exception of the optional rule S → λ (included when the grammar may generate the empty string), all rules of a grammar in Chomsky normal form are expansive; thus, throughout the derivation of a string, each string of terminals and nonterminals is always either the same length or one element longer than the previous such string. The derivation of a string of length n is always exactly 2n-1 steps long. Furthermore, since all rules deriving nonterminals transform one nonterminal to exactly two nonterminals, a parse tree based on a grammar in Chomsky normal form is a binary tree, and the height of this tree is limited to at most the length of the string.

Because of these properties, many proofs in the field of languages and computability make use of the Chomsky normal form. These properties also yield various efficient algorithms based on grammars in Chomsky normal form; for example, the CYK algorithm that decides whether a given string can be generated by a given grammar uses the Chomsky normal form. The Cocke-Younger-Kasami (CYK algorithm (alternatively called CKY determines whether a string can be generated by a given Context-free grammar and if so how it

The Chomsky normal form is named after Noam Chomsky, the US linguist who invented the Chomsky hierarchy. Avram Noam Chomsky (noʊm ˈtʃɑmski born December 7 1928 is an American linguist, Philosopher, cognitive scientist, Political The United States of America —commonly referred to as the Within the field of Computer science, specifically in the area of Formal languages, the Chomsky hierarchy (occasionally referred to as Chomsky–Schützenberger

Alternative definition

Some sources define Chomsky normal form in the following slightly different way:

A formal grammar is in Chomsky normal form if all of its production rules are of the form:

ABC or
A → α

where A, B and C are nonterminal symbols, and α is a terminal symbol. In Formal semantics, Computer science and Linguistics, a formal grammar (also called formation rules) is a precise description of a Formal In Computer science, terminal and nonterminal symbols are those symbols that are used to construct production rules in a Formal grammar. When using this definition, B or C may be the start symbol.

This definition differs from the previous one in that it precludes the possibility that the grammar will generate the empty string, λ. It remains true that any context-free grammar accepting a language L can be efficiently transformed into a grammar in Chomsky normal form that accepts L - {λ}. In Formal language theory, a context-free grammar ( CFG) is a grammar in which every production rule is of the form V &rarr The principal advantage of this later definition is that proofs are generally marginally simpler, due to the fact that each step in a derivation never decreases the length of the resulting string. Its disadvantage, of course, is that special consideration is needed if the original grammar generated λ.

See also

References


© 2009 citizendia.org; parts available under the terms of GNU Free Documentation License, from http://en.wikipedia.org
Dapyx Software network: MP3 Explorer | Ebook Manager | Zenithic