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.

Similar documents
Well-Ordering Principle. Axiom: Every nonempty subset of Z + has a least element. That is, if S Z + and S, then S has a smallest element.

Complete Induction and the Well- Ordering Principle

CSE 20 DISCRETE MATH. Winter

3.2 Solving linear congruences. v3

Part V. Chapter 19. Congruence of integers

CSE 20 DISCRETE MATH. Fall

3.7 Non-linear Diophantine Equations

Orders and Equivalences

Proof 1: Using only ch. 6 results. Since gcd(a, b) = 1, we have

14 Equivalence Relations

MATH 433 Applied Algebra Lecture 4: Modular arithmetic (continued). Linear congruences.

CHAPTER 3. Congruences. Congruence: definitions and properties

Deviations from the Mean

This exam contains 5 pages (including this cover page) and 4 questions. The total number of points is 100. Grade Table

MATH 115, SUMMER 2012 LECTURE 4 THURSDAY, JUNE 21ST

Mathematics 220 Homework 4 - Solutions. Solution: We must prove the two statements: (1) if A = B, then A B = A B, and (2) if A B = A B, then A = B.

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

Notes on Systems of Linear Congruences

Modular Arithmetic Instructor: Marizza Bailey Name:

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

Solution Sheet (i) q = 5, r = 15 (ii) q = 58, r = 15 (iii) q = 3, r = 7 (iv) q = 6, r = (i) gcd (97, 157) = 1 = ,

4. Congruence Classes

COMP239: Mathematics for Computer Science II. Prof. Chadi Assi EV7.635

CSE 20 DISCRETE MATH. Winter

2.3 In modular arithmetic, all arithmetic operations are performed modulo some integer.

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

2x 1 7. A linear congruence in modular arithmetic is an equation of the form. Why is the solution a set of integers rather than a unique integer?

CS 514, Mathematics for Computer Science Mid-semester Exam, Autumn 2017 Department of Computer Science and Engineering IIT Guwahati

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

Wilson s Theorem and Fermat s Little Theorem

COT3100 SI Final Exam Review

2x 1 7. A linear congruence in modular arithmetic is an equation of the form. Why is the solution a set of integers rather than a unique integer?

Factoring Algorithms Pollard s p 1 Method. This method discovers a prime factor p of an integer n whenever p 1 has only small prime factors.

A field F is a set of numbers that includes the two numbers 0 and 1 and satisfies the properties:

Algebra. Modular arithmetic can be handled mathematically by introducing a congruence relation on the integers described in the above example.

2 Equivalence Relations

MATH 215 Final. M4. For all a, b in Z, a b = b a.

EQUIVALENCE RELATIONS (NOTES FOR STUDENTS) 1. RELATIONS

Solutions to Section 2.1 Homework Problems S. F. Ellermeyer

Properties of Binary Relations

Congruence Classes. Number Theory Essentials. Modular Arithmetic Systems

Definition List Modern Algebra, Fall 2011 Anders O.F. Hendrickson

3. R = = on Z. R, S, A, T.

Basic elements of number theory

Basic elements of number theory

Lecture Notes. Advanced Discrete Structures COT S

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.

Section 0. Sets and Relations

SEVENTH EDITION and EXPANDED SEVENTH EDITION

Number Theory. Modular Arithmetic

Know the Well-ordering principle: Any set of positive integers which has at least one element contains a smallest element.

Computer Architecture 10. Residue Number Systems

The number of ways to choose r elements (without replacement) from an n-element set is. = r r!(n r)!.

Name (please print) Mathematics Final Examination December 14, 2005 I. (4)

Tomáš Madaras Congruence classes

Chapter 2 - Relations

cse 311: foundations of computing Fall 2015 Lecture 11: Modular arithmetic and applications

MTH 346: The Chinese Remainder Theorem

Introduction to Cryptography CS 355 Lecture 3

Mathematics 228(Q1), Assignment 3 Solutions

9 RELATIONS. 9.1 Reflexive, symmetric and transitive relations. MATH Foundations of Pure Mathematics

Applied Cryptography and Computer Security CSE 664 Spring 2018

AN ALGEBRAIC PROOF OF RSA ENCRYPTION AND DECRYPTION

(a) Let F be a field, and E F a subfield. Then F can be regarded as a vector space over E (with + and the field operations).

Math.3336: Discrete Mathematics. Chapter 9 Relations

0 Sets and Induction. Sets

Abstract Algebra Part I: Group Theory

Math 42, Discrete Mathematics

1 Partitions and Equivalence Relations

Math 109 HW 9 Solutions

Lecture 11 - Basic Number Theory.

Elementary Number Theory. Franz Luef

Congruences and Residue Class Rings

Notes on Sets, Relations and Functions

Notes for Math 290 using Introduction to Mathematical Proofs by Charles E. Roberts, Jr.

1 2 3 style total. Circle the correct answer; no explanation is required. Each problem in this section counts 5 points.

Number Theory Homework.

Practice Exam 1 CIS/CSE 607, Spring 2009

Relations, Functions & Binary Operations

Discrete Logarithms. Let s begin by recalling the definitions and a theorem. Let m be a given modulus. Then the finite set

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

23.1. Proof of the fundamental theorem of homomorphisms (FTH). We start by recalling the statement of FTH introduced last time.

There are seven questions, of varying point-value. Each question is worth the indicated number of points.

Part IA Numbers and Sets

For your quiz in recitation this week, refer to these exercise generators:

3 The fundamentals: Algorithms, the integers, and matrices

DISCRETE MATHEMATICS W W L CHEN

1.4 Equivalence Relations and Partitions

Integers and Division

Chapter 3 Basic Number Theory

The Chinese Remainder Theorem

Name: Mathematics 1C03

NORTHWESTERN UNIVERSITY Tuesday, Oct 6th, 2015 ANSWERS FALL 2015 NU PUTNAM SELECTION TEST

ax b mod m. has a solution if and only if d b. In this case, there is one solution, call it x 0, to the equation and there are d solutions x m d

arithmetic properties of weighted catalan numbers

and e 2 ~ e 2 iff e 1

CS280, Spring 2004: Prelim Solutions

Homework #2 solutions Due: June 15, 2012

Math 3000 Section 003 Intro to Abstract Math Final Exam

MATH 215 Sets (S) Definition 1 A set is a collection of objects. The objects in a set X are called elements of X.

Transcription:

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. If (a, b) R, we write a R b. 1

Binary Relation Example: Consider the sets A = {2, 3, 5, 7} and B = {4, 6, 8, 9, 10}. Let R be the relation from A to B defined by a R b iff b is divisible by a. Then R consists of the ordered pairs {(2, 4), (2, 6), (2, 8), (2, 10), (3, 6), (3, 9), (5, 10)}. 2

Domain and Range The domain of a relation R from A to B is the set Dom(R) = {x A y (y B and x R y)}. The range of the relation R from A to B is the set Rng(R) = {y B x (x A and x R y)}. 3

Domain and Range Example: Consider the sets A = {2, 3, 5, 7} and B = {4, 6, 8, 9, 10}. Let R be the relation from A to B defined by a R b iff b is divisible by a. Then R consists of the ordered pairs {(2, 4), (2, 6), (2, 8), (2, 10), (3, 6), (3, 9), (5, 10)}.

Domain and Range Example: Consider the sets A = {2, 3, 5, 7} and B = {4, 6, 8, 9, 10}. Let R be the relation from A to B defined by a R b iff b is divisible by a. Then R consists of the ordered pairs {(2, 4), (2, 6), (2, 8), (2, 10), (3, 6), (3, 9), (5, 10)}. Dom(R) = {2, 3, 5} Rng(R) = {4, 6, 8, 9, 10} 4

Domain and Range Example: Let X = Y = R, and consider the relation R from X to Y defined by x R y iff x 2 16 + y2 9 1. That is, R = { (x, y) R R x 2 } 16 + y2 9 1. 5

Domain and Range Example: Let X = Y = R, and consider the relation R from X to Y defined by x R y iff x 2 16 + y2 9 1. That is, R = { (x, y) R R x 2 } 16 + y2 9 1. Dom(R) = [ 4, 4] Rng(R) = [ 3, 3] 6

Binary Relation on a Set A (binary) relation on a set S is a relation from the set S to S. 7

Binary Relation on a Set Examples: Let S = R. The following are examples of binary relations on S. R 1 = {(x, y) x = y}, R 2 = {(x, y) x < y}, R 3 = {(x, y) x y}, R 4 = {(x, y) x > y}, R 5 = {(x, y) x y}, R 6 = {(x, y) x = y or x = y}, R 7 = {(x, y) x = y + 1}, R 8 = {(x, y) x + y 3}. 8

Identity Relation The identity relation on S is the relation from S to itself given by I S = {(x, x) x S}. Example: Let S = {a, b, c}. The identity relation on S is the relation I S = {(a, a), (b, b), (c, c)} 9

Inverse Relation If R is a relation from A to B, then the inverse of R, denoted R 1, is the relation R 1 = {(y, x) (x, y) R} Example: Consider the relation R = {(2, 4), (2, 6), (2, 8), (2, 10), (3, 6), (3, 9), (5, 10)}. The inverse of R is the relation R 1 = {(4, 2), (6, 2), (8, 2), (10, 2), (6, 3), (9, 3), (10, 5)}. 10

Inverse Relation Theorem: If R is a relation from A to B, then (a) Rng(R 1 ) = Dom(R). (b) Dom(R 1 ) = Rng(R). 11

Proof:

Inverse Relation Example Let R be the relation on R given by x R y iff y = e x. The inverse of R is the relation given by x R 1 y iff x = e y iff y = ln x. 12

Inverse Relation Example Let R be the relation on R given by x R y iff y = e x. The inverse of R is the relation given by x R 1 y iff x = e y iff y = ln x. The previous theorem gives Dom(R 1 ) = Rng(R) = (0, ). Rng(R 1 ) = Dom(R) = (, ). 13

Composition of Relations Let R be a relation from A to B, and let S be a relation from B to C. The composition of R and S, denoted S R, is a relation from A to C defined by S R = {(a, c) b B ( (a, b) R and (b, c) S )} 14

Composition of Relations Example: Consider the sets A = {1, 2, 3, 4, 5} B = {p, q, r, s, t} C = {x, y, z, w} Let R be the relation from A to B given by R = {(1, p), (1, q), (2, q), (3, r), (4, s)}. Let S be the relation from B to C given by S = {(p, x), (q, x), (q, y), (s, z), (t, z)}. 15

Composition of Relations Example: Consider the sets A = {1, 2, 3, 4, 5} B = {p, q, r, s, t} C = {x, y, z, w} Let R be the relation from A to B given by R = {(1, p), (1, q), (2, q), (3, r), (4, s)}. Let S be the relation from B to C given by S = {(p, x), (q, x), (q, y), (s, z), (t, z)}. The composition S R is the relation from A to C given by S R = {(1, x), (1, y), (2, x), (2, y), (4, z)}. 16

Composition of Relations Example: Consider the relations R = {(x, y) R R y = x + 1} S = {(x, y) R R y = x 2 }. Determine the following: S R = R S = 17

Composition of Relations Theorem: Suppose A, B, C, and D are sets. Let R be a relation from A to B, S be a relation from B to C, and T be a relation from C to D. (a) (R 1 ) 1 = R. (b) T (S R) = (T S) R. (c) I B R = R and R I A = R. (d) (S R) 1 = R 1 S 1 18

Equivalence Relations Reflexive Property Let R be a relation on A. We say that R is reflexive if and only if x R x for all x A. 1

Reflexive Property Examples: Let A = {a, b, c}. In each case, decide if the given relation is reflexive. R = {(a, b), (b, a), (c, c)}. R = {(a, a), (a, c), (c, b), (a, b), (c, c)}. R = {(a, b), (b, b), (b, c)}. R = {(a, a), (a, b), (b, b), (b, a), (c, c)}. R = {(a, b), (a, c), (b, a), (b, c), (c, a), (c, b)}. R = {(a, a), (b, b), (c, c)}. 2

Symmetric Property Let R be a relation on A. We say that R is symmetric if and only if x R y y R x for all x, y A. 3

Symmetric Property Examples: Let A = {a, b, c}. In each case, decide if the given relation is symmetric. R = {(a, b), (b, a), (c, c)}. R = {(a, a), (a, c), (c, b), (a, b), (c, c)}. R = {(a, b), (b, b), (b, c)}. R = {(a, a), (a, b), (b, b), (b, a), (c, c)}. R = {(a, b), (a, c), (b, a), (b, c), (c, a), (c, b)}. R = {(a, a), (b, b), (c, c)}. 4

Transitive Property Let R be a relation on A. We say that R is transitive if and only if (x R y y R z) x R z for all x, y, z A. 5

Transitive Property Examples: Let A = {a, b, c}. In each case, decide if the given relation is transitive. R = {(a, b), (b, a), (c, c)}. R = {(a, a), (a, c), (c, b), (a, b), (c, c)}. R = {(a, b), (b, b), (b, c)}. R = {(a, a), (a, b), (b, b), (b, a), (c, c)}. R = {(a, b), (a, c), (b, a), (b, c), (c, a), (c, b)}. R = {(a, a), (b, b), (c, c)}. 6

Equivalence Relation Let R be a relation on A. We say that R is an equivalence relation if and only if R is reflexive, symmetric, and transitive. That is, R is an equivalence relation iff 1. (Reflexivity) x R x, for all x A. 2. (Symmetry) if x R y, then y R x. 3. (Transitivity) if x R y and y R z, then x R z. 7

Equivalence Relation Example: Let A = {a, b, c}. List all equivalence relations on A. R = {(a, a), (b, b), (c, c)} R = {(a, a), (b, b), (c, c), (a, b), (b, a)} R = {(a, a), (b, b), (c, c), (b, c), (c, b)} R = {(a, a), (b, b), (c, c), (a, c), (c, a)} R = {(a, a), (b, b), (c, c), (a, b), (b, a) (a, c), (c, a), (b, c), (c, b)} 9

Equivalence Relation Definition Let n be a fixed positive integer. Given x, y Z, we say that x is congruent to y modulo n if x y is divisible to n, and we write x y (mod n) The number n is called the modulus of the congruence. 10

Equivalence Relation Example: Let R be the relation on Z defined by x R y iff x y (mod n) where n is a fixed positive integer. Prove that R is an equivalence relation. 11

Proof: Recall that x y (mod n) if and only if x y = nk for some integer k. (Reflexivity) (i) x R x, since x x = 0 = n 0. (Symmetry) (ii) Assume x R y. Then, x y = nk for some integer k. Therefore, y x = n( k), where k is an integer. Therefore, y R x. (Transitivity) (iii) Assume x R y and y R z. Then, x y = nk for some integer k, and y z = nj for some integer j. Then, x z = (x y) + (y z) = nk + nj That is, x z = n(k + j) where k + j is an integer. Therefore, x R z.