Week 8 - Wednesday.  What did we talk about last time?  Cardinality  Countability  Relations.

Slides:



Advertisements
Similar presentations
Binary Relations Binary Relations on Real Numbers.
Advertisements

Equivalence Relations
Equivalence Relations
Equivalence Relations
Lecture 1 RMIT University, Taylor's University Learning Objectives
Cryptography and Network Security
The Engineering Design of Systems: Models and Methods
Chap6 Relations Def 1: Let A and B be sets. A binary relation from A
Basic Properties of Relations
Discrete Structures Chapter 5 Relations Nurul Amelina Nasharuddin Multimedia Department.
Congruence of Integers
Discrete Mathematics Lecture#11.
Slide 10-1 Copyright © 2005 Pearson Education, Inc. SEVENTH EDITION and EXPANDED SEVENTH EDITION.
SETS A set B is a collection of objects such that for every object X in the universe the statement: “X is a member of B” Is a proposition.
Relations Chapter 9.
Equivalence Relations MSU CSE 260. Outline Introduction Equivalence Relations –Definition, Examples Equivalence Classes –Definition Equivalence Classes.
Logics for Data and Knowledge Representation Introduction to Algebra Chiara Ghidini, Luciano Serafini, Fausto Giunchiglia and Vincenzo Maltese.
Mathematics of Cryptography Part I: Modular Arithmetic
Exam 2 Review 8.2, 8.5, 8.6, Thm. 1 for 2 roots, Thm. 2 for 1 root Theorem 1: Let c 1, c 2 be elements of the real numbers. Suppose r 2 -c 1.
Week 15 - Wednesday.  What did we talk about last time?  Review first third of course.
Chapter 9. Chapter Summary Relations and Their Properties n-ary Relations and Their Applications (not currently included in overheads) Representing Relations.
Chapter 9. Section 9.1 Binary Relations Definition: 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.
Relations, Functions, and Matrices Mathematical Structures for Computer Science Chapter 4 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Relations, Functions.
Week 9 - Wednesday.  What did we talk about last time?  Exam 2  Before that: review  Before that: relations.
Digraphs and Relations Warm Up. The Divisibility Relation Let “|” be the binary relation on N×N such that a|b (“a divides b”) iff there is an n ∈ N such.
Copyright © Cengage Learning. All rights reserved. CHAPTER 8 RELATIONS.
Rosen, Section 8.5 Equivalence Relations
Relations, Functions, and Countability
Relations, Functions, and Matrices Mathematical Structures for Computer Science Chapter 4 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Relations, Functions.
Week 6 - Friday.  What did we talk about last time?  Solving recurrence relations.
Mathematical Preliminaries
Foundations of Discrete Mathematics Chapter 4 By Dr. Dalia M. Gil, Ph.D.
1 RELATIONS Learning outcomes Students are able to: a. determine the properties of relations – reflexive, symmetric, transitive, and antisymmetric b. determine.
Discrete Mathematics Lecture # 15 Types of Relations (contd.)
1 Lecture 2 Equivalence Relations Reading: Epp Chp 10.3.
Equivalence Relations. Partial Ordering Relations 1.
Chapter 9. Chapter Summary Relations and Their Properties n-ary Relations and Their Applications (not currently included in overheads) Representing Relations.
1 RELATIONS Learning outcomes Students are able to: a. determine the properties of relations – reflexive, symmetric, transitive, and antisymmetric b. determine.
Chapter 8: Relations. 8.1 Relations and Their Properties Binary relations: Let A and B be any two sets. A binary relation R from A to B, written R : A.
Copyright © Cengage Learning. All rights reserved. CHAPTER 8 RELATIONS.
1 Section 4.2 Equivalence Relations A binary relation is an equivalence relation if it has the three properties reflexive, symmetric, and transitive (RST).
RelationsCSCE 235, Spring Introduction A relation between elements of two sets is a subset of their Cartesian products (set of all ordered pairs.
Set Theory Concepts Set – A collection of “elements” (objects, members) denoted by upper case letters A, B, etc. elements are lower case brackets are used.
Chapter 13 Mathematic Structures 13.1 Modular Arithmetic Definition 1 (modulo). Let a be an integer and m be a positive integer. We denoted by a mod m.
ORDERED SETS. RELATIONS COSC-1321 Discrete Structures 1.
Chap. 7 Relations: The Second Time Around
Cryptography Lecture 14 Arpita Patra © Arpita Patra.
Advanced Digital Designs Jung H. Kim. Chapter 1. Sets, Relations, and Lattices.
Week 15 - Wednesday.  What did we talk about last time?  Review first third of course.
Week 8 - Monday.  What did we talk about last time?  Properties of functions  One-to-one  Onto  Inverses  Cardinality.
1 CMSC 250 Discrete Structures CMSC 250 Lecture 41 May 7, 2008.
Week 8 - Wednesday.  What did we talk about last time?  Relations  Properties of relations  Reflexive  Symmetric  Transitive.
Agenda Review:  Relation Properties Lecture Content:  Divisor and Prime Number  Binary, Octal, Hexadecimal Review & Exercise.
Relations Chapter 9 Copyright © McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill.
The Relation Induced by a Partition
Relations and Their Properties
Introduction to Relations
Equivalence Relations
Cartesian product Given two sets A, B we define their Cartesian product is the set of all the pairs whose first element is in A and second in B. Note that.
Reflexivity, Symmetry, and Transitivity
CS201: Data Structures and Discrete Mathematics I
Foundations of Discrete Mathematics
Discrete Math (2) Haiming Chen Associate Professor, PhD
PROPERTIES OF ALGEBRA.
Mathematical Background 1
Section 10.3 Modular Arithmetic
Equivalence Relations
Equivalence Relations
Lecture 3 Strings and Things (Section 1.1)
Section 9.3 Modular Arithmetic.
Presentation transcript:

Week 8 - Wednesday

 What did we talk about last time?  Cardinality  Countability  Relations

 There is a Grand Hotel with an infinite number of rooms  Their slogan is: "We're always full, but we always have room for you!"  Although completely full, when a single guest arrives, he or she can be accommodated by moving into Room 1  The guest in Room 1 will move into Room 2, the guest in Room 2 will move into Room 3, and so on, with each guest in Room n moving into Room n + 1  Unfortunately, tragedy has struck! The hotel across the street, Inn Finite, which also has a (countably) infinite number of rooms, has just burned down  Describe how all of Inn Finite's guests can be accommodated at the Grand Hotel

 To solve sequence a k = Aa k-1 + Ba k-2  Find its characteristic equation t 2 – At – B = 0  If the equation has two distinct roots r and s  Substitute a 0 and a 1 into a n = Cr n + Ds n to find C and D  If the equation has a single root r  Substitute a 0 and a 1 into a n = Cr n + Dnr n to find C and D

Student Lecture

 We will discuss many useful properties that hold for any binary relation R on a set A (that is from elements of A to other elements of A)  Relation R is reflexive iff for all x  A, (x, x)  R  Informally, R is reflexive if every element is related to itself  R is not reflexive if there is an x  A, such that (x, x)  R

 Relation R is symmetric iff for all x, y  A, if (x, y)  R then (y, x)  R  Informally, R is symmetric if for every element related to another element, the second element is also related to the first  R is not symmetric if there is an x, y  A, such that (x, y)  R but (y, x)  R

 Relation R is transitive iff for all x, y, z  A, if (x, y)  R and (y, z)  R then (x, z)  R  Informally, R is transitive when an element is related to a second element and a second element is related to a third, then it must be the case that the first element is also related to the third  R is not transitive if there is an x, y, z  A, such that (x, y)  R and (y, z)  R but (x, z)  R

 Let A = {0, 1, 2, 3}  Let R = {(0,0), (0,1), (0,3), (1,0), (1,1), (2,2), (3,0), (3,3)}  Is R reflexive?  Is R symmetric?  Is R transitive?  Let S = {(0,0), (0,2), (0,3), (2,3)}  Is S reflexive?  Is S symmetric?  Is S transitive?  Let T = {(0,1), (2,3)}  Is T reflexive?  Is T symmetric?  Is T transitive?

 If you have a set A and a binary relation R on A, the transitive closure of R called R t satisfies the following properties:  R t is transitive R  RtR  Rt  If S is any other transitive relation that contains R, then R t  S  Basically, the transitive closure just means adding in the least amount of stuff to R to make it transitive  If you can get there in R, you can get there directly in R t

 Let A = {0, 1, 2, 3}  Let R = {(0,1), (1,2), (2,3)}  Is R transitive?  Then, find the transitive closure of R

 Let R be a relation on real numbers R such that  x R y  x = y  Is R reflexive?  Is R symmetric?  Is R transitive?  Let S be a relation on real numbers R such that  x S y  x < y  Is S reflexive?  Is S symmetric?  Is S transitive?  Let T be a relation on positive integers N such that  m T n  3 | (m – n)  Is T reflexive?  Is T symmetric?  Is T transitive?

 A partition of a set A (as we discussed earlier) is a collection of nonempty, mutually disjoint sets, whose union is A  A relation can be induced by a partition  For example, let A = {0, 1, 2, 3, 4}  Let A be partitioned into {0, 3, 4}, {1}, {2}  The binary relation induced by the partition is: x R y  x and y are in the same subset of the partition  List the ordered pairs in R

 Given set A with a partition  Let R be the relation induced by the partition  Then, R is reflexive, symmetric, and transitive  As it turns out, any relation R is that is reflexive, symmetric, and transitive induces a partition  We call a relation with these three properties an equivalence relation

 We say that m is congruent to n modulo d if and only if d | (m – n)  We write this:  m  n (mod d)  Congruence mod d defines an equivalence relation  Reflexive, because m  m (mod d)  Symmetric because m  n (mod d) means that n  m (mod d)  Transitive because m  n (mod d) and n  k (mod d) mean that m  k (mod d)  Which of the following are true?  12  7 (mod 5)  6  -8 (mod 4)  3  3 (mod 7)

 Let A be a set and R be an equivalence relation on A  For each element a in A, the equivalence class of a, written [a], is the set of all elements x in A such that a R x  Example  Let A be { 0, 1, 2, 3, 4, 5, 6, 7, 8}  Let R be congruence mod 3  What's the equivalence class of 1?  For A with R as an equivalence relation on A  If b  [a], then [a] = [b]  If b  [a], then [a]  [b] = 

 Modular arithmetic has many applications  For those of you in Security, you know how many of them apply to cryptography  To help us, the following statements for integers a, b, and n, with n > 1, are all equivalent 1. n | (a – b) 2. a  b (mod n) 3. a = b + kn for some integer k 4. a and b have the same remainder when divided by n 5. a mod n = b mod n

 Let a, b, c, d and n be integers with n > 1  Let a  c (mod n) and b  d (mod n), then: 1. (a + b)  (c + d) (mod n) 2. (a – b)  (c – d) (mod n) 3. ab  cd (mod n) 4. a m  c m (mod n), for all positive integers m  If a and n are relatively prime (share no common factors), then there is a multiplicative inverse a -1 such that a -1 a  1 (mod n)  I'd love to have us learn how to find this, but there isn't time

 Let R be a relation on a set A  R is antisymmetric iff for all a and b in A, if a R b and b R a, then a = b  That is, if two different elements are related to each other, then the relation is not antisymmetric  Let R be the "divides" relation on the set of all positive integers  Is R antisymmetric?  Let S be the "divides" relation on the set of all integers  Is S antisymmetric?

 A relation that is reflexive, antisymmetric, and transitive is called a partial order  The subset relation is a partial order  Show it's reflexive  Show it's antisymmetric  Show it's transitive  The less than or equal to relation is a partial order  Show it's reflexive  Show it's antisymmetric  Show it's transitive

 Review for Exam 2

 Work on Homework 6  Due Friday before midnight  Study for Exam 2  Next Monday in class  Review on Friday