Binary Relations Cunsheng Ding HKUST, Hong Kong September 27, 2015 - - PowerPoint PPT Presentation

binary relations
SMART_READER_LITE
LIVE PREVIEW

Binary Relations Cunsheng Ding HKUST, Hong Kong September 27, 2015 - - PowerPoint PPT Presentation

Binary Relations Cunsheng Ding HKUST, Hong Kong September 27, 2015 Cunsheng Ding (HKUST, Hong Kong) Binary Relations September 27, 2015 1 / 21 Contents Binary Relations 1 Equivalence Relations 2 Partial Orders 3 Total Orders 4


slide-1
SLIDE 1

Binary Relations

Cunsheng Ding

HKUST, Hong Kong

September 27, 2015

Cunsheng Ding (HKUST, Hong Kong) Binary Relations September 27, 2015 1 / 21

slide-2
SLIDE 2

Contents

1

Binary Relations

2

Equivalence Relations

3

Partial Orders

4

Total Orders

Cunsheng Ding (HKUST, Hong Kong) Binary Relations September 27, 2015 2 / 21

slide-3
SLIDE 3

Binary Relations

Definition 1

1

Let A and B be two sets. A binary relation R from A to B is a subset of A× B. A binary relation on A is a subset of A× A.

2

Given an ordered pair (x,y) ∈ A× B, we say that x is related to y by R, written x R y, if and only if (x,y) ∈ R.

Example 2

Let A = {Alice, Jim} and B = {Math, Biology}. Assume that Student Course Alice Math, Biology Jim Math Then the students and modules involved can be described by the following relation: R = {(Alice,Math), (Alice,Biology), (Jim,Math)}.

Cunsheng Ding (HKUST, Hong Kong) Binary Relations September 27, 2015 3 / 21

slide-4
SLIDE 4

Ways to describe a Binary Relation (1)

1

In terms of a subset of A× B (see Example 2).

2

Arrow diagram.

Example 3

The arrow diagram representation of the binary relation of Example 2 is the following:

Bio Alice Jim Math

Cunsheng Ding (HKUST, Hong Kong) Binary Relations September 27, 2015 4 / 21

slide-5
SLIDE 5

Ways to describe a Binary Relation (2)

Example 4

Write the following relation R in terms of ordered pairs.

5 1 2 3 4

Solution: A

= {1,2,3,4,5}

R

= {(1,1),(2,2),(3,3),(4,4),(5,5),(3,5),(5,4),(4,3)}

Cunsheng Ding (HKUST, Hong Kong) Binary Relations September 27, 2015 5 / 21

slide-6
SLIDE 6

The Inverse Relation

Definition 5

Let R be a relation from X to Y. The inverse of R, denoted by R−1, is the relation from Y to X defined by R−1 = {(y,x) | (x,y) ∈ R}

Example 6

Let X = {2,3,4} and Y = {3,4,5,6,7}. Define R = {(2,4),(2,6),(3,3),(3,6),(4,4)} Then R−1 = {(4,2),(6,2),(3,3),(6,3),(4,4)}

Cunsheng Ding (HKUST, Hong Kong) Binary Relations September 27, 2015 6 / 21

slide-7
SLIDE 7

The Composition of Relations

Definition 7

Let R1 be a relation from X to Y, and R2 be a relation from Y to Z. The composition of R1 and R2 is denoted by R2 ◦ R1 or simply R2R1, is the relation from X to Z defined as R2R1 = {(x,z) | (x,y) ∈ R1 and (y,z) ∈ R2, for some y ∈ Y.}

Example 8

Let X = Y = {1,2,3,4,5,6,7,8} and Z = {u,s,t}, and let R1

= {(1,2),(1,6),(2,4),(3,4),(3,6),(3,8)},

R2

= {(2,u),(4,s),(4,t),(6,t),(8,u)}

Then R2R1 = {(1,u),(1,t),(2,s),(2,t),(3,s),(3,t),(3,u)}

Cunsheng Ding (HKUST, Hong Kong) Binary Relations September 27, 2015 7 / 21

slide-8
SLIDE 8

Reflexive Relations

Definition 9

A binary relation R on a set A is reflexive if and only if (a,a) ∈ R for all a ∈ A.

Example 10

Let A = {1,2,3,4} and let R = {(1,1),(1,2),(2,1),(2,2),(3,4),(4,3),(3,3),(4,4)}. Is R reflexive?

Example 11

Let R be the set of real numbers and let R = {(x,y) ∈ R2 | x ≤ y}. Then R is reflexive.

Example 12

R = {(x,y) ∈ R2 | x2 + y2 > 0} is not a reflexive relation.

Proof. (0,0) ∈ R.

Cunsheng Ding (HKUST, Hong Kong) Binary Relations September 27, 2015 8 / 21

slide-9
SLIDE 9

Symmetric Relations

Definition 13

A binary relation R on a set A is symmetric if and only if for all a,b ∈ A,

(a,b) ∈ R implies (b,a) ∈ R. Example 14

R = {(x,y) ∈ R2 | x2 + y2 = 1} is a symmetric relation on R.

Example 15

Let A = {1,2,3}, R = {(1,1),(2,2)}. Then R is symmetric, but not reflexive.

Example 16

R = {(x,y) ∈ R2 | x2 ≥ y} is not a symmetric relation on R.

Proof. (2,1) ∈ R but (1,2) ∈ R.

Cunsheng Ding (HKUST, Hong Kong) Binary Relations September 27, 2015 9 / 21

slide-10
SLIDE 10

Transitive Relations

Definition 17

A binary relation on R on a set A is transitive if and only if for all a,b,c ∈ A, (a,b) ∈ R and (b,c) ∈ R implies that (a,c) ∈ R.

Example 18

R = {(x,y) ∈ R2 | x ≤ y} is a transitive relation on R.

Proof.

Let (x,y) ∈ R and (y,z) ∈ R. Then x ≤ y and y ≤ z. Hence x ≤ z and

(x,z) ∈ R. Example 19

R = {(a,b),(b,a),(a,a)} is not a transitive relation on {a,b}.

Proof. (b,a) ∈ R, (a,b) ∈ R, but (b,b) ∈ R.

Cunsheng Ding (HKUST, Hong Kong) Binary Relations September 27, 2015 10 / 21

slide-11
SLIDE 11

Equivalence Relations (1)

Definition 20

An equivalence relation on a set A is a binary relation R on A which is reflexive, symmetric and transitive. (a) Many people use ∼ to denote an equivalence relation. (b) To prove that R is an equivalence relation, we need to prove reflexivity, symmetry, and transitivity. (c) To prove that R is NOT an equivalence relation, we need to prove one of the reflexivity, symmetry, and transitivity does not hold.

Example 21

The relation ≤ on the real numbers is not an equivalence relation.

Proof.

The relation ≤ is not symmetric. For example, (3,7) ∈ R, but (7,3) ∈ R.

Cunsheng Ding (HKUST, Hong Kong) Binary Relations September 27, 2015 11 / 21

slide-12
SLIDE 12

Equivalence Relations (2)

Example 22

Let R = {(x,y) | (x,y) ∈ Z2 and 3 | (x − y)}. Then R is an equivalence relation on Z.

Proof.

Reflexivity: Since 3 divides x − x = 0 for any x ∈ Z, by definition, (x,x) ∈ R. Symmetry: Let (x,y) ∈ R, we want to prove (y,x) ∈ R.

(x,y) ∈ R implies 3 | (x − y) implies 3 | (y − x) implies (y,x) ∈ R.

Transitivity: For any (x,y) ∈ R and (y,z) ∈ R, we now prove (x,z) ∈ R.

(x,y) ∈ R implies 3 | (x − y) implies(x − y) = 3k1 for some k1 (y,z) ∈ R implies 3 | (y − z) implies (y − z) = 3k2 for some k2

Hence x − z = (x − y)+(y − z) = 3(k1 + k2). Thus 3 | (x − z). By definition,

(x,z) ∈ R.

Cunsheng Ding (HKUST, Hong Kong) Binary Relations September 27, 2015 12 / 21

slide-13
SLIDE 13

Partitions on A

Definition 23

A partition of a set A is a collection of disjoint nonempty subsets of A whose union is A. These disjoint sets are called cells (or blocks). The cells are said to partition A.

Example 24

Let A = {0,1,2,3,4,5,6}. Then

1

{{0,1},{2,3,4},{5,6}} is a partition of A.

2

{{0},{1,2,3,4,5,6}} is also a partition of A.

Cunsheng Ding (HKUST, Hong Kong) Binary Relations September 27, 2015 13 / 21

slide-14
SLIDE 14

Equivalence Relation Induced by a Partition (1)

Let A be a set and let {A1,A2,...,An} be a partition of A. Define a binary relation R by a R b iff a and b ∈ Ai for some i This is a binary relation.

Example 25

Let A = {1,2,3} and let {{1},{2,3}} be a partition on A. The equivalence relation R induced by this partition is: R = {(1,1),(2,3),(3,2),(2,2),(3,3)}

Cunsheng Ding (HKUST, Hong Kong) Binary Relations September 27, 2015 14 / 21

slide-15
SLIDE 15

Equivalence Relation Induced by a Partition (2)

Let A be a set and let {A1,A2,...,An} be a partition of A. Define a binary relation R by a R b iff a and b ∈ Ai for some i

Theorem 26

The above R is an equivalence relation defined on A.

Proof.

1

Reflexivity: a and a in the same subset implies that a R a.

2

Symmetry: a R b implies {a,b} ⊆ Ai implies {b,a} ⊆ Ai implies b R a

3

Transitivity: Assume that a R b and b R c. Then a and b are in the same subset Ai, and b and c are in the same subset Aj. If i = j, then b ∈ (Ai ∩ Aj). This is contrary to Ai ∩ Aj = /

  • 0. Therefore i = j and a R c.

Cunsheng Ding (HKUST, Hong Kong) Binary Relations September 27, 2015 15 / 21

slide-16
SLIDE 16

Partition Induced by an Equivalence Relation

Definition 27

Let R be an equivalence relation on a set A. The equivalence class containing a, denoted a, is defined by a = {x ∈ A | x R a}. It is straightforward to prove the following.

Theorem 28

Let R be an equivalence relation on a set A. The set {a | a ∈ A} of distinct equivalence classes forms a partition of A.

Cunsheng Ding (HKUST, Hong Kong) Binary Relations September 27, 2015 16 / 21

slide-17
SLIDE 17

Antisymmetric Relations

Definition 29

A binary relation R on a set A is antisymmetric if and only if for all a,b ∈ A,

(a,b) ∈ R and (b,a) ∈ R implies that a = b. Example 30

Let S be any set and let A = P(S) be the power set of S, then R = {(X,Y) | X,Y ∈ P(S), X ⊆ Y} is an antisymmetric relation on P(S). Warning: “Antisymmetric” = “not Symmetric”.

Example 31

R = {(1,2),(2,3),(3,3),(2,1)} defined on A = {1,2,3} is not symmetric, but neither is it antisymmetric.

Cunsheng Ding (HKUST, Hong Kong) Binary Relations September 27, 2015 17 / 21

slide-18
SLIDE 18

Partial Orders

Definition 32

1

A partial order R on a set A is a reflexive, antisymmetric, transitive relation

  • n A.

2

A partially ordered set, is a pair (A,R), where R is a partial order on A.

Example 33

The binary relation ≤ on the set of real numbers is a partial order.

Proof.

1

Reflexivity: a ≤ a.

2

Antisymmetry: a ≤ b, b ≤ a implies that a = b.

3

Transitivity: a ≤ b, b ≤ c implies that a ≤ c.

Cunsheng Ding (HKUST, Hong Kong) Binary Relations September 27, 2015 18 / 21

slide-19
SLIDE 19

Total Orders

Definition 34

Let (A,R) be a partially ordered set. Elements a and b of A are said to be comparable if and only if either a R b or b R a.

(P(S),⊆) is a partially ordered set. Note that {a} ⊆ {b,c}, {b,c} ⊆ {a}. Definition 35

Let R be a partial order. If for every a,b ∈ A, either a R b or b R a, then R is called a total order, and (A,R) is called a totally ordered set.

Example 36 (R,≤) is a totally ordered set, and ≤ is a total order on R.

Cunsheng Ding (HKUST, Hong Kong) Binary Relations September 27, 2015 19 / 21

slide-20
SLIDE 20

The Greatest and Least Elements

Definition 37

1

A greatest element g of a partially ordered set (A,R) is an element such that a R g for every element a ∈ A.

2

A least element l of a partially ordered set (A,R) is an element such that l R a for every element a ∈ A.

Example 38

Let S be a set, and let P(S) be the power set. Then (P(S),⊆) is a partially

  • rdered set. Then

1

/ 0 is the least element;

2

S is the greatest element. Remark: Least and greatest elements are comparable with every element.

Question 39

Are the greatest and least elements unique, if they exist?

Cunsheng Ding (HKUST, Hong Kong) Binary Relations September 27, 2015 20 / 21

slide-21
SLIDE 21

Comments on Binary Relations

Binary relations are an important part of discrete mathematics. Functions that will be covered in the sequel are special binary relations. Also graphs can also be viewed as binary relations. Many of the things in our daily life can be viewed as binary relations, for examples, love and hate.

Question 40

Let A be the set of students in this classroom, and let Love be the binary relation defined on A.

1

Is this relation reflexive?

2

Is this relation symmetric?

3

Is this relation antisymmetric?

4

Is this relation transitive?

Cunsheng Ding (HKUST, Hong Kong) Binary Relations September 27, 2015 21 / 21