Consider the following DFA in which s0 is the start state and s1,s3 are the final states.
What language does this DFA recognize?
A
All strings of x and y which have equal number of x and y
No worries! We‘ve got your back. Try BYJU‘S free classes today!
B
All strings of x and y which have either even number of x and even number of y or odd number or x and odd number of y
No worries! We‘ve got your back. Try BYJU‘S free classes today!
C
All strings of x and y
No worries! We‘ve got your back. Try BYJU‘S free classes today!
D
All strings of x and y with either even number of x and odd number of y or odd number of x and even number of y
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
Open in App
Solution
The correct option is D All strings of x and y with either even number of x and odd number of y or odd number of x and even number of y Given DFA can be redesigned as S0 as q00, S1 as q10, S2 as q11, S3 as q01.
Each state is qab[a=namod2,b=nbmod2]
q00 as namod2=0,nbmod2=0 [ number of x is even, number of y is even].
q01 is final state mean where number of x is even and number of y is odd.
q10 is final state mean where number of x is odd and number of y is even.