0% found this document useful (0 votes)
43 views3 pages

Theory of Computation

Uploaded by

Shashidhar S
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views3 pages

Theory of Computation

Uploaded by

Shashidhar S
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

DFA Problems

1. Construct a DFA accepting the set of strings over {a,b} such that
i. Strings containing atmost 1 a
ii. Strings containing atleast 1 a
Check whether the strings aabab, abbb are valid or not
2. Construct a DFA accepting the set of strings over {a,b} which ends
with a, Check whether the strings ababa, abbbab are valid or not
3. Construct a DFA over the strings of 0’s and 1’s
i. Begins with 01
ii. Ends with 01
iii. Substring 01

Check the validity of the strings 01101, 0110, 0011

4. Construct DFA accepting the languages


a. L={wabb| w € (a+b)*}
b. L={abbw| w € (a+b)*}
c. L={wabbw| w € (a+b)*}
Check the strings abbaba, ababb, abba are valid or not
5. Construct a DFA accepting the strings ending with ab or ba. Check
whether the strings aabba, ababa are valid or not
6. Construct a DFA accepting the strings that begins with ab or ends
with ba. Check whether the strings aabb, ababa are valid or not
7. Construct a DFA accepting the strings that begins with ab and ends
with ba. Check whether the strings aabb, ababa are valid or not
8. Construct DFA accepting the language L={01n2| n is odd number}
9. Construct DFA accepting the language L={0w2| w € (0+1+2) + }.
Check the strings 02, 0112 are valid or not.
10. Construct a DFA accepting set of strings over {a,b} such that
a. No string contains the substring abb
b. No string ends with abb
c. No string begins with abb

Check the strings aabbabb, aabab are valid or not

11. Construct a DFA accepting the language L={ w | w does not


contain the substring 110}. Check whether the string 010101 and
01101 are valid or invalid
12. Construct a DFA accepting the language L={abnw| n>=3 and
w € (a|b)*
13. Construct a DFA accepting the language with strings ending
with 01and whose minimum length is 4 over the symbol 0’s and 1’s.
14. Construct a DFA accepting the language L={0n1m2p| m is even
and n,p are odd}.
15. Construct a DFA accepting the strings of a’s and b’s
a. String having even number of a’s an even number of b’s
b. String having even number of a’s an odd number of b’s
c. String having odd number of a’s an even number of b’s
d. String having odd number of a’s an odd number of b’s
16. Construct a DFA accepting the language { w | w has an even
number of 0’s, and |w| is even. } over the alphabet set ∑={0,1}
17. Construct DFA accepting the strings on ∑={a,b} such that
na(w) mod 3=0.
18. Construct DFA accepting the strings on ∑={a,b} such that
(na(w)- nb(w))mod 3 = 0 . (Assume absolute value if any negative
value exists)
19. Construct DFA accepting the strings on ∑={a,b} such that
na(w) mod 3!= nb(w) mod 2.
20. Construct DFA accepting the strings on ∑={a,b} such that |w|
mod 3>|w| mod 2.
21. Construct a DFA which accepts the strings over 0’s and 1’s
having 3 consecutive 0’s atleast once.
22. Construct a DFA accepting binary numbers divisible by 3
23. Construct a DFA accepting decimal numbers divisible by 3
24. Construct a DFA accepting binary numbers divisible by 5 and
that begins with 1.

NFA Problems

1. Construct an NFA that accepts the strings of a’s and b’s that begins
with ab
2. Construct an NFA that accepts the strings of a’s and b’s that ends
with ab
3. Construct an NFA that accepts the strings of a’s and b’s containing
substring ab
4. Construct an NFA that accepts the strings of 0’s and 1’s which ends
with either 01 or 10
5. Construct NFA for the language L accepting the strings
(abc+ab(cb)*)
6. Construct NFA accepting the strings abc,abd,acd,abcd
7. Construct NFA accepting the strings of 0’s and 1’s such that the 3 rd
symbol from the right end is 1
8. Construct and NFA accepting the strings over {a,b} such that
L={an:n>=0) U {bna:n>=1} with 4 states
9. Draw an NFA in which all the string contains a substring 1110.
10. Draw an NFA with the alphabet over {0,1} accepts all string in
which the third symbol from the right end is always 0.
11. Draw the NFA which accepts any binary string that contains 00
or 11 as a substring.
12. Draw NFA that accepts all binary strings that end with 101.
13. Draw NFA for a*+(ab)*
14. Draw NFA with the alphabet over {0,1} in which each string
must contain “11” followed by “00”.
15. Construct an NFA with the alphabet over {0,1} that accepts all
strings that begin with 1 and end with 0.
16. Construct NFA with the alphabet {0,1} for the language
L={0 1 , where m>=0 and n>=1}.
m n

ε-NFA Problems

1. Construct ε-NFA for the strings ab,aab,abc over the alphabet set
∑={a,b}
2. Construct ε-NFA for the language L=(a+b)*ab
3. Construct ε-NFA for the language L= ab (a+b)*
4. Construct ε-NFA for the language L= (a+b)* aba*
5. Construct ε-NFA for the language L= (a+b)*ab (a+b)*
6. Construct ε-NFA for the language L= (0+1)*2 (1+2)*12
7. Construct ε-NFA for the language L= (0|1)2*
8. Convert the following regular expression into its equivalent 1 (0 +

9. Construct ε-NFA for regular expression: (a ∪ bc ∪ c) ∗


1)* 0

10. Construct ε-NFA for regular expression: (b∗ab∗ab∗ab∗)∗ ∪ b∗

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy