CONSTRUCT DFA:
- DIVISIBLE EITHER 2 OR 3
NO OF STATES LCM 92,3)=6
=> {0,1,2,3,4,5}
FINAL STATES= [NO OF DIVISIBLE BY 2] U [NO OF DIVISIBLE 3]
= [0,2,4] U [3]
= [0,2,3,4]
q0 q2 q3 q4
- BY 2 BUT NOT BY 3 FINAL STATE [2, 4]
q2 q4
- BY 3 BUT NOTT BY 2 FINAL STATE [3]
q3
- NOT 2 OR NOT 3 FINAL STATE [1,5]
q1 q5
No comments:
Post a Comment