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.

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

Chapter 9: Relations Relations

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

Math.3336: Discrete Mathematics. Chapter 9 Relations

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

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

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

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

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

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

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

Section 8.4 Closures of Relations

Relations Graphical View

MAD 3105 PRACTICE TEST 2 SOLUTIONS

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska

CSC Discrete Math I, Spring Relations

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska

Problem 1: Suppose A, B, C and D are finite sets such that A B = C D and C = D. Prove or disprove: A = B.

Solutions to In Class Problems Week 4, Mon.

Week 4-5: Generating Permutations and Combinations

CSE 20 DISCRETE MATH. Winter

Section 2.2 Set Operations. Propositional calculus and set theory are both instances of an algebraic system called a. Boolean Algebra.

Mathematical Preliminaries. Sipser pages 1-28

Generating Permutations and Combinations

Department of Computer Science University at Albany, State University of New York Solutions to Sample Discrete Mathematics Examination I (Spring 2008)

Section 1.8 The Growth of Functions. We quantify the concept that g grows at least as fast as f.

Deviations from the Mean

Practice Exam 1 CIS/CSE 607, Spring 2009

Preliminary Matters. Semantics vs syntax (informally):

Reading 11 : Relations and Functions

CSE 20 DISCRETE MATH WINTER

CSE 20 DISCRETE MATH SPRING

Propositional Logic, Predicates, and Equivalence

CS173 Strong Induction and Functions. Tandy Warnow

Introduction. Applications of discrete mathematics:

Problem 2: (Section 2.1 Exercise 10) (a.) How many elements are in the power set of the power set of the empty set?

a + b = b + a and a b = b a. (a + b) + c = a + (b + c) and (a b) c = a (b c). a (b + c) = a b + a c and (a + b) c = a c + b c.

5. Partitions and Relations Ch.22 of PJE.

Properties of the Integers

CSE 20 DISCRETE MATH. Fall

(c) Give a proof of or a counterexample to the following statement: (3n 2)= n(3n 1) 2

Mathematical Induction. How does discrete math help us. How does discrete math help (CS160)? How does discrete math help (CS161)?

UNIVERSITY OF VICTORIA DECEMBER EXAMINATIONS MATH 122: Logic and Foundations

CMPSCI 250: Introduction to Computation. Lecture #11: Equivalence Relations David Mix Barrington 27 September 2013

1.4 Equivalence Relations and Partitions

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

Discrete Mathematics. 2. Relations

Relational-Database Design

EQUATIONS OF TOURNAMENTS ARE NOT FINITELY BASED

Plan of the lecture. G53RDB: Theory of Relational Databases Lecture 10. Logical consequence (implication) Implication problem for fds

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.

Preparing for the CS 173 (A) Fall 2018 Midterm 1

Discrete Structures May 13, (40 points) Define each of the following terms:

PALACE PIER, ST. LEONARDS. M A N A G E R - B O W A R D V A N B I E N E.

MANY BILLS OF CONCERN TO PUBLIC

MATH 13 SAMPLE FINAL EXAM SOLUTIONS

Propositional and Predicate Logic - IV

What are relations? f: A B

Lecture Notes 1 Basic Concepts of Mathematics MATH 352

Exercises 1 - Solutions

spaghetti fish pie cake Ann X X Tom X X X Paul X X X

Foundations of algebra

Markov properties for undirected graphs

Discrete Wiskunde II. Lecture 5: Shortest Paths & Spanning Trees

Chapter 6. Relations. 6.1 Relations

In this episode of The Verification Corner, Rustan Leino talks about Loop Invariants. He gives a brief summary of the theoretical foundations and

Generalized Cayley Digraphs

Exercises. Exercise Sheet 1: Propositional Logic

AMTH140 Trimester Question 1. [8 marks] Answer

Online Courses for High School Students

Exam in Discrete Mathematics

Math 42, Discrete Mathematics

INF210 Datamaskinteori (Models of Computation)

Discrete Structures: Sample Questions, Exam 2, SOLUTIONS

CSE 20 DISCRETE MATH WINTER

Math 242: Principles of Analysis Fall 2016 Homework 1 Part B solutions

1 Completeness Theorem for Classical Predicate

Kruskal s Theorem Rebecca Robinson May 29, 2007

Logic, Set Theory and Computability [M. Coppenbarger]

Relations --- Binary Relations. Debdeep Mukhopadhyay IIT Madras

Discrete Optimization 23

Discrete Mathematics. W. Ethan Duckworth. Fall 2017, Loyola University Maryland

Discrete Structures: Sample Questions, Exam 2, SOLUTIONS

Department of Computer Science University at Albany, State University of New York Solutions to Sample Discrete Mathematics Examination II (Fall 2007)

Nonnegative Matrices I

Exercises for Discrete Maths

Notes for Science and Engineering Foundation Discrete Mathematics

586 Index. vertex, 369 disjoint, 236 pairwise, 272, 395 disjoint sets, 236 disjunction, 33, 36 distributive laws

REVIEW FOR THIRD 3200 MIDTERM

LECTURE 15: RELATIONS. Software Engineering Mike Wooldridge

m + q = p + n p + s = r + q m + q + p + s = p + n + r + q. (m + s) + (p + q) = (r + n) + (p + q) m + s = r + n.

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

Complete Induction and the Well- Ordering Principle

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

Math 42, Discrete Mathematics

Discrete Mathematics. Chapter 4. Relations and Digraphs Sanguk Noh

Graph Transformations T1 and T2

1 Initial Notation and Definitions

Is g one-to-one? Is g onto? Why? Solution: g is not one-to-one, since for c A, g(b) = g(c) = c. g is not onto, since a / g(a).

THE EQUATIONAL THEORIES OF REPRESENTABLE RESIDUATED SEMIGROUPS

Transcription:

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. Note: there are no constraints on relations as there are on functions. We have a common graphical representation of relations: Definition: A Directed graph or a Digraph D from A to B is a collection of vertices V A B and a collection of edges R A B. If there is an ordered pair e = <x, y> in R then there is an arc or edge from x to y in D. The elements x and y are called the initial and terminal vertices of the edge e. Examples: Let A = { a, b, c} B = {1, 2, 3, 4} R is defined by the ordered pairs or edges {<a, 1>, <a, 2>, <c, 4>} can be represented by the digraph D: and Its Applications 4/E Kenneth Rosen TP 1

a 1 b 2 c 3 4 Definition: A binary relation R on a set A is a subset of A A or a relation from A to A. Example: A = {a, b, c} R = {<a, a>, <a, b>, <a, c>}. Then a digraph representation of R is: a b Note: An arc of the form <x, x> on a digraph is called a loop. Question: How many binary relations are there on a set A? c and Its Applications 4/E Kenneth Rosen TP 2

Special Properties of Binary Relations Given: A Universe U A binary relation R on a subset A of U Definition: R is reflexive iff x[x U < x, x > R] Note: if U = then the implication is true vacuously The void relation on a void Universe is reflexive! Note: If U is not void then all vertices in a reflexive relation must have loops! Definition: R is symmetric iff x y[< x, y > R < y, x > R] Note: If there is an arc <x, y> there must be an arc <y, x>. and Its Applications 4/E Kenneth Rosen TP 3

Definition: R is antisymmetric iff x y[< x, y > R < y, x > R x = y] Note: If there is an arc from x to y there cannot be one from y to x if x y. You should be able to show that logically: if <x, y> is in R and x y then <y, x> is not in R. Definition: R is transitive iff x y z[< x, y > R < y, z > R < x,z > R] Note: if there is an arc from x to y and one from y to z then there must be one from x to z. This is the most difficult one to check. We will develop algorithms to check this later. and Its Applications 4/E Kenneth Rosen TP 4

Examples: A. B. C. D. A: not reflexive B: not reflexive symmetric not symmetric antisymmetric not antisymmetric transitive not transitive C: not reflexive D: not reflexive not symmetric not symmetric antisymmetric antisymmetric not transitive transitive and Its Applications 4/E Kenneth Rosen TP 5

Combining Relations Set operations A very large set of potential questions - Let R1 and R2 be binary relations on a set A: If R1 has property 1 and R2 has property 2, does R1 * R2 have property 3 where * represents an arbitrary binary set operation? Example: If R1 is symmetric, and R2 is antisymmetric, does it follow that R1 R2 is transitive? If so, prove it. Otherwise find a counterexample. and Its Applications 4/E Kenneth Rosen TP 6

Example: Let R1 and R2 be transitive on A. Does it follow that is transitive? Consider A = {1, 2} R1 = {<1,2>} R2 = {<2, 1>} R1 R2 Then R1 R2 = {<1, 2>, <2,1>} which is not transitive! (Why?) and Its Applications 4/E Kenneth Rosen TP 7

Composition Definition: Suppose R1 is a relation from A to B R2 is a relation from B to C. Then the composition of R2 with R1, denoted R2 or1 is the relation from A to C: If <x. y> is a member of R1 and <y, z> is a member of R2 then <x, z> is a member of R2 or1. Note: For <x, z> to be in the composite relation R2 or1 there must exist a y in B.... Note: We read them right to left as in functions. Example: a x x x A b x x B c x x C x D R1 R2 R2 or1 = {<b, D>, <b, B>} and Its Applications 4/E Kenneth Rosen TP 8

Definition: Let R be a binary relation on A. Then Basis: R 1 = R Induction: R n + 1 = R n or Note: an ordered pair <x, y> is in R n iff there is a path of length n from x to y following the arcs (in the direction of the arrows) of R. Example: a b d R c Discrete Mathematics by Section 6.1 and Its Applications 4/E Kenneth Rosen TP 9

a b d R 2 c a b d R 3 c a b d R 4 c Discrete Mathematics by Section 6.1 and Its Applications 4/E Kenneth Rosen TP 10

Very Important Theorem: Proof: R is transitive iff Rn R for n > 0. 1. R transitive R n R Use a direct proof and a proof by induction: Assume R is transitive. Now show R n R by induction. Basis: Obviously true for n = 1. Induction: The induction hypothesis: 'assume true for n'. Show it must be true for n + 1. R n+1 = R n o R so if <x, y> is in R n+1 then there is a z such that <x, z> is in R n and <z, y> is in R. But since R n R, <x, z> is in R. R is transitive so <x, y> is in R. Since <x, y> was an arbitrary edge the result follows. and Its Applications 4/E Kenneth Rosen TP 11

2. R n R R transitive Use the fact that R 2 R and the definition of transitivity. Proof left to the... Q. E. D. and Its Applications 4/E Kenneth Rosen TP 12