TOC Module 1 Complete Solutions
TOC Module 1 Complete Solutions
PART-A
1. Describe NFA for accepting any binary string that contains 11 as a substring
and Convert to DFA.
1
2. Convert NFA with ϵ to equivalent DFA
2
3. Describe a DFA that any given decimal number is divisible by 5
4. Describe a DFA for the following language L={w/|w | mod 5=0, w belongs to
(a, b)} L={w/|w mod 5=1, w belongs to (a, b)}
3
5. Convert NFA with ϵ to equivalent NFA M=({q0,q1,q2},{0,1,2}, δ, q0, {q2})
where δ is given by [δ (q0,0)={q0}, δ (q0,1)=ϕ, δ (q0,2)=ϕ, δ(q0, ϵ)=q1] ; [δ
(q1,0)=ϕ, δ (q1,1)=q1 , δ (q1,2)=ϕ ,δ (q1,ϵ)=q2] ; [δ (q2,0)=ϕ, δ (q2,1)= ϕ ,
δ(q2,2)= {q2},δ (q2, ϵ)= ϕ] .
4
5
6
6. Demonstrate NFA that strings such that the third symbol from the right end is a
0 over an alphabet P={0,1}. And Convert it into equivalent DFA.
7
8
7. Convert the NFA to equivalent DFA, as shown in fig. below.
9
10
11
8. Describe the transition Table for the below NFA and then convert its equivalent
transition diagram for DFA.
12
9. Describe a DFA that will accept those words from P= {a, b} where the number
of a’s is divisible by two and the number of b’s is divisible by three. Sketch the
transition table of the finite automata.
13
10. Describe a DFA that will accept those words from alphabets P= {a, b} where
the number of bs is divisible by three. Sketch the transition table and diagram
of the finite Automata.
PART-B
14
1. Demonstrate DFA to accept a set of all strings ending with 0101.
2. Describe the DFA with the set of strings having “aaa as a substring over an
alphabet P ={a,b}.
DFA :
15
resultant state i.e. there is only one transition.
NFA :
3 DFA cannot use the Empty String NFA can use the Empty String
transition. transition.
5. Describe a DFA to accept the string as and bs ending with abb over an alphabet
P ={a,b}
16
6. List the properties and operations of strings and languages.
For example,
● Concatenation.
● Substring.
● Kleen star operation.
● Reversal.
● Union
● Intersection
● Difference
● Concatenation
17
● kleen * closure
18
b) L={w/ w is any string that contain at most 3 a’s}
19
20
10. Describe Finite Automata and draw FA for the strings over an alphabet P =
{0,1}
11. Describe a DFA, the language recognized by the Automaton being L={w/ w
contains neither the substring ab nor ba}.Draw the transition table.
21
12. Convert the following NFA into DFA
22
23
13. Describe a DFA for the following language L={w/| w| mod 3=0, w belongs to
(a,b)* }
L={w/| w | mod 3=1, w belongs to (a,b)*}
14. Describe a DFA for the following language over an alphabet P = { 0,1}
24
b)The string with odd no of 0s and even no of1s
25
16. Convert the followinNFA-ϵ to NFA.
***(QUESTION DOUBT)
26
17. Describe a DFA for the following language L={w/na| w | mod 3=1, w belongs
to (a,b)*}
27
28
19. Describe a DFA that accepts set of strings starts with 01 and ends with 01 over
alphabet P = {0,1}
20. Illustrate the model and behavior of finite automata with a neat block diagram.
PART-C
1. Define Automata.
29
4. Define transition function of DFA.
5. Define ϵ–transitions.
11. Describe transition diagram for DFA accepting string ending with 00.
30
12. Describe DFA for a string accepting odd number of 0’s
13. Describe transition diagram for DFA to accept exactly one ‘a’ defined. over an
alphabet P= {a,b}.
31
17. State the Mathematical definition of Finite Automata.
32
20. Demonstrate DFA for the language accepting strings which contains 001 as
substring.
33