You are on page 1of 1

INTERNATIONAL ISLAMIC UNIVERSITY ISLAMABAD

DEPARTMENT OF COMPUTER SCIENCE AND SOFTWARE ENGINEERING


Midterm Examination Fall- 2020
__________________________________________________________________________________
Course Title: Theory of Computation Exam Date: 2-12-2020
Course Code: CS314 Total Marks: 25
Class: MSCS F20 Time Allowed: 1hr 30minutes
Instructor: Dr. Fareeha Anwar
-

Q1. Let L= {amb2n akb2 : n =m/2, m>0, k=2} be a language 6


i. Construct
Name: deterministic Finite Automata.
______________
ii. Construct_________
Roll Number: CFG of the language

Part b:
Question No 1: (Part a) Q2. Let L= {amb2n akb2 : n =m/2, m>0, k=2} be a language
Remove Recursion and factoring of following grammar G={ {R, Q, T}, {a, b, t}, R, P} 4
12
R→ RbQ | Rb | aa
i. Construct deterministic Finite Automata.
Q→ tbT | tbQ | tbb
ii. Construct non-deterministic Push down Automata that accept the given language.
T→ aQT | aQ
iii. Construct CFG of the language

Q2.
Q3. Prove that the following language is not regular language 5
i. Prove that the following language is not regular language 4
L= {amb2n am : m>0}
L= {amb2n am : m>0}
ii. Construct NFA of (b*+ a+b*)* (ba)*. Also minimize it. 6
Q4. Part a:
iii. Find RE using Arden’s Theorem 5
Prove two regular expressions are closed under union 4
Part b: B
Construct NFA ofA(b*+ a+b*)*0 (ba)*. Also minimize 1it. 6
1
0 D
1
0
C 1

Page 1 of 1

You might also like