Math.3336: Discrete Mathematics. Chapter 9 Relations

Similar documents
Math.3336: Discrete Mathematics. Cardinality of Sets

Math.3336: Discrete Mathematics. Applications of Propositional Logic

Math.3336: Discrete Mathematics. Primes and Greatest Common Divisors

Math.3336: Discrete Mathematics. Propositional Equivalences

Definition: A binary relation R from a set A to a set B is a subset R A B. Example:

Chapter 9: Relations Relations

Math.3336: Discrete Mathematics. Advanced Counting Techniques

Section Summary. Relations and Functions Properties of Relations. Combining Relations

Math.3336: Discrete Mathematics. Combinatorics: Basics of Counting

Math.3336: Discrete Mathematics. Mathematical Induction

Math.3336: Discrete Mathematics. Primes and Greatest Common Divisors

Math.3336: Discrete Mathematics. Nested Quantifiers

Math.3336: Discrete Mathematics. Nested Quantifiers/Rules of Inference

Math.3336: Discrete Mathematics. Proof Methods and Strategy

CSC Discrete Math I, Spring Relations

Section 7.1 Relations and Their Properties. Definition: A binary relation R from a set A to a set B is a subset R A B.

Notes. Relations. Introduction. Notes. Relations. Notes. Definition. Example. Slides by Christopher M. Bourke Instructor: Berthe Y.

Relations Graphical View

CHAPTER 1. Relations. 1. Relations and Their Properties. Discussion

Relations. Relations of Sets N-ary Relations Relational Databases Binary Relation Properties Equivalence Relations. Reading (Epp s textbook)

COMP 182 Algorithmic Thinking. Relations. Luay Nakhleh Computer Science Rice University

Today. Binary relations establish a relationship between elements of two sets

Math 42, Discrete Mathematics

What are relations? f: A B

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska

Relations. We have seen several types of abstract, mathematical objects, including propositions, predicates, sets, and ordered pairs and tuples.

Nonnegative Matrices I

5. Partitions and Relations Ch.22 of PJE.

2.1 Differential Equations and Solutions. Blerina Xhabli

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska

Relations. Binary Relation. Let A and B be sets. A (binary) relation from A to B is a subset of A B. Notation. Let R A B be a relation from A to B.

Definition: A binary relation R from a set A to a set B is a subset R A B. Example:

Discrete Mathematics. 2. Relations

Rela%ons and Their Proper%es. Slides by A. Bloomfield

Outline for Today. Binary Relations. Equivalence Relations. Partial Orders. Quick Midterm Review

Math 4377/6308 Advanced Linear Algebra

Outline Inverse of a Relation Properties of Relations. Relations. Alice E. Fischer. April, 2018

Matrices and Vectors

7.4 DO (uniqueness of minimum-cost spanning tree) Prove: if all edge weights are distinct then the minimum-cost spanning tree is unique.

21-301, Spring 2019 Homework 4 Solutions

MATH 61-02: PRACTICE PROBLEMS FOR FINAL EXAM

1.4 Equivalence Relations and Partitions

ABOUT THE CLASS AND NOTES ON SET THEORY

Today s topics. Binary Relations. Inverse Relations. Complementary Relations. Let R:A,B be any binary relation.

HOMEWORK 9 solutions

CSE 311: Foundations of Computing I Autumn 2014 Practice Final: Section X. Closed book, closed notes, no cell phones, no calculators.

Discrete Mathematics. Chapter 4. Relations and Digraphs Sanguk Noh

1. To be a grandfather. Objects of our consideration are people; a person a is associated with a person b if a is a grandfather of b.

Relations --- Binary Relations. Debdeep Mukhopadhyay IIT Madras

Discrete Structures: Sample Questions, Exam 2, SOLUTIONS

Relations. Relations. Definition. Let A and B be sets.

Important Dates. Non-instructional days. No classes. College offices closed.

Massachusetts Institute of Technology 6.042J/18.062J, Fall 02: Mathematics for Computer Science Professor Albert Meyer and Dr.

Generalized Cayley Digraphs

Equivalence Relations and Partitions, Normal Subgroups, Quotient Groups, and Homomorphisms

Exercises for Discrete Maths

Introduction to Kleene Algebras

Math 42, Discrete Mathematics

Math 391: Midterm 1.0 Spring 2016

and e 2 ~ e 2 iff e 1

Week 4-5: Binary Relations

Reading 11 : Relations and Functions

Notes for Science and Engineering Foundation Discrete Mathematics

Kleene Algebras and Algebraic Path Problems

CSC 1700 Analysis of Algorithms: Warshall s and Floyd s algorithms

Week 4-5: Binary Relations

Relationships between elements of sets occur in many contexts. Every day we deal with

Equivalence, Order, and Inductive Proof

Sets and Functions. MATH 464/506, Real Analysis. J. Robert Buchanan. Summer Department of Mathematics. J. Robert Buchanan Sets and Functions

CIS 375 Intro to Discrete Mathematics Exam 3 (Section M004: Blue) 6 December Points Possible

PROPOSITIONS AND LOGICAL OPERATIONS

Week 4-5: Generating Permutations and Combinations

CS 455/555: Mathematical preliminaries

Generating Permutations and Combinations

Selected Solutions to Even Problems, Part 3

Topics in Logic, Set Theory and Computability

Edge colored complete bipartite graphs with trivial automorphism groups

Do not open this exam until you are told to begin. You will have 75 minutes for the exam.

Honors Algebra II / Trigonometry

Assignment #2 COMP 3200 Spring 2012 Prof. Stucki

Packet #5: Binary Relations. Applied Discrete Mathematics

Discrete Optimization 23

EECS 1028 M: Discrete Mathematics for Engineers

CIS 375 Intro to Discrete Mathematics Exam 3 (Section M001: Green) 6 December Points Possible

Math 410 Linear Algebra Summer Session American River College

Course Content (visit for details)

Spring Based on Partee, ter Meulen, & Wall (1993), Mathematical Methods in Linguistics

Prerequisite: Qualification by assessment process or completion of Mathematics 1050 or one year of high school algebra with a grade of "C" or higher.

DRAFT CONCEPTUAL SOLUTION REPORT DRAFT

CS246: Mining Massive Data Sets Winter Only one late period is allowed for this homework (11:59pm 2/14). General Instructions

2MA105 Algebraic Structures I

Stochastic processes. MAS275 Probability Modelling. Introduction and Markov chains. Continuous time. Markov property

Section 8.4 Closures of Relations

Divisor Problems HAROLD B. REITER.

Math 180 Written Homework Solutions Assignment #4 Due Tuesday, September 23rd at the beginning of your discussion class.

Algorithm Design and Analysis (NTU CSIE, Fall 2017) Homework #3. Homework #3. Due Time: 2017/12/14 (Thu.) 17:20 Contact TAs:

Discrete Mathematics. Spring 2017

Axioms of Kleene Algebra

Relationships between the Completion Problems for Various Classes of Matrices

Lecture 1 and 2: Introduction and Graph theory basics. Spring EE 194, Networked estimation and control (Prof. Khan) January 23, 2012

Transcription:

Math.3336: Discrete Mathematics Chapter 9 Relations Instructor: Dr. Blerina Xhabli Department of Mathematics, University of Houston https://www.math.uh.edu/ blerina Email: blerina@math.uh.edu Fall 2018 Instructor: Dr. Blerina Xhabli, University of Houston Math.3336: Discrete Mathematics Chapter 9 Relations 1/19

Assignments to work on Homework #8 due Wednesday, 11/14, 11:59pm No credit unless turned in by 11:59pm on due date Late submissions not allowed, but lowest homework score dropped when calculating grades Homework will be submitted online in your CASA accounts. You can find the instructions on how to upload your homework in our class webpage. Instructor: Dr. Blerina Xhabli, University of Houston Math.3336: Discrete Mathematics Chapter 9 Relations 2/19

Chapter 9 Relations Chapter 9 Overview Relations and their Properties Section 9.1 n-ary Relations and Their Applications Section 9.2* Representing Relations Section 9.3 Closures of Relations Section 9.4 Equivalence Relations Section 9.5 Partial Orderings Section 9.6 Instructor: Dr. Blerina Xhabli, University of Houston Math.3336: Discrete Mathematics Chapter 9 Relations 3/19

Relations and Their Properties Binary Relations A binary relation R from a set A to a set B is a subset R A B. Example: Let A = {0, 1, 2} and B = {a, b}. Then: {(0, a), (0, b), (1, a), (1, b)} is relation from A to B. We can represent relations graphically or using a table: Relations are more general than functions. A function is a relation where exactly one element of B is related to each element of A. Instructor: Dr. Blerina Xhabli, University of Houston Math.3336: Discrete Mathematics Chapter 9 Relations 4/19

Relations and Their Properties Binary Relation on a Set A binary relation R on a set A is a subset A A. Examples: Let A = {a, b, c}. Then R = {(a, a), (a, b), (a, c)} is a relation on A. Let A = {1, 2, 3, 4}. Then R = {(a, b) : a divides b} is a relation on A, given by R = {(1, 1), (1, 2), (1, 3), (1, 4), (2, 2), (2, 4), (3, 3), (4, 4)}. Question: How many relations are there on a set A? Since a relation is a subset of A A, then there are as many relations as the number of all subsets of A A, i.e. 2 A. Instructor: Dr. Blerina Xhabli, University of Houston Math.3336: Discrete Mathematics Chapter 9 Relations 5/19

Reflexive Relations A relation R is reflexive on A iff (a, a) R for every element a A. Written symbolically, R is reflexive if and only if a [a A (a, a) R]. Which of the following relations on integers are reflexive? R 1 = {(a, b) : a divides b} is not reflexive, because (0, 0) / R 1. R 2 = {(a, b) : a b} is reflexive: For all a Z, a a i.e. (a, a) R 2 R 3 = {(a, b) : a 2 = b 2 } is reflexive: For all a Z, a 2 = a 2 i.e. (a, a) R 3 If A =, then the empty relation is reflexive vacuously. That is the empty relation on an empty set is reflexive! Instructor: Dr. Blerina Xhabli, University of Houston Math.3336: Discrete Mathematics Chapter 9 Relations 6/19

Symmetric Relations A relation R is symmetric on A iff (b, a) R whenever (a, b) R. Written symbolically, R is symmetric if and only if a b [(a, b) R (b, a) R]. Which of the following relations on integers are symmetric: R 1 = {(a, b) : a divides b} is not symmetric: Note that (2, 4) R 1 but (4, 2) / R 1. R 2 = {(a, b) : a b} is not symmetric: Note that (3, 5) R 2 but (5, 3) / R 2. R 3 = {(a, b) : a 2 = b 2 } is symmetric: If (a, b) R 3, then a 2 = b 2 i.e. b 2 = a 2, which gives (b, a) R 3. R 4 = {(a, b) : a + b 3} is symmetric: If (a, b) R 4, then a + b < 3 i.e. b + a < 3, which gives (b, a) R 4. Instructor: Dr. Blerina Xhabli, University of Houston Math.3336: Discrete Mathematics Chapter 9 Relations 7/19

Antisymmetric Relations A relation R is antisymmetric on A iff for all a, b A, (a, b) R and (b, a) R implies a = b. Written symbolically, R is antisymmetric if and only if a b [(a, b) R (b, a) R a = b]. Which of the following relations on integers are antisymmetric: R 2 = {(a, b) : a b} is antisymmetric: If a b and b a, then a = b. R 5 = {(a, b) : a > b} is antisymmetric: If a > b, then b a and a b. R 6 = {(a, b) : a = b + 1} is antisymmetric: If a = b + 1, then a > b. Therefore b a and a b. Instructor: Dr. Blerina Xhabli, University of Houston Math.3336: Discrete Mathematics Chapter 9 Relations 8/19

Transitive Relations A relation R is transitive on A if whenever (a, b) R and (b, c) R implies (a, c) R. Written symbolically, R is transitive if and only if a b c [(a, b) R (b, c) R (a, c) R]. Which of the following relations on integers are transitive: R 1 = {(a, b) : a divides b} is transitive: If a b and b c, then a c. R 2 = {(a, b) : a b} is transitive: If a b and b c, then a c. R 5 = {(a, b) : a > b} is transitive: If a > b and b > c, then a > c. Instructor: Dr. Blerina Xhabli, University of Houston Math.3336: Discrete Mathematics Chapter 9 Relations 9/19

Examples The following relations are defined on the set A = {a, b, c}. Determine whether they are reflexive, symmetric, antisymmetric and/or transitive. R = {(a, a), (b, b), (a, b), (b, a)} not reflexive, symmetric, transitive, not antisymmetric. S = {(a, a), (b, b), (c, c), (a, b), (b, c)} reflexive, not symmetric, not transitive, antisymmetric. T = {(a, a), (b, b), (c, c), (a, b), (b, a), (b, c), (a, c)} reflexive, not symmetric, transitive, not antisymmetric. U = {(a, a), (b, b), (c, c)} reflexive, symmetric, transitive, antisymmetric. Instructor: Dr. Blerina Xhabli, University of Houston Math.3336: Discrete Mathematics Chapter 9 Relations 10/19

Representing Relations using Matrices A relation between finite sets can be represented using a zero-one matrix. Suppose R is a relation from A = {a 1, a 2,..., a m } to B = {b 1, b 2,..., b n }. The relation R is represented by the matrix M R = [m ij ], where m ij = { 1, if (ai, b j ) R 0, if (a i, b j ) / R The matrix representing R has a 1 as its (i, j ) entry when a i is related to b j and a 0 if a i is not related to b j. Instructor: Dr. Blerina Xhabli, University of Houston Math.3336: Discrete Mathematics Chapter 9 Relations 11/19

Examples Let A = {1, 2, 3} and B = {1, 2}. The order of elements is the same as the numerical increasing order. Write the matrix representation for R = {(a, b) : a > b}. 0 0 Since R = {(2, 1), (3, 1), (3, 2)}, then M R = 1 0. 1 1 Let A = {a 1, a 2, a 3 } and B = {b 1, b 2, b 3, b 4, b 5 }. Write explicitly the relation S represented by 0 1 0 0 0 M S = 1 0 0 1 0 1 0 1 0 1 S = {(a 1, b 2 ), (a 2, b 1 ), (a 2, b 4 ), (a 3, b 1 ), (a 3, b 3 ), (a 3, b 5 )} Instructor: Dr. Blerina Xhabli, University of Houston Math.3336: Discrete Mathematics Chapter 9 Relations 12/19

Matrices of Relations on Sets If R is a reflexive relation, all the elements on the main diagonal of M R are equal to 1. R is a symmetric relation, if and only if m ij = 1 whenever m ji = 1. R is an antisymmetric relation, if and only if m ij = 0 or m ji = 0 when i j. Instructor: Dr. Blerina Xhabli, University of Houston Math.3336: Discrete Mathematics Chapter 9 Relations 13/19

An Example Suppose that the relation R on a set is represented by the matrix 1 1 0 M R = 1 1 1 0 1 1 Is R reflexive, symmetric, and/or antisymmetric? Solution: R is reflexive and symmetric, but it is not antisymmetric. Instructor: Dr. Blerina Xhabli, University of Houston Math.3336: Discrete Mathematics Chapter 9 Relations 14/19

Representing Relations Using Digraphs A directed graph, or digraph, consists of a set V of vertices (or nodes) together with a set E of ordered pairs of elements of V called edges (or arcs). The vertex a is called the initial vertex of the edge (a, b), and the vertex b is called the terminal vertex of this edge. An edge of the form (a, a) is called a loop. A directed graph with vertices V = {a, b, c, d} and edges E = {(a, b), (a, d), (b, b), (b, d), (c, a), (c, b), (d, b)} is shown here. Instructor: Dr. Blerina Xhabli, University of Houston Math.3336: Discrete Mathematics Chapter 9 Relations 15/19

Examples of Digraphs Representing Relations What are the ordered pairs in the relation represented by this directed graph? R = {(1, 3), (1, 4), (2, 1), (2, 2), (2, 3), (3, 1), (3, 3), (4, 1), (4, 3)} Instructor: Dr. Blerina Xhabli, University of Houston Math.3336: Discrete Mathematics Chapter 9 Relations 16/19

Determining which Properties a Relation has from its Digraph Reflexivity: A loop must be present at all vertices in the graph. Symmetry: If (x, y) is an edge, then so is (y, x). Antisymmetry: If (x, y) with x y is an edge, then (y, x) is not an edge. Transitivity: If (x, y) and (y, z) are edges, then so is (x, z). Instructor: Dr. Blerina Xhabli, University of Houston Math.3336: Discrete Mathematics Chapter 9 Relations 17/19

Equivalence Relations A relation R on a set A is called an equivalence relation if R is reflexive, symmetric, and transitive. Two elements a and b that are related by an equivalence relation are called equivalent. The notation a b is often used to denote that a and b are equivalent elements with respect to a particular equivalence relation. Which of the following relations on positive integers are equivalence relations: R 1 = {(a, b) : a divides b} is not an equivalence relation, because it is not symmetric. R 3 = {(a, b) : a 2 = b 2 } is an equivalence relation. R = {(a, b) : a b (mod m)} is an equivalence relation. Instructor: Dr. Blerina Xhabli, University of Houston Math.3336: Discrete Mathematics Chapter 9 Relations 18/19

Partial Orderings A relation R on a set A is called a partial ordering if R is reflexive, antisymmetric, and transitive. A set S together with a partial ordering R is called a partially ordered set, or poset, and is denoted by (S, R). Members of S are called elements of the poset. Which of the following relations on positive integers are partial orderings: R 1 = {(a, b) : a divides b} is a partial ordering. R 2 = {(a, b) : a b} is a partial ordering. R 5 = {(a, b) : a > b} is not a partial ordering, since it is not reflexive. Instructor: Dr. Blerina Xhabli, University of Houston Math.3336: Discrete Mathematics Chapter 9 Relations 19/19