0% found this document useful (0 votes)
6 views1 page

Assignments 3 39copies

VTU BE CSE ATC Assignment Questions

Uploaded by

Rakesh CSE
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views1 page

Assignments 3 39copies

VTU BE CSE ATC Assignment Questions

Uploaded by

Rakesh CSE
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

CAMBRIDGE INSTITUTE OF TECHNOLOGY

K.R. PURAM, BENGALURU-560036

Department of Computer Science and Engineering


Third Assignment Questions
Date: 20/02/2024
1. Write Context Free Grammar for the following:
a) L = {0n 1m 2k | n+2m = k, n >= 0, m >= 0}
b) L = {0i 1j | i != j, i >= 0, j >= 0}.
c) L = {ai bj ck | i + j = k, i >= 0, j >= 0}
d) L = {an bn+2 | n >= 1}.

2. Write LMD, RMD and parse tree for the string "aaabbabbba" that belongs to the given
grammar:
S-> aB | bA
A-> a | aS | bAA
B-> b | bS | aBB.

3. Construct LL(1) parsing table and show the moves made for respective strings for the
following grammar:
S → a | (L)
L → L,S | S
Show moves for: (a,(a,a))

4. Construct a PDA for the following languages and write the ID as directed:
a) L = {anb2n | n ≥ 1}; Write the ID for string: aabbbb.
b) L = {wCwR | w € (a + b)* } where wR is the reverse of the string w. Write the ID for
string: aababb.

5. Identify LR(0) canonical items for the following and Write LR(0) & SLR(1) parsing table
for the following. Also, explain the parsing of a suitable string.
S → AA
A → aA | b
Due Date: 04/03/2024

You might also like