Relations Aritra Hazra Department of Computer Science and - - PowerPoint PPT Presentation

relations
SMART_READER_LITE
LIVE PREVIEW

Relations Aritra Hazra Department of Computer Science and - - PowerPoint PPT Presentation

Relations Aritra Hazra Department of Computer Science and Engineering, Indian Institute of Technology Kharagpur, Paschim Medinipur, West Bengal, India - 721302. Email: aritrah@cse.iitkgp.ac.in Autumn 2020 Aritra Hazra (CSE, IITKGP) CS21001 :


slide-1
SLIDE 1

Relations

Aritra Hazra

Department of Computer Science and Engineering, Indian Institute of Technology Kharagpur, Paschim Medinipur, West Bengal, India - 721302. Email: aritrah@cse.iitkgp.ac.in

Autumn 2020

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 1 / 12

slide-2
SLIDE 2

Cartesian Product

Definition: Cartesian Product or Cross Product of two sets, A and B, denoted as A × B, is defined by, A × B = {(a, b) | a ∈ A, b ∈ B} Generically, A1 × A2 × · · · × Ak = {(x1, x2, . . . , xk) | ∀i, xi ∈ Ai}

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 2 / 12

slide-3
SLIDE 3

Cartesian Product

Definition: Cartesian Product or Cross Product of two sets, A and B, denoted as A × B, is defined by, A × B = {(a, b) | a ∈ A, b ∈ B} Generically, A1 × A2 × · · · × Ak = {(x1, x2, . . . , xk) | ∀i, xi ∈ Ai} Ordered Pairs: The elements of (A × B) are called ordered pairs. Generically, the elements, (x1, x2, . . . , xk) ∈ A1 × A2 × · · · × Ak (k-fold Cartesian product), are called ordered k-tuples.

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 2 / 12

slide-4
SLIDE 4

Cartesian Product

Definition: Cartesian Product or Cross Product of two sets, A and B, denoted as A × B, is defined by, A × B = {(a, b) | a ∈ A, b ∈ B} Generically, A1 × A2 × · · · × Ak = {(x1, x2, . . . , xk) | ∀i, xi ∈ Ai} Ordered Pairs: The elements of (A × B) are called ordered pairs. Generically, the elements, (x1, x2, . . . , xk) ∈ A1 × A2 × · · · × Ak (k-fold Cartesian product), are called ordered k-tuples. Cardinality: Let, |A1| = n1, |A2| = n2, . . . , |Ak| = nk. Then, |A1 × A2 × · · · × Ak| = |A1||A2| · · · |Ak| = n1n2 · · · nk.

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 2 / 12

slide-5
SLIDE 5

Cartesian Product

Definition: Cartesian Product or Cross Product of two sets, A and B, denoted as A × B, is defined by, A × B = {(a, b) | a ∈ A, b ∈ B} Generically, A1 × A2 × · · · × Ak = {(x1, x2, . . . , xk) | ∀i, xi ∈ Ai} Ordered Pairs: The elements of (A × B) are called ordered pairs. Generically, the elements, (x1, x2, . . . , xk) ∈ A1 × A2 × · · · × Ak (k-fold Cartesian product), are called ordered k-tuples. Cardinality: Let, |A1| = n1, |A2| = n2, . . . , |Ak| = nk. Then, |A1 × A2 × · · · × Ak| = |A1||A2| · · · |Ak| = n1n2 · · · nk. Properties: For (a, b), (c, d) ∈ A × B, we have (a, b) = (c, d) if and only if a = b and c = d.

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 2 / 12

slide-6
SLIDE 6

Cartesian Product

Definition: Cartesian Product or Cross Product of two sets, A and B, denoted as A × B, is defined by, A × B = {(a, b) | a ∈ A, b ∈ B} Generically, A1 × A2 × · · · × Ak = {(x1, x2, . . . , xk) | ∀i, xi ∈ Ai} Ordered Pairs: The elements of (A × B) are called ordered pairs. Generically, the elements, (x1, x2, . . . , xk) ∈ A1 × A2 × · · · × Ak (k-fold Cartesian product), are called ordered k-tuples. Cardinality: Let, |A1| = n1, |A2| = n2, . . . , |Ak| = nk. Then, |A1 × A2 × · · · × Ak| = |A1||A2| · · · |Ak| = n1n2 · · · nk. Properties: For (a, b), (c, d) ∈ A × B, we have (a, b) = (c, d) if and only if a = b and c = d. Note that, A × B = B × A, but |A × B| = |A||B| = |B × A|.

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 2 / 12

slide-7
SLIDE 7

Cartesian Product

Definition: Cartesian Product or Cross Product of two sets, A and B, denoted as A × B, is defined by, A × B = {(a, b) | a ∈ A, b ∈ B} Generically, A1 × A2 × · · · × Ak = {(x1, x2, . . . , xk) | ∀i, xi ∈ Ai} Ordered Pairs: The elements of (A × B) are called ordered pairs. Generically, the elements, (x1, x2, . . . , xk) ∈ A1 × A2 × · · · × Ak (k-fold Cartesian product), are called ordered k-tuples. Cardinality: Let, |A1| = n1, |A2| = n2, . . . , |Ak| = nk. Then, |A1 × A2 × · · · × Ak| = |A1||A2| · · · |Ak| = n1n2 · · · nk. Properties: For (a, b), (c, d) ∈ A × B, we have (a, b) = (c, d) if and only if a = b and c = d. Note that, A × B = B × A, but |A × B| = |A||B| = |B × A|. Other Properties: Let A, B, C ∈ U (i) A × φ = φ × A = φ

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 2 / 12

slide-8
SLIDE 8

Cartesian Product

Definition: Cartesian Product or Cross Product of two sets, A and B, denoted as A × B, is defined by, A × B = {(a, b) | a ∈ A, b ∈ B} Generically, A1 × A2 × · · · × Ak = {(x1, x2, . . . , xk) | ∀i, xi ∈ Ai} Ordered Pairs: The elements of (A × B) are called ordered pairs. Generically, the elements, (x1, x2, . . . , xk) ∈ A1 × A2 × · · · × Ak (k-fold Cartesian product), are called ordered k-tuples. Cardinality: Let, |A1| = n1, |A2| = n2, . . . , |Ak| = nk. Then, |A1 × A2 × · · · × Ak| = |A1||A2| · · · |Ak| = n1n2 · · · nk. Properties: For (a, b), (c, d) ∈ A × B, we have (a, b) = (c, d) if and only if a = b and c = d. Note that, A × B = B × A, but |A × B| = |A||B| = |B × A|. Other Properties: Let A, B, C ∈ U (i) A × φ = φ × A = φ (ii) A × (B ∩ C) = (A × B) ∩ (A × C) (iii) A × (B ∪ C) = (A × B) ∪ (A × C)

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 2 / 12

slide-9
SLIDE 9

Cartesian Product

Definition: Cartesian Product or Cross Product of two sets, A and B, denoted as A × B, is defined by, A × B = {(a, b) | a ∈ A, b ∈ B} Generically, A1 × A2 × · · · × Ak = {(x1, x2, . . . , xk) | ∀i, xi ∈ Ai} Ordered Pairs: The elements of (A × B) are called ordered pairs. Generically, the elements, (x1, x2, . . . , xk) ∈ A1 × A2 × · · · × Ak (k-fold Cartesian product), are called ordered k-tuples. Cardinality: Let, |A1| = n1, |A2| = n2, . . . , |Ak| = nk. Then, |A1 × A2 × · · · × Ak| = |A1||A2| · · · |Ak| = n1n2 · · · nk. Properties: For (a, b), (c, d) ∈ A × B, we have (a, b) = (c, d) if and only if a = b and c = d. Note that, A × B = B × A, but |A × B| = |A||B| = |B × A|. Other Properties: Let A, B, C ∈ U (i) A × φ = φ × A = φ (ii) A × (B ∩ C) = (A × B) ∩ (A × C) (iii) A × (B ∪ C) = (A × B) ∪ (A × C) (iv) (A ∩ B) × C = (A × C) ∩ (B × C) (v) (A ∪ B) × C = (A × C) ∪ (B × C)

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 2 / 12

slide-10
SLIDE 10

Cartesian Product

Definition: Cartesian Product or Cross Product of two sets, A and B, denoted as A × B, is defined by, A × B = {(a, b) | a ∈ A, b ∈ B} Generically, A1 × A2 × · · · × Ak = {(x1, x2, . . . , xk) | ∀i, xi ∈ Ai} Ordered Pairs: The elements of (A × B) are called ordered pairs. Generically, the elements, (x1, x2, . . . , xk) ∈ A1 × A2 × · · · × Ak (k-fold Cartesian product), are called ordered k-tuples. Cardinality: Let, |A1| = n1, |A2| = n2, . . . , |Ak| = nk. Then, |A1 × A2 × · · · × Ak| = |A1||A2| · · · |Ak| = n1n2 · · · nk. Properties: For (a, b), (c, d) ∈ A × B, we have (a, b) = (c, d) if and only if a = b and c = d. Note that, A × B = B × A, but |A × B| = |A||B| = |B × A|. Other Properties: Let A, B, C ∈ U (i) A × φ = φ × A = φ (ii) A × (B ∩ C) = (A × B) ∩ (A × C) (iii) A × (B ∪ C) = (A × B) ∪ (A × C) (iv) (A ∩ B) × C = (A × C) ∩ (B × C) (v) (A ∪ B) × C = (A × C) ∪ (B × C) (vi) (A − B) × C = (A × C) − (B × C) (vii) A × (B − C) = (A × B) − (A × C)

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 2 / 12

slide-11
SLIDE 11

Relations and Examples

(Binary) Relation

Definition: A (binary) relation, ρ, between two sets, A and B, is defined as, ρ ⊆ A × B. If an ordered pair, (a, b) ∈ ρ (or a ρ b), then the element, a ∈ A, is said to be related to the element, b ∈ B.

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 3 / 12

slide-12
SLIDE 12

Relations and Examples

(Binary) Relation

Definition: A (binary) relation, ρ, between two sets, A and B, is defined as, ρ ⊆ A × B. If an ordered pair, (a, b) ∈ ρ (or a ρ b), then the element, a ∈ A, is said to be related to the element, b ∈ B. Any subset of (A × A) (or A2) is called a relation on A. The relation, ρ = A × B, is called the universal relation.

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 3 / 12

slide-13
SLIDE 13

Relations and Examples

(Binary) Relation

Definition: A (binary) relation, ρ, between two sets, A and B, is defined as, ρ ⊆ A × B. If an ordered pair, (a, b) ∈ ρ (or a ρ b), then the element, a ∈ A, is said to be related to the element, b ∈ B. Any subset of (A × A) (or A2) is called a relation on A. The relation, ρ = A × B, is called the universal relation. Count: Total number of (binary) relations between two sets, A and B (where, |A| = m and |B| = n), is the number of possible subsets of (A × B), i.e. 2mn.

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 3 / 12

slide-14
SLIDE 14

Relations and Examples

(Binary) Relation

Definition: A (binary) relation, ρ, between two sets, A and B, is defined as, ρ ⊆ A × B. If an ordered pair, (a, b) ∈ ρ (or a ρ b), then the element, a ∈ A, is said to be related to the element, b ∈ B. Any subset of (A × A) (or A2) is called a relation on A. The relation, ρ = A × B, is called the universal relation. Count: Total number of (binary) relations between two sets, A and B (where, |A| = m and |B| = n), is the number of possible subsets of (A × B), i.e. 2mn.

Example

Let A = {1, 2, 3} and B = {a, b}. So, the Cartesian products are defined as, A × B = {(1, a), (2, a), (3, a), (1, b), (2, b), (3, b)} and B × A = {(a, 1), (a, 2), (a, 3), (b, 1), (b, 2), (b, 3)}

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 3 / 12

slide-15
SLIDE 15

Relations and Examples

(Binary) Relation

Definition: A (binary) relation, ρ, between two sets, A and B, is defined as, ρ ⊆ A × B. If an ordered pair, (a, b) ∈ ρ (or a ρ b), then the element, a ∈ A, is said to be related to the element, b ∈ B. Any subset of (A × A) (or A2) is called a relation on A. The relation, ρ = A × B, is called the universal relation. Count: Total number of (binary) relations between two sets, A and B (where, |A| = m and |B| = n), is the number of possible subsets of (A × B), i.e. 2mn.

Example

Let A = {1, 2, 3} and B = {a, b}. So, the Cartesian products are defined as, A × B = {(1, a), (2, a), (3, a), (1, b), (2, b), (3, b)} and B × A = {(a, 1), (a, 2), (a, 3), (b, 1), (b, 2), (b, 3)} Clearly, A × B = B × A, however |A × B| = 6 = |B × A|.

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 3 / 12

slide-16
SLIDE 16

Relations and Examples

(Binary) Relation

Definition: A (binary) relation, ρ, between two sets, A and B, is defined as, ρ ⊆ A × B. If an ordered pair, (a, b) ∈ ρ (or a ρ b), then the element, a ∈ A, is said to be related to the element, b ∈ B. Any subset of (A × A) (or A2) is called a relation on A. The relation, ρ = A × B, is called the universal relation. Count: Total number of (binary) relations between two sets, A and B (where, |A| = m and |B| = n), is the number of possible subsets of (A × B), i.e. 2mn.

Example

Let A = {1, 2, 3} and B = {a, b}. So, the Cartesian products are defined as, A × B = {(1, a), (2, a), (3, a), (1, b), (2, b), (3, b)} and B × A = {(a, 1), (a, 2), (a, 3), (b, 1), (b, 2), (b, 3)} Clearly, A × B = B × A, however |A × B| = 6 = |B × A|. There can be a total of 26 = 64 different (binary) relations possible. Some are: ρ1 = {(1, a), (1, b), (1, c)}

  • r

ρ2 = {(2, a), (3, a), (1, b), (3, b)}.

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 3 / 12

slide-17
SLIDE 17

Types and Properties of Relations

Let a relation, ρ, is defined over the set, A with |A| = n, as ρ ⊆ A × A.

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 4 / 12

slide-18
SLIDE 18

Types and Properties of Relations

Let a relation, ρ, is defined over the set, A with |A| = n, as ρ ⊆ A × A. (Count: 2n2)

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 4 / 12

slide-19
SLIDE 19

Types and Properties of Relations

Let a relation, ρ, is defined over the set, A with |A| = n, as ρ ⊆ A × A. (Count: 2n2) Reflexive: ρ is reflexive if ∀x ∈ A, (x, x) ∈ ρ

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 4 / 12

slide-20
SLIDE 20

Types and Properties of Relations

Let a relation, ρ, is defined over the set, A with |A| = n, as ρ ⊆ A × A. (Count: 2n2) Reflexive: ρ is reflexive if ∀x ∈ A, (x, x) ∈ ρ Count: 2n2−n

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 4 / 12

slide-21
SLIDE 21

Types and Properties of Relations

Let a relation, ρ, is defined over the set, A with |A| = n, as ρ ⊆ A × A. (Count: 2n2) Reflexive: ρ is reflexive if ∀x ∈ A, (x, x) ∈ ρ Count: 2n2−n (after choosing all n number of (x, x) pairs, any subset from (n2 − n) pairs can be taken as relation keeping reflexivity)

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 4 / 12

slide-22
SLIDE 22

Types and Properties of Relations

Let a relation, ρ, is defined over the set, A with |A| = n, as ρ ⊆ A × A. (Count: 2n2) Reflexive: ρ is reflexive if ∀x ∈ A, (x, x) ∈ ρ Count: 2n2−n (after choosing all n number of (x, x) pairs, any subset from (n2 − n) pairs can be taken as relation keeping reflexivity) Symmetric: ρ is symmetric if ∀x, y ∈ A, (x, y) ∈ ρ ⇒ (y, x) ∈ ρ

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 4 / 12

slide-23
SLIDE 23

Types and Properties of Relations

Let a relation, ρ, is defined over the set, A with |A| = n, as ρ ⊆ A × A. (Count: 2n2) Reflexive: ρ is reflexive if ∀x ∈ A, (x, x) ∈ ρ Count: 2n2−n (after choosing all n number of (x, x) pairs, any subset from (n2 − n) pairs can be taken as relation keeping reflexivity) Symmetric: ρ is symmetric if ∀x, y ∈ A, (x, y) ∈ ρ ⇒ (y, x) ∈ ρ Count: 2

n2+n 2

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 4 / 12

slide-24
SLIDE 24

Types and Properties of Relations

Let a relation, ρ, is defined over the set, A with |A| = n, as ρ ⊆ A × A. (Count: 2n2) Reflexive: ρ is reflexive if ∀x ∈ A, (x, x) ∈ ρ Count: 2n2−n (after choosing all n number of (x, x) pairs, any subset from (n2 − n) pairs can be taken as relation keeping reflexivity) Symmetric: ρ is symmetric if ∀x, y ∈ A, (x, y) ∈ ρ ⇒ (y, x) ∈ ρ Count: 2

n2+n 2

(selecting an (x, y) + (x, x) pair in n

2

  • + n ways, any

subset from n

2

  • + n pairs can be taken as relation keeping symmetry)

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 4 / 12

slide-25
SLIDE 25

Types and Properties of Relations

Let a relation, ρ, is defined over the set, A with |A| = n, as ρ ⊆ A × A. (Count: 2n2) Reflexive: ρ is reflexive if ∀x ∈ A, (x, x) ∈ ρ Count: 2n2−n (after choosing all n number of (x, x) pairs, any subset from (n2 − n) pairs can be taken as relation keeping reflexivity) Symmetric: ρ is symmetric if ∀x, y ∈ A, (x, y) ∈ ρ ⇒ (y, x) ∈ ρ Count: 2

n2+n 2

(selecting an (x, y) + (x, x) pair in n

2

  • + n ways, any

subset from n

2

  • + n pairs can be taken as relation keeping symmetry)

Transitive: ρ is transitive if ∀x, y, z ∈ A, (x, y), (y, z) ∈ ρ ⇒ (x, z) ∈ ρ

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 4 / 12

slide-26
SLIDE 26

Types and Properties of Relations

Let a relation, ρ, is defined over the set, A with |A| = n, as ρ ⊆ A × A. (Count: 2n2) Reflexive: ρ is reflexive if ∀x ∈ A, (x, x) ∈ ρ Count: 2n2−n (after choosing all n number of (x, x) pairs, any subset from (n2 − n) pairs can be taken as relation keeping reflexivity) Symmetric: ρ is symmetric if ∀x, y ∈ A, (x, y) ∈ ρ ⇒ (y, x) ∈ ρ Count: 2

n2+n 2

(selecting an (x, y) + (x, x) pair in n

2

  • + n ways, any

subset from n

2

  • + n pairs can be taken as relation keeping symmetry)

Transitive: ρ is transitive if ∀x, y, z ∈ A, (x, y), (y, z) ∈ ρ ⇒ (x, z) ∈ ρ Count: Unknown (still an open-problem!)

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 4 / 12

slide-27
SLIDE 27

Types and Properties of Relations

Let a relation, ρ, is defined over the set, A with |A| = n, as ρ ⊆ A × A. (Count: 2n2) Reflexive: ρ is reflexive if ∀x ∈ A, (x, x) ∈ ρ Count: 2n2−n (after choosing all n number of (x, x) pairs, any subset from (n2 − n) pairs can be taken as relation keeping reflexivity) Symmetric: ρ is symmetric if ∀x, y ∈ A, (x, y) ∈ ρ ⇒ (y, x) ∈ ρ Count: 2

n2+n 2

(selecting an (x, y) + (x, x) pair in n

2

  • + n ways, any

subset from n

2

  • + n pairs can be taken as relation keeping symmetry)

Transitive: ρ is transitive if ∀x, y, z ∈ A, (x, y), (y, z) ∈ ρ ⇒ (x, z) ∈ ρ Count: Unknown (still an open-problem!) Antisymmetric: ρ is antisymmetric if ∀x, y ∈ A, (x, y), (y, x) ∈ ρ ⇒ (x = y)

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 4 / 12

slide-28
SLIDE 28

Types and Properties of Relations

Let a relation, ρ, is defined over the set, A with |A| = n, as ρ ⊆ A × A. (Count: 2n2) Reflexive: ρ is reflexive if ∀x ∈ A, (x, x) ∈ ρ Count: 2n2−n (after choosing all n number of (x, x) pairs, any subset from (n2 − n) pairs can be taken as relation keeping reflexivity) Symmetric: ρ is symmetric if ∀x, y ∈ A, (x, y) ∈ ρ ⇒ (y, x) ∈ ρ Count: 2

n2+n 2

(selecting an (x, y) + (x, x) pair in n

2

  • + n ways, any

subset from n

2

  • + n pairs can be taken as relation keeping symmetry)

Transitive: ρ is transitive if ∀x, y, z ∈ A, (x, y), (y, z) ∈ ρ ⇒ (x, z) ∈ ρ Count: Unknown (still an open-problem!) Antisymmetric: ρ is antisymmetric if ∀x, y ∈ A, (x, y), (y, x) ∈ ρ ⇒ (x = y) Count: 2n3

n2−n 2

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 4 / 12

slide-29
SLIDE 29

Types and Properties of Relations

Let a relation, ρ, is defined over the set, A with |A| = n, as ρ ⊆ A × A. (Count: 2n2) Reflexive: ρ is reflexive if ∀x ∈ A, (x, x) ∈ ρ Count: 2n2−n (after choosing all n number of (x, x) pairs, any subset from (n2 − n) pairs can be taken as relation keeping reflexivity) Symmetric: ρ is symmetric if ∀x, y ∈ A, (x, y) ∈ ρ ⇒ (y, x) ∈ ρ Count: 2

n2+n 2

(selecting an (x, y) + (x, x) pair in n

2

  • + n ways, any

subset from n

2

  • + n pairs can be taken as relation keeping symmetry)

Transitive: ρ is transitive if ∀x, y, z ∈ A, (x, y), (y, z) ∈ ρ ⇒ (x, z) ∈ ρ Count: Unknown (still an open-problem!) Antisymmetric: ρ is antisymmetric if ∀x, y ∈ A, (x, y), (y, x) ∈ ρ ⇒ (x = y) Count: 2n3

n2−n 2

(element (x, x) can either be included or excluded; element (x, y) have three options – (i) take only (x, y), (ii) take only (y, x), or (iii) take neither (x, y) nor (y, x). What if take both?)

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 4 / 12

slide-30
SLIDE 30

Types and Properties of Relations

Let a relation, ρ, is defined over the set, A with |A| = n, as ρ ⊆ A × A. (Count: 2n2) Reflexive: ρ is reflexive if ∀x ∈ A, (x, x) ∈ ρ Count: 2n2−n (after choosing all n number of (x, x) pairs, any subset from (n2 − n) pairs can be taken as relation keeping reflexivity) Symmetric: ρ is symmetric if ∀x, y ∈ A, (x, y) ∈ ρ ⇒ (y, x) ∈ ρ Count: 2

n2+n 2

(selecting an (x, y) + (x, x) pair in n

2

  • + n ways, any

subset from n

2

  • + n pairs can be taken as relation keeping symmetry)

Transitive: ρ is transitive if ∀x, y, z ∈ A, (x, y), (y, z) ∈ ρ ⇒ (x, z) ∈ ρ Count: Unknown (still an open-problem!) Antisymmetric: ρ is antisymmetric if ∀x, y ∈ A, (x, y), (y, x) ∈ ρ ⇒ (x = y) Count: 2n3

n2−n 2

(element (x, x) can either be included or excluded; element (x, y) have three options – (i) take only (x, y), (ii) take only (y, x), or (iii) take neither (x, y) nor (y, x). What if take both?) Irreflexive: ρ is irreflexive if ∃x ∈ A, (x, x) ∈ ρ

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 4 / 12

slide-31
SLIDE 31

Types and Properties of Relations

Let a relation, ρ, is defined over the set, A with |A| = n, as ρ ⊆ A × A. (Count: 2n2) Reflexive: ρ is reflexive if ∀x ∈ A, (x, x) ∈ ρ Count: 2n2−n (after choosing all n number of (x, x) pairs, any subset from (n2 − n) pairs can be taken as relation keeping reflexivity) Symmetric: ρ is symmetric if ∀x, y ∈ A, (x, y) ∈ ρ ⇒ (y, x) ∈ ρ Count: 2

n2+n 2

(selecting an (x, y) + (x, x) pair in n

2

  • + n ways, any

subset from n

2

  • + n pairs can be taken as relation keeping symmetry)

Transitive: ρ is transitive if ∀x, y, z ∈ A, (x, y), (y, z) ∈ ρ ⇒ (x, z) ∈ ρ Count: Unknown (still an open-problem!) Antisymmetric: ρ is antisymmetric if ∀x, y ∈ A, (x, y), (y, x) ∈ ρ ⇒ (x = y) Count: 2n3

n2−n 2

(element (x, x) can either be included or excluded; element (x, y) have three options – (i) take only (x, y), (ii) take only (y, x), or (iii) take neither (x, y) nor (y, x). What if take both?) Irreflexive: ρ is irreflexive if ∃x ∈ A, (x, x) ∈ ρ Asymmetric: ρ is asymmetric if ∃x, y ∈ A, (x, y) ∈ ρ ∧ (y, x) ∈ ρ

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 4 / 12

slide-32
SLIDE 32

Types and Properties of Relations

Let a relation, ρ, is defined over the set, A with |A| = n, as ρ ⊆ A × A. (Count: 2n2) Reflexive: ρ is reflexive if ∀x ∈ A, (x, x) ∈ ρ Count: 2n2−n (after choosing all n number of (x, x) pairs, any subset from (n2 − n) pairs can be taken as relation keeping reflexivity) Symmetric: ρ is symmetric if ∀x, y ∈ A, (x, y) ∈ ρ ⇒ (y, x) ∈ ρ Count: 2

n2+n 2

(selecting an (x, y) + (x, x) pair in n

2

  • + n ways, any

subset from n

2

  • + n pairs can be taken as relation keeping symmetry)

Transitive: ρ is transitive if ∀x, y, z ∈ A, (x, y), (y, z) ∈ ρ ⇒ (x, z) ∈ ρ Count: Unknown (still an open-problem!) Antisymmetric: ρ is antisymmetric if ∀x, y ∈ A, (x, y), (y, x) ∈ ρ ⇒ (x = y) Count: 2n3

n2−n 2

(element (x, x) can either be included or excluded; element (x, y) have three options – (i) take only (x, y), (ii) take only (y, x), or (iii) take neither (x, y) nor (y, x). What if take both?) Irreflexive: ρ is irreflexive if ∃x ∈ A, (x, x) ∈ ρ Asymmetric: ρ is asymmetric if ∃x, y ∈ A, (x, y) ∈ ρ ∧ (y, x) ∈ ρ Non-Transitive: ρ is non-transitive if ∃x, y, z ∈ A, (x, y), (y, z) ∈ ρ ∧ (x, z) ∈ ρ

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 4 / 12

slide-33
SLIDE 33

Types and Properties of Relations

Let a relation, ρ, is defined over the set, A with |A| = n, as ρ ⊆ A × A. (Count: 2n2) Reflexive: ρ is reflexive if ∀x ∈ A, (x, x) ∈ ρ Count: 2n2−n (after choosing all n number of (x, x) pairs, any subset from (n2 − n) pairs can be taken as relation keeping reflexivity) Symmetric: ρ is symmetric if ∀x, y ∈ A, (x, y) ∈ ρ ⇒ (y, x) ∈ ρ Count: 2

n2+n 2

(selecting an (x, y) + (x, x) pair in n

2

  • + n ways, any

subset from n

2

  • + n pairs can be taken as relation keeping symmetry)

Transitive: ρ is transitive if ∀x, y, z ∈ A, (x, y), (y, z) ∈ ρ ⇒ (x, z) ∈ ρ Count: Unknown (still an open-problem!) Antisymmetric: ρ is antisymmetric if ∀x, y ∈ A, (x, y), (y, x) ∈ ρ ⇒ (x = y) Count: 2n3

n2−n 2

(element (x, x) can either be included or excluded; element (x, y) have three options – (i) take only (x, y), (ii) take only (y, x), or (iii) take neither (x, y) nor (y, x). What if take both?) Irreflexive: ρ is irreflexive if ∃x ∈ A, (x, x) ∈ ρ Asymmetric: ρ is asymmetric if ∃x, y ∈ A, (x, y) ∈ ρ ∧ (y, x) ∈ ρ Non-Transitive: ρ is non-transitive if ∃x, y, z ∈ A, (x, y), (y, z) ∈ ρ ∧ (x, z) ∈ ρ Not Antisymmetric: ρ is not antisymmetric if ∃x, y ∈ A, (x, y), (y, x) ∈ ρ ∧ (x = y)

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 4 / 12

slide-34
SLIDE 34

Examples of Relations

1

Reflexive and Symmetric, but NOT Transitive:

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 5 / 12

slide-35
SLIDE 35

Examples of Relations

1

Reflexive and Symmetric, but NOT Transitive: ρ is defined over Z as, ρ = {(x, y) | xy ≥ 0 and x, y ∈ Z}

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 5 / 12

slide-36
SLIDE 36

Examples of Relations

1

Reflexive and Symmetric, but NOT Transitive: ρ is defined over Z as, ρ = {(x, y) | xy ≥ 0 and x, y ∈ Z}

(Reflexive as x2 ≥ 0, Symmetric as xy = yx, NOT Transitive for x = 2, y = 0, z = −1)

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 5 / 12

slide-37
SLIDE 37

Examples of Relations

1

Reflexive and Symmetric, but NOT Transitive: ρ is defined over Z as, ρ = {(x, y) | xy ≥ 0 and x, y ∈ Z}

(Reflexive as x2 ≥ 0, Symmetric as xy = yx, NOT Transitive for x = 2, y = 0, z = −1)

2

Symmetric and Transitive, but NOT Reflexive:

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 5 / 12

slide-38
SLIDE 38

Examples of Relations

1

Reflexive and Symmetric, but NOT Transitive: ρ is defined over Z as, ρ = {(x, y) | xy ≥ 0 and x, y ∈ Z}

(Reflexive as x2 ≥ 0, Symmetric as xy = yx, NOT Transitive for x = 2, y = 0, z = −1)

2

Symmetric and Transitive, but NOT Reflexive: ρ is defined over R as, ρ = {(x, y) | xy > 0 and x, y ∈ R}

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 5 / 12

slide-39
SLIDE 39

Examples of Relations

1

Reflexive and Symmetric, but NOT Transitive: ρ is defined over Z as, ρ = {(x, y) | xy ≥ 0 and x, y ∈ Z}

(Reflexive as x2 ≥ 0, Symmetric as xy = yx, NOT Transitive for x = 2, y = 0, z = −1)

2

Symmetric and Transitive, but NOT Reflexive: ρ is defined over R as, ρ = {(x, y) | xy > 0 and x, y ∈ R}

(NOT Reflexive for x = 0, Symmetric as xy = yx, Transitive as xz = (xy).(yz)

y2

> 0 since xy > 0, yz > 0, y2 > 0) Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 5 / 12

slide-40
SLIDE 40

Examples of Relations

1

Reflexive and Symmetric, but NOT Transitive: ρ is defined over Z as, ρ = {(x, y) | xy ≥ 0 and x, y ∈ Z}

(Reflexive as x2 ≥ 0, Symmetric as xy = yx, NOT Transitive for x = 2, y = 0, z = −1)

2

Symmetric and Transitive, but NOT Reflexive: ρ is defined over R as, ρ = {(x, y) | xy > 0 and x, y ∈ R}

(NOT Reflexive for x = 0, Symmetric as xy = yx, Transitive as xz = (xy).(yz)

y2

> 0 since xy > 0, yz > 0, y2 > 0) 3

Reflexive and Transitive, but NOT Symmetric (Antisymmetric):

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 5 / 12

slide-41
SLIDE 41

Examples of Relations

1

Reflexive and Symmetric, but NOT Transitive: ρ is defined over Z as, ρ = {(x, y) | xy ≥ 0 and x, y ∈ Z}

(Reflexive as x2 ≥ 0, Symmetric as xy = yx, NOT Transitive for x = 2, y = 0, z = −1)

2

Symmetric and Transitive, but NOT Reflexive: ρ is defined over R as, ρ = {(x, y) | xy > 0 and x, y ∈ R}

(NOT Reflexive for x = 0, Symmetric as xy = yx, Transitive as xz = (xy).(yz)

y2

> 0 since xy > 0, yz > 0, y2 > 0) 3

Reflexive and Transitive, but NOT Symmetric (Antisymmetric): ρ is defined over R as, ρ = {(x, y) | x ≤ y and x, y ∈ R}

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 5 / 12

slide-42
SLIDE 42

Examples of Relations

1

Reflexive and Symmetric, but NOT Transitive: ρ is defined over Z as, ρ = {(x, y) | xy ≥ 0 and x, y ∈ Z}

(Reflexive as x2 ≥ 0, Symmetric as xy = yx, NOT Transitive for x = 2, y = 0, z = −1)

2

Symmetric and Transitive, but NOT Reflexive: ρ is defined over R as, ρ = {(x, y) | xy > 0 and x, y ∈ R}

(NOT Reflexive for x = 0, Symmetric as xy = yx, Transitive as xz = (xy).(yz)

y2

> 0 since xy > 0, yz > 0, y2 > 0) 3

Reflexive and Transitive, but NOT Symmetric (Antisymmetric): ρ is defined over R as, ρ = {(x, y) | x ≤ y and x, y ∈ R}

(Reflexive as x ≤ x, NOT Symmetric for x = 0.1, y = 1.0, Transitive as x ≤ y ≤ z)

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 5 / 12

slide-43
SLIDE 43

Examples of Relations

1

Reflexive and Symmetric, but NOT Transitive: ρ is defined over Z as, ρ = {(x, y) | xy ≥ 0 and x, y ∈ Z}

(Reflexive as x2 ≥ 0, Symmetric as xy = yx, NOT Transitive for x = 2, y = 0, z = −1)

2

Symmetric and Transitive, but NOT Reflexive: ρ is defined over R as, ρ = {(x, y) | xy > 0 and x, y ∈ R}

(NOT Reflexive for x = 0, Symmetric as xy = yx, Transitive as xz = (xy).(yz)

y2

> 0 since xy > 0, yz > 0, y2 > 0) 3

Reflexive and Transitive, but NOT Symmetric (Antisymmetric): ρ is defined over R as, ρ = {(x, y) | x ≤ y and x, y ∈ R}

(Reflexive as x ≤ x, NOT Symmetric for x = 0.1, y = 1.0, Transitive as x ≤ y ≤ z)

4

NOT Reflexive, NOT Symmetric, NOT Transitive, BUT Antisymmetric:

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 5 / 12

slide-44
SLIDE 44

Examples of Relations

1

Reflexive and Symmetric, but NOT Transitive: ρ is defined over Z as, ρ = {(x, y) | xy ≥ 0 and x, y ∈ Z}

(Reflexive as x2 ≥ 0, Symmetric as xy = yx, NOT Transitive for x = 2, y = 0, z = −1)

2

Symmetric and Transitive, but NOT Reflexive: ρ is defined over R as, ρ = {(x, y) | xy > 0 and x, y ∈ R}

(NOT Reflexive for x = 0, Symmetric as xy = yx, Transitive as xz = (xy).(yz)

y2

> 0 since xy > 0, yz > 0, y2 > 0) 3

Reflexive and Transitive, but NOT Symmetric (Antisymmetric): ρ is defined over R as, ρ = {(x, y) | x ≤ y and x, y ∈ R}

(Reflexive as x ≤ x, NOT Symmetric for x = 0.1, y = 1.0, Transitive as x ≤ y ≤ z)

4

NOT Reflexive, NOT Symmetric, NOT Transitive, BUT Antisymmetric: ρ is defined over Z as, ρ = {(x, y) | y = x + 1 and x, y ∈ Z}

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 5 / 12

slide-45
SLIDE 45

Examples of Relations

1

Reflexive and Symmetric, but NOT Transitive: ρ is defined over Z as, ρ = {(x, y) | xy ≥ 0 and x, y ∈ Z}

(Reflexive as x2 ≥ 0, Symmetric as xy = yx, NOT Transitive for x = 2, y = 0, z = −1)

2

Symmetric and Transitive, but NOT Reflexive: ρ is defined over R as, ρ = {(x, y) | xy > 0 and x, y ∈ R}

(NOT Reflexive for x = 0, Symmetric as xy = yx, Transitive as xz = (xy).(yz)

y2

> 0 since xy > 0, yz > 0, y2 > 0) 3

Reflexive and Transitive, but NOT Symmetric (Antisymmetric): ρ is defined over R as, ρ = {(x, y) | x ≤ y and x, y ∈ R}

(Reflexive as x ≤ x, NOT Symmetric for x = 0.1, y = 1.0, Transitive as x ≤ y ≤ z)

4

NOT Reflexive, NOT Symmetric, NOT Transitive, BUT Antisymmetric: ρ is defined over Z as, ρ = {(x, y) | y = x + 1 and x, y ∈ Z}

(NOT Reflexive as x = x + 1, NOT Symmetric as y = x + 1 ⇒ x = y − 1, NOT Transitive as z = y + 1 = x + 2) Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 5 / 12

slide-46
SLIDE 46

Examples of Relations

1

Reflexive and Symmetric, but NOT Transitive: ρ is defined over Z as, ρ = {(x, y) | xy ≥ 0 and x, y ∈ Z}

(Reflexive as x2 ≥ 0, Symmetric as xy = yx, NOT Transitive for x = 2, y = 0, z = −1)

2

Symmetric and Transitive, but NOT Reflexive: ρ is defined over R as, ρ = {(x, y) | xy > 0 and x, y ∈ R}

(NOT Reflexive for x = 0, Symmetric as xy = yx, Transitive as xz = (xy).(yz)

y2

> 0 since xy > 0, yz > 0, y2 > 0) 3

Reflexive and Transitive, but NOT Symmetric (Antisymmetric): ρ is defined over R as, ρ = {(x, y) | x ≤ y and x, y ∈ R}

(Reflexive as x ≤ x, NOT Symmetric for x = 0.1, y = 1.0, Transitive as x ≤ y ≤ z)

4

NOT Reflexive, NOT Symmetric, NOT Transitive, BUT Antisymmetric: ρ is defined over Z as, ρ = {(x, y) | y = x + 1 and x, y ∈ Z}

(NOT Reflexive as x = x + 1, NOT Symmetric as y = x + 1 ⇒ x = y − 1, NOT Transitive as z = y + 1 = x + 2) 5

Only Reflexive:

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 5 / 12

slide-47
SLIDE 47

Examples of Relations

1

Reflexive and Symmetric, but NOT Transitive: ρ is defined over Z as, ρ = {(x, y) | xy ≥ 0 and x, y ∈ Z}

(Reflexive as x2 ≥ 0, Symmetric as xy = yx, NOT Transitive for x = 2, y = 0, z = −1)

2

Symmetric and Transitive, but NOT Reflexive: ρ is defined over R as, ρ = {(x, y) | xy > 0 and x, y ∈ R}

(NOT Reflexive for x = 0, Symmetric as xy = yx, Transitive as xz = (xy).(yz)

y2

> 0 since xy > 0, yz > 0, y2 > 0) 3

Reflexive and Transitive, but NOT Symmetric (Antisymmetric): ρ is defined over R as, ρ = {(x, y) | x ≤ y and x, y ∈ R}

(Reflexive as x ≤ x, NOT Symmetric for x = 0.1, y = 1.0, Transitive as x ≤ y ≤ z)

4

NOT Reflexive, NOT Symmetric, NOT Transitive, BUT Antisymmetric: ρ is defined over Z as, ρ = {(x, y) | y = x + 1 and x, y ∈ Z}

(NOT Reflexive as x = x + 1, NOT Symmetric as y = x + 1 ⇒ x = y − 1, NOT Transitive as z = y + 1 = x + 2) 5

Only Reflexive: Relation ρ = {(A, B) | Person-A knows Person-B}

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 5 / 12

slide-48
SLIDE 48

Examples of Relations

1

Reflexive and Symmetric, but NOT Transitive: ρ is defined over Z as, ρ = {(x, y) | xy ≥ 0 and x, y ∈ Z}

(Reflexive as x2 ≥ 0, Symmetric as xy = yx, NOT Transitive for x = 2, y = 0, z = −1)

2

Symmetric and Transitive, but NOT Reflexive: ρ is defined over R as, ρ = {(x, y) | xy > 0 and x, y ∈ R}

(NOT Reflexive for x = 0, Symmetric as xy = yx, Transitive as xz = (xy).(yz)

y2

> 0 since xy > 0, yz > 0, y2 > 0) 3

Reflexive and Transitive, but NOT Symmetric (Antisymmetric): ρ is defined over R as, ρ = {(x, y) | x ≤ y and x, y ∈ R}

(Reflexive as x ≤ x, NOT Symmetric for x = 0.1, y = 1.0, Transitive as x ≤ y ≤ z)

4

NOT Reflexive, NOT Symmetric, NOT Transitive, BUT Antisymmetric: ρ is defined over Z as, ρ = {(x, y) | y = x + 1 and x, y ∈ Z}

(NOT Reflexive as x = x + 1, NOT Symmetric as y = x + 1 ⇒ x = y − 1, NOT Transitive as z = y + 1 = x + 2) 5

Only Reflexive: Relation ρ = {(A, B) | Person-A knows Person-B}

6

Only Symmetric:

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 5 / 12

slide-49
SLIDE 49

Examples of Relations

1

Reflexive and Symmetric, but NOT Transitive: ρ is defined over Z as, ρ = {(x, y) | xy ≥ 0 and x, y ∈ Z}

(Reflexive as x2 ≥ 0, Symmetric as xy = yx, NOT Transitive for x = 2, y = 0, z = −1)

2

Symmetric and Transitive, but NOT Reflexive: ρ is defined over R as, ρ = {(x, y) | xy > 0 and x, y ∈ R}

(NOT Reflexive for x = 0, Symmetric as xy = yx, Transitive as xz = (xy).(yz)

y2

> 0 since xy > 0, yz > 0, y2 > 0) 3

Reflexive and Transitive, but NOT Symmetric (Antisymmetric): ρ is defined over R as, ρ = {(x, y) | x ≤ y and x, y ∈ R}

(Reflexive as x ≤ x, NOT Symmetric for x = 0.1, y = 1.0, Transitive as x ≤ y ≤ z)

4

NOT Reflexive, NOT Symmetric, NOT Transitive, BUT Antisymmetric: ρ is defined over Z as, ρ = {(x, y) | y = x + 1 and x, y ∈ Z}

(NOT Reflexive as x = x + 1, NOT Symmetric as y = x + 1 ⇒ x = y − 1, NOT Transitive as z = y + 1 = x + 2) 5

Only Reflexive: Relation ρ = {(A, B) | Person-A knows Person-B}

6

Only Symmetric: Relation ρ = {(A, B) | A + B = 5 and A, B ∈ Z}

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 5 / 12

slide-50
SLIDE 50

Examples of Relations

1

Reflexive and Symmetric, but NOT Transitive: ρ is defined over Z as, ρ = {(x, y) | xy ≥ 0 and x, y ∈ Z}

(Reflexive as x2 ≥ 0, Symmetric as xy = yx, NOT Transitive for x = 2, y = 0, z = −1)

2

Symmetric and Transitive, but NOT Reflexive: ρ is defined over R as, ρ = {(x, y) | xy > 0 and x, y ∈ R}

(NOT Reflexive for x = 0, Symmetric as xy = yx, Transitive as xz = (xy).(yz)

y2

> 0 since xy > 0, yz > 0, y2 > 0) 3

Reflexive and Transitive, but NOT Symmetric (Antisymmetric): ρ is defined over R as, ρ = {(x, y) | x ≤ y and x, y ∈ R}

(Reflexive as x ≤ x, NOT Symmetric for x = 0.1, y = 1.0, Transitive as x ≤ y ≤ z)

4

NOT Reflexive, NOT Symmetric, NOT Transitive, BUT Antisymmetric: ρ is defined over Z as, ρ = {(x, y) | y = x + 1 and x, y ∈ Z}

(NOT Reflexive as x = x + 1, NOT Symmetric as y = x + 1 ⇒ x = y − 1, NOT Transitive as z = y + 1 = x + 2) 5

Only Reflexive: Relation ρ = {(A, B) | Person-A knows Person-B}

6

Only Symmetric: Relation ρ = {(A, B) | A + B = 5 and A, B ∈ Z}

7

Only Transitive:

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 5 / 12

slide-51
SLIDE 51

Examples of Relations

1

Reflexive and Symmetric, but NOT Transitive: ρ is defined over Z as, ρ = {(x, y) | xy ≥ 0 and x, y ∈ Z}

(Reflexive as x2 ≥ 0, Symmetric as xy = yx, NOT Transitive for x = 2, y = 0, z = −1)

2

Symmetric and Transitive, but NOT Reflexive: ρ is defined over R as, ρ = {(x, y) | xy > 0 and x, y ∈ R}

(NOT Reflexive for x = 0, Symmetric as xy = yx, Transitive as xz = (xy).(yz)

y2

> 0 since xy > 0, yz > 0, y2 > 0) 3

Reflexive and Transitive, but NOT Symmetric (Antisymmetric): ρ is defined over R as, ρ = {(x, y) | x ≤ y and x, y ∈ R}

(Reflexive as x ≤ x, NOT Symmetric for x = 0.1, y = 1.0, Transitive as x ≤ y ≤ z)

4

NOT Reflexive, NOT Symmetric, NOT Transitive, BUT Antisymmetric: ρ is defined over Z as, ρ = {(x, y) | y = x + 1 and x, y ∈ Z}

(NOT Reflexive as x = x + 1, NOT Symmetric as y = x + 1 ⇒ x = y − 1, NOT Transitive as z = y + 1 = x + 2) 5

Only Reflexive: Relation ρ = {(A, B) | Person-A knows Person-B}

6

Only Symmetric: Relation ρ = {(A, B) | A + B = 5 and A, B ∈ Z}

7

Only Transitive: Relation ρ = {(A, B) | A ⊂ B and A, B ∈ U}

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 5 / 12

slide-52
SLIDE 52

Examples of Relations

1

Reflexive and Symmetric, but NOT Transitive: ρ is defined over Z as, ρ = {(x, y) | xy ≥ 0 and x, y ∈ Z}

(Reflexive as x2 ≥ 0, Symmetric as xy = yx, NOT Transitive for x = 2, y = 0, z = −1)

2

Symmetric and Transitive, but NOT Reflexive: ρ is defined over R as, ρ = {(x, y) | xy > 0 and x, y ∈ R}

(NOT Reflexive for x = 0, Symmetric as xy = yx, Transitive as xz = (xy).(yz)

y2

> 0 since xy > 0, yz > 0, y2 > 0) 3

Reflexive and Transitive, but NOT Symmetric (Antisymmetric): ρ is defined over R as, ρ = {(x, y) | x ≤ y and x, y ∈ R}

(Reflexive as x ≤ x, NOT Symmetric for x = 0.1, y = 1.0, Transitive as x ≤ y ≤ z)

4

NOT Reflexive, NOT Symmetric, NOT Transitive, BUT Antisymmetric: ρ is defined over Z as, ρ = {(x, y) | y = x + 1 and x, y ∈ Z}

(NOT Reflexive as x = x + 1, NOT Symmetric as y = x + 1 ⇒ x = y − 1, NOT Transitive as z = y + 1 = x + 2) 5

Only Reflexive: Relation ρ = {(A, B) | Person-A knows Person-B}

6

Only Symmetric: Relation ρ = {(A, B) | A + B = 5 and A, B ∈ Z}

7

Only Transitive: Relation ρ = {(A, B) | A ⊂ B and A, B ∈ U}

8

Only Antisymmetric: Left for You to find as an Exercise!

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 5 / 12

slide-53
SLIDE 53

Equivalence Relation and Equivalence Classes

Equivalence Relation: A relation ρ ⊆ A × A on set A is called an equivalence relation if it is reflexive, symmetric and transitive.

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 6 / 12

slide-54
SLIDE 54

Equivalence Relation and Equivalence Classes

Equivalence Relation: A relation ρ ⊆ A × A on set A is called an equivalence relation if it is reflexive, symmetric and transitive. Example: ρ = {(x, y) | (x − y) is divisible by 5 and x, y ∈ Z} Reflexive since (x − x) = 0 is divisible by 5. Symmetric since (y − x) = −(x − y) is divisible by 5. Transitive since (x − z) = (x − y) + (y − z) is divisible by 5.

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 6 / 12

slide-55
SLIDE 55

Equivalence Relation and Equivalence Classes

Equivalence Relation: A relation ρ ⊆ A × A on set A is called an equivalence relation if it is reflexive, symmetric and transitive. Example: ρ = {(x, y) | (x − y) is divisible by 5 and x, y ∈ Z} Reflexive since (x − x) = 0 is divisible by 5. Symmetric since (y − x) = −(x − y) is divisible by 5. Transitive since (x − z) = (x − y) + (y − z) is divisible by 5. Fallacy: Does Symmetric + Transitive ⇒ Reflexive? Why define Reflexivity? [ from (x, y) ∈ ρ ⇒ (y, x) ∈ ρ and (x, y), (y, x) ∈ ρ ⇒ (x, x) ∈ ρ ]

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 6 / 12

slide-56
SLIDE 56

Equivalence Relation and Equivalence Classes

Equivalence Relation: A relation ρ ⊆ A × A on set A is called an equivalence relation if it is reflexive, symmetric and transitive. Example: ρ = {(x, y) | (x − y) is divisible by 5 and x, y ∈ Z} Reflexive since (x − x) = 0 is divisible by 5. Symmetric since (y − x) = −(x − y) is divisible by 5. Transitive since (x − z) = (x − y) + (y − z) is divisible by 5. Fallacy: Does Symmetric + Transitive ⇒ Reflexive? Why define Reflexivity? [ from (x, y) ∈ ρ ⇒ (y, x) ∈ ρ and (x, y), (y, x) ∈ ρ ⇒ (x, x) ∈ ρ ] Reason: NO, since for all x, an y may not be found/associated!

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 6 / 12

slide-57
SLIDE 57

Equivalence Relation and Equivalence Classes

Equivalence Relation: A relation ρ ⊆ A × A on set A is called an equivalence relation if it is reflexive, symmetric and transitive. Example: ρ = {(x, y) | (x − y) is divisible by 5 and x, y ∈ Z} Reflexive since (x − x) = 0 is divisible by 5. Symmetric since (y − x) = −(x − y) is divisible by 5. Transitive since (x − z) = (x − y) + (y − z) is divisible by 5. Fallacy: Does Symmetric + Transitive ⇒ Reflexive? Why define Reflexivity? [ from (x, y) ∈ ρ ⇒ (y, x) ∈ ρ and (x, y), (y, x) ∈ ρ ⇒ (x, x) ∈ ρ ] Reason: NO, since for all x, an y may not be found/associated! Equivalence Class: Let ρ be an equivalence relation on A. For each y ∈ A, the equivalence class is denoted by [y] = {x | (x, y) ∈ ρ and x ∈ A}.

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 6 / 12

slide-58
SLIDE 58

Equivalence Relation and Equivalence Classes

Equivalence Relation: A relation ρ ⊆ A × A on set A is called an equivalence relation if it is reflexive, symmetric and transitive. Example: ρ = {(x, y) | (x − y) is divisible by 5 and x, y ∈ Z} Reflexive since (x − x) = 0 is divisible by 5. Symmetric since (y − x) = −(x − y) is divisible by 5. Transitive since (x − z) = (x − y) + (y − z) is divisible by 5. Fallacy: Does Symmetric + Transitive ⇒ Reflexive? Why define Reflexivity? [ from (x, y) ∈ ρ ⇒ (y, x) ∈ ρ and (x, y), (y, x) ∈ ρ ⇒ (x, x) ∈ ρ ] Reason: NO, since for all x, an y may not be found/associated! Equivalence Class: Let ρ be an equivalence relation on A. For each y ∈ A, the equivalence class is denoted by [y] = {x | (x, y) ∈ ρ and x ∈ A}. Example: In the relation, ρ = {(x, y) | (x − y) is divisible by 3 and x, y ∈ Z}, the four equivalence classes are defined as: [0] = {. . . , −6, −3, 0, +3, +6, . . .} = {3k | k ∈ Z} [1] = {. . . , −5, −2, 1, +4, +7, . . .} = {3k + 1 | k ∈ Z} [2] = {. . . , −4, −1, 2, +5, +8, . . .} = {3k + 2 | k ∈ Z}

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 6 / 12

slide-59
SLIDE 59

Equivalence Relation and Equivalence Classes

Equivalence Relation: A relation ρ ⊆ A × A on set A is called an equivalence relation if it is reflexive, symmetric and transitive. Example: ρ = {(x, y) | (x − y) is divisible by 5 and x, y ∈ Z} Reflexive since (x − x) = 0 is divisible by 5. Symmetric since (y − x) = −(x − y) is divisible by 5. Transitive since (x − z) = (x − y) + (y − z) is divisible by 5. Fallacy: Does Symmetric + Transitive ⇒ Reflexive? Why define Reflexivity? [ from (x, y) ∈ ρ ⇒ (y, x) ∈ ρ and (x, y), (y, x) ∈ ρ ⇒ (x, x) ∈ ρ ] Reason: NO, since for all x, an y may not be found/associated! Equivalence Class: Let ρ be an equivalence relation on A. For each y ∈ A, the equivalence class is denoted by [y] = {x | (x, y) ∈ ρ and x ∈ A}. Example: In the relation, ρ = {(x, y) | (x − y) is divisible by 3 and x, y ∈ Z}, the four equivalence classes are defined as: [0] = {. . . , −6, −3, 0, +3, +6, . . .} = {3k | k ∈ Z} [1] = {. . . , −5, −2, 1, +4, +7, . . .} = {3k + 1 | k ∈ Z} [2] = {. . . , −4, −1, 2, +5, +8, . . .} = {3k + 2 | k ∈ Z} Note: [0] = [−3] = [+3] = [−6] = [+6] = · · · (from definition) [0] = [1] = [2] and Z = [0] ∪ [1] ∪ [2] (details in next slide)

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 6 / 12

slide-60
SLIDE 60

Equivalence Classes and Partitions

Theorem: If ρ is an equivalence relation on A and x, y ∈ A, then (i) x ∈ [x]; (ii) (x, y) ∈ ρ iff [x] = [y]; and (iii) [x] = [y] or [x] ∩ [y] = φ

Proof:

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 7 / 12

slide-61
SLIDE 61

Equivalence Classes and Partitions

Theorem: If ρ is an equivalence relation on A and x, y ∈ A, then (i) x ∈ [x]; (ii) (x, y) ∈ ρ iff [x] = [y]; and (iii) [x] = [y] or [x] ∩ [y] = φ

Proof:

i

From Reflexive property, (x, x) ∈ ρ.

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 7 / 12

slide-62
SLIDE 62

Equivalence Classes and Partitions

Theorem: If ρ is an equivalence relation on A and x, y ∈ A, then (i) x ∈ [x]; (ii) (x, y) ∈ ρ iff [x] = [y]; and (iii) [x] = [y] or [x] ∩ [y] = φ

Proof:

i

From Reflexive property, (x, x) ∈ ρ.

ii

[ If ] Let a ∈ [x] ⇒ (a, x) ∈ ρ. As (x, y) ∈ ρ, so using transitivity, we get (a, y) ∈ ρ ⇒ a ∈ [y]. Hence, [x] ⊆ [y].

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 7 / 12

slide-63
SLIDE 63

Equivalence Classes and Partitions

Theorem: If ρ is an equivalence relation on A and x, y ∈ A, then (i) x ∈ [x]; (ii) (x, y) ∈ ρ iff [x] = [y]; and (iii) [x] = [y] or [x] ∩ [y] = φ

Proof:

i

From Reflexive property, (x, x) ∈ ρ.

ii

[ If ] Let a ∈ [x] ⇒ (a, x) ∈ ρ. As (x, y) ∈ ρ, so using transitivity, we get (a, y) ∈ ρ ⇒ a ∈ [y]. Hence, [x] ⊆ [y]. Again, let b ∈ [y] ⇒ (b, y) ∈ ρ. By symmetry, (x, y) ∈ ρ ⇒ (y, x) ∈ ρ. So, using transitivity, (b, x) ∈ ρ ⇒ b ∈ [x]. Hence, [y] ⊆ [x].

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 7 / 12

slide-64
SLIDE 64

Equivalence Classes and Partitions

Theorem: If ρ is an equivalence relation on A and x, y ∈ A, then (i) x ∈ [x]; (ii) (x, y) ∈ ρ iff [x] = [y]; and (iii) [x] = [y] or [x] ∩ [y] = φ

Proof:

i

From Reflexive property, (x, x) ∈ ρ.

ii

[ If ] Let a ∈ [x] ⇒ (a, x) ∈ ρ. As (x, y) ∈ ρ, so using transitivity, we get (a, y) ∈ ρ ⇒ a ∈ [y]. Hence, [x] ⊆ [y]. Again, let b ∈ [y] ⇒ (b, y) ∈ ρ. By symmetry, (x, y) ∈ ρ ⇒ (y, x) ∈ ρ. So, using transitivity, (b, x) ∈ ρ ⇒ b ∈ [x]. Hence, [y] ⊆ [x]. [ Only-If ] x ∈ [x] and [x] = [y] implies x ∈ [y] ⇒ (x, y) ∈ ρ.

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 7 / 12

slide-65
SLIDE 65

Equivalence Classes and Partitions

Theorem: If ρ is an equivalence relation on A and x, y ∈ A, then (i) x ∈ [x]; (ii) (x, y) ∈ ρ iff [x] = [y]; and (iii) [x] = [y] or [x] ∩ [y] = φ

Proof:

i

From Reflexive property, (x, x) ∈ ρ.

ii

[ If ] Let a ∈ [x] ⇒ (a, x) ∈ ρ. As (x, y) ∈ ρ, so using transitivity, we get (a, y) ∈ ρ ⇒ a ∈ [y]. Hence, [x] ⊆ [y]. Again, let b ∈ [y] ⇒ (b, y) ∈ ρ. By symmetry, (x, y) ∈ ρ ⇒ (y, x) ∈ ρ. So, using transitivity, (b, x) ∈ ρ ⇒ b ∈ [x]. Hence, [y] ⊆ [x]. [ Only-If ] x ∈ [x] and [x] = [y] implies x ∈ [y] ⇒ (x, y) ∈ ρ.

iii

Assume [x] = [y], then [x] ∩ [y] = φ must hold. If otherwise [x] ∩ [y] = φ, then let u ∈ [x] and u ∈ [y]. Thus, (u, x) ∈ ρ and by symmetry, (x, u) ∈ ρ. With (u, y) ∈ ρ, applying transitivity we get, (x, y) ∈ ρ ⇒ [x] = [y], which contradicts the assumption!

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 7 / 12

slide-66
SLIDE 66

Equivalence Classes and Partitions

Theorem: If ρ is an equivalence relation on A and x, y ∈ A, then (i) x ∈ [x]; (ii) (x, y) ∈ ρ iff [x] = [y]; and (iii) [x] = [y] or [x] ∩ [y] = φ

Proof:

i

From Reflexive property, (x, x) ∈ ρ.

ii

[ If ] Let a ∈ [x] ⇒ (a, x) ∈ ρ. As (x, y) ∈ ρ, so using transitivity, we get (a, y) ∈ ρ ⇒ a ∈ [y]. Hence, [x] ⊆ [y]. Again, let b ∈ [y] ⇒ (b, y) ∈ ρ. By symmetry, (x, y) ∈ ρ ⇒ (y, x) ∈ ρ. So, using transitivity, (b, x) ∈ ρ ⇒ b ∈ [x]. Hence, [y] ⊆ [x]. [ Only-If ] x ∈ [x] and [x] = [y] implies x ∈ [y] ⇒ (x, y) ∈ ρ.

iii

Assume [x] = [y], then [x] ∩ [y] = φ must hold. If otherwise [x] ∩ [y] = φ, then let u ∈ [x] and u ∈ [y]. Thus, (u, x) ∈ ρ and by symmetry, (x, u) ∈ ρ. With (u, y) ∈ ρ, applying transitivity we get, (x, y) ∈ ρ ⇒ [x] = [y], which contradicts the assumption!

Partitions of a Set (Revisited)

Given set A and index set I, let ∀i, φ = Ai ⊆ A. Then {Ai}i∈I induces a partition on A if: (i) A =

i∈I

Ai, and (ii) Ai ∩ Aj = φ, ∀i, j ∈ I (i = j).

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 7 / 12

slide-67
SLIDE 67

Equivalence Classes and Partitions

Theorem: If ρ is an equivalence relation on A and x, y ∈ A, then (i) x ∈ [x]; (ii) (x, y) ∈ ρ iff [x] = [y]; and (iii) [x] = [y] or [x] ∩ [y] = φ

Proof:

i

From Reflexive property, (x, x) ∈ ρ.

ii

[ If ] Let a ∈ [x] ⇒ (a, x) ∈ ρ. As (x, y) ∈ ρ, so using transitivity, we get (a, y) ∈ ρ ⇒ a ∈ [y]. Hence, [x] ⊆ [y]. Again, let b ∈ [y] ⇒ (b, y) ∈ ρ. By symmetry, (x, y) ∈ ρ ⇒ (y, x) ∈ ρ. So, using transitivity, (b, x) ∈ ρ ⇒ b ∈ [x]. Hence, [y] ⊆ [x]. [ Only-If ] x ∈ [x] and [x] = [y] implies x ∈ [y] ⇒ (x, y) ∈ ρ.

iii

Assume [x] = [y], then [x] ∩ [y] = φ must hold. If otherwise [x] ∩ [y] = φ, then let u ∈ [x] and u ∈ [y]. Thus, (u, x) ∈ ρ and by symmetry, (x, u) ∈ ρ. With (u, y) ∈ ρ, applying transitivity we get, (x, y) ∈ ρ ⇒ [x] = [y], which contradicts the assumption!

Partitions of a Set (Revisited)

Given set A and index set I, let ∀i, φ = Ai ⊆ A. Then {Ai}i∈I induces a partition on A if: (i) A =

i∈I

Ai, and (ii) Ai ∩ Aj = φ, ∀i, j ∈ I (i = j).

Results: (i) Any equivalence relation ρ on set A induces a partition of A.

Proof: Follows from the above theorem.

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 7 / 12

slide-68
SLIDE 68

Equivalence Classes and Partitions

Theorem: If ρ is an equivalence relation on A and x, y ∈ A, then (i) x ∈ [x]; (ii) (x, y) ∈ ρ iff [x] = [y]; and (iii) [x] = [y] or [x] ∩ [y] = φ

Proof:

i

From Reflexive property, (x, x) ∈ ρ.

ii

[ If ] Let a ∈ [x] ⇒ (a, x) ∈ ρ. As (x, y) ∈ ρ, so using transitivity, we get (a, y) ∈ ρ ⇒ a ∈ [y]. Hence, [x] ⊆ [y]. Again, let b ∈ [y] ⇒ (b, y) ∈ ρ. By symmetry, (x, y) ∈ ρ ⇒ (y, x) ∈ ρ. So, using transitivity, (b, x) ∈ ρ ⇒ b ∈ [x]. Hence, [y] ⊆ [x]. [ Only-If ] x ∈ [x] and [x] = [y] implies x ∈ [y] ⇒ (x, y) ∈ ρ.

iii

Assume [x] = [y], then [x] ∩ [y] = φ must hold. If otherwise [x] ∩ [y] = φ, then let u ∈ [x] and u ∈ [y]. Thus, (u, x) ∈ ρ and by symmetry, (x, u) ∈ ρ. With (u, y) ∈ ρ, applying transitivity we get, (x, y) ∈ ρ ⇒ [x] = [y], which contradicts the assumption!

Partitions of a Set (Revisited)

Given set A and index set I, let ∀i, φ = Ai ⊆ A. Then {Ai}i∈I induces a partition on A if: (i) A =

i∈I

Ai, and (ii) Ai ∩ Aj = φ, ∀i, j ∈ I (i = j).

Results: (i) Any equivalence relation ρ on set A induces a partition of A.

Proof: Follows from the above theorem.

(ii) Any partition of A gives rise to an equivalence relation ρ on A.

Proof: Left for You as an Exercise!

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 7 / 12

slide-69
SLIDE 69

Partial Order and Hasse Diagram

Partial Order: A relation ρ ⊆ A × A on set A is called a partial ordering relation (or partial order) if it is reflexive, antisymmetric and transitive. We call (A, ρ) as a Poset (Partial Ordered Set).

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 8 / 12

slide-70
SLIDE 70

Partial Order and Hasse Diagram

Partial Order: A relation ρ ⊆ A × A on set A is called a partial ordering relation (or partial order) if it is reflexive, antisymmetric and transitive. We call (A, ρ) as a Poset (Partial Ordered Set). Example: Let S = {1, 2, 3} and ρ = {(A, B) | A ⊆ B and A, B ∈ P(S)}, therefore (P(S), ρ) or (P(S), ⊆) is a poset. Also, (P(S), ⊇) is a poset and called dual of the poset (P(S),⊆).

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 8 / 12

slide-71
SLIDE 71

Partial Order and Hasse Diagram

Partial Order: A relation ρ ⊆ A × A on set A is called a partial ordering relation (or partial order) if it is reflexive, antisymmetric and transitive. We call (A, ρ) as a Poset (Partial Ordered Set). Example: Let S = {1, 2, 3} and ρ = {(A, B) | A ⊆ B and A, B ∈ P(S)}, therefore (P(S), ρ) or (P(S), ⊆) is a poset. Also, (P(S), ⊇) is a poset and called dual of the poset (P(S),⊆). Covering Relation: Let (A, ρ) is a poset and p, q, r ∈ A. We call q as the cover for p (denoted as p ≺ q) when (p, q) ∈ ρ, and no element r ∈ A exists such that p ≺ r ≺ q, that is (p, r) ∈ ρ and (r, q) ∈ ρ.

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 8 / 12

slide-72
SLIDE 72

Partial Order and Hasse Diagram

Partial Order: A relation ρ ⊆ A × A on set A is called a partial ordering relation (or partial order) if it is reflexive, antisymmetric and transitive. We call (A, ρ) as a Poset (Partial Ordered Set). Example: Let S = {1, 2, 3} and ρ = {(A, B) | A ⊆ B and A, B ∈ P(S)}, therefore (P(S), ρ) or (P(S), ⊆) is a poset. Also, (P(S), ⊇) is a poset and called dual of the poset (P(S),⊆). Covering Relation: Let (A, ρ) is a poset and p, q, r ∈ A. We call q as the cover for p (denoted as p ≺ q) when (p, q) ∈ ρ, and no element r ∈ A exists such that p ≺ r ≺ q, that is (p, r) ∈ ρ and (r, q) ∈ ρ. Hasse Diagram: A directed acyclic graph (DAG) with elements of set A as nodes and (p, q) as directed edges from p to q (p, q ∈ A) iff p ≺ q (q covers p).

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 8 / 12

slide-73
SLIDE 73

Partial Order and Hasse Diagram

Partial Order: A relation ρ ⊆ A × A on set A is called a partial ordering relation (or partial order) if it is reflexive, antisymmetric and transitive. We call (A, ρ) as a Poset (Partial Ordered Set). Example: Let S = {1, 2, 3} and ρ = {(A, B) | A ⊆ B and A, B ∈ P(S)}, therefore (P(S), ρ) or (P(S), ⊆) is a poset. Also, (P(S), ⊇) is a poset and called dual of the poset (P(S),⊆). Covering Relation: Let (A, ρ) is a poset and p, q, r ∈ A. We call q as the cover for p (denoted as p ≺ q) when (p, q) ∈ ρ, and no element r ∈ A exists such that p ≺ r ≺ q, that is (p, r) ∈ ρ and (r, q) ∈ ρ. Hasse Diagram: A directed acyclic graph (DAG) with elements of set A as nodes and (p, q) as directed edges from p to q (p, q ∈ A) iff p ≺ q (q covers p). Example: Note that, ({2}, {1, 3}) ∈ ρ and {1, 2} ≺ {1, 2, 3} (forming the cover), but {1} ⊀ {1, 2, 3} as {1} ≺ {1, 3} ≺ {1, 2, 3}.

{2,3} {1,3} { } {1} {3} {2} {1,2,3} {1,2}

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 8 / 12

slide-74
SLIDE 74

Partial Order and Hasse Diagram

Partial Order: A relation ρ ⊆ A × A on set A is called a partial ordering relation (or partial order) if it is reflexive, antisymmetric and transitive. We call (A, ρ) as a Poset (Partial Ordered Set). Example: Let S = {1, 2, 3} and ρ = {(A, B) | A ⊆ B and A, B ∈ P(S)}, therefore (P(S), ρ) or (P(S), ⊆) is a poset. Also, (P(S), ⊇) is a poset and called dual of the poset (P(S),⊆). Covering Relation: Let (A, ρ) is a poset and p, q, r ∈ A. We call q as the cover for p (denoted as p ≺ q) when (p, q) ∈ ρ, and no element r ∈ A exists such that p ≺ r ≺ q, that is (p, r) ∈ ρ and (r, q) ∈ ρ. Hasse Diagram: A directed acyclic graph (DAG) with elements of set A as nodes and (p, q) as directed edges from p to q (p, q ∈ A) iff p ≺ q (q covers p). Example: Note that, ({2}, {1, 3}) ∈ ρ and {1, 2} ≺ {1, 2, 3} (forming the cover), but {1} ⊀ {1, 2, 3} as {1} ≺ {1, 3} ≺ {1, 2, 3}.

{2,3} {1,3} { } {1} {3} {2} {1,2,3} {1,2}

Total Order: If (A, ρ) is a Poset, we call A is totally ordered (or linearly ordered) if for all x, y ∈ A either (x, y) ∈ ρ or (y, x) ∈ ρ. In this case, ρ is also called a total order (or linear order).

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 8 / 12

slide-75
SLIDE 75

Properties of Partial Orders

Maximal Element: In the poset (A, ρ), an element x ∈ A is called a maximal element of A if ∀a ∈ A [(a = x) ⇒ (x, a) ∈ ρ] (≡ ∃a ∈ A [(x, a) ∈ ρ ⇒ (a = x)]).

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 9 / 12

slide-76
SLIDE 76

Properties of Partial Orders

Maximal Element: In the poset (A, ρ), an element x ∈ A is called a maximal element of A if ∀a ∈ A [(a = x) ⇒ (x, a) ∈ ρ] (≡ ∃a ∈ A [(x, a) ∈ ρ ⇒ (a = x)]). Minimal Element: In the poset (A, ρ), an element y ∈ A is called a minimal element of A if ∀b ∈ A [(b = y) ⇒ (b, y) ∈ ρ] (≡ ∃b ∈ A [(b, y) ∈ ρ ⇒ (b = y)]).

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 9 / 12

slide-77
SLIDE 77

Properties of Partial Orders

Maximal Element: In the poset (A, ρ), an element x ∈ A is called a maximal element of A if ∀a ∈ A [(a = x) ⇒ (x, a) ∈ ρ] (≡ ∃a ∈ A [(x, a) ∈ ρ ⇒ (a = x)]). Minimal Element: In the poset (A, ρ), an element y ∈ A is called a minimal element of A if ∀b ∈ A [(b = y) ⇒ (b, y) ∈ ρ] (≡ ∃b ∈ A [(b, y) ∈ ρ ⇒ (b = y)]). Example: In the poset (P(S),⊆) where S = {1, 2, 3}, we have {1, 2, 3} and {} as the maximal and minimal elements, respectively.

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 9 / 12

slide-78
SLIDE 78

Properties of Partial Orders

Maximal Element: In the poset (A, ρ), an element x ∈ A is called a maximal element of A if ∀a ∈ A [(a = x) ⇒ (x, a) ∈ ρ] (≡ ∃a ∈ A [(x, a) ∈ ρ ⇒ (a = x)]). Minimal Element: In the poset (A, ρ), an element y ∈ A is called a minimal element of A if ∀b ∈ A [(b = y) ⇒ (b, y) ∈ ρ] (≡ ∃b ∈ A [(b, y) ∈ ρ ⇒ (b = y)]). Example: In the poset (P(S),⊆) where S = {1, 2, 3}, we have {1, 2, 3} and {} as the maximal and minimal elements, respectively. If (A, ρ) is a poset and A is finite, then A has both a maximal and a minimal element.

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 9 / 12

slide-79
SLIDE 79

Properties of Partial Orders

Maximal Element: In the poset (A, ρ), an element x ∈ A is called a maximal element of A if ∀a ∈ A [(a = x) ⇒ (x, a) ∈ ρ] (≡ ∃a ∈ A [(x, a) ∈ ρ ⇒ (a = x)]). Minimal Element: In the poset (A, ρ), an element y ∈ A is called a minimal element of A if ∀b ∈ A [(b = y) ⇒ (b, y) ∈ ρ] (≡ ∃b ∈ A [(b, y) ∈ ρ ⇒ (b = y)]). Example: In the poset (P(S),⊆) where S = {1, 2, 3}, we have {1, 2, 3} and {} as the maximal and minimal elements, respectively. If (A, ρ) is a poset and A is finite, then A has both a maximal and a minimal element. Least Element: Let (A, ρ) is a poset. An element x ∈ A is called the least element if ∀a ∈ A, (x, a) ∈ ρ.

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 9 / 12

slide-80
SLIDE 80

Properties of Partial Orders

Maximal Element: In the poset (A, ρ), an element x ∈ A is called a maximal element of A if ∀a ∈ A [(a = x) ⇒ (x, a) ∈ ρ] (≡ ∃a ∈ A [(x, a) ∈ ρ ⇒ (a = x)]). Minimal Element: In the poset (A, ρ), an element y ∈ A is called a minimal element of A if ∀b ∈ A [(b = y) ⇒ (b, y) ∈ ρ] (≡ ∃b ∈ A [(b, y) ∈ ρ ⇒ (b = y)]). Example: In the poset (P(S),⊆) where S = {1, 2, 3}, we have {1, 2, 3} and {} as the maximal and minimal elements, respectively. If (A, ρ) is a poset and A is finite, then A has both a maximal and a minimal element. Least Element: Let (A, ρ) is a poset. An element x ∈ A is called the least element if ∀a ∈ A, (x, a) ∈ ρ. Greatest Element: Let (A, ρ) is a poset. An element y ∈ A is called the greatest element if ∀a ∈ A, (a, y) ∈ ρ.

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 9 / 12

slide-81
SLIDE 81

Properties of Partial Orders

Maximal Element: In the poset (A, ρ), an element x ∈ A is called a maximal element of A if ∀a ∈ A [(a = x) ⇒ (x, a) ∈ ρ] (≡ ∃a ∈ A [(x, a) ∈ ρ ⇒ (a = x)]). Minimal Element: In the poset (A, ρ), an element y ∈ A is called a minimal element of A if ∀b ∈ A [(b = y) ⇒ (b, y) ∈ ρ] (≡ ∃b ∈ A [(b, y) ∈ ρ ⇒ (b = y)]). Example: In the poset (P(S),⊆) where S = {1, 2, 3}, we have {1, 2, 3} and {} as the maximal and minimal elements, respectively. If (A, ρ) is a poset and A is finite, then A has both a maximal and a minimal element. Least Element: Let (A, ρ) is a poset. An element x ∈ A is called the least element if ∀a ∈ A, (x, a) ∈ ρ. Greatest Element: Let (A, ρ) is a poset. An element y ∈ A is called the greatest element if ∀a ∈ A, (a, y) ∈ ρ. Example: In the poset (P(S),⊆) where S = {1, 2, 3}, we have {} and {1, 2, 3} as the least and greatest elements, respectively.

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 9 / 12

slide-82
SLIDE 82

Properties of Partial Orders

Maximal Element: In the poset (A, ρ), an element x ∈ A is called a maximal element of A if ∀a ∈ A [(a = x) ⇒ (x, a) ∈ ρ] (≡ ∃a ∈ A [(x, a) ∈ ρ ⇒ (a = x)]). Minimal Element: In the poset (A, ρ), an element y ∈ A is called a minimal element of A if ∀b ∈ A [(b = y) ⇒ (b, y) ∈ ρ] (≡ ∃b ∈ A [(b, y) ∈ ρ ⇒ (b = y)]). Example: In the poset (P(S),⊆) where S = {1, 2, 3}, we have {1, 2, 3} and {} as the maximal and minimal elements, respectively. If (A, ρ) is a poset and A is finite, then A has both a maximal and a minimal element. Least Element: Let (A, ρ) is a poset. An element x ∈ A is called the least element if ∀a ∈ A, (x, a) ∈ ρ. Greatest Element: Let (A, ρ) is a poset. An element y ∈ A is called the greatest element if ∀a ∈ A, (a, y) ∈ ρ. Example: In the poset (P(S),⊆) where S = {1, 2, 3}, we have {} and {1, 2, 3} as the least and greatest elements, respectively. If (A, ρ) is a poset has a least (greatest) element, then that element is unique.

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 9 / 12

slide-83
SLIDE 83

Properties of Partial Orders

Lower Bound: Let (A, ρ) is a poset and B ⊆ A. An element x ∈ A is called a lower bound of B if ∀b ∈ B, (x, b) ∈ ρ.

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 10 / 12

slide-84
SLIDE 84

Properties of Partial Orders

Lower Bound: Let (A, ρ) is a poset and B ⊆ A. An element x ∈ A is called a lower bound of B if ∀b ∈ B, (x, b) ∈ ρ. Upper Bound: Let (A, ρ) is a poset and B ⊆ A. An element y ∈ A is called a upper bound of B if ∀b ∈ B, (b, y) ∈ ρ.

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 10 / 12

slide-85
SLIDE 85

Properties of Partial Orders

Lower Bound: Let (A, ρ) is a poset and B ⊆ A. An element x ∈ A is called a lower bound of B if ∀b ∈ B, (x, b) ∈ ρ. Upper Bound: Let (A, ρ) is a poset and B ⊆ A. An element y ∈ A is called a upper bound of B if ∀b ∈ B, (b, y) ∈ ρ. Greatest Lower Bound: Let (A, ρ) is a poset. An element x′ ∈ A is called the greatest lower bound (glb) of B if it is a lower bound of B and (x′′, x′) ∈ ρ for all

  • ther lower bounds x′′ of B.

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 10 / 12

slide-86
SLIDE 86

Properties of Partial Orders

Lower Bound: Let (A, ρ) is a poset and B ⊆ A. An element x ∈ A is called a lower bound of B if ∀b ∈ B, (x, b) ∈ ρ. Upper Bound: Let (A, ρ) is a poset and B ⊆ A. An element y ∈ A is called a upper bound of B if ∀b ∈ B, (b, y) ∈ ρ. Greatest Lower Bound: Let (A, ρ) is a poset. An element x′ ∈ A is called the greatest lower bound (glb) of B if it is a lower bound of B and (x′′, x′) ∈ ρ for all

  • ther lower bounds x′′ of B.

Least Upper Bound: Let (A, ρ) is a poset. An element y ′ ∈ A is called the least upper bound (lub) of B if it is an upper bound of B and (y ′, y ′′) ∈ ρ for all

  • ther upper bounds y ′′ of B.

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 10 / 12

slide-87
SLIDE 87

Properties of Partial Orders

Lower Bound: Let (A, ρ) is a poset and B ⊆ A. An element x ∈ A is called a lower bound of B if ∀b ∈ B, (x, b) ∈ ρ. Upper Bound: Let (A, ρ) is a poset and B ⊆ A. An element y ∈ A is called a upper bound of B if ∀b ∈ B, (b, y) ∈ ρ. Greatest Lower Bound: Let (A, ρ) is a poset. An element x′ ∈ A is called the greatest lower bound (glb) of B if it is a lower bound of B and (x′′, x′) ∈ ρ for all

  • ther lower bounds x′′ of B.

Least Upper Bound: Let (A, ρ) is a poset. An element y ′ ∈ A is called the least upper bound (lub) of B if it is an upper bound of B and (y ′, y ′′) ∈ ρ for all

  • ther upper bounds y ′′ of B.

Example: In the poset (P(S),⊆) where S = {1, 2, 3} and let B = {{1}, {2}, {1, 2}} ⊆ P(S). Then, {1, 2} and {1, 2, 3} both are the upper bounds for B in (P(S),ρ); whereas {1, 2} is the lub (and is in B). However, the glb for B is {}, i.e. φ, which does not belong to B.

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 10 / 12

slide-88
SLIDE 88

Properties of Partial Orders

Lower Bound: Let (A, ρ) is a poset and B ⊆ A. An element x ∈ A is called a lower bound of B if ∀b ∈ B, (x, b) ∈ ρ. Upper Bound: Let (A, ρ) is a poset and B ⊆ A. An element y ∈ A is called a upper bound of B if ∀b ∈ B, (b, y) ∈ ρ. Greatest Lower Bound: Let (A, ρ) is a poset. An element x′ ∈ A is called the greatest lower bound (glb) of B if it is a lower bound of B and (x′′, x′) ∈ ρ for all

  • ther lower bounds x′′ of B.

Least Upper Bound: Let (A, ρ) is a poset. An element y ′ ∈ A is called the least upper bound (lub) of B if it is an upper bound of B and (y ′, y ′′) ∈ ρ for all

  • ther upper bounds y ′′ of B.

Example: In the poset (P(S),⊆) where S = {1, 2, 3} and let B = {{1}, {2}, {1, 2}} ⊆ P(S). Then, {1, 2} and {1, 2, 3} both are the upper bounds for B in (P(S),ρ); whereas {1, 2} is the lub (and is in B). However, the glb for B is {}, i.e. φ, which does not belong to B. If (A, ρ) is a poset and B ⊆ A, then B has at most one lub (glb).

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 10 / 12

slide-89
SLIDE 89

Lattice

Definition

A lattice is a poset, (A, ρ), in which for every pair of elements a, b ∈ A, the lub{a, b} and glb{a, b} both exists in A. A lattice is complete in which every subset of elements has a lub and glb.

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 11 / 12

slide-90
SLIDE 90

Lattice

Definition

A lattice is a poset, (A, ρ), in which for every pair of elements a, b ∈ A, the lub{a, b} and glb{a, b} both exists in A. A lattice is complete in which every subset of elements has a lub and glb.

Examples: All the following posets are lattice.

1

Poset (N, ρ), where ρ = {(x, y) | x ≤ y and x, y ∈ N} is a lattice. Here, for any x, y ∈ N, lub{x, y} = max{x, y} and glb{x, y} = min{x, y}.

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 11 / 12

slide-91
SLIDE 91

Lattice

Definition

A lattice is a poset, (A, ρ), in which for every pair of elements a, b ∈ A, the lub{a, b} and glb{a, b} both exists in A. A lattice is complete in which every subset of elements has a lub and glb.

Examples: All the following posets are lattice.

1

Poset (N, ρ), where ρ = {(x, y) | x ≤ y and x, y ∈ N} is a lattice. Here, for any x, y ∈ N, lub{x, y} = max{x, y} and glb{x, y} = min{x, y}.

2

Poset (P(S), ρ), where ρ = {(A, B) | A ⊆ B and A, B ∈ P(S)} is a lattice. Here, for any A, B ∈ P(S), lub{A, B} = A ∪ B and glb{A, B} = A ∩ B.

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 11 / 12

slide-92
SLIDE 92

Lattice

Definition

A lattice is a poset, (A, ρ), in which for every pair of elements a, b ∈ A, the lub{a, b} and glb{a, b} both exists in A. A lattice is complete in which every subset of elements has a lub and glb.

Examples: All the following posets are lattice.

1

Poset (N, ρ), where ρ = {(x, y) | x ≤ y and x, y ∈ N} is a lattice. Here, for any x, y ∈ N, lub{x, y} = max{x, y} and glb{x, y} = min{x, y}.

2

Poset (P(S), ρ), where ρ = {(A, B) | A ⊆ B and A, B ∈ P(S)} is a lattice. Here, for any A, B ∈ P(S), lub{A, B} = A ∪ B and glb{A, B} = A ∩ B.

3

Poset (Z+, ρ), where ρ = {(x, y) | x divides y and x, y ∈ Z+} is a lattice. Here, for any x, y ∈ Z+, lub{x, y} = LCM{x, y} and glb{x, y} = GCD{x, y}.

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 11 / 12

slide-93
SLIDE 93

Lattice

Definition

A lattice is a poset, (A, ρ), in which for every pair of elements a, b ∈ A, the lub{a, b} and glb{a, b} both exists in A. A lattice is complete in which every subset of elements has a lub and glb.

Examples: All the following posets are lattice.

1

Poset (N, ρ), where ρ = {(x, y) | x ≤ y and x, y ∈ N} is a lattice. Here, for any x, y ∈ N, lub{x, y} = max{x, y} and glb{x, y} = min{x, y}.

2

Poset (P(S), ρ), where ρ = {(A, B) | A ⊆ B and A, B ∈ P(S)} is a lattice. Here, for any A, B ∈ P(S), lub{A, B} = A ∪ B and glb{A, B} = A ∩ B.

3

Poset (Z+, ρ), where ρ = {(x, y) | x divides y and x, y ∈ Z+} is a lattice. Here, for any x, y ∈ Z+, lub{x, y} = LCM{x, y} and glb{x, y} = GCD{x, y}.

Example: The following poset is NOT a lattice.

Let S = {1, 2, 3} and Q ⊂ P(S) (all proper subsets) where φ ∈ Q. Poset (Q, ρ), where ρ = {(A, B) | A ⊆ B and x, y ∈ Q} is NOT a lattice. Here, the pair of elements {1, 2} and {1, 3} in Q do not have a lub, whereas the pair of elements {1} and {2} in Q do not have a glb.

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 11 / 12

slide-94
SLIDE 94

Thank You!

Aritra Hazra (CSE, IITKGP) CS21001 : Discrete Structures Autumn 2020 12 / 12