You are on page 1of 1

BSCS-5 SPRING 2021

SEMESTER 6th
Theory of Automata

ASSIGNMENT # 4
Marks 10

INSTRUCTIONS

 Submit your assignment handwritten

Question # 1
Consider the following CFG:

N = {S}, T = {a, b}, Starting symbol = S

Production rules = S → SS | aSb | ε

The language generated from above CFG is “abaabb”. Write its derivation and also draw
derivation tree of this language.

Question # 2

Convert the following CFG into CNF: S→ aSa| bSb| a| b| aa| bb

S→ASA

S→ BSB

S→AA

S→BB

S→a

S→b

A→a

B→b

You might also like