You are on page 1of 2

Dr. A. Q.

Khan Institute of Computer Sciences and Information


Technology Kahuta
Distribution Date: 8/12/2022 Assignment: 2 Submission Date: 15/12/2022.
Class: BSCS IV Course Instructor: Fahim Khan Total Marks: 30
Theory of Automata
Instruction:
 Do not copy and paste anything from the internet. No argument will be accepted in case of
copied assignment.
 Late assignment will not be accepted in any case.
 Submit the Assignment in hard copy format is acceptable.
 Deadline will not be extended.

Q1. Use the pumping lemma to show that the given languages are not regular; [10]
i. A = {1n 2n / n>=0}
ii B = {ai bi / i>0}
Q2. : Convert the following NFA to an equivalent DFA by using an appropriate theorem. [5]

Q3. The following are the state diagrams of two NFA’s, N1 and N2. Answer the following
questions about each of these machines. [5]

i. Weather the strings “abababaaab”, “bbbbba”, “aabbab” and “abbabbaba”are accepted


on these two machines.
Q3. a) Convert the following regular expressions into an equivalent NFA’s by using an appropriate
theorem: [5]

i. (((ab+a)*)*)*.
ii. ((a+b)*+(c+d)*)*.
iii. ((ab*c)*ca)*.

b) Convert the following DFA’s to regular expression by using an appropriate theorem: [5]

Good Luck

You might also like