Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Grammar - theory of automata, Exercises of Theory of Automata

Grammar - theory of automata , grammar

Typology: Exercises

2023/2024

Uploaded on 05/12/2024

vardhit-chandra
vardhit-chandra 🇮🇳

1 document

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1) Consider the following grammar
S->aB|bA
A-aS|bAA|a
B->bS|aBB|b
for string aaabbabbba
a. Find left most derivation
b. Find right most derivation
c. Draw the parse tree
2) Show that the given grammar is ambiguous or not
a. S->a|abSb|abb, A->bS|aAAb
b. S->ab|ab, A->aAB|a, B->ABb|b

Partial preview of the text

Download Grammar - theory of automata and more Exercises Theory of Automata in PDF only on Docsity!

  1. Consider the following grammar S->aB|bA A-aS|bAA|a B->bS|aBB|b for string aaabbabbba a. Find left most derivation b. Find right most derivation c. Draw the parse tree
  2. Show that the given grammar is ambiguous or not a. S->a|abSb|abb, A->bS|aAAb b. S->ab|ab, A->aAB|a, B->ABb|b