Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
145 views

Assignment 2

The document contains 42 questions about finite automata. It asks the reader to design deterministic finite automata (DFAs) and non-deterministic finite automata (NFAs) that accept specific languages over various alphabets. It also asks the reader to convert some NFAs into equivalent DFAs. Finally, it contains some questions about epsilon transitions and converting epsilon NFAs into regular NFAs and DFAs.

Uploaded by

Breaking Die
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
145 views

Assignment 2

The document contains 42 questions about finite automata. It asks the reader to design deterministic finite automata (DFAs) and non-deterministic finite automata (NFAs) that accept specific languages over various alphabets. It also asks the reader to convert some NFAs into equivalent DFAs. Finally, it contains some questions about epsilon transitions and converting epsilon NFAs into regular NFAs and DFAs.

Uploaded by

Breaking Die
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Theory of Computation

By: Assistant Professor Lok Nath Regmi

Assignment -2

Finite Automata

1. Differentiate between DFA and NFA? Design a DFA that accepts the language given by L=
{w ϵ {0, 1} *: w has neither ‘00’ nor ‘11’ as substring}. Hence test your design for 01011010.
2. Design a DFA and also NFA that accepts the language given by L= {w ϵ {0,1} *: w does not
contain four consecutive 0’s}. Hence test your design for 0100001 and 0101111.
3. Design a DFA and also NFA that accepts the language given by L= {w ϵ {0,1} *: w contains
‘0110’ or ‘1001’ as substring. Hence test your design for 01011100 and 1010011.
4. Design a DFA that accepts a language given by L = {w ϵ {a,b}* : w has no. of ‘a’ multiple of
3}
5. Design a NFA over {a,b} that accepts strings containing occurrence of pattern ‘bb’ or ‘bab’ .
6. What is the significance of finite automata? Design a DFA that accepts the strings over an
alphabet σ = {0,1} that either start with 01 or end 01. Hence test your design for any two
strings.
7. Explain finite automata and their application. Design a DFA that accepts the Language L= {w
ϵ {a, b}: w 'must have either aaa or bbb as a substring.
8. Construct a NFA for the language (ab*a U b*aa). Provide any two accepted strings and two
rejected strings.
9. Differentiate between NFA and DFA. Design a DFA that accepts the language 𝐿 = {𝑤: 𝑤 ∈
{0,1}∗ }|10110 not occurs as a subshing in x). verifv vour design with supporting example.
10. Why is NDFA important although it is equivalent to a DFA? Design NDFA which 𝐿 =
{𝑤: 𝑤 ∈ {𝑎, 𝑏}∗ } such that W contains either two consecutive a's or two consecutive b's.
11. Design a DFA accepting strings over the alphabet {0,1} defined by {0 0} * {11} *.
12. Construct a DFA over {a, b} accepting strings having even number of 'a' and odd number of
b.
13. Design a DFA that accepts the language given by L = {w ∈ {0, 1} *: w begins with 0 and ends
with 01. Your design should accept strings like 010, 01110, 000010, 0101 1010 and should not
accept strings like 1010, 0011, 01011.
14. Design a Deterministic Finite Automata (DFA) for the regular expression (a(ab)*b)*. your
design by taking one accepted and one rejected string.
15. Design an NDFA for a language defined as (baUb)* U(bbUa*). Give two strings that are,
accepted by this NIDFA and two rejected strings.
16. Construct DFA, which accepts set of all strings over {0, 1} which interpreted as binary
number is divisible by 3.
17. Construct DFA, which accepts set of all strings over {0, 1} which interpreted as binary
number is divisible by 2.
18. Construct DFA, which accepts set of all strings over {0, 1} which interpreted as binary
number is divisible by 4.
19. Design a DFA over w ∈ {a,b}* such that number of a = 2 and there is no restriction over length of b
20. Design a DFA in which number of a’s are divisible by 2. And input alphabet is {a,b}.
21. Design a DFA such a way that Let string is w, Number of a(w) mod 2 = 0 and Number of b(w) mod 2
= 0. This means number of a should be divisible by 2 as well as number of b should also be divisible
by 2.
22. Design a DFA in which every 'a' should be followed by 'b'.
23. Design a DFA such that: L = {anbm | n,m ≥ 1} Given: Input alphabet, Σ={a, b}.
24. Design a DFA such that: L = {anbm | n,m ≥ 0} Given: Input alphabet, Σ={a, b}.
25. Design a DFA such that: L = {anbmcl | n,m,l ≥ 1} Given: Input alphabet, Σ={a, b, c}.
26. Design a DFA such that:L = {anbmcl | n,m,l ≥ 0} Given: Input alphabet, Σ={a, b, c}.
27. Design a NFA of all binary strings in which 2nd last bit is 1.
28. Design an NFA with ∑ = {0, 1} accepts all string ending with 01.
29. Construct an NFA with ∑ = {0, 1} in which a substring “double ‘1’ is followed by single ‘0’”
must exist.
30. Construct an NFA in which all the string contains a substring 1101.
31. Convert the following Non-Deterministic Finite Automata (NFA) to Deterministic Finite
Automata (DFA)

32. Convert the following Non-Deterministic Finite Automata (NFA) to Deterministic Finite
Automata (DFA)

33. Convert the following Non-Deterministic Finite Automata (NFA) to Deterministic Finite
Automata (DFA)
34. Consider a Non-deterministic finite automata (NFA) and convert that NFA into equivalent
Deterministic Finite Automata (DFA).

35. Convert the following NFA into it's equivalent DFA.

36. Convert the following NDFA to its DFA.

37. Convert the following NFA into it's equivalent DFA.


38. Convert epsilon-NFA to NFA

39. Convert the NFA with ε into its equivalent DFA.

40. Convert the NFA with ε into its equivalent NFA.


41. Convert the following ε-NFA to its equivalent NFA.

42. Convert the following ε-NFA to its equivalent NFA.

You might also like