Discrete Mathematics
Ch t 7 R l ti Th
- - Chapter 7: Relations: The
Second Time Round
Hung-Yu Kao (高宏宇) Department of Computer Science and Information Engineering, N l Ch K U National Cheng Kung University
Discrete Mathematics -- Chapter 7: Relations: The Ch t 7 R l ti - - PowerPoint PPT Presentation
Discrete Mathematics -- Chapter 7: Relations: The Ch t 7 R l ti Th Second Time Round Hung-Yu Kao ( ) Department of Computer Science and Information Engineering, N National Cheng Kung University l Ch K U Outline Relations
Hung-Yu Kao (高宏宇) Department of Computer Science and Information Engineering, N l Ch K U National Cheng Kung University
Relations Revisited: Properties of Relations Computer Recognition: Zero-One Matrices and
Partial Orders: Hasse Diagrams Partial Orders: Hasse Diagrams Equivalence Relations and Partitions
Finite State Machine: The Minimization Process
Application of equivalence relation Minimization process: find a machine with the same
Discrete Mathematics Discrete Mathematics – – CH7 CH7 2009 Spring 2009 Spring
2
relation from A to B. Any subset of A × A is called a (binary) relation
D fi th l ti ℜ th t Z b ℜb if ≤ b
x - y is a multiple of n, e.g., with n=7, 9ℜ2, -3ℜ11, but 3 ℜ 7
Discrete Mathematics Discrete Mathematics – – CH7 CH7 2009 Spring 2009 Spring
3
reachability.
1 2
( 1,
1 2) 2, 1 2
reachability.
1 i l l ti E if ( ) ( ) f I
q
, y equivalent.
Discrete Mathematics Discrete Mathematics – – CH7 CH7 2009 Spring 2009 Spring
4
x)∈ℜ, for all x∈A.
if and only if ℜ ⊇ {(1, 1), (2, 2), (3, 3), (4, 4)}. But ℜ1 = {(1, 1), (2, 2), (3, 3)} is not reflexive, ℜ2 = {(x, y)| x ≤ y, x, y∈A} is reflexive reflexive.
there are relations on A. Among them are reflexive.
2
2n
) (
2
2
n n −
there are relations on A. Among them are reflexive.
2
A A 一定要留著
j)|
1 2
A1 (n) A2 (n2-n) A×A
Discrete Mathematics Discrete Mathematics – – CH7 CH7 2009 Spring 2009 Spring
5
(n2)
all x, y∈A, (x, y)∈ℜ ⇒ (y, x)∈ℜ .
(3, 2)}, both reflexive and symmetric. (3, 2)}, both reflexive and symmetric.
Discrete Mathematics Discrete Mathematics – – CH7 CH7 2009 Spring 2009 Spring
6
To count the symmetric relations on A = {a1, a2,…, an}.
) )( 2 / 1 (
2
2 2
n n n −
×
If the relations are both reflexive and symmetric, we have
choices
) )( 2 / 1 (
2
2
n n −
choices.
A1 (n) A2 (n2-n) 1 A×A (n2)
Discrete Mathematics Discrete Mathematics – – CH7 CH7 2009 Spring 2009 Spring
7
Definition 7.4: A relation ℜ on a set A is called transitive
Ex 7.8 : Define the relation ℜ on the set Z+ by aℜb if a
Ex 7.9 : Define the relation ℜ on the set Z by aℜb if
Reflexive, symmetric Not transitive, e.g., (3,0),(0,-7) ∈ℜ, but (3,-7) not
Discrete Mathematics Discrete Mathematics – – CH7 CH7 2009 Spring 2009 Spring
8
Definition 7.5: A relation ℜ on a set A is called antisymmetric if (x,
y)∈ℜ and (y, x)∈ℜ ⇒ x = y for all x, y∈A.
element from A E 7 11 D fi
th l ti (A B) ℜ if A B Th it i ti
symmetric relation.
Note that “not symmetric” is different from anti-symmetric.
have? have?
Discrete Mathematics Discrete Mathematics – – CH7 CH7 2009 Spring 2009 Spring
9
To count the antisymmetric relations on A = {a1, a2,…, an}.
1 co ta s n pa s, a d 2 co ta s n n pa s.
) )( 2 / 1 (
2
3 2
n n n −
×
A1 (n) A2 (n2-n) (n) (n -n) A×A (n2)
Discrete Mathematics Discrete Mathematics – – CH7 CH7 2009 Spring 2009 Spring
10
by g (or f∈ O(g)). What are their properties?
Reflexive Transitive not symmetric (e.g., g=n, f =n2, g=O(f), but f ≠O(g)) not antisymmetric (e.g., g(n)= n, f(n) = n+5, fℜg and gℜf, but
f ≠g)
Discrete Mathematics Discrete Mathematics – – CH7 CH7 2009 Spring 2009 Spring
11
Definition 7.6: A relation ℜ is called a partial order
(A,R) is a partially ordered set / poset if R is a partial
If a≤b or b≤a, the elements a and b are comparable. If all pairs are comparable, ≤ is a total ordering or chain.
Discrete Mathematics Discrete Mathematics – – CH7 CH7 2009 Spring 2009 Spring
12
relation ℜ on A by aℜb if a divides b, it defines a partial order. How many ordered pairs does it occur in ℜ. many ordered pairs does it occur in ℜ.
(2, 4), (2, 6), (2, 12), (3, 3), (3, 6), (3, 12), (4, 4), (4, 12), (6, 6), (6, 12), (12, 12)}
pairs
18 3 6 total , for 3 ; , for 6
2 3 2 1 2 2 2 4 2 1 2 3
= ⋅ = ∴ = = = =
− + − +
q n p m
pairs
18 3 6 total = = ∴
+ = − + + ⋅ ⋅ ⋅
= ⇒ =
k e k e p p p
i i k e k e e
n
2 2 2 1 2 ) 1 (
pairs
number the
2 2 1 1
Discrete Mathematics Discrete Mathematics – – CH7 CH7 2009 Spring 2009 Spring
13
= = i i 1 1
Maximal element
reflexive, symmetric and transitive.
Given an equivalence relation R on A, for each a∈A the equivalence
class [a] is defined by {x | (x,a)∈R }.
g , q , [0] = {…,–6,–3,0,3,6,…} and [1] = {…,–5,–2,1,4,7,…}
Ex 7.16 (b): If A {1, 2, 3}, the following are all equivalence relations
ℜ1 = {(1, 1), (2, 2), (3, 3)} ℜ2 = {(1, 1), (2, 2), (3, 3), (2, 3), (3,2)}
ℜ {(1 1) (1 3) (2 2) (3 1) (3 3)}
ℜ3 = {(1, 1), (1, 3), (2, 2), (3, 1), (3, 3)} ℜ4 = {(1, 1), (1, 2), (1, 3), (2, 1), (2, 2), (2, 3), (3, 1), (3, 2), (3, 3)}
Discrete Mathematics Discrete Mathematics – – CH7 CH7 2009 Spring 2009 Spring
14
If A = {a1, a2, …, an}, then the equality relation ℜ = {(ai, ai)|1 ≤ i ≤ n} is the smallest equivalence relation on A.
Define the relation ℜ on A by aℜb if f(a) = f(b) Define the relation ℜ on A by aℜb if f(a) = f(b). ℜ is reflexive, symmetric, and transitive, so it is an equivalence relation. (e.g., f(a)=f(b), f(b)=f(c)=> f(a)=f(c))
and a partial order relation iff ℜ is the equality relation on A.
Discrete Mathematics Discrete Mathematics – – CH7 CH7 2009 Spring 2009 Spring
15
ℜ1°ℜ2 is a relation defined by ℜ1°ℜ2 = {(x, z)| ∃y ∈B such that (x, y)∈ℜ1 and (y z)∈ℜ2 and (y, z)∈ℜ2.
(Note the different ordering with function composition.) f : A B, g : B C, g。f : A C
d ℜ {( 5) ( 6)} ℜ ℜ {(1 6) (2 6)} d ℜ ℜ ? ∅ and ℜ3={(w, 5), (w, 6)}. ℜ1°ℜ2 = {(1, 6), (2, 6)}, and ℜ1°ℜ3 = ?
center, while B denotes a set of programming language {C++, Java,…},
∅
p g g g g { } and C is a set of projects {p1, p2,…}, consider ℜ1⊆A×B, ℜ2⊆B×C. What is the means of ℜ1°ℜ2 ?
Discrete Mathematics Discrete Mathematics – – CH7 CH7 2009 Spring 2009 Spring
16
°ℜ3
ℜn+1=ℜ°ℜn.
4)}, ℜ3 = ? and ℜ4 = ?
ℜ3 = {(1,4)} {( , )} and for n ≥ 4, ℜn=∅
Discrete Mathematics Discrete Mathematics – – CH7 CH7 2009 Spring 2009 Spring
17
numbers arranged in m rows and n columns, where each eij denotes the entry in the ith row and jth column of E, and each such entry is 0 or 1.
ℜ1°ℜ2 to be represented by relation matrices?
1 2
p y
Discrete Mathematics Discrete Mathematics – – CH7 CH7 2009 Spring 2009 Spring
18
Boolean addition’ with 1+1=1
Ex 7.22: If ℜ={(1, 2), (1, 3), (2, 4), (3, 2)}, then what are the
relation matrices of ℜ2, ℜ3 and ℜ4?
Discrete Mathematics Discrete Mathematics – – CH7 CH7 2009 Spring 2009 Spring
19
matrix for ℜ, then
M(ℜ) = 0 if and only if ℜ = φ M(ℜ) 0 if and only if ℜ
φ.
M(ℜ) = 1 if and only if ℜ = A×A. M(ℜm) = [M(ℜ)]m
( ) [ ( )]
We say that E precedes, or is less than, F, written as E ≤ F, if eij ≤ fij for all i, j.
G? G? ⎥ ⎦ ⎤ ⎢ ⎣ ⎡ = 1 1 1 E ⎥ ⎦ ⎤ ⎢ ⎣ ⎡ = 1 1 1 1 F
Discrete Mathematics Discrete Mathematics – – CH7 CH7 2009 Spring 2009 Spring
20
23=8
Definition 7.12: In = (δij)n×n is the n×n zero-one matrix, where
⎩ ⎨ ⎧ ≠ = = , if , , if , 1 j i j i
ij
δ
Definition 7.13: A = (aij)m×n is a zero-one matrix, the transpose of
A, written Atr, is the matrix (a*ji)n×m where a*ji = aij
⎩ , , j
⎥ ⎦ ⎤ ⎢ ⎣ ⎡ = 1 1 1
tr
A
⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎣ ⎡ = 1 1 1 A Theorem 7.2: If M denote the relation matrix for ℜ on A, then
(A) ℜ is reflexive if and only if In ≤ M.
⎥ ⎦ ⎢ ⎣ 1 1
( ) y
n
(B) ℜ is symmetric if and only if M = Mtr. (C) ℜ is transitive if and only if M2 ≤ M. (D) ℜ is anti-symmetric if and only if M∩Mtr ≤ In.
Discrete Mathematics Discrete Mathematics – – CH7 CH7 2009 Spring 2009 Spring
21
(D) ℜ is anti symmetric if and only if M∩M ≤ In.
the vertex set and E is the edge set.
source (origin) of the edge, and b is terminating vertex.
the two directed edges shown in Fig. 7.2 (a).
Discrete Mathematics Discrete Mathematics – – CH7 CH7 2009 Spring 2009 Spring
22
Ex 7.26 precedence graph
Discrete Mathematics Discrete Mathematics – – CH7 CH7 2009 Spring 2009 Spring
23
starting at x and ending at y.
least three edges.
No repeated vertex
Discrete Mathematics Discrete Mathematics – – CH7 CH7 2009 Spring 2009 Spring
24
for all x, y ∈ V, where x ≠ y, there is a path (in G) of directed edges from x to y.
Fi 7 5
components of the graph.
Fi 7 6
Discrete Mathematics Discrete Mathematics – – CH7 CH7 2009 Spring 2009 Spring
25
Complete graph: the graphs of ndirected graphs that are loop free and
have an edge for every pair of distinct vertices, which are denoted by Kn.
Discrete Mathematics Discrete Mathematics – – CH7 CH7 2009 Spring 2009 Spring
26
each vertex.
e.g., Fig 7.8, A {1, 2, 3} and ℜ {(1,1), (1, 2), (2, 2), (3, 3), (3, 1)}
contains at most one of the edges (x, y) or (y, x)
Fi 7 10 A {1 2 3} d ℜ {(1 1) (1 2) (2 3) (1 3)}
Discrete Mathematics Discrete Mathematics – – CH7 CH7 2009 Spring 2009 Spring
27
from x to y in the associated graph, then there is an edge (x, y) also.
e.g., Fig 7.10, A {1, 2, 3} and ℜ {(1, 1), (1, 2), (2, 3), (1, 3)}
graph is one complete graph augmented by loops at every vertex or consists of disjoint union of complete graphs augmented by loops at each consists of disjoint union of complete graphs augmented by loops at each vertex.
4), (4, 3), (4, 4), (5, 5)}, ℜ2 = {(1,1), (1, 2), (1, 3), (2, 1), (2, 2), (2, 3), (3, 1), (3, 4), (4, 3), (4, 4), (5, 5)}, ℜ2 {(1,1), (1, 2), (1, 3), (2, 1), (2, 2), (2, 3), (3, 1), (3, 2), (3, 3), (4, 4), (4, 5), (5, 4) (5, 5)}.
Discrete Mathematics Discrete Mathematics – – CH7 CH7 2009 Spring 2009 Spring
28
Discrete Mathematics Discrete Mathematics – – CH7 CH7 2009 Spring 2009 Spring
29
Definition: Let A be a set with ℜ a relation on A. The pair (A,
A that makes A into this set.
Discrete Mathematics Discrete Mathematics – – CH7 CH7 2009 Spring 2009 Spring
30
Ex 7.34 : Let A be the set of courses offered at a college. Define
Ex 7.35 : Define ℜ on A = {1, 2, 3, 4} by xℜy if x divide y.
Ex 7.36 : PERT (Program Evaluation and Review Technique)
network is first used by U.S. Navy in 1950.
E.g., Let A be the set of tasks that must be performed to build a
g , p
Discrete Mathematics Discrete Mathematics – – CH7 CH7 2009 Spring 2009 Spring
31
Ex 7.37 : Figure 7.17 (b) illustrates a simpler diagram for
X
not partial order 1 2 1 3
Discrete Mathematics Discrete Mathematics – – CH7 CH7 2009 Spring 2009 Spring
32
If (A, ℜ) is a poset, we construct a Hasse diagram for ℜ on A
by drawing a line segment from x up to y, if
ℜ
following four posets following four posets.
Discrete Mathematics Discrete Mathematics – – CH7 CH7 2009 Spring 2009 Spring
33
In this case ℜ is called a total order In this case, ℜ is called a total order.
a)
On the set N, the relation ℜ defined by xℜy if x ≤ y is a total order.
b)
The subset relation is a partial
)
p
e.g., {1, 2}, {1, 3} ∈ A, but {1, 2} ⊄ {1, 3}
c)
Fig 7.19 is a total order.
Discrete Mathematics Discrete Mathematics – – CH7 CH7 2009 Spring 2009 Spring
34
Given a Hasse diagram for a partial order relation ℜ, how to
find a total order ℑ for which ℜ⊆ℑ.
N 12
Discrete Mathematics Discrete Mathematics – – CH7 CH7 2009 Spring 2009 Spring
35
Not unique, 12 answers
For a partial order ℜ on a set A with |A| = n
Step 1: Set k = 1. Let H1 be the Hasse diagram of the partial order. Step 2: Select a vertex vk in Hk such that no edge in Hk starts at vk. Step 3: If k = n, the process is completed and we have a total
ℑ : vn < vn-1 < … < v1 that contains ℜ. If k < th f H th t d ll d f H
If k < n, then remove from Hk the vertex vk and all edges of Hk
that terminate at vk. Call the result Hk+1. Increase k by 1 and return to step (2).
Discrete Mathematics Discrete Mathematics – – CH7 CH7 2009 Spring 2009 Spring
36
Topological Sort
Discrete Mathematics Discrete Mathematics – – CH7 CH7 2009 Spring 2009 Spring
37
DFS sequence
Discrete Mathematics Discrete Mathematics – – CH7 CH7 2009 Spring 2009 Spring
38
Definition 7.17: If (A, ℜ) is a poset, then x is a maximal element of
A if for all a∈A, a ≠ x ⇒ x
A if for all b∈A b ≠ y ⇒ b y
ℜ / ℜ /
A if for all b∈A, b ≠ y ⇒ b y.
Ex 7.42 : Ų = {1, 2, 3}, A = P(Ų).
For the poset (A, ⊆), Ų is the maximal and
ℜ /
φ is the minimal.
Let B be the proper subsets of {1, 2, 3}.
Then we have multiple maximal elements Then we have multiple maximal elements {1, 2}, {1, 3}, and {2, 3} for the poset (B, ⊆), and φ is still the only minimal element.
E 7 43 F
th t (Z ≤) h ith i l
Ex 7.43 : For the poset (Z, ≤), we have neither a maximal nor a
minimal element. The poset (N, ≤), has no maximal element but a minimal element 0.
Discrete Mathematics Discrete Mathematics – – CH7 CH7 2009 Spring 2009 Spring
39
E 7 44 H
b h i (b) ( ) d (d) f Fi 7 18? D
Ex 7.44 : How about the poset in (b), (c), and (d) of Fig. 7.18? Do
they have maximal or minimal elements?
Theorem 7.3: If (A, ℜ) is a poset and A is finite, then A has both a
( , ) p , maximal and a minimal element.
Discrete Mathematics Discrete Mathematics – – CH7 CH7 2009 Spring 2009 Spring
40
D fi iti 7 18 If (A ℜ) i t th i l t l t f A if f
Definition 7.18: If (A, ℜ) is a poset, then x is a least element of A if for
all a∈A, xℜa. Similarly, y is a greatest element of A if for all a∈A, aℜy.
Ex 7.45 : Ų = {1, 2, 3}, A = P(Ų).
Ų { , , }, (Ų)
element and three minimal elements for the poset (B ⊆) but no least element and three minimal elements for the poset (B, ⊆), but no least element.
Theorem 7.4: If poset (A, ℜ) has a greatest or a least element, then that
l t i i element is unique.
Since x is a greatest element, yℜx. Likewise, xℜy while y is a greatest element. As ℜ is antisymmetric, it follows x = y.
Discrete Mathematics Discrete Mathematics – – CH7 CH7 2009 Spring 2009 Spring
41
Definition 7.19: If (A, ℜ) is a poset with
b∈B
all b∈B
upper bond
ub ub
An element x′∈A is called a greatest lower
bound (glb) of B if for all other lower bounds x″
lub lub
ub ub ub ub
(g )
is called a least upper bound (lub) of B if for all
Theorem 7.5: If (A, ℜ) is a poset and B⊆A, then
B has at most one lub (glb).
lower bond
glb glb
lb lb lb lb lb lb
Discrete Mathematics Discrete Mathematics – – CH7 CH7 2009 Spring 2009 Spring
42
(g )
lower bond
Ex 7.47 : Let U ={1, 2, 3, 4} with A = P(U ) and let ℜ be the subset
relation on B. If B = {{1}, {2}, {1, 2}}, then what are the upper bounds of B, lower bounds of B, the greatest lower bound and the least upper bound?
Upper bounds: {1, 2}, {1, 2, 3}, {1, 2, 4}, and {1, 2, 3, 4} lub: {1 2} lub: {1, 2} glb = φ
{2, 3, 4} is not.
Ex 7.48 : Let ℜ be the “≤” relation on A. What are the results for the
following cases?
A = R and B = [0, 1] => lub:1, glb:0
A = R and B = {q∈Q⏐q2<2} => A = Q and B = {q∈Q⏐q2<2} => ?
2
glb , 2 : lub
No lub and glb
Discrete Mathematics Discrete Mathematics – – CH7 CH7 2009 Spring 2009 Spring
43
elements lub{x, y} and glb{x, y} both exist in A.
max{x, y}, glb{x, y} = min{x, y}, and (N, ≤) is a lattice.
and glb{S, T} = S∩T and it is a lattice.
= 6 exists, but there is no glb for the elements 2 and 3.
Lattice Total order
Discrete Mathematics Discrete Mathematics – – CH7 CH7 2009 Spring 2009 Spring
44
OK
For any set A ≠ φ, the relation of equality is an
Let the relation on Z defined by xℜy if x-y is a multiple of
The above relation splits Z into two subsets:
{…, -3, -1, 1, 3,…} ∪ {…, -4, -2, 0, 2, 4,…}
Discrete Mathematics Discrete Mathematics – – CH7 CH7 2009 Spring 2009 Spring
45
Definition 7.21. Given a set A and index set I, let φ ≠ Ai ⊆
Then {Ai}i∈I is a partition of A if (a) A = ∪i∈IAi and (b) Ai∩Aj = φ
for i ≠ j.
Each subset Ai is called a cell (block) of the partition. Each subset Ai is called a cell (block) of the partition.
Ex 7.52 : A = {1, 2,…,10}
A1 = {1, 2, 3, 4, 5}, A2 = {6, 7, 8, 9, 10}. Ai = {i, i+5}, 1 ≤ i ≤ 5.
Ex 7.53 : Let A = R, for each i∈Z,
Discrete Mathematics Discrete Mathematics – – CH7 CH7 2009 Spring 2009 Spring
46
the equivalence class of x, denoted [x], is defined by [x] = {y∈A⏐yℜx}
[0] = {…, -8, -4, 0, 4, …} = {4k|k ∈ Z}
xℜy?
[0] {…, 8, 4, 0, 4, …} {4k|k ∈ Z} [1] = {…, -7, -3, 1, 5, …} = {4k+1|k ∈ Z} [2] = {…, -6, -2, 2, 6, …} = {4k+2|k ∈ Z}
[ ] { , , , , , } { | }
[3] = {…, -5, -1, 3, 7, …} = {4k+3|k ∈ Z}
relation.
}) { ( } { n n Z − ∪ ∪ =
Discrete Mathematics Discrete Mathematics – – CH7 CH7 2009 Spring 2009 Spring
47
}) , { ( } { n n Z
Z n∪
∪ =
+
∈
(5, 5)}. [1] = {1}, [2] = {2, 3}=[3], [4] = {4, 5} = [5]. Then, we have A=[1]∪[2]∪[4]. C id f i f A B f({1 3 7}) f({4 6}) f({2 5})
The relation ℜ defined on A by aℜb if f(a) = f(b).
partition A = {1, 2}∪ {3}∪{4, 5, 7}∪{6}, what is ℜ?
Discrete Mathematics Discrete Mathematics – – CH7 CH7 2009 Spring 2009 Spring
48
[ ] { , } [ ] {( , ), ( , ), ( , ), ( , )}
{(1,1), (2,2)} v.s. {1,2}x{1,2}
the set of equivalence relations on A and the set of partitions of A.
Ex 7.59 :
( ) f { } h l i i l l i
(identical containers)
h l f
6
containers with no container left empty
=
6 1
203 ) , 6 (
i
i S
4
15 ) 4 ( i S
Discrete Mathematics Discrete Mathematics – – CH7 CH7 2009 Spring 2009 Spring
49
=
1
15 ) , 4 (
i
i S
n1 n2 n3 nk
…
n1 n2 n3 nk
…
Discrete Mathematics Discrete Mathematics – – CH7 CH7 2009 Spring 2009 Spring
50
Two finite state machines of the same function may have
Some of these states are redundant.
A process of transforming a given machine into one that
Rely on the concepts of equivalence relation and partition.
Discrete Mathematics Discrete Mathematics – – CH7 CH7 2009 Spring 2009 Spring
51
1-Equivlence: Given the finite state machine M = {S,
The relation E1 is an equivalence relation on S, and
Here s1 and s2 are called 1-equivlent.
1 2
Discrete Mathematics Discrete Mathematics – – CH7 CH7 2009 Spring 2009 Spring
52
For the states S, we define the k-equivalence relation Ek
The relation Ek is an equivalence relation on S, and it
We call two states s1 and s2 equivalent if they are k-
Discrete Mathematics Discrete Mathematics – – CH7 CH7 2009 Spring 2009 Spring
53
Goal: Determine the partition of S induced by E and
Observations:
If two states are not 2-equivalent, they can not be 3-equivalent.
q y q
For s1, s2∈S, where s1Eks2, we find that s1Ek+1s2 if and only if v(s1,
x)Ekv(s2, x) for all x∈I.
Ik x∈Ik S1 x∈Ik-1 I x∈I x∈Ik x∈I S2 x∈I
Discrete Mathematics Discrete Mathematics – – CH7 CH7 2009 Spring 2009 Spring
54
x∈Ik x∈Ik
1.
2.
3.
Discrete Mathematics Discrete Mathematics – – CH7 CH7 2009 Spring 2009 Spring
55
Ex 7.60 : M is given by the state table shown in Table 7.1.
P titi S P { } { } { }
3 { 1}, { 2, 5}, { 6}, { 3, 4}, 3 2,
p
0,1 s6 1 s2,s5 , s1 0 1 s3,s4 1 0,1
Discrete Mathematics Discrete Mathematics – – CH7 CH7 2009 Spring 2009 Spring
56
1
See also 15.2 Karnaugh Maps, a similar idea
I E 6 20 C
t t hi th t i h f
the sequence 111.
0, 0 1, 0 1, 1 1, 0
s0 s1 s2
Start 1, 0 1, 0 0, 0 0 0
0, 0
P1: {s0, s1}, {s2, s3} P : {s } {s } {s s }
Discrete Mathematics Discrete Mathematics – – CH7 CH7 2009 Spring 2009 Spring
57
P2: {s0}, {s1}, {s2, s3} P3: {s0}, {s1}, {s2, s3}
Definition 7.23: If P1 and P2 are partitions of set A,
2 1 2
In Example 7.60, P3 = P2 < P1
Theorem 7.9: In the minimization process, if Pk+1
Discrete Mathematics Discrete Mathematics – – CH7 CH7 2009 Spring 2009 Spring
58
If s1Eks2 but s1Ek+1s2, then we have a string x =
s1Ek+1s2 ⇒ ∃x1∈I [v(s1, x1) Ek v(s2, x1)]
Discrete Mathematics Discrete Mathematics – – CH7 CH7 2009 Spring 2009 Spring
59
Ex 7.61 : From Example 7.60, s2E1s6 but s2E2s6, so we seek a
distinguishing string of length 2.
x = 00 is the minimal distinguishing string for s2 and s6 w(s2, 00) =11≠ 10 = w(s6, 00)
Discrete Mathematics Discrete Mathematics – – CH7 CH7 2009 Spring 2009 Spring
60
Ex 7.62 : s1 and s4 are 2-equivalent but are not 3-equivalent.
x = 111 is the minimal distinguishing string for s1 and s4
w(s1, 111) =100 ≠ 101 = w(s4, 111)
Discrete Mathematics Discrete Mathematics – – CH7 CH7 2009 Spring 2009 Spring
61
7-1: 10, 12, 14 7 2: 20 22 7-2: 20, 22 7-3: 14, 18, 28(a) 7-4: 12 7-5: 1(c) 3 (1 3兩題都要寫過程) 7 5: 1(c), 3 (1,3兩題都要寫過程)
Discrete Mathematics Discrete Mathematics – – CH7 CH7 2009 Spring 2009 Spring
62