Packet #5: Binary Relations Applied Discrete Mathematics

Packet #5: Binary Relations Applied Discrete Mathematics

CSC224/226 – Packet 5 – Binary Relations Packet #5: Binary Relations Applied Discrete Mathematics Table of Contents Binary Relations Summary Page 1 Binary Relations Examples Page 2 Properties of Relations Page 3 Examples Pages 4-5 Representations Page 6 Composites Page 8 Closures Pages 10-11 Equivalence Relations Pages 12-13 Posets & Hasse Diagrams Pages 14-17 CSC224 – Packet 5 – Binary Relations CSC224/226 – Packet 5 – Binary Relations Binary Relations Summary I. Definition: A binary relation is a set of points, or ordered pairs. The ordered pairs are of the form (a,b) where a is a member of a set A (a ∈ A) and b is a member of a set B (b ∈ B). Any subset R ⊆ A x B is a binary relation. (Remember that A x B is the set of ordered pairs {(a,b) | a∈A ∧ b ∈ B}) II. Properties: Consider the binary relation R ⊆ A x A. A. Reflexive:R is reflexive if ∀ a ∈ A, (a,a) ∈ R B. Irreflexive: R is irreflexive if ∀ a ∈ A, (a,a) ∉ R. Is ¬ (R is reflexive) ⇔ (R is irreflexive)? C. Non-reflexive: ¬ (R is reflexive) D. Symmetric: R is symmetric if ∀ a, b ∈ A, [ ((a,b) ∈ R) ⇔ ((b,a) ∈ R) ] E. Antisymmetric: R is antisymmetric if ∀ a, b ∈ A, [(a,b) ∈ R ∧ (b,a) ∈ R] ⇒ (b = a) F. Asymmetric: R is asymmetric if ∀ a, b ∈ A, [(a,b) ∈ R] ⇒ [(b,a) ∉ R] Asymmetric = irreflexive AND antisymmetric G. Transitive: R is transitive if ∀ a, b ∈ A, [(a,b) ∈ R ∧ (b,c) ∈ R] ⇒ (a,c) ∈ R Also: R2 ⊆ R if and only if R is transitive. III. Representations A. Matrix: Form a matrix with the rows labeled with elements of A and the columns labeled with elements of B. Then place a 1 in position (a,b) if (a,b) ∈ R and a 0 in position (a,b) if (a,b) ∉ R. B. Digraph: Make a column of dots, label one for each element of A. Make another column of dots for the elements of B. Now, for every element (a,b) in R, draw an arrow from point a to point b. IV. Inverse Relation V. Composite Relations VI. Closure Properties (Reflexive, Symmetric, & Transitive closures) VII. Special Types A. Equivalence Relations are reflexive, symmetric and transitive (RST) B. Partially Ordered Sets are reflexive, antisymmetric and transitive (RAT) 1 CSC224/226 – Packet 5 – Binary Relations Binary Relations Definition 1. A binary relation is a set of ordered pairs. 2. Each ordered pair consists of elements taken from two sets. 3. The relation xRy is an ordered pair, <x,y> ∈ R, with x taken from the set S , and y taken from the set S . 1 2 4. S and S can be finite or infinite. They do not have to be equal. 1 2 Examples of Binary Relations A binary relation R on the set SxT. Example: S = {a, b, c} T = {1, 2, 3} R = {(a, 1), (a, 3), (b, 2), (c, 3)} A special binary relation R is a subset of SxS. Example: S = {a,b,c,d} R = {<a,a>, <a,b>, <a,c>, <b,a>, <b,d>, <c,a>, <c,b>, <d,b>} R is a factor relation on Ρ, where for x,y ∈ Ρ, xRy ⇔ x is a factor of y True or False? 3R6, 5R6, 6R3, 8R24, 5R5, 12R16 Define R on Ζ by xRy ⇔ x < y True or False? 2R3, 2R2, 5R10, 3R2, -1R1, 0R-1 Let R be the "congruent mod 5" relation on Ζ x Ζ for x,y ∈ Ζ, xRy ⇔ (x-y) is divisible by 5 ⇔ x ≡ y (mod 5) True or False? 2R7, -2R2, 2R2, 23R3, 3R23, -1R4, 0R10, -1R5 Let R be the subset relation, P({1,2,3}), where for A,B ∈ P({1,2,3}), ARB ⇔ A ⊆ B True or False? ∅R{1,2}, {1}R{2}, {1}R{1,2,3}, {2,3}R{2,3}, {1,2}R∅ CSC224 – Packet 5 – Binary Relations 2 CSC224/226 – Packet 5 – Binary Relations Properties of Binary Relations Relation R on set S (Universe of Discourse = S) Reflexive: if, for all x in S, xRx exists, then R is said to be reflexive. ∀x[xRx] Example: S = {1,2,3,4} if <1,1>;<2,2>;<3,3>;<4,4> ∈ R, then R is reflexive. if S = ∅, then R is also empty. Is R reflexive? Irreflexive: if, for all x in S, there is no xRx, then R is said to be irreflexive. ∀x[¬(xRx)] Note: To be irreflexive is different from being non-reflexive. ∀x[¬ (xRx)] irreflexive ¬∀x(xRx) = ∃x[¬(xRx)] non-reflexive Symmetric: If ∀x∀y[xRy → yRx] then R is said to be symmetric. Antisymmetric: If ∀x∀y[(xRy ∧ yRx) → (x = y)] then R is said to be antisymmetric. Note: To be antisymmetric is different from being asymmetric. ∀x∀y[xRy → ¬(yRx)] asymmetric Transitive: If ∀x∀y[(xRy ∧ yRz) → xRz] then R is said to be transitive. Also: R2 ⊆ R if and only if R is transitive. CSC224 – Packet 5 – Binary Relations 3 CSC224/226 – Packet 5 – Binary Relations Examples of Binary Relations Example 1: The real plane (R x R) is a binary relation, where points are of the form (x,y) where x ∈ R is on the real x-axis and y ∈ R is on the real y-axis. Example 2: The set of points on the graph y = x2 forms a subset of R x R, so it is a binary relation. It can be written as a set as well as by a graph. The set notation is: {(x,f(x)) | x ∈ R and f(x) = x2 }. Some points in this binary relation are: (0,0), (- 1,1), (1,1), (2,4), (3,9). What are some points that are not in this binary relation? Example 3: Define a relation R ⊆ A x B where A is the set of all dogs on the planet, and B is the set of all humans, and (a,b) ∈ R if dog a belongs to person b. If Tony is a boy and Sparky is a dog, can (Tony, Sparky) be in R? Notice that not all dogs have owners and not all people have dogs, so R ≠ A x B. Example 4: Let A = {1,3,4,6,7}. Here are some binary relations on A x A. For each of them, determine which properties the relations have. R1 = {(1,3),(7,4)} is a binary relation. R2 is defined by: ∀(a ∈ A) ∀ (b ∈ A) a ≤ b ⇒ (a,b) ∈ R R2 = {(1,1),(1,3),(1,4),(1,6),(1,7), (3,3),(3,4),(3,6),(3,7),(4,4),(4,6),(4,7),(6,6),(6,7),(7,7)} R3 is defined by: ∀(a ∈ A) ∀ (b ∈ A) a > b ⇒ (a,b) ∈ R R3 = ? R4 is defined by: ∀(a ∈ A) ∀ (b ∈ A) a ≡ b (mod 3) ⇒ (a,b) ∈ R (Remember that a ≡ b (mod 3) means that a and b have the same remainder if you divide both of them by 3.) R4 = { (1,1),(1,4),(1,7),(3,3),(3,6),(4,1),(4,4),(4,7),(6,3),(6,6), (7,1),(7,4),(7,7)} CSC224 – Packet 5 – Binary Relations 4 CSC224/226 – Packet 5 – Binary Relations Examples (Illustrated Under Examples of Binary Relations) CSC224 – Packet 5 – Binary Relations 5 CSC224/226 – Packet 5 – Binary Relations Representations of Binary Relations A matrix can be used to represent the binary relation by using a 1 to indicate the pairs in the relationship and 0 elsewhere. If S = S , a digraph (also called a 1 2 directed graph) can be also used to represent the relation, xRy. A digraph consists of vertices (elements of the set S) and directional branches indicating the connection in the ordered pair. example: S = S = S = {1,2,3,4} 1 2 xRy = {<1,2>,<1,4>,<2,3>,<4,4>} Matrix Representation: 1234 1 0101 2 0010 3 0000 4 0001 Digraph Representation 1 2 3 4 It is easy to see if a relation is reflexive from the matrix representing the relation. If the relation is reflexive, M will have all 1's in its major diagonal. If the relation is irreflexive, M will have all 0's in its major diagonal. If the relation is non-reflexive, M will have a mixture of 0's and 1's in its major diagonal. 1000 0100 This matrix is reflexive. 0010 0001 CSC224 – Packet 5 – Binary Relations 6 CSC224/226 – Packet 5 – Binary Relations If the relation is symmetric, M is symmetric about the major diagonal. If the relation is antisymmetric, M will not have any symmetry about the major diagonal. If the relation is non-symmetric, M will have at least one set of elements that are symmetric about the major diagonal. (The matrix given below is symmetric.) 0100 1010 0110 0000 Transitivity is a little more difficult to check. One can check element by element xRy, yRz, and xRz for all x, y, and z. You must check EVERY pair xRy and yRz and make sure that xRz is in the relation. Alternatively, you can compute R2 and check: if R2 ⊆ R then R is transitive. -1 Definition of R -1 R is obtained by interchanging the x,y pair for each element in R. So if -1 R ⊆ A x B, then R ⊆ B x A. Example 1: R = {<1,2>, <3,4>, <2,3>, <4,1>} -1 R = {<2,1>, <4,3>, <3,2>, <1,4>} Using the Matrix to check for properties: -1 If M is the matrix for R, then R is represented by the transpose of M, where we T interchange the rows and columns of M to get M .

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    17 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us