Answered step by step
Verified Expert Solution
Question
1 Approved Answer
5. (5 marks) Consider languages over terminal alphabet ={a,b,c,d}. - Give context-free grammars that generate the following five languages. - In each case, also give
5. (5 marks) Consider languages over terminal alphabet ={a,b,c,d}. - Give context-free grammars that generate the following five languages. - In each case, also give a derivation of the specified terminal string using your grammar. The derivation beginning from the start variable should indicate each individual derivation step using the notation . (a) L1={b2ic3k+1ki0} Derivation for the string: b2c4. (b) L2={aibkc2ii1,k1}{c3kdkk1} Derivation for the string: a2bc4 (c) L3={a2ib2i+1c5k+2i1,k1} Derivation for the string: a4b5c7. (d) L4={a2rb3i+1c3s+1di+1i1,r1,s1} Derivation for the string: a4b4c7d2 (e) L5={a3i+1bi+3c2kd2ki0,k0}{a2rbsc5sdr+1r0,s0} Derivation for the string: a2bc5d2
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started