Week 2 - Practice Questions
Week 2 - Practice Questions
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.
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.