Practice problems on finite automata | Set 2
Last Updated :
11 Jul, 2025
A DFA is represented as {Q, Σ, q, F, δ}. In DFA, for each input symbol, the machine transitions to one and only one state. DFA does not allow any null transitions, meaning every state must have a transition defined for every input symbol. NFA is similar to DFA but includes the following features:
- It can transition to multiple states for the same input.
- It allows null (ϵ) moves, where the machine can change states without consuming any input.
Que-1: Draw a deterministic and non-deterministic finite automate which either starts with 01 or end with 01 of a string containing 0, 1 in it, e.g., 01010100 but not 000111010.
Explanation :
DFA and NFA of same language whose strings only reach to the final state containing either 01 at start or at the end. If anything else is come then come out to the final state then it does not accept. NFA of the given string is as follows:
Example: 0110,110001,111101,0100000,11010101,0111111...
DFA of the same given string is as follows by converting the given NFA to DFA :
Here, q0 shows the initial state, q1, q2 are the transition states, and q3, q4, q5, q6, q7 are the transition and final states.
Que-2: Draw a non-deterministic finite automate which starts with 01 and ends with 01 of a string containing 0, 1 in it, e.g., 01000101 but not 000111001.
Explanation :
NFA of same language whose strings only reach to the final state containing 01 at start and at the end. If anything else is come then come out to the final state then it does not accept. NFA of the given string is as follows: 
Here, q0 shows the initial state, q1, q2, q3 are the transition states, and q4 is the final state.
Explanation :
Draw a DFA whose strings only reach to the final state containing 0 at the end that means number is multiple of 2. If anything else is come then come out to the final state then it does not accept. DFA of the given string is as follows:
Example:00,100,10010,10100,0100010...
Here, q0 shows the initial and final state, q1 is the transition states.
Explanation :
Draw a DFA whose string only reach to the final state containing binary number is multiple of 3. If anything else is come then come out to the final state then it does not accept. DFA of the given string is as follows:
Example :011,0011,01001,1001...
Here, q0 shows the initial and final state, q1, q2 are the transition states.
For more practice on DFA you can refer to Practice problems on finite automata.
Explore
Automata _ Introduction
Regular Expression and Finite Automata
CFG
PDA (Pushdown Automata)
Introduction of Pushdown Automata
5 min read
Pushdown Automata Acceptance by Final State
4 min read
Construct Pushdown Automata for given languages
4 min read
Construct Pushdown Automata for all length palindrome
6 min read
Detailed Study of PushDown Automata
3 min read
NPDA for accepting the language L = {anbm cn | m,n>=1}
2 min read
NPDA for accepting the language L = {an bn cm | m,n>=1}
2 min read
NPDA for accepting the language L = {anbn | n>=1}
2 min read
NPDA for accepting the language L = {amb2m| m>=1}
2 min read
NPDA for accepting the language L = {am bn cp dq | m+n=p+q ; m,n,p,q>=1}
2 min read
Construct Pushdown automata for L = {0n1m2m3n | m,n ⥠0}
3 min read
Construct Pushdown automata for L = {0n1m2n+m | m, n ⥠0}
2 min read
NPDA for accepting the language L = {ambncm+n | m,n ⥠1}
2 min read
NPDA for accepting the language L = {amb(m+n)cn| m,n ⥠1}
3 min read
NPDA for accepting the language L = {a2mb3m|m>=1}
2 min read
NPDA for accepting the language L = {amb2m+1 | m ⥠1}
2 min read
NPDA for accepting the language L = {aibjckdl | i==k or j==l,i>=1,j>=1}
3 min read
Construct Pushdown automata for L = {a2mc4ndnbm | m,n ⥠0}
3 min read
NPDA for L = {0i1j2k | i==j or j==k ; i , j , k >= 1}
2 min read
NPDA for accepting the language L = {anb2n| n>=1} U {anbn| n>=1}
2 min read
NPDA for the language L ={wÐ{a,b}* | w contains equal no. of a's and b's}
3 min read
Turing Machine
Decidability
TOC Interview preparation
TOC Quiz and PYQ's in TOC