Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

IMS Engineering College

NH-09, Adhyatmik Nagar, Near Dasna, Distt. Ghaziabad, U.P.


Tel: (0120) 4940000

Department of Computer Science


Theory of Automata and Formal Languages KCS402 (2022-2023)

Assignment 1
Maximum Marks: 20 Submission Date: 28th April, 2023
COURSE OUTCOMES

By the end of the course, students will be able to:


Bloom’s
CO No. Description Level
Analyze and design finite automata, pushdown automata, Turing
CO1(C214.1) K4, K6
machines, formal languages, and grammars
Analyze and design, Turing machines, formal languages, and grammars
CO2(C214.2) K4, K6
Demonstrate the understanding of key notions, such as algorithm,
CO3(C214.3) computability, decidability, and complexity through problem solving K1, K5
Prove the basic results of the Theory of Computation.
CO4(C214.4) K2, K3
CO5(C214.5) State and explain the relevance of the Church-Turing thesis K1, K5

ATTEMPT ALL QUESTIONS each question carries equal marks

Q. No. Question CO
a) Design FA to accept language L where all the strings in L are such that
total number of a’s in them are multiple of 3. i.e. L = { w : na(w) mod 3 = 0
}

b) Design FA to accept L, where L = {Strings in which ‘a’ always appears tripled}


over the set Σ = {a, b}. (Whenever ‘a’ appears it will repeat 3 times )
c) Design a DFA that reads strings made up of letters in the word Σ = {A, I, L, M, R,
S, T} and recognize those strings that contain the word “IMS” as a substring.
d) Write a DFA to accept the language L = { w : |w| mod 5 ≠ 0 } over Σ = { a, b }
Q1. e) Construct a DFA for the language L = { am bn : m ≥ 0, n ≥ 1 } over the set Σ CO1(C214.1)
= {a, b}.
f) Find a dfa that accepts all the strings on Σ = {0, 1}, except those
containing the sub string “001”.
g) Draw DFA for the following over the set Σ = { 0, 1 }
i) L = {w : |w| mod 3 = 0 }
ii) L = {w : |w| mod 3 > 1 }
h) Construct a Mealy machine for 2’s complement of any binary no.
i) Construct FA accepting all strings over {0, 1}
 Having odd no. of 0’s & odd no of 1’s.
 Having even no. of 0’s and even no. of 1’s.
 Having even no. of 0’s and odd no. of 1’s.
 Having odd no. of 0’s and even no. of 1’s.
Find ∈- Closure for given ∈-NFA. Convert ∈-NFA to NFA

Q2. CO1(C214.1)

a) Perform the DFA minimization for the following:

Q3.

b) Convert following NFA to DFA: CO1(C214.1)


State 0 1 Null
 q0 q0,q3 q0,q1 ---
q1 --- q2 ---
q2 q2 q2 q4
q3 q4 --- ---
q4 q4 q4 ---

Convert Mealy Machine into Moore Machine

Q4. CO1(C214.1)

Convert the following NDFAs to DFA (* represent a final state)


a) States (Q) / Input (∑) 0 1
→A A, B A
B C C
C D --
*D D D
Q5. CO1(C214.1)
States (Q) / Input (∑) a b
b)
→q0 q0, q1 q0
q1 q2 q1
q2 q3 q3
*q3 -- q2

You might also like