Least Fixed-Points and the Greibach Normal Form Assignment Help

Assignment Help: >> Context-free grammars and languages >> Least Fixed-Points and the Greibach Normal Form

Least Fixed-Points and the Greibach Normal Form:

The difficult part in converting a grammar G = (V, Σ, P, S) to Greibach Normal Form is to convert it to a grammar in weak Greibach Normal Form, where productions are of the form

A aα, or

S → ,

where a Σ, α V*, and if S ∈ is a rule, then S does not take place on the right-hand side of any rule. Indeed, if we 1st convert G to Chomsky Normal Form, it turns out that we will get rules of the form A aBC , A aB  or A a.

By using the algorithm for eliminating ∈-rules and chain  rules, we can 1st convert the proper grammar to a grammar with no chain rules and no  -rules except possibly S → ∈, in which case, S  doesn't appear on right-hand side of rules.  Therefore, for the purpose of converting to weak Greibach Normal Form, we can assume that we are dealing with grammars without chain rules and without -rules.  Let us assume that we computed the set T (G) of nonterminals which derive some terminal string, and that useless productions involving symbols not in T (G) have been deleted.

Now let us explain the idea of the conversion by using the following grammar:

A AaB  + BB  + b.

B Bd + BAa + aA + c.

The 1st step is to group the right-hand sides α into 2 categories: those whose leftmost symbol is a terminal (α ΣV*) and those whose leftmost symbol is a nonterminal (α NV*). It is convenient to adopt a matrix notation, and we can write above grammar as follows

 

2139_Least Fixed-Points and the Greibach Normal Form.png

Therefore, we are dealing with matrices whose entries are finite subsets of V*. For the notational simplicity, braces around singleton sets are removed. The finite subsets of V* form a semiring, where addition  is union, and multiplication  is concatenation. Addition and multiplication of matrices are as usual, except that the semiring operations are used. We will consider matrices whose entries are languages over Σ. Again, languages over Σ form a semiring, where addition  is union, and multiplication is concatenation. The identity element for the addition is , and  identity  element for the multiplication   is {}. As above, multiplication and addition of matrices are as usual, except the semiring operations are used. For instance, given any languages Ai,j and Bi,j over Σ, here i, j {1, 2}, we have

501_Least Fixed-Points and the Greibach Normal Form1.png

245_Least Fixed-Points and the Greibach Normal Form2.png

Generally, given any context-free grammar G = (V, Σ, P, S) with m  nonterminals A1 , .. ., Am , supposing that there are no chain rules, no -rules, and that every nonterminal belongs to T (G), supposing

= (A1,..., Am),

we can write G as

X = XH  + K,

for some appropriate m × m matrix H in which every entry contains a set of strings in V+, and some row vector K in which every entry contains a set of strings α each starting with a terminal (α ΣV* ).

Given an m × m square matrix A = (Ai,j ) of languages over Σ, we de?ne the matrix A* whose entry A*ij is given as

555_Least Fixed-Points and the Greibach Normal Form3.png

here A0 = Idm , the identity matrix, and An  is the nth power of A.  Likewise, we de?ne Ahere

1499_Least Fixed-Points and the Greibach Normal Form4.png

Given a matrix A where entries are finite subset of V*, where N = {A1 ,..., Am}, for m-tuple Λ = (L1 ,..., Lm) of languages over Σ, we assume

Φ[Λ](A) = (Φ[Λ](Ai,j )).

Given a system X = XH  + K  where H is an m × m matrix and X, K  are row matrices, if H  and K  do not have any nonterminals, we claim that least fixed-point of grammar G associated with X = XH  + K  is KH*. This can be seen by computing the approximations Xn = Φn (,..., ). Indeed,  X0 = K, and

631_Least Fixed-Points and the Greibach Normal Form6.png

Likewise, if Y  is an m × m  matrix of nonterminals, least fixed-point of grammar associated with = HY  + H is H + (given that H does not contain any nonterminals).

Given context-free grammar G  = (V, Σ, P, S) having m  nonterminals A1, .. ., Am , writing G as X = XH  + K  as explained  previously, we can form another grammar GH  by creating m2   new nonterminals Yi,j , where rules of this new grammar can be defined by the system of 2 matrix equations 

X = KY  + K,

= HY  + H,

where Y  = (Yi,j ).

 

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 Least Fixed-Points and the Greibach 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