1 / 46

第二章

第二章. 集合,關係與函數. 2.1 集合的運算. 圖 2.2. 2.2 等價關係. Example. 令宇集合 U = {1, 2, 3, 4, 5, 6, 7} 且 U 的子集合 C = {1, 2, 3, 6} 我們對 U 的冪集合 P ( U ) 子定義關係 R 如下 : 對 A , B  P ( U ) , A R B 若且唯若 A ∩ C = B ∩ C . {1, 2, 4, 5} 與 {1, 2, 5, 7} 是有關係 R 的,因為 {1, 2, 4, 5}∩C = {1, 2} = {1, 2, 5, 7}∩C .

Download Presentation

第二章

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 第二章 集合,關係與函數

  2. 2.1 集合的運算

  3. 圖 2.2

  4. 2.2 等價關係

  5. Example • 令宇集合U={1, 2, 3, 4, 5, 6, 7}且U的子集合C={1, 2, 3, 6}我們對U的冪集合P(U)子定義關係R如下:對A, B P(U),ARB若且唯若A∩C=B∩C. • {1, 2, 4, 5}與{1, 2, 5, 7}是有關係R的,因為{1, 2, 4, 5}∩C ={1, 2}={1, 2, 5, 7}∩C. • X={4, 5}與Y={7} 也是有關係R的,因為X∩C==Y∩C. • 然而, S={1, 2, 3, 4, 5}與T={1, 2, 3, 6, 7}是沒有關係R的 — that is, (S,T)R—,因為S∩C={1, 2, 3}{1, 2, 3, 6}=T∩C.

  6. reflexive(反身性) for all x, (x, x)R . • 令宇集合U={1, 2, 3, 4, 5, 6, 7}且U的子集合C={1, 2, 3, 6}我們對U的冪集合P(U)定義關係R如下:對A, B P(U),ARB若且唯若A∩C=B∩C. • (a)具有reflexive • (b)沒有reflexive

  7. Remark • For A={1, 2, 3, 4}, a relation R AA will be reflexive if and only if {(1, 1), (2, 2), (3, 3), (4, 4)}R . • R1={(1, 1), (2, 2), (3, 3)} is not a reflexive relation on A. • R2={(x, y) | x,yA, x  y} is reflexive on A.

  8. Symmetric(對稱性)(x, y)R(y, x)R • With A={1, 2, 3}, we have • R1={(1, 2), (2, 1), (1, 3), (3, 1)} , a symmetric, but not reflexive, relation on A; • R2={(1, 1), (2, 2), (3, 3), (2, 3)}, a reflexive, but not symmetric, relation on A; • R3={(1, 1), (2, 2), (3, 3)} and R4={(1, 1), (2, 2), (3, 3), (2, 3), (3, 2)}, two relations on A that are both reflexive and symmetric; • R5={(1, 1), (2, 3), (3, 3)}, a relation on A that is neither reflexive nor symmetric.

  9. Transitive(遞移性)(x, y), (y,z) R(x, z)R. • If A={1, 2, 3,4}, then R1={(1, 1), (2, 3), (3, 4), (2, 4)} is a transitive relation on A, • The relation R2={(1, 3), (3, 2)} is not transitive because (1, 3), (3, 2) R2 but (1, 2) R2.

  10. Example • With A={1, 2, 3}, we have • R1={(1, 2), (2, 1), (1, 3), (3, 1)} not reflexive, symmetric, not transitive • R2={(1, 1), (2, 2), (3, 3), (2, 3)} reflexive, not symmetric, transitive • R3={(1, 1), (2, 2), (3, 3)} reflexive, symmetric, transitive • R4={(2, 2), (3, 3), (2, 3), (3, 2)} notreflexive, symmetric, transitive • R5={(1, 1), (2, 3), (3, 1)} not reflexive, not symmetric, not transitive

  11. 等價關係 • 若關係R同時滿足反身性、對稱性及遞移性,則我們稱R為等價關係(equivalence relation)。 • 在上頁例子中,只有R3為等價關係。

  12. Example • If A={1, 2, 3}, then • R1= {(1, 1), (2, 2), (3, 3)} • R2={(1, 1), (2, 2), (3, 3), (2, 3), (3, 2)} • R3={(1, 1), (1, 2), (2, 2), (2,1), (3, 3)} • R4={(1,1), (1,2), (1,3), (2,1), (2,2), (2,3), (3,1), (3,2), (3,3)}=AA are all equivalent relations onA. • R5= {(1, 1), (2, 2)} • R6={(1, 1), (2, 2), (3, 3), (2, 3)} • R7={(1, 1), (1, 2), (2, 1), (2, 2), (2, 3), (3, 3)} are not equivalent relations onA. not reflexive not symmetric not transitive

  13. 定理2.3 • 若R為定義在集合S上的一個等價關係(equivalence relation)且x,yS,則 • x[x]; • x R y if and only if [x]=[y]; • either [x]=[y] or [x][y]=.

  14. Example • For the equivalence relation R={(1, 1), (2, 2), (3, 3), (2, 3), (3, 2), (3, 3), (4, 4), (4, 5), (5, 4), (5, 5)}on A={1, 2, 3, 4, 5}. We have [1]={1}, [2]={2,3}, [3]={2,3}, [4]={4,5}, [5]={4,5}. • Note that {[1],[2],[4]} is a partition of A since A=[1][2][3], [1][2]=,[1][4]=, and [2][4]=.

  15. S={1, 2, 3, 4, 5, 6}. x R y x,y在同一子集合內 [1]=[3]=[4]=A [2]=[6]=B [5]=C

  16. 2.3 偏序關係

  17. Definition • 給定在集合A上的關係R,如果對任意a,bA, (aRb 且bRa)  a=b. 則稱R具有反對稱性(antisymmetric)。 • These relations --- “” and “” on Z, “” on subset of power set P(A)--- are antisymmetric.

  18. Example • If A={1, 2, 3,4}, then R1={(1, 1), (2, 3), (3, 2), (2, 4)} is not antisymmetric on A because (2, 3), (3, 2) R1 but 32 • The relation R2={(1, 3), (3, 2)} is an antisymmetric relation.

  19. 偏序關係 • 若關係R同時滿足反身性、反對稱性及遞移性,則我們稱R為偏序關係(partial ordering relation)或簡稱為偏序(partial order)。 • “” and “” on Z, “” on subset of power set P(A)--- 皆為偏序關係。

  20. Example • 令A={1, 2, 3,4,6,12} — 並定義關係R為 xR y if x|y. • R滿足反身性與遞移性。 • 若x,yA且xR y與yR x同時成立,則 • xR yy=ax, for some aZ+ • yR xx=by, for some bZ+. • 所以 y=ax=a(by)=(ab)y,因此ab=1。 • 因為a,bZ+,所以a=b=1且y=x。 • 故R具有反對稱性。 • 所以R為偏序 。 • Noted that R= {(1, 1), (1, 2), (1, 3), (1, 4), (1, 6), (1, 12), (2, 2), (2, 4), (2, 6),(2, 12), (3, 3), (3, 6), (3, 12), (4, 4), (4, 12), (6, 6), (6, 12), (12, 12)}

  21. Lexicographic order(字典排序法) • (a0 , a1 ,…, an) (b0 , b1 ,…,bn) • a0<b0或 • a0=b0且 • a1<b1或 • a1=b1且 • a2<b2或 • a2=b2且  • an=bn

  22. 字典排序法為偏序關係。

  23. 全序關係 • 若定義在S的關係R滿足 對所有x,yA 皆有xR y或or yR x, 則我們稱R為全序關係(total order)或稱為線性關係(linear order)。 • 全序關係  任兩個元素皆可比較。 • The relation “” on Z is a total order. • The relation “” on subset of power set P(A)is not a total order if A has at least 2 elements.

  24. 最大元素與最小元素 • 令R為定義在S的偏序關係且xS。 • 若對所有aA我們有(xR a  x = a),則稱x為S的最小元素(minimal element)。也就是說,只有x=a才會滿足xR a。 • 若對所有aA我們有( aR x x = a),則稱x為S的最小元素(minimal element)。也就是說,只有x=a才會滿足aR x。

  25. 最小元素 最大元素 S={{1},{2},{3},{4}, {1,2},{1,3},{1,4},{2,3},{2,4},{3,4}, {1,2,3},{1,2,4},{1,3,4},{2,3,4} }

  26. 海氏圖(Hasse Diagrams) • 令R為定義在有限集合S上的偏序關係。若xR y且不存在z S使得xR z與zR y同時成立,則畫一條由x到y,由下到上的線段。則如此畫出的圖形稱為的海氏圖(Hasse Diagrams)。

  27. {1,2,3} {1,2} {1,3} {2,3} {1} {2} {3}  Example • U={1, 2, 3}and A= P(U). Define the relation R on A by XRY when XY. 其海氏圖如下

  28. 8 4 2 1 Example • A={1, 2, 4, 8} and xR y if x整除y. • Noted that R= {(1, 1), (1, 2), (1, 4), (1, 8), (2, 2), (2, 4), (2, 8), (4, 4), (4, 8), (8, 8)}

  29. 2 3 5 7 Example • A={2, 3, 5, 7} and xR y if x整除y. • Noted that R= 

  30. 385 12 35 6 7 5 11 2 3 Example • A={2, 3, 5, 6, 7, 11, 12, 35, 385} and xR y if x整除y. • Noted that R= {(2, 6), (2, 12), (3, 6), (3, 12), (5, 35), (5, 385), (6, 12), (7, 35), (7, 385), (11, 385), (35,385)}

More Related