Consider the following DFA in which s0 is the start state and s1, s3 are the…
2007
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
- 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
- C.
All strings of x and y which have equal number of x and y
- 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
Attempted by 61 students.
Show answer & explanation
Correct answer: D
The DFA recognizes strings where the number of x's and y's have opposite parity: either an even number of x's and odd number of y's, or an odd number of x's and even number of y's.
A video solution is available for this question — log in and enroll to watch it.