Relations Discrete Structures (CS 173)

Slides:



Advertisements
Similar presentations
Equivalence Relations
Advertisements

Practice Quiz 3 Recursive Definitions Relations Basic Counting Pigeonhole Principle Permutations & Combinations Discrete Probability.
Lesson 2.5 AIM: Proving Angles Congruent
Discrete Mathematics Relations
Chapter 3 Relations. Section 3.1 Relations and Digraphs.
Relations - review A binary relation on A is a subset of A×A (set of ordered pairs of elements from A) Example: A = {a,b,c,d,e} R = { (a,a),(a,b),(b,b),(b,c),
Basic Properties of Relations
CS2210(22C:19) Discrete Structures Relations Spring 2015 Sukumar Ghosh.
Relations & Their Properties. Copyright © Peter Cappello2 Introduction Let A & B be sets. A binary relation from A to B is a subset of A x B. Let R be.
Discussion #26 Chapter 5, Sections /15 Discussion #26 Binary Relations: Operations & Properties.
Relations Chapter 9.
© by Kenneth H. Rosen, Discrete Mathematics & its Applications, Sixth Edition, Mc Graw-Hill, 2007 Chapter 8: Relations Relations(8.1) n-any Relations &
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.
Exam 2 Review 7.5, 7.6, |A1  A2  A3| =∑|Ai| - ∑|Ai ∩ Aj| + |A1∩ A2 ∩ A3| |A1  A2  A3  A4| =∑|Ai| - ∑|Ai ∩ Aj| + ∑ |Ai∩ Aj ∩ Ak| - |A1∩
1 Relations and Their Properties Epp, section ??? CS 202 Aaron Bloomfield.
CS Discrete Mathematical Structures Mehdi Ghayoumi MSB rm 132 Ofc hr: Thur, 9:30-11:30a Fall 2002KSU - Discrete Structures1.
Chapter 9. Chapter Summary Relations and Their Properties Representing Relations Equivalence Relations Partial Orderings.
Lesson 2.6 p. 109 Proving Statements about Angles Goal: to begin two-column proofs about congruent angles.
CSC-2259 Discrete Structures
1 Relations and Their Properties Rosen, section 7.1 CS/APMA 202 Aaron Bloomfield.
Chapter 7: Relations Relations(7.1) Relations(7.1) n-any Relations & their Applications (7.2) n-any Relations & their Applications (7.2)
2.5 Proving Statements and Segments. Properties of Segment Congruence Segment congruence is reflexive, symmetric, and transitive. Reflexive: For any segment.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Relations.
Graphs and Isomorphisms Discrete Structures (CS 173) Madhusudan Parthasarathy, University of Illinois Backyards of Old Houses in Antwerp in the Snow Van.
Mathematical Preliminaries
Section 4.4 Properties of Relations. Order Relations Draw an arrow diagram for the relation R defined on the set {1,2,3,4} such that
CS 103 Discrete Structures Lecture 19 Relations. Chapter 9.
CS-7081 Irreflexive – (13 - 8). CS-7082 Example – (13 - 9)
Lecture 4.1: Relations Basics CS 250, Discrete Structures, Fall 2012 Nitesh Saxena Adopted from previous lectures by Cinda Heeren.
Chapter Relations and Their Properties
Lecture 1 Overview Topics 1. Proof techniques: induction, contradiction Proof techniques June 1, 2015 CSCE 355 Foundations of Computation.
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.
Objective: To prove and apply theorems about angles Proving Angles Congruent (2-6)
Congruence and Sets Discrete Structures (CS 173) Madhusudan Parthasarathy, University of Illinois Dali - “The Persistence of Memory” 1.
RelationsCSCE 235, Spring Introduction A relation between elements of two sets is a subset of their Cartesian products (set of all ordered pairs.
Given an equation, you can … * Add the same value (or equivalent values) to both sides, If a = b, then a + 7 = b + 7 * Subtract the same value (or equivalent.
MAT 2720 Discrete Mathematics Section 3.3 Relations
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 B = {a,b} {( 0, a), (
More Induction Discrete Structures (CS 173) Madhusudan Parthasarathy, University of Illinois 1 A Pork-Butchers Shop Seen from a Window Van Gogh.
01/24/13 Strategies for Proofs Discrete Structures (CS 173) Madhusudan Parthasarathy, University of Illinois Landscape with House and Ploughman Van Gogh.
Lecture 4.1: Relations Basics CS 250, Discrete Structures, Fall 2011 Nitesh Saxena *Adopted from previous lectures by Cinda Heeren.
1 CMSC 250 Discrete Structures CMSC 250 Lecture 41 May 7, 2008.
Bellwork 1)When are two angles congruent? 2)In, if m ∠ A=64° and m ∠ B=71°, what is m ∠ C? 3)What property of angle congruence is illustrated by this statement?
Section 9.1. Section Summary Relations and Functions Properties of Relations Reflexive Relations Symmetric and Antisymmetric Relations Transitive Relations.
Lecture 7: Relations Dr Andrew Purkiss-Trew Cancer Research UK Mathematics for Computing.
Congruent Angles.
CSCE 355 Foundations of Computation
Proving Statements about Segments
Relations and Their Properties
CS1022 Computer Programming & Principles
RELATION KS MATEMATIKA DISKRIT (DISCRETE MATHEMATICS )
Relations and Their Properties
CSE 504 Discrete Structures & Foundations of Computer Science
Chapter 2.6 (Part 1): Prove Statements about Segments and Angles
Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103 Chapter 9 Relations Slides are adopted from.
CONGRUENCE OF ANGLES THEOREM
CSCE 355 Foundations of Computation
2. Definition of congruent segments AB = CD 2.
Lesson 2-5: Algebraic Proofs
CONGRUENCE OF ANGLES THEOREM
CS2210 Discrete Structures Relations
Discrete Math & Fixed points
Equivalence Relations
Geometric Proofs Standards 2i & 2j.
2.6 Proving Statements about Angles
DO NOW.
Lesson 2-5: Algebraic Proofs
CSE 321 Discrete Structures
2.6 Proving Statements about Angles
2-6 Proving Angles Congruent
Presentation transcript:

Relations Discrete Structures (CS 173) Van Gogh Discrete Structures (CS 173) Madhusudan Parthasarathy, University of Illinois

Midterm 1 Oct 1 in class Skills list on website, under exams Practice midterm and practice problems will also be up soon.

Last Class: Sets A set is an unordered collection of objects grandfather Madonna mother father Beethoven sister my friend me

Last Class: Sets Family grandfather Madonna mother father Beethoven sister my friend me

Today’s class: Relations mother father sister grandfather me parent sibling Madonna Beethoven my friend

Today’s class How to represent relations Properties and types of relations: reflexive, symmetric, transitive, partial order, etc. Practice proofs with relations

Representing relations A relation 𝑅 on a set 𝐴 is a set of ordered pairs of elements from 𝐴 i.e. 𝑅 ⊆𝐴 ×𝐴 Consider relation 𝑅 to stand for “parent” on the set of people mother 𝑅 me 𝑅 = {(grandfather, mother), (mother, me), (father, me), (mother, sister), (father, sister)} Relation 𝑆 stands for “sibling” 𝑆={(sister, me), (me, sister)} mother father sister grandfather me parent sibling

Relations with numbers “less than” 1 2 3 4 5 6 7 8 “divides” 1 2 3 4 5 6 7 8 “congruent mod 3” 1 2 3 4 5 6 7 8

Application: Relational Databases, SQL A database can be seen as a relation (or sets of relations) Represented as tables Query languages (like SQL) SELECT statements combine relations to get new relations SELECT * FROM Book WHERE price > 100.00 ORDER BY title; Uses JOINs, etc. Uses Boolean connectives, etc. http://en.wikipedia.org/wiki/SQL

Reflexivity Reflexive: all elements relate to self 𝐹𝑜𝑟 𝑎𝑙𝑙 𝑥∈𝐴, 𝑥𝑅𝑥 Irreflexive: no elements relate to self 𝐹𝑜𝑟 𝑎𝑙𝑙 𝑥∈𝐴, 𝑥𝑅𝑥 (𝑅 means “𝑅 does not hold”) Is irreflexive the negation of reflexive? No!

Symmetry Symmetric: ∀𝑥, 𝑦∈𝐴, 𝑥𝑅𝑦→𝑦𝑅𝑥 Antisymmetric: ∀𝑥, 𝑦∈𝐴 with 𝑥≠𝑦, 𝑥𝑅𝑦→𝑦𝑅𝑥 equivalent: ∀𝑥, 𝑦∈𝐴, 𝑥𝑅𝑦∧ 𝑦𝑅𝑥→ 𝑥=𝑦

Transitivity Transitive: ∀𝑥,𝑦,𝑧∈𝐴, 𝑥𝑅𝑦∧𝑦𝑅𝑧→𝑥𝑅𝑧 Example of a relation that is transitive? Not transitive?

Practice identifying relation properties Never both ways if not same If one way then both All to self None to self if x->y->z, x->z Antisymmetric Reflexive Irreflexive Symmetric Transitive

Practice identifying relation properties Never both ways if not same If one way then both All to self None to self if x->y->z, x->z Antisymmetric Symmetric Reflexive Irreflexive Transitive “less than” “divides” “congruent mod k” “is square of”

Disproof of transitive Claim: “is square of” is not transitive. Definition: Relation 𝑅 on set 𝐴 is transitive iff ∀𝑥,𝑦,𝑧∈𝐴, 𝑥𝑅𝑦∧𝑦𝑅𝑧→𝑥𝑅𝑧 Emphasize writing down definition

Proof of antisymmetric Claim: “is square of” is antisymmetric. Definition: Relation 𝑅 on set 𝐴 is antisymmetric if ∀𝑥, 𝑦∈𝐴 with 𝑥≠𝑦, 𝑥𝑅𝑦→𝑦𝑅𝑥, or equivalently ∀𝑥, 𝑦∈𝐴, 𝑥𝑅𝑦∧ 𝑦𝑅𝑥→ 𝑥=𝑦 Note that second case is often more useful

Types of relations Partial order: reflexive, antisymmetric, transitive

Types of relations Linear order: partial order (reflexive, antisymmetric, transitive) in which every pair of elements is comparable: ∀𝑥,𝑦∈𝐴, (𝑥𝑅𝑦 or 𝑦𝑅𝑥)

Types of relations Strict partial order: irreflexive, antisymmetric, transitive

Types of relations Equivalence relation: reflexive, symmetric, transitive

Equivalence example Relation 𝐶 on 𝑅 2 : 𝑥,𝑦 𝐶(𝑎, 𝑏) iff 𝑥 2 + 𝑦 2 = 𝑎 2 + 𝑏 2 0,1 𝐶 contains all points on the unit circle

Proof of equivalence Claim: “congruent mod k” is an equivalence relation Definition: An equivalence relation is reflexive, symmetric, and transitive

The subset relation What kind of ordering is the subset () relation sets?

Types of relations Antisymmetric Symmetric Irreflexive Reflexive Transitive Partial Order Strict Partial Order Linear Order Equivalence Relation

Things to remember How to illustrate a relation graphically Be able to identify basic properties of relations: reflexivity, symmetry, transitivity Types of relations: partial order, strict partial order, linear order When proving (or disproving) a property of a relation, write down definition of relation and property

See you next week! Functions and more functions