CSE 311 Foundations of Computing I Lecture 19 Relations Autumn 2011 CSE 3111.

Slides:



Advertisements
Similar presentations
Reflexive example: AB = AB Symmetric example: AB = BA
Advertisements

CSE 311 Foundations of Computing I
Discrete Mathematics Relations
Basic Properties of Relations
Discrete Mathematics Lecture # 16 Inverse of Relations.
My Academic Genealogy. Kevin Shang UC Irvine 2002 Jeannette Song Columbia Univ Paul Zipkin Yale Univ
Ch. 8: Relations 8.1 Relations and their Properties.
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.
CSE115/ENGR160 Discrete Mathematics 04/24/12 Ming-Hsuan Yang UC Merced 1.
CSE 311 Foundations of Computing I Autumn 2011 Lecture 1 Propositional Logic.
Discrete Mathematics Richard Anderson University of Washington 7/1/20081IUCEE: Discrete Mathematics.
1 Section 7.1 Relations and their properties. 2 Binary relation A binary relation is a set of ordered pairs that expresses a relationship between elements.
3-4 Algebra Properties Used in Geometry The properties of operations of real numbers that you used in arithmetic and algebra can be applied in geometry.
© by Kenneth H. Rosen, Discrete Mathematics & its Applications, Sixth Edition, Mc Graw-Hill, 2007 Chapter 8: Relations Relations(8.1) n-any Relations &
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.
1 Relations Rosen 6 th ed., § Relations Re lationships between elements of sets occur in many contextsRe lationships between elements of sets occur.
CSE 311 Foundations of Computing I Lecture 23 Finite State Machines Autumn 2012 CSE 3111.
Unit Unit 04 Relations IT DisiciplineITD1111 Discrete Mathematics & Statistics STDTLP1 Unit 4 Relations.
Relations and Their Properties
Gottfried Wilhelm Von Leibniz July 1, November14, 1716 Tabitha B. Sondra F.
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.
Sets Define sets in 2 ways  Enumeration  Set comprehension (predicate on membership), e.g., {n | n  N   k  k  N  n = 10  k  0  n  50} the set.
1 Relations and Their Properties Rosen, section 7.1 CS/APMA 202 Aaron Bloomfield.
Properties and Mental Computation p. 80. Math talk What are some math properties that we use? Why do you think we have them? Do you ever use them?
Chapter 7: Relations Relations(7.1) Relations(7.1) n-any Relations & their Applications (7.2) n-any Relations & their Applications (7.2)
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Relations.
Discrete Mathematics Relation.
CSE 311: Foundations of Computing Fall 2014 Lecture 20: Relations and Directed Graphs.
Relations and their Properties
CSE 311 Foundations of Computing I Lecture 22 Relations, Database Autumn 2012 CSE TexPoint fonts used in EMF. Read the TexPoint manual before you.
CSE 311 Foundations of Computing I Lecture 27 FSM Limits, Pattern Matching Autumn 2012 CSE
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.
Discrete Mathematics Lecture # 15 Types of Relations (contd.)
CSE 311 Foundations of Computing I Lecture 20 Relations, Graphs, Finite State Machines Autumn 2011 CSE 3111 TexPoint fonts used in EMF. Read the TexPoint.
Discrete Structures – CNS2300
Chapter Relations and Their Properties
Jost Burgi ( Jost Burgi ( Geronimo Cardano ( )
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), (
CSE 311 Foundations of Computing I Lecture 19 Recursive Definitions: Context-Free Grammars and Languages Spring
Scientific Revolution NamePeriod # Information Front Back.
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.
Relations and Their Properties
Family Grandfather Grandmother Mother Father Aunt Uncle Sister Brother
RELATION KS MATEMATIKA DISKRIT (DISCRETE MATHEMATICS )
Relations and Their Properties
CSE 504 Discrete Structures & Foundations of Computer Science
CSE 311 Foundations of Computing I
Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103 Chapter 9 Relations Slides are adopted from.
Applied Discrete Mathematics Week 9: Equivalence Relations
CSE 311 Foundations of Computing I
Relations and Their Properties
8.1 Relations and Their Properties
Xuan Guo Lab 12 Xuan Guo
Equivalence Relations
CSE 311 Foundations of Computing I
Relations: representation and closures
Applied Discrete Mathematics Week 5: Boolean Algebra
CSE 321 Discrete Structures
Relations and their Properties
CSE 321 Discrete Structures
CSE 311: Foundations of Computing
CSE 321 Discrete Structures
Mathematical Background
Discrete Math (2) Haiming Chen Associate Professor, PhD
Complete the following sentences with the name of the relative.
Agenda Lecture Content: Relations (Relasi)
Presentation transcript:

CSE 311 Foundations of Computing I Lecture 19 Relations Autumn 2011 CSE 3111

Announcements Reading assignments – 7 th Edition, Section 9.1 and pp – 6 th Edition, Section 8.1 and pp – 5 th Edition, Section 7.1 and pp Upcoming topics – Relations – Finite State Machines Autumn 2011CSE 3112

Definition of Relations Let A and B be sets, A binary relation from A to B is a subset of A  B Let A be a set, A binary relation on A is a subset of A  A

Relation Examples R 1 = {(a, 1), (a, 2), (b, 1), (b, 3), (c, 3)} R 2 = {(x, y) | x ≡ y (mod 5) } R 3 = {(c 1, c 2 ) | c 1 is a prerequisite of c 2 } R 4 = {(s, c) | student s had taken course c } Autumn 2011CSE 3114

Properties of Relations Let R be a relation on A R is reflexive iff (a,a)  R for every a  A R is symmetric iff (a,b)  R implies (b, a)  R R is antisymmetric iff (a,b)  R and a  b implies (b,a)  R R is transitive iff (a,b)  R and (b, c)  R implies (a, c)  R /

Combining Relations Let R be a relation from A to B Let S be a relation from B to C The composite of R and S, S  R is the relation from A to C defined S  R = {(a, c) |  b such that (a,b)  R and (b,c)  S}

Examples (a,b)  Parent: b is a parent of a (a,b)  Sister: b is a sister of a What is Sister  Parent? What is Parent  Sister? S  R = {(a, c) |  b such that (a,b)  R and (b,c)  S}

Examples Using the relations: Parent, Child, Brother, Sister, Sibling, Father, Mother, Husband, Wife express - Uncle: b is an uncle of a Cousin: b is a cousin of a

Powers of a Relation R 2 = R  R = {(a, c) |  b such that (a,b)  R and (b,c)  R} R 0 = {(a,a) | a  A} R 1 = R R n+1 = R n  R

How is Anderson related to Bernoulli?

Autumn 2011CSE

BauerCaratheodoryMinkowski Klein LipschitzDirichletFourier LagrangeEuler Johann BernoulliJacob BernoulliLeibniz RheticusCopernicus Anderson Weigel Mayr

Beame CookQuineWhiteheadHopkins SedgewickSmith NewtonBarrowGalileo

Nicolaus Copernicus Georg Rheticus Moritz Steinmetz Christoph Meurer Philipp Muller Erhard Weigel Gottfried Leibniz Noclas Malebranache Jacob Bernoulli Johann Bernoulli Leonhard Euler Joseph Lagrange Jean-Baptiste Fourier Gustav Dirichlet Rudolf Lipschitz Felix Klein C. L. Ferdinand Lindemann Herman Minkowski Constantin Caratheodory Georg Aumann Friedrich Bauer Manfred Paul Ernst Mayr Richard Anderson Galileo Galilei Vincenzo Viviani Issac Barrow Isaac Newton Roger Cotes Robert Smith Walter Taylor Stephen Whisson Thomas Postlethwaite Thomas Jones Adam Sedgewick William Hopkins Edward Routh Alfred North Whitehead Willard Quine Hao Wang Stephen Cook Paul Beame

n-ary relations Let A 1, A 2, …, A n be sets. An n-ary relation on these sets is a subset of A 1  A 2 ...  A n.

Relational databases Student_NameID_NumberMajorGPA Knuth CS4.00 Von Neuman CS3.78 Von Neuman Mathematics3.78 Russell Philosophy3.85 Einstein Physics2.11 Newton Mathematics3.61 Karp CS3.98 Newton Physics3.61 Bernoulli Mathematics3.21 Bernoulli Mathematics3.54

Alternate Approach Student_IDNameGPA Knuth Von Neuman Russell Einstein Newton Karp Bernoulli Bernoulli3.54 Student_IDMajor CS CS Mathematics Philosophy Physics Mathematics CS Physics Mathematics Mathematics

Database Operations Projection Join Select