Determine the type of the following grammars into the Chomsky Hierarchy (e.g. Type-0, Type-1, Type-2 and Type-3). 1.) G=({a,b}, {A,B,S}, S, P), P={S::=aA, A::=bB, A::=aA, A::=a, B::=λ} 2.) G=({a,b,c},...


Determine the type of the following grammars into the Chomsky Hierarchy
(e.g. Type-0, Type-1, Type-2 and Type-3).




1.)
G=({a,b}, {A,B,S}, S, P),
P={S::=aA, A::=bB, A::=aA, A::=a, B::=λ}




2.)
G=({a,b,c}, {A,B,C,S}, S, P),
P={S::=aAb, S::=Ba, S::=λ, aAbC::=aAbB, aAbC::=aabC, BCc::=AaCc,
BCc::=BaAbc, C::=Ca, C::=a}




3.)
G=({ house, garden, cat}, {S, CASTLE, FOREST, TIGER }, S, P),
P={ S::=TIGER garden, S::=FOREST CASTLE, FOREST::=λ, garden
CASTLE TIGHER house::=garden FOREST TIGER house, cat
CASTLE FOREST::=cat FOREST house TIGER FOREST,
FOREST::=TIGER house, FOREST::=garden }




4.)
G=({x,y}, {C,A,B,S}, S, P),
P={S::=Cx, S::=Cy, S::=By, S::=Ax, S::=x, S::=y, A::=Ax, A::=Cx,
A::=x,
B::=By, B::=yA, C::=xA}




5.)
G=({a,b,c}, {S,B}, S, P),
P={S::=abc, S::=aBSc, Ba::=aB, Bb::=bb}



Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here