Assignment-2: Finite Automata
Assignment-2: Finite Automata
State Input
ε a b
A A B
A
B 0 C B
0 0 0
C
Table 1.1 : Transition Table for The DFA Diagram
in Fig 1.1(Above Graph) Set of state = {A,B,C} [4].
the initial State is State {A} which is directed by an Arrow(-→) ; The final State is {A , C}
which is described by double circle in the diagram. For instance, we use an arrow to point the
initial state and we encircle all the final states.[3].
set of input {ε , a , b}
(1) A deterministic finite automaton which accepts the empty string ε
(2) any occurrence of “a’s” will be accepted since the initial and final state found at the state “A”
(3) any occurrence of “b” and at last “a” will be accepted since state “C” is final state
(4) generally ε any occurrence of “a’s” or any occurrence of “a’s” followed by any occurrence of
“b’s” at lease one followed by “a” at once will be accepted by the machine.
(5) Regular Expression which is determined by the above graph(fig 1.1) which is accepted word are
expressed as followed.
(a*|a*b+a) -------------- eq.1
which either of empty string ε a* or a*b+a will be executed successfully based on the input
inserted on the machine.
A finite automaton accepts a language L iff it accepts every word in L and no other word. If a
finite automaton M accepts a language L, we say that L is the language accepted by M. L(M)
denotes the language accepted by the finite automaton M[4].
Check By Depth First Search
Two words Accepted By The Machine Two words not Accepted By The Machine
Input 1 : Input 2 : Input 3: Input 4 :
aaaabbbbbba aaaaaaaaaaba aaaaaaaaaabaaaa bbbbbbbbbbbaa
A,aaaabbbbbba A,aaaaaaaaaaba A,aaaaaaaaaabaaaa A,bbbbbbbbbbaa