0% found this document useful (0 votes)
17 views

Week 2 - Practice Questions

Uploaded by

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

Week 2 - Practice Questions

Uploaded by

Murtaza Tunio
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Practice Questions – DFAs and NFAs

1. Construct a DFA which accept strings that contain odd number of zeros. (Σ = {0,1})
2. Construct a DFA which accept strings not containing the substring ‘aac’. (Σ = {a,b,c})

Regular Languages
Nondeterministic Finite Automaton

1. Construct a NFA which accepts strings which have a in their second last place. (Σ =
{a,b})
2. Construct a NFA which accepts strings that have a prefix of 01. (Σ = {0,1})
3. Construct an NFA which accepts strings of length 2. (Σ = {H,T})
4. Construct a NFA which accepts strings that contain odd number of zeros. (Σ = {0,1,2})
5. Prove that
a) Union of two regular languages is a regular language.
b) Concatenation of two regular languages is a regular language.
c) Kleene Star of a regular language is a regular language.

NFA to DFA (not covered in R1)

1. Create a DFA from the following NFA diagram and description.

2. Describe the language that this NFA recognizes and list example strings. Convert it into a
DFA.
3. Create a DFA from the NFA below. Be careful about the epsilon transitions.

You might also like