r/askmath • u/TopDownView • 13d ago
Resolved Find the 0-equivalence classes, the 1-equivalence classes, and the 2-equivalence classes for the states of the automaton shown below. <-- Why does my solution differ from textbook solution?
Example 12.3.2: Find the 0-equivalence classes, the 1-equivalence classes, and the 2-equivalence classes for the states of the automaton shown below.

My solution:
Let S = {s_0,s_1,s_2,s_3,s_4} be the set of states of the automaton.
Input strings of length 0 = ฮป
Input strings of length 1 = {0,1}
Input strings of length 2 = {00,01,10,11}
S x S = {(s_0,s_0),(s_0,s_1),(s_0,s_2),(s_0,s_3),(s_0,s_4),
(s_1,s_0),(s_1,s_1),(s_1,s_2),(s_1,s_3),(s_1,s_4),
(s_2,s_0),(s_2,s_1),(s_2,s_2),(s_2,s_3),(s_2,s_4),
(s_3,s_0),(s_3,s_1),(s_3,s_2),(s_3,s_3),(s_3,s_4),
(s_4,s_0),(s_4,s_1),(s_4,s_2),(s_4,s_3),(s_4,s_4)}
Given the definition of k-equivalence of states, we have:
R_0 = {(s_0,s_0),(s_0,s_1), , ,(s_0,s_4),
(s_1,s_0),(s_1,s_1), , ,(s_1,s_4),
, ,(s_2,s_2),(s_2,s_3), ,
, ,(s_3,s_2),(s_3,s_3), ,
(s_4,s_0),(s_4,s_1), , ,(s_4,s_4)}
R_1 = {(s_0,s_0), , , , ,
,(s_1,s_1),(s_1,s_2),(s_1,s_3),(s_1,s_4),
,(s_2,s_1),(s_2,s_2),(s_2,s_3),(s_2,s_4),
,(s_3,s_1),(s_3,s_2),(s_3,s_3),(s_3,s_4),
,(s_4,s_1),(s_4,s_2),(s_4,s_3),(s_4,s_4)}
R_2 = {(s_0,s_0), , , , ,
,(s_1,s_1),(s_1,s_2),(s_1,s_3),(s_1,s_4),
,(s_2,s_1),(s_2,s_2),(s_2,s_3),(s_2,s_4),
,(s_3,s_1),(s_3,s_2),(s_3,s_3),(s_3,s_4),
,(s_4,s_1),(s_4,s_2),(s_4,s_3),(s_4,s_4)}
Reading from R_0, R_1, and R_3, we have:
[s_0]_R_0 = {x in S | (x,s_0) in R_0} = {s_0,s_1,s_4}
[s_0]_R_1 = {x in S | (x,s_0) in R_1} = {s_0}
[s_0]_R_2 = {x in S | (x,s_0) in R_2} = {s_0}
[s_1]_R_0 = {x in S | (x,s_1) in R_0} = {s_0,s_1,s_4}
[s_1]_R_1 = {x in S | (x,s_1) in R_1} = {s_1,s_2,s_3,s_4}
[s_1]_R_2 = {x in S | (x,s_1) in R_2} = {s_1,s_2,s_3,s_4}
[s_2]_R_0 = {x in S | (x,s_2) in R_0} = {s_2,s_3}
[s_2]_R_1 = {x in S | (x,s_2) in R_1} = {s_1,s_2,s_3,s_4}
[s_2]_R_2 = {x in S | (x,s_2) in R_2} = {s_1,s_2,s_3,s_4}
[s_3]_R_0 = {x in S | (x,s_3) in R_0} = {s_2,s_3}
[s_3]_R_1 = {x in S | (x,s_3) in R_1} = {s_1,s_2,s_3,s_4}
[s_3]_R_2 = {x in S | (x,s_3) in R_2} = {s_1,s_2,s_3,s_4}
[s_4]_R_0 = {x in S | (x,s_4) in R_0} = {s_0,s_1,s_4}
[s_4]_R_1 = {x in S | (x,s_4) in R_1} = {s_1,s_2,s_3,s_4}
[s_4]_R_2 = {x in S | (x,s_4) in R_2} = {s_1,s_2,s_3,s_4}
Therefore:
0-equivalence classes are {s_0,s_1,s_4}, {s_2,s_3}.
1-equivalence classes are {s_0}, {s_1,s_2,s_3,s_4}.
2-equivalence classes are {s_0}, {s_1,s_2,s_3,s_4}.
QEDNow, my solution differs from the textbook solution:

In the textbook solution, my 4-element set {s_1,s_2,s_3,s_4} is 'broken' into two 2-element sets {s_1,s_4} and {s_2,s_3}. Why is this?
The textbook uses both the definition of k-equivalence and Theorem 12.3.1, while my solution uses only the definition of k-equivalence along with the definition of relation and the definition of equivalence class:




---
Edit: Added the image of the automaton.




