Example of Chomsky Normal Form Assignment Help

Assignment Help: >> Chomsky Normal Form >> Example of Chomsky Normal Form

Example of Chomsky Normal Form:

Given a context-free grammar G = (V, Σ, P, S), 1 can construct a context- free grammar G' = (V', Σ,P', S') such that:

(1) L(G')= L(G);

(2) P' contains no-rules other than S'  , and S'   P'   iff   L(G);

(3) S'  does not take place on right-hand side of production in P'.

Proof . We begin by proving that E(G)= Ei0 . For specifically this, we prove that E(G) Ei0  and Ei0  E(G).

To prove that Ei0  E(G), we continue by induction on i.  As E0 = {A N  | (A ) P }, we have  A, and hence A  E(G).   By the induction  hypothesis, E⊆ E(G). If Ei+1 , either A Ei  and then A E(G), or there is production (A  B1  ... Bj ... Bk ) P , such that Bj  Ei  for all j, 1 j k.  By induction hypothesis, B => for each j,1 j k, and therefore

781_example ofChomsky Normal Form1.png

which signifies that A E(G).

To prove that E(G) Ei0 , we also proceed by induction,  but on the length of a derivation . If A =>, then A P , and thus A Eas E= {A N  | (A ) P }.

If A =>, then

98_example ofChomsky Normal Form2.png

for some production  A α P . If α contains terminals of nonterminals not in E(G), it is not possible to derive   from α, and thus, we should have α = B1  ... Bj ... Bk , with Bj E(G), for all j, 1 j k.  But, Bj => ∈ where nj  n, and by the induction hypothesis,Bj Ei0 . But then, we get A Ei0 +1 = Ei0, as desired.

Having shown that E(G)= Ei0 , we construct  grammar G'. First, we create the production  S'S  where S' /  V , to make sure that S'  does not occur on right-hand side of any rule in P'. Let

2111_example ofChomsky Normal Form3.png

and let P2  be the set of productions

1325_example ofChomsky Normal Form9.png

Keep in mind that L(G) i? S E(G). If S / E(G), then let P'= P1 P2, and if S E(G), then let P'= P1 P2 {S'  }. We claim that L(G')= L(G), which can proved by showing that every derivation using G can be simulated by a derivation using G', and vice-versa. All conditions of the lemma are now achived.

From a practical point of view, the construction  or lemma is quite costly. for instance, given a grammar containing the productions

1508_example ofChomsky Normal Form10.png

eliminating the   rules will create 26  - 1 = 63 new rules corresponding  to 63 nonempty subsets of set {A, B, C, D, E, F }. Now turn to elimination of chain rules.

It turns out that matters are simplified greatly if we 1st apply lemma 3.3.1 to the input grammar G, and we explain the construction assuming that G = (V, Σ, P, S) satisfies the conditions of lemma. For every nonterminal A N , we describe the set

73_example ofChomsky Normal Form4.png

The sets IA are computed by using approximations IA,i can be defined as follows:

 

783_example ofChomsky Normal Form5.png

Obviously, for every A N , the IA,i form the ascending chain

 

759_example ofChomsky Normal Form6.png

and as N  is finite, there is a least i, say i0, such that 182_example ofChomsky Normal Form7.pngWe claim that 1293_example ofChomsky Normal Form8.png

 

Email based Automata assignment help – homework help

The study of automata is an important area of theory of computation. Students feel trouble in solving automata questions. We at www.expertsmind.com offers Automata assignment help – Automata homework help and online tutoring with best qualified and experienced computer science tutor’s help. We cover all topics including Example of Chomsky Normal Form in assignment help – homework help service. Get solved problems in automata theory with step by step answers anytime from expert tutors at expertsmind.

 

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd