Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.

Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.

Like this presentation? Why not share!

- Pec 2013 14 by Escola Marquès de... 545 views
- Social goes mobile - TNS May 2010 by Mundo Contact 995 views
- Wikibrands Social for Social Good by Precog Digital 1532 views
- Brighton SEO: Engagement & Branding... by Branded3 1941 views
- Forming storming norming_performing... by AIESECGreece 1138 views
- Lecture 11 by Faisal Mehmood 312 views

750 views

Published on

Published in:
Technology

License: CC Attribution License

No Downloads

Total views

750

On SlideShare

0

From Embeds

0

Number of Embeds

13

Shares

0

Downloads

6

Comments

0

Likes

1

No embeds

No notes for slide

- 1. Relations www.tudorgirba.com
- 2. Wax on … wax off … these are the basics http://www.youtube.com/watch?v=3PycZtfns_U
- 3. Sets www.tudorgirba.com
- 4. computer information information computation
- 5. Set A set is a group of objects.
- 6. Set A set is a group of objects. {10, 23, 32} N = {0, 1, 2, … } Z = {… , -2, -1, 0, 1, 2, … } Ø U empty set universe
- 7. Set A set is a group of objects. {10, 23, 32} N = {0, 1, 2, … } Z = {… , -2, -1, 0, 1, 2, … } 10 ∈ {10, 23, 32} -1 ∉ N Ø U empty set universe Membership a is a member of set A
- 8. Subset A⊆B ∀x:: x∈A x∈B Every member of A is also an element of B.
- 9. Subset A⊆B ∀x:: x∈A x∈B ∅ ⊆ A. A ⊆ A. A = B A ⊆ B ∧ B ⊆ A. Every member of A is also an element of B.
- 10. Subset A⊆B ∀x:: x∈A x∈B ∅ ⊆ A. A ⊆ A. A = B A ⊆ B ∧ B ⊆ A. Proper subset A⊂B ∀x:: A⊆B ∧ A≠B A is a subset of B and not equal to B. Every member of A is also an element of B.
- 11. Union A∪B ∀x:: x∈A ∨ x∈B A∪B={ x | x∈A or x∈B }
- 12. Union A∪B ∀x:: x∈A ∨ x∈B A∪B={ x | x∈A or x∈B }
- 13. Union A∪B ∀x:: x∈A ∨ x∈B A∪B={ x | x∈A or x∈B } A ∪ B = B ∪ A. A ∪ (B ∪ C) = (A ∪ B) ∪ C. A ⊆ (A ∪ B). A ∪ A = A. A ∪ ∅ = A. A ⊆ B A ∪ B = B.
- 14. Intersection A∩B ∀x:: x∈A ∧ x∈B A∩B={ x | x∈A and x∈B }
- 15. Intersection A∩B ∀x:: x∈A ∧ x∈B A∩B={ x | x∈A and x∈B }
- 16. Intersection A∩B ∀x:: x∈A ∧ x∈B A∩B={ x | x∈A and x∈B } A ∩ B = B ∩ A. A ∩ (B ∩ C) = (A ∩ B) ∩ C. A ∩ B ⊆ A. A ∩ A = A. A ∩ ∅ = ∅. A ⊆ B A ∩ B = A.
- 17. Complements AB, A’ ∀x:: x∈A ∧ x∉B AB={ x | x∈A and x∉B }
- 18. Complements AB, A’ ∀x:: x∈A ∧ x∉B AB={ x | x∈A and x∉B } A B ≠ B A. A ∪ A′ = U. A ∩ A′ = ∅. (A′)′ = A. A A = ∅. U′ = ∅. ∅′ = U. A B = A ∩ B′.
- 19. A ∩ U = A A ∪ ∅ = A Neutral elements
- 20. A ∩ U = A A ∪ ∅ = A Neutral elements A ∩ ∅ = ∅ A ∪ U = U Zero elements
- 21. A ∩ U = A A ∪ ∅ = A Neutral elements A ∩ ∅ = ∅ A ∪ U = U Zero elements A ∩ A = A A ∪ A = A Idempotence
- 22. A ∩ U = A A ∪ ∅ = A Neutral elements A ∩ ∅ = ∅ A ∪ U = U Zero elements A ∩ A = A A ∪ A = A Idempotence A ∪ B = B ∪ A A ∩ B = B ∩ A Commutativity
- 23. A ∩ U = A A ∪ ∅ = A Neutral elements A ∩ ∅ = ∅ A ∪ U = U Zero elements A ∩ A = A A ∪ A = A Idempotence A ∪ B = B ∪ A A ∩ B = B ∩ A Commutativity A ∩ (B ∩ C) = (A ∩ B) ∩ C A ∪ (B ∪ C) = (A ∪ B) ∪ C Associativity
- 24. A ∩ U = A A ∪ ∅ = A Neutral elements A ∩ ∅ = ∅ A ∪ U = U Zero elements A ∩ A = A A ∪ A = A Idempotence A ∪ B = B ∪ A A ∩ B = B ∩ A Commutativity A ∩ (B ∩ C) = (A ∩ B) ∩ C A ∪ (B ∪ C) = (A ∪ B) ∪ C Associativity A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C) A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C) Distributivity
- 25. A ∩ U = A A ∪ ∅ = A Neutral elements A ∩ ∅ = ∅ A ∪ U = U Zero elements A ∩ A = A A ∪ A = A Idempotence A ∩ A’ = ∅ A ∪ A’ = U Complement A ∪ B = B ∪ A A ∩ B = B ∩ A Commutativity A ∩ (B ∩ C) = (A ∩ B) ∩ C A ∪ (B ∪ C) = (A ∪ B) ∪ C Associativity A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C) A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C) Distributivity
- 26. Similar to boolean algebra a ∧ 1 = a a ∨ 0 = a Neutral elements a ∧ 0 = 0 a ∨ 1 = 1 Zero elements a ∧ a = a a ∨ a = a Idempotence a ∧ ¬ a = 0 a ∨ ¬ a = 1 Negation a ∨ b = b ∨ a a ∧ b = b ∧ a Commutativity a ∧ (b ∧ c) = (a ∧ b) ∧ c a ∨ (b ∨ c) = (a ∨ b) ∨ c Associativity a ∧ (b ∨ c) = (a ∧ b) ∨ (a ∧ c) a ∨ (b ∧ c) = (a ∨ b) ∧ (a ∨ c) Distributivity
- 27. A ∩ U = A A ∪ ∅ = A Neutral elements A ∩ ∅ = ∅ A ∪ U = U Zero elements A ∩ A = A A ∪ A = A Idempotence A ∩ A’ = ∅ A ∪ A’ = U Complement A ∪ B = B ∪ A A ∩ B = B ∩ A Commutativity A ∩ (B ∩ C) = (A ∩ B) ∩ C A ∪ (B ∪ C) = (A ∪ B) ∪ C Associativity A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C) A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C) Distributivity
- 28. A ∩ U = A A ∪ B = B ∪ A A ∪ ∅ = A A ∩ ∅ = ∅ A ∪ U = U A ∩ A = A A ∪ A = A A ∩ A’ = ∅ A ∪ A’ = U Neutral elements Zero elements Idempotence Complement A ∩ (B ∩ C) = (A ∩ B) ∩ C A ∩ B = B ∩ A A ∪ (B ∪ C) = (A ∪ B) ∪ C A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C) A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C) (A ∩ B)’ = (A’) ∪ (B’) (A ∪ B)’ = (A’) ∩ (B’) Commutativity Associativity Distributivity DeMorgan’s
- 29. A ⊆ A. A ⊆ B ∧ B ⊆ A A = B. A ⊆ B ∧ B ⊆ C A ⊆ C Reﬂexivity Anti-symmetry Transitivity
- 30. Relations www.tudorgirba.com
- 31. Scissors Paper Stone
- 32. Scissors Paper Stone beats beats beats
- 33. Scissors Paper Stone beats beats beats beats Scissors Paper Stone Scissors FALSE TRUE FALSE Paper FALSE FALSE TRUE Stone TRUE FALSE FALSE
- 34. beats Scissors Paper Stone Scissors FALSE TRUE FALSE Paper FALSE FALSE TRUE Stone TRUE FALSE FALSE beats = {(Scissors, Paper), (Paper, Stone), (Stone, Scissors)}
- 35. beats Scissors Paper Stone Scissors FALSE TRUE FALSE Paper FALSE FALSE TRUE Stone TRUE FALSE FALSE beats = {(Scissors, Paper), (Paper, Stone), (Stone, Scissors)} beats ⊆ {Scissor, Paper, Stone} x {Scissor, Paper, Stone}
- 36. Cartesian product AxB AxB={ (a,b) | a∈A and b∈B }
- 37. Cartesian product AxB AxB={ (a,b) | a∈A and b∈B } A × ∅ = ∅. A × (B ∪ C) = (A × B) ∪ (A × C). (A ∪ B) × C = (A × C) ∪ (B × C).
- 38. N-ary Relation A1, A2, ..., An R ⊆ A1 x A2 x...x An
- 39. Binary Relation A1, A2 R ⊆ A1 x A2 (a,b) ∈ R aRb
- 40. Binary Relation A1, A2 R ⊆ A1 x A2 (a,b) ∈ R aRb
- 41. Binary Relation A1, A2 R ⊆ A1 x A2 (a,b) ∈ R aRb dom R = {a⏐∃b :: (a,b) ∈ R} range R = {b⏐∃a :: (a,b) ∈ R}
- 42. Reﬂexive relation every element x of A is in relation R with itself
- 43. ∀x: x∈A: xRx Reﬂexive relation every element x of A is in relation R with itself
- 44. Symmetric relation if there is a relation between x and y, then there is a relation between y and x ∀x: x∈A: xRx Reﬂexive relation every element x of A is in relation R with itself
- 45. Symmetric relation if there is a relation between x and y, then there is a relation between y and x ∀x: x∈A: xRx ∀x,y: x,y∈A: xRy yRx Reﬂexive relation every element x of A is in relation R with itself
- 46. Transitive relation ... Symmetric relation if there is a relation between x and y, then there is a relation between y and x ∀x: x∈A: xRx ∀x,y: x,y∈A: xRy yRx Reﬂexive relation every element x of A is in relation R with itself
- 47. Transitive relation ... Symmetric relation if there is a relation between x and y, then there is a relation between y and x ∀x: x∈A: xRx ∀x,y: x,y∈A: xRy yRx ∀x,y,z: x,y,z∈A: (xRy ∧ yRz) xRz Reﬂexive relation every element x of A is in relation R with itself
- 48. Transitive relation ... Symmetric relation if there is a relation between x and y, then there is a relation between y and x Equivalentrelation ∀x: x∈A: xRx ∀x,y: x,y∈A: xRy yRx ∀x,y,z: x,y,z∈A: (xRy ∧ yRz) xRz Reﬂexive relation every element x of A is in relation R with itself
- 49. Examples = >, < ≥, ≤ beats
- 50. Examples = >, < ≥, ≤ beats reﬂexive, symmetric, transitive transitive reﬂexive, transitive -
- 51. [x]R= {y | xRy} Equivalence class
- 52. [x]R= {y | xRy} Equivalence class [1]= =
- 53. [x]R= {y | xRy} Equivalence class [1]= = {1}
- 54. Example Consider the relation ≡5 over the integer numbers Z deﬁned as x≡5y if and only if x-y is a multiple of 5 (where x,y∈Z). Is ≡5 an equivalence relation?
- 55. Example Consider the relation ≡5 over the integer numbers Z deﬁned as x≡5y if and only if x-y is a multiple of 5 (where x,y∈Z). Is ≡5 an equivalence relation? What is [1]≡5 ?
- 56. R ⊆ AxA {(a,b), (b,c), (c,d)}
- 57. a b c d R ⊆ AxA {(a,b), (b,c), (c,d)}
- 58. a b c d R ⊆ AxA {(a,b), (b,c), (c,d)}
- 59. a b c d R ⊆ AxA {(a,b), (b,c), (c,d)}
- 60. a b c d R ⊆ AxA {(a,b), (b,c), (c,d)}
- 61. a b c d R ⊆ AxA {(a,b), (b,c), (c,d)} R1 = R; ∀i:i>1:Ri = Ri-1 ∪ {(a,b) | ∃c:: (a,c)∈Ri-1 ∧ (c,b)∈Ri-1}. Rt = ∪i≥1Ri = R1 ∪ R2 ∪ R3 ∪ ... Transitive closure
- 62. Irreﬂexive relation no element x of A is in relation R with itself
- 63. ∀x: x∈A: ¬(xRx) Irreﬂexive relation no element x of A is in relation R with itself
- 64. Antisymmetric relation if there is a relation between x and y and one between y and x, then x equals y ∀x: x∈A: ¬(xRx) Irreﬂexive relation no element x of A is in relation R with itself
- 65. Antisymmetric relation if there is a relation between x and y and one between y and x, then x equals y ∀x: x∈A: ¬(xRx) ∀x,y: x,y∈A: (xRy ∧ yRx) x=y Irreﬂexive relation no element x of A is in relation R with itself
- 66. Asymmetric relation xRy and yRx cannot hold at the same time Antisymmetric relation if there is a relation between x and y and one between y and x, then x equals y ∀x: x∈A: ¬(xRx) ∀x,y: x,y∈A: (xRy ∧ yRx) x=y Irreﬂexive relation no element x of A is in relation R with itself
- 67. Asymmetric relation xRy and yRx cannot hold at the same time Antisymmetric relation if there is a relation between x and y and one between y and x, then x equals y ∀x: x∈A: ¬(xRx) ∀x,y: x,y∈A: (xRy ∧ yRx) x=y ∀x,y: x,y∈A: xRy ¬(yRx) Irreﬂexive relation no element x of A is in relation R with itself
- 68. Examples = >, < ≥, ≤ beats
- 69. Examples = >, < ≥, ≤ beats antisymmetric irreﬂexive, asymmetric antisymmetric irreﬂexive
- 70. Non-symmetric relation a relation that is not symmetric
- 71. ∀x,y: x,y∈A: (xRy) ∧ ¬(yRx) Non-symmetric relation a relation that is not symmetric
- 72. ∀x,y: x,y∈A: (xRy) ∧ ¬(yRx) Non-symmetric relation a relation that is not symmetric Total relation R is deﬁned on the entire A.
- 73. ∀x,y: x,y∈A: (xRy) ∧ ¬(yRx) Non-symmetric relation a relation that is not symmetric ∀x,y: x,y∈A: xRy ∨ yRx Total relation R is deﬁned on the entire A.
- 74. Examples = >, < ≥, ≤ beats
- 75. Examples = >, < ≥, ≤ beats - non-symmetric non-symmetric, total -
- 76. Acyclic relation there are no elements with transitive closure to themselves
- 77. Acyclic relation there are no elements with transitive closure to themselves ∀n: n∈N: ( ¬(∃x1, x2, ...,xn: x1, x2, ...,xn∈A: x1Rx2 ∧ x2Rx3 ∧ ... ∧ xn-1Rxn ∧ xnRx1 ) )
- 78. Acyclic relation there are no elements with transitive closure to themselves ∀n: n∈N: ( ¬(∃x1, x2, ...,xn: x1, x2, ...,xn∈A: x1Rx2 ∧ x2Rx3 ∧ ... ∧ xn-1Rxn ∧ xnRx1 ) ) >, <
- 79. Acyclic relation there are no elements with transitive closure to themselves ∀n: n∈N: ( ¬(∃x1, x2, ...,xn: x1, x2, ...,xn∈A: x1Rx2 ∧ x2Rx3 ∧ ... ∧ xn-1Rxn ∧ xnRx1 ) ) >, < acyclic
- 80. R is partial order; R is total relation. Total order R is reflexive; R is transitive; R is antisymmetric. Partial order R is reflexive; R is transitive. Strict partial order
- 81. A, B F ⊆ A x B (a,b)∈F ∧ (a,c)∈F b=c domF = A F:A -> B Function
- 82. A, B F ⊆ A x B (a,b)∈F ∧ (a,c)∈F b=c domF = A F:A -> B Function FºG(x) = F(G(x)) Function composition
- 83. Tudor Gîrba www.tudorgirba.com creativecommons.org/licenses/by/3.0/

No public clipboards found for this slide

×
### Save the most important slides with Clipping

Clipping is a handy way to collect and organize the most important slides from a presentation. You can keep your great finds in clipboards organized around topics.

Be the first to comment