answersLogoWhite

0


Best Answer

1,In computer science, a formal grammar is said to be in Chomsky normal form if all of its production rules are of the form: 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. 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. 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 Chomsky normal form is named after Noam Chomsky, the US linguist who invented the Chomsky hierarchy. 2,In computer science, to say that a context-free grammar is in Greibach normal form (GNF) means that all production rules are of the form: where A is a nonterminal symbol, α is a terminal symbol, X is a (possibly empty) sequence of nonterminal symbols not including the start symbol, S is the start symbol, and λ is the null string. Observe that the grammar must be without left recursions. Every context-free grammar can be transformed into an equivalent grammar in Greibach normal form. (Some definitions do not consider the second form of rule to be permitted, in which case a context-free grammar that can generate the null string cannot be so transformed.) This can be used to prove that every context-free language can be accepted by a non-deterministic pushdown automaton. Given a grammar in GNF and a derivable string in the grammar with length n, any top-down parser will halt at depth n. Greibach normal form is named after Sheila Greibach.

User Avatar

Wiki User

15y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Difference between chomsky normal form and greibach normal form?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

5.2 Transform the following grammar to Chomsky Normal Form. s--0s1s s--1sos s--01100011?

Noam Chomsky is a leading innovator in linguistics, that is - the study of language.


What is the difference between a micro pet and a normal pet?

the difference between a micro pet and a normal pet is that a micro pet is a really small animal such as a micro pig and a normal animal is a animal just like a normal person normal size normal wight and that is the difference between a normal animal and a micro animal.


What is the difference between normal saline solution and ringer's lactate solution?

What is the difference between normal saline solution and ringer's lactate solution?


What is the difference between a normal and a participating preference share?

what is defference between normal and preference shares


What is the difference between normal and average respiratory rate?

The difference between normal and average respiratory rate is simple. Normal is healthy and cannot change and average most certainly can change.


What is the difference between sowing and planting?

The treatment effect is the difference between the observed outcome and the "normal" outcome


What the difference between a pie and tartlet?

The treatment effect is the difference between the observed outcome and the "normal" outcome


What is the difference between a normal guitar and a junior guitar?

The difference between a normal guitar and a junior guitar is primarily its size. A Junior guitar is shorter and about three quarters the size of a normal guitar.


What is the difference between inferior and normal goods?

Cheese


What is the difference between a normal piano and a pianoforte?

unsure


What is the Difference between normal relief and high relief coin?

what is differenc between high relief and normal relief


What is the Difference between a normal paper and currency paper?

the main difference between currency paper and normal paper is that the currency paper is made up of cotton fibres and the normal paper is obtainde from trees