Professional Documents
Culture Documents
Computer Science Book 6
Computer Science Book 6
24-26
ISSN 2230-7621MIT Publications
24
Puneet Kumar
Anurag Panday
ABSTRACT
In this paper we have given a New Approach to design a minimal DFA for the problem Binary Number divisible by N, where
N is in power of 2 without following the Tradition Method of designing and Minimization for Mod N problems over {0,1}.
Keywords: Deterministic Finite Automata, DFA, Minimization, Equivalence Classes, Binary Number/string.
I. Introduction
A DFA [1] [2] is 5-tuple Machine (Q, , , q0, F)
Where
Q, is set of finite states.
, is set of finite symbols.
, transition from one state to another, Q Q.
q0 Q, is the start state.
F Q, is set of final states.
Q = {0, 1, 2 N1}
= {0, 1}
, transition is as
So,
Q = {0, 1, 2, 3}
MIT International Journal of Computer Science and Information Technology, Vol. 6, No. 1, January 2016, pp. 24-26
ISSN 2230-7621MIT Publications
so,
25
= {0, 1}
Firstly we have two classes (i) set of final states and (ii) set of
non-final states
p0 = {0}, {1, 2, 3}
[2 0 + 0] mod4 = 0
[2 0 + 1] mod4 = 1
[2 1 + 0] mod4 = 2
[2 1 + 1] mod4 = 3
[2 2 + 0] mod4 = 0
Q\
1
3
[2 2 + 1] mod4 = 1
[2 3 + 0] mod4 = 2
[2 3 + 1] mod4 = 3
So,
and
p2 = p1
0
0
2
0
2
1
1
3
1
3
0
2
2
1
3
3
0
0
2
0
1
1,3
1,3
1,3
Fig. 2. DFA M
We can say we get the DFA for binary numbers divide by 4 having
4 states, 0, 1, 2, and 3, representing distinct remainder. But if we
If, N can be written as 2n, then we need to design DFA for binary
strings ending with n 0s, having n + 1 states.
Here N = 4
4 can be written in power of 2 as 22.
MIT International Journal of Computer Science and Information Technology, Vol. 6, No. 1, January 2016, pp. 24-26
ISSN 2230-7621MIT Publications
26
Fig. 4: DFA M
V. ConClusion
In this paper we have seen that we can draw a minimized DFA for
binary number divisible by N, where N= 2n by simply drawing
DFA ending with n 0s and making final state as initial too, with
easier way and without minimization and in lesser steps.
Fig. 3. DFA M
References
[1] Peter Linz, An Introduction to Formal Languages and Automata,
Jones & Bartlett, 2011.
[2] Hopcroft, J & Ullman, J., Introduction to Automata Theory,
Languages, and Computation, Addison-Wilsey, 2008.
[3] http://www.comp.nus.edu.sg/~sanjay/cs4232/dfa-min.pdf