Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1 . Draw a derivation tree for the string bab from the CFG given by S - > bSb | a | b 2 .

1. Draw a derivation tree for the string "bab" from the CFG given by
S -> bSb | a | b
2. Construct a derivation tree for the string aabbabba for the CFG given by,
S -> aB | bA
A -> a | aS | bAA
B -> b | bS | aBB
3. Show the derivation tree for string "aabbbb" with the following grammar.
S -> AB |\epsi
A -> aB
B -> Sb
4. Check whether the given grammar G is ambiguous or not.
A -> AA
A ->(A)
A -> a
5. ANSWER THE FOLLOWING QUESTION
6. Convert the given CFG to CNF
S -> a | aA | B
A -> aBB |\epsi
B -> Aa | b
7. Convert the given grammar into Chomsky's Normal Form (CNF)
S->AAA|B
A->aA|B
B->\epsi
8. Convert the following CFG into GNF
S -> XB | AA
A -> a | SA
B -> b
X -> a

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Database 11g SQL

Authors: Jason Price

1st Edition

0071498508, 978-0071498500

More Books

Students also viewed these Databases questions