Cartesian Product - Discrete Mathematics - Lecture Slides, Slides of Discrete Mathematics

During the study of discrete mathematics, I found this course very informative and applicable.The main points in these lecture slides are:Cartesian Product, Relations and Their Properties, Elements of Sets, Binary Relation, Ordered Pairs, Domains of Relation, Functions Relations, Graph of Function, Generalization of Functions, Relation on Set

Typology: Slides

2012/2013

Uploaded on 04/27/2013

ashwini
ashwini 🇮🇳

4.5

(18)

167 documents

1 / 29

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CSE115/ENGR160 Discrete Mathematics
04/24/12
1
Docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d

Partial preview of the text

Download Cartesian Product - Discrete Mathematics - Lecture Slides and more Slides Discrete Mathematics in PDF only on Docsity!

CSE115/ENGR160 Discrete Mathematics 04/24/

9.1 Relations and their properties

  • Relationships between elements of sets are represented using the structure called a relation
  • A subset of Cartesian product of the sets
  • Example: a student and his/her ID

Binary relation

  • aRb denotes that (a,b)∊R
  • When (a,b) belongs to R, a is said to be related to b by R
  • Likewise, n-ary relations express relationships among n elements
  • Let A 1 , A 2 , …, An be sets. An n-ary relation of these sets is a subset of A 1 ×A 2 ×…×An. The sets A 1 , A 2 , ..., An are called the domains of the relation, and n is called its degree

Example

  • Let A be the set of students and B be the set of courses
  • Let R be the relation that consists of those pairs (a, b) where a∊A and b∊B
  • If Jason is enrolled only in CSE20, and John is enrolled in CSE20 and CSE
  • The pairs (Jason, CSE20), (John,CSE20), (John, CSE 21) belong to R
  • But (Jason, CSE21) does not belong to R

Example

  • Let A={0, 1, 2} and B={a, b}. Then {(0, a), (0, b), (1, a), (2, b)} is a relation from A to B
  • That is 0Ra but not 1Rb

Functions as relations

  • Recall that a function f from a set A to a set B assigns exactly one element of B to each element of A
  • The graph of f is the set of ordered pairs (a, b) such that b=f(a)
  • Because the graph of f is a subset of A x B, it is a relation from A to B
  • Furthermore, the graph of a function has the property that every element of A is the first element of exactly one ordered pair of the graph

Relation on a set

  • A relation on the set A is a relation from A to A, i.e., a subset of A x A
  • Let A be the set {1, 2, 3, 4}. Which ordered pairs are in the relation R={(a,b)|a divides b}?
  • R={(1,1),(1,2),(1,3),(1,4),(2,2),(2,4),(3,3),(4,4)}

10

1 2 3 4

1 2 3 4

R 1 2 3 4 1 X X X X 2 X X 3 X 4 X

Example

  • Consider these relations on set of integers R 1 ={(a,b)|a≤b} R 2 ={(a,b)|a>b} R 3 ={(a,b)|a=b or a=-b} R 4 ={(a,b)|a=b} R 5 ={(a,b)|a=b+1} R 6 ={(a,b)|a+b≤3} Which of these relations contain each of the pairs (1,1), (1,2), (2,1), (1, -1) and (2, 2)?
  • (1,1) is in R 1 , R 3 , R 4 and R 6 ; (1,2) is in R 1 and R 6 ; (2,1) is in R 2 , R 5 , and R 6 ; (1,-1) is in R 2 , R 3 , and R 6 ; (2,2) is in R 1 , R 3 , and R (^4)

Properties of relations: Reflexive

  • In some relations an element is always related to itself
  • Let R be the relation on the set of all people consisting of pairs (x,y) where x and y have the same mother and the same father. Then x R x for every person x
  • A relation R on a set A is called reflexive if (a,a) ∊ R for every element a∊A
  • The relation R on the set A is reflexive if ∀a((a,a) ∊ R)

Example

  • Consider these relations on {1, 2, 3, 4} R 1 ={(1,1),(1,2),(2,1),(2,2),(3,4),(4,1),(4,4)} R 2 ={(1,1),(1,2),(2,1)} R 3 ={(1,1),(1,2),(1,4),(2,1),(2,2),(3,3),(4,1),(4,4)} R 4 ={(2,1),(3,1),(3,2),(4,1),(4,2),(4,3)} R 5 ={(1,1),(1,2),(1,3),(1,4),(2,2),(2,3),(2,4),(3,3),(3,4),(4,4)} R 6 ={(3,4)} Which of these relations are reflexive?
  • R 3 and R 5 are reflexive as both contain all pairs of the (a,a)
  • Is the “divides” relation on the set of positive integers reflexive?

Antisymmetric

  • A relation R on a set A such that for all a, b ∊ A, if (a, b)∊R and (b, a)∊ R, then a=b is called antisymmetric
  • Similarly, the relation R is antisymmetric if ∀a∀b(((a,b)∊R∧(b,a)∊R)→(a=b))
  • A relation is antisymmetric if and only if there are no pairs of distinct elements a and b with a related to b and b related to a
  • That is, the only way to have a related to b and b related to a is for a and b to be the same element

Symmetric and antisymmetric

  • The terms symmetric and antisymmetric are not opposites as a relation can have both of these properties or may lack both of them
  • A relation cannot be both symmetric and antisymmetric if it contains some pair of the form (a, b) where a ≠ b

Example

  • Which are symmetric and antisymmetric R 1 ={(a,b)|a≤b} R 2 ={(a,b)|a>b} R 3 ={(a,b)|a=b or a=-b} R 4 ={(a,b)|a=b} R 5 ={(a,b)|a=b+1} R 6 ={(a,b)|a+b≤3}
  • Symmetric: R 3 , R 4 , R 6. R 3 is symmetric, if a=b (or a=-b), then b=a (b=-a), R (^4) is symmetric as a=b implies b=a, R 6 is symmetric as a+b≤3 implies b+a≤
  • Antisymmetric: R 1 , R 2 , R 4 , R 5. R 1 is antisymmetric as a≤b and b≤a imply a=b. R 2 is antisymmetric as it is impossible to have a>b and b>a, R 4 is antisymmteric as two elements are related w.r.t. R 4 if and only if they are equal. R 5 is antisymmetric as it is impossible to have a=b+1 and b=a+

Transitive

  • A relation R on a set A is called transitive if whenever (a,b)∊R and (b,c)∊R then (a,c)∊R for all a, b, c ∊ A
  • Using quantifiers, we see that a relation R is transitive if we have ∀a∀b∀c (((a,b)∊R ∧ (b,c)∊R)→ (a,c)∊R)