Moore Mealy Machine Lecture-1
Moore Mealy Machine Lecture-1
Regular Expression
It is the most effective way to represent string.
- R.E = a+
Strings = a, aa, aaa, aaaa, aaaaa,……….
- R.E = a*
Strings = Λ, a, aa, aaa, aaaa, aaaaa,……….
- R.E = (a+b)
Strings = a, b
Examples
R.E = a(a+b)*
Strings: a, aa, ab, aab, aaab, aba, ababab,…
R.E = (a+b)* a (a+b)* a (a+b)*
Strings={aa, aaa, baa,aab, aba, abba,…}
Finite Automata:
It is another method for defining language in graphical
form. It is also known as Finite Automata Machine.
Rules
In DFA, there is only one path for specific input from
the current state to the next state.
DFA does not accept the null move, i.e., the DFA
cannot change state without any input character.
DFA can contain multiple final states.
One letter cannot go to many state from one state.
Dead State: A rejecting state is known as dead state.
This state occurs, when an entry for initial state is not
accurate according to required input.
Non-Deterministic Finite Automata
DFA is defined by 5 parts/tuples
NFA is also defined by same 5 parts.
NFA Rule:
1) According to DFA, one letter cannot move to
more than 1 state, there is only one output so the
next state is already determined.
According to NFA one letter can move to more
than one state, next state is not determined.
2) In NFA, Dead End state is not required.
3) In NFA, State can be null. Its mean, can move
to other state without any input. This is known as
null or epsilon transition. It is denoted as є-NFA
DFA vs NFA
FA
FA without FA with
output output
Mealy Moore
TG NFA DFA
Machine Machine
Transition Table
Transition table is tabular representation of
transition function.
It takes two argument (a state and a
symbol) and returns a state (the “next
state”)
We write all states in column and
transitions in a row.
State (current) Input Next State
q0 q1 q2
q1 q0 Q2
q2 q2 q2
Transition Table