Chapter 4
Chapter 4
• The largest of the DFA, Moore and Mealy models is the Mealy model.
• Because the recognizer (FA) model can be seen as a subtype of the
Moore model with the output alphabet {accept, rejection}.
• The Moore model, on the other hand, can be seen as a subtype of the
Mealy model, whose output function is independent of the input
alphabet. For this reason, the Mealy model will be taken as a basis
while the definitions are given, and the 𝑀5 machine, whose definition
is given below, will be used as an example.
Example 4.1 The input and output alphabets of the Mealy type 𝑀11
machine are {0,1} alphabet. The transition and output functions of the
machine with initial state A are defined by the states table below.
States States, z
x=0 x=1
→A A,0 D,1
B C,0 E,1
C G,0 E,1
D G,0 F,1
E E,1 C,0
F B,0 D,1
G B,0 E,1
Figure 4.1
4.1.1 Succesor
If moving from the 𝑆1 state of the M machine to the 𝑆2 state with the
symbol x:
𝑥
𝑆1 → 𝑆2
𝑆2 is the x-successor of 𝑆1 .
• Where w is a string of input symbols, if state 𝑆1 is passed to state 𝑆2
with the input string w, the w-successor of 𝑆1 is 𝑆2 . For example, on
the 𝑀11 machine, the 1st successor of state A is D. The 011- successor
of case B of the same machine is C.
• With x an input symbol and w a string of input symbols, in
deterministic models, the x and w successor of a state is always a
single state. In nondeterministic models, the successors x and w are
subsets of states. The x-successor of a state can be easily found
because it is in the transition table. To find the successor 𝑤 =
𝑥1 𝑥2 … 𝑥𝑘 of a state, find the successor consecutive using the
transition table; then 𝑥2 -successor of 𝑥𝑖 -successor, etc. is obtained.
𝑀2 =< 𝑄, 𝛴, 𝛿, 𝑞0 , 𝐹 >
𝑄 = 𝑞0 , 𝑞1 , 𝑞2 , 𝑞3
𝛴 = {0,1}
𝐹 = {𝑞3 }
𝛿 𝑞0 , 0 = {𝑞0 , 𝑞1 } 𝛿 𝑞2 , 0 =𝜙
𝛿 𝑞0 , 1 = {𝑞0 , 𝑞2 } 𝛿 𝑞2 , 1 = {𝑞3 }
𝛿 𝑞1 , 0 = {𝑞3 } 𝛿 𝑞3 , 0 = {𝑞3 }
𝛿 𝑞1 , 1 = =𝜙 𝛿 𝑞3 , 1 = {𝑞3 }
• For example, in the 𝑀2 machine, the 0-successor of the 𝑞0 state is {𝑞0 , 𝑞1 }. {𝑞0 , 𝑞1 } can
be replaced with 𝑞0 𝑞1 . Accordingly, the 0-successor of the 𝑞0 case is 𝑞0 𝑞1 , the 1-
successor is 𝑞0 𝑞2 , and the 100-successor is 𝑞0 𝑞1 𝑞3 . The 1-successor of the 𝑞1 state of the
same machine and the 01-successor of the 𝑞2 state do not exist (it is the empty set).
4.1.2 Predecessor
G B,0 E,1
4.1.3 Equivalent States
𝑋 = 10 𝑋 = 10
•B ⟶ 𝐸 D ⟶ 𝐵 B and D are 2- distinguishable
𝑍 = 11 𝑍 = 10
𝑋 = 010 𝑋 = 010
•𝐴 ⟶ 𝐺 F ⟶ 𝐸 A and F are 3- distinguishable
𝑍 = 010 𝑍 = 011
Machine Equivalance
𝑃1 = (𝐴𝐵𝐶𝐷𝐹𝐺)(𝐸)
• contains two sections. Because all states of the machine except E are
1-equivalent
• To find the equivalence partitioning of the machine, find 𝑃0 , 𝑃1 , 𝑃2 , ….
in order. Derivation of equivalence partitions is continued until the
below equation is obtained:
𝑃𝑘 = 𝑃𝑘+1
𝑃 = 𝑃𝑘
b) For all the input symbols x, the x-successors of the states 𝑆1 and
𝑆2 must also be m-equivalent (they must be in the same section in the
𝑃𝑚 equivalence partitioning).
4.2.1 Reduction of Mealy Machines
𝑃0 = (𝐴𝐵𝐶𝐷𝐸𝐹𝐺)
It is sufficient to examine the state table to find the equivalence
partitioning of 𝑃1 . In the state table of 𝑀11 , it is seen that the output
value produced during the x pass is 0 in the first column and 1 in the
second column for all cases except E. Accordingly, cases other than E
are 1-equivalent.
𝑃1 = (𝐴𝐵𝐶𝐷𝐹𝐺)(𝐸)
Proposition 4.1 is used to find the 𝑃2 equivalence partition. In order for
the two states of the 𝑀11 machine to be 2-equivalent, both these two
states and the 0 and 1-succesors of these two states must be 1-
equivalent; for this, it must be in the same section in the 𝑃1
equivalence partitioning.
In the 𝑃1 -partition, the 0-successors of the states ABCDFG, which are
located in the same section, are 1-equivalent due to their presence in
the same 𝑃1 partition. However, not all 1-successors of these states are
1-equivalent. From this, it is understood that the ADF states are 2-
equivalent among themselves and the BCG states are 2-equivalent
among themselves, and the following 𝑃2 equivalence partitioning is
obtained:
𝑃2 = (𝐴𝐷𝐹)(𝐵𝐶𝐺)(𝐸)
To find the 𝑃3 equivalence partitioning, 0 and 1- successors of ADF and
BCG states are examined:
Upon examination, it is seen that 1-successors of ADF states are in the
same section in 𝑃2 , but 0-successors are not in the same section in 𝑃2 .
Therefore, it is understood that the DF states are 3-equivalent, but the
A state is not 3-equivalent to the D and F states, and in 𝑃3 , the A state
differs from the DF states. As for the BCG states, both 0 and 1-
successors of these cases are in the same partition in 𝑃2 . Accordingly,
the BCG cases are 3-equivalents and will be in the same partition in the
𝑃3 equivalence partition. As a result, the 𝑃3 equivalence partitioning
occurs as follows:
𝑃3 = (𝐴)(𝐷𝐹)(𝐵𝐶𝐺)(𝐸)
To find the 𝑃4 equivalence partitioning, it is necessary to examine the 0
and 1 successors of the DF and BCG states. The 0 and 1-successors of
the BCG states, previously reviewed and included above, are also
included in 𝑃3 in the same section. Therefore, BCG states will be
included in 𝑃4 in the same section.
When the successors of the DF cases are examined, it is seen that the 0
and 1-successors of these two cases are in the same section in 𝑃3 .
Therefore, the DF states will be in the same section in 𝑃4 . As a result,
the equivalence partition 𝑃4 is equal to 𝑃3 .
𝑃4 = 𝑃3 = (𝐴)(𝐷𝐹)(𝐵𝐶𝐺)(𝐸)
Thus, the equivalence partitioning of the 𝑀5 machine is obtained as :
𝑃 = (𝐴)(𝐷𝐹)(𝐵𝐶𝐺)(𝐸)
for A : 𝑆0
for DF : 𝑆1
for BCG : 𝑆2
for E : 𝑆3
The state table of the smallest machine equivalent to machine 𝑀11 is
found as follows:
SD, z
States
x=0 x=1
𝑆0 𝑆0 ,0 𝑆1 ,1
𝑆1 𝑆2 ,0 𝑆1 ,1
𝑆2 𝑆2 ,0 𝑆3 ,1
𝑆3 𝑆3 ,1 𝑆2 ,0
4.2.2 Reduction of Moore Machines
𝑃0 = (𝐴)(𝐵𝐷𝐺𝐻)(𝐶𝐸𝐹)
𝑃1 = (𝐴)(𝐵𝐺)(𝐷𝐻)(𝐶)(𝐸𝐹)
𝑃1 = (𝐴)(𝐵𝐺)(𝐷𝐻)(𝐶)(𝐸𝐹)
𝑃2 = 𝑃1 = (𝐴)(𝐵𝐺)(𝐷𝐻)(𝐶)(𝐸𝐹)
𝑃 = (𝐴)(𝐵𝐺)(𝐷𝐻)(𝐶)(𝐸𝐹)
𝑃 = (𝐴)(𝐵𝐺)(𝐷𝐻)(𝐶)(𝐸𝐹)
for A, 𝑆0
for BG, 𝑆1
for DH, 𝑆2
for C, 𝑆3
for EF, 𝑆4
State table of the smallest machine equivalent to 𝑀12 is as below:
SD, z
States x=0 x=1 z
𝑆0 𝑆3 𝑆1 0
𝑆1 𝑆1 𝑆2 1
𝑆2 𝑆4 𝑆1 1
𝑆3 𝑆0 𝑆2 2
𝑆4 𝑆3 𝑆2 2
4.2.3 Reduction of DFA Model
𝑃0 = (𝑞0 𝑞1 𝑞2 𝑞3 𝑞4 𝑞6 )(𝑞5 𝑞7 )
𝑃1 = (𝑞0 𝑞1 )(𝑞2 𝑞3 )(𝑞4 𝑞6 )(𝑞5 𝑞7 )
for 𝑞0 , 𝑆0
for 𝑞1 , 𝑆1
for 𝑞2 𝑞3 , 𝑆2
for 𝑞4 𝑞6 , 𝑆3
for 𝑞5 𝑞7 , 𝑆4
State table of the smallest machine equivalent to 𝑀13 is as below:
SD, z
States x=0 x=1
𝑆0 𝑆0 𝑆1
𝑆1 𝑆2 𝑆3
𝑆2 𝑆3 𝑆4
𝑆3 𝑆4 𝑆2
𝑆4 𝑆4 𝑆4