Tuesday, April 24, 2012

DFA(Deterministic Finite Automaton) of Binary Number Divisible By4

Q: Draw a DFA of the strings over the set {0,1}, so that the strings are divisible by 4.

Solution:
A binary number is divisible by 4 if its last two digits are "0". As example : 100, 1000,10100, 11100,.....
So the DFA of binary number divisible by 4 is as:








Where Q0 starting state and Qf is final state.

No comments:

Post a Comment