BHAGWAN MAHAVIR UNIVERSITY
FACULTY OF ENGINEERING
Theory of Computation
(2010206502)
ASSIGNMENTS
TH SEMESTER
5
Winter-2025
BHAGWAN MAHAVIR UNIVERSITY
FACULTY OF ENGINEERING
COMPUTER/IT ENGINEERING DEPARTMENT
5TH SEM
heory of Computation (2010206502)ASSIGNMENTS
T
Unit-2: Regular Languages and Finite Automata
Que 1: Answer the following Questions. (2 Marks)
1. Differentiate between constructive proofs and proofs using contradiction with
examples.
2. Define FA(Finite Automata), DFA(Deterministic Finite Automata), NFA(Non-
Deterministic Finite Automata), and NFA- Λ
3. Construct a Finite Automata that accepts all strings over{0, 1}*,NOT containing the
s ub-string 101.
4. Explain the importance of distinguishable strings and equivalent classes’ w.r.t.
regular languages.
5. Write a difference between Moore and Mealy Machine.
Que 2: Answer the following Questions. (4 Marks)
1. Write the Strong Principle of Mathematical Induction and prove that for any integer
𝑛 ≥ 2, 𝑛 is either a prime or a product of two or more primes.
2. Find a regular expression of following subsets of {0, 1}* 1. The language of all
strings that begin or end with 00 or 11. 2. The language of all strings ending with 1
and not containing 00.
3. Draw Finite Automata to accept following over input alphabets Σ ={0, 1}
(i) The language accepting strings not ending with ’01’
(ii)The language accepting strings next to last symbol ‘0’
4. Design Moore Machine to generate 1’s complement of Binary Numbers.
5. Using pumping lemma, proof that the language palindrome is not regular.
Que 3: Answer the following Questions. (6 Marks)
1. Convert NFA-^ to DFA
Page3
BHAGWAN MAHAVIR UNIVERSITY
FACULTY OF ENGINEERING
COMPUTER/IT ENGINEERING DEPARTMENT
5TH SEM
heory of Computation (2010206502)ASSIGNMENTS
T
2. Convert the given NFA to DFA.
3. Minimize given DFA.
4. Let𝑀1 and𝑀2 be the FAs pictured in Figure,recognizing languages𝐿 1 and𝐿 2
respectively.
Draw FAs recognizing the following languages.
A. 𝐿 1 U 𝐿 2
B. 𝐿 2 -𝐿 1
C. 𝐿 1∆
𝐿
2
Page4
BHAGWAN MAHAVIR UNIVERSITY
FACULTY OF ENGINEERING
COMPUTER/IT ENGINEERING DEPARTMENT
5TH SEM
heory of Computation (2010206502)ASSIGNMENTS
T
5. onvert the given Moore machine into Mealy machine. Draw state
C
transition diagram of Mealy machine.
Present Next State
Output
State 0 1
→ 𝑃0 R 𝑄0 ɛ
𝑃1
R 𝑄0 1
𝑄0 𝑃1 𝑆0 0
𝑄1 𝑃1 𝑆0 1
R 𝑄1 𝑃1 0
𝑆0 𝑆1 R 0
𝑆1 𝑆1 R 1
************
Page5