CSC-2259 Discrete Structures

Slides:



Advertisements
Similar presentations
Representing Relations Rosen 7.3. Using Matrices For finite sets we can use zero-one matrices. Elements of each set A and B must be listed in some particular.
Advertisements

CSE115/ENGR160 Discrete Mathematics 04/26/12 Ming-Hsuan Yang UC Merced 1.
8.3 Representing Relations Connection Matrices Let R be a relation from A = {a 1, a 2,..., a m } to B = {b 1, b 2,..., b n }. Definition: A n m  n connection.
Basic Properties of Relations
Representing Relations Using Matrices
5/16/20151 You Never Escape Your… Relations. 5/16/20152Relations If we want to describe a relationship between elements of two sets A and B, we can use.
8.4 Closures of Relations. Intro Consider the following example (telephone line, bus route,…) abc d Is R, defined above on the set A={a, b, c, d}, transitive?
CS2210(22C:19) Discrete Structures Relations Spring 2015 Sukumar Ghosh.
Costas Busch - RPI1 Single Final State for NFAs. Costas Busch - RPI2 Any NFA can be converted to an equivalent NFA with a single final state.
Fall 2006Costas Busch - RPI1 Regular Expressions.
CSE115/ENGR160 Discrete Mathematics 04/24/12 Ming-Hsuan Yang UC Merced 1.
Fall 2004COMP 3351 Single Final State for NFA. Fall 2004COMP 3352 Any NFA can be converted to an equivalent NFA with a single final state.
Costas Busch - RPI1 Mathematical Preliminaries. Costas Busch - RPI2 Mathematical Preliminaries Sets Functions Relations Graphs Proof Techniques.
Courtesy Costas Busch - RPI1 Mathematical Preliminaries.
Theoretical Computer Science COMP 335 Fall 2004
Fall 2004COMP 3351 Regular Expressions. Fall 2004COMP 3352 Regular Expressions Regular expressions describe regular languages Example: describes the language.
Chapter 9 1. Chapter Summary Relations and Their Properties n-ary Relations and Their Applications (not currently included in overheads) Representing.
Applied Discrete Mathematics Week 10: Equivalence Relations
© by Kenneth H. Rosen, Discrete Mathematics & its Applications, Sixth Edition, Mc Graw-Hill, 2007 Chapter 8: Relations Relations(8.1) n-any Relations &
Chapter Relations and Their Properties 8.2 n-ary Relations and Their Applications 8.3 Representing Relations 8.4 Closures of Relations 8.5 Equivalence.
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∩
Advanced Counting Techniques CSC-2259 Discrete Structures Konstantin Busch - LSU1.
CS Discrete Mathematical Structures Mehdi Ghayoumi MSB rm 132 Ofc hr: Thur, 9:30-11:30a Fall 2002KSU - Discrete Structures1.
April 10, 2002Applied Discrete Mathematics Week 10: Relations 1 Counting Relations Example: How many different reflexive relations can be defined on a.
Chapter 9. Chapter Summary Relations and Their Properties Representing Relations Equivalence Relations Partial Orderings.
Chapter 9. Chapter Summary Relations and Their Properties n-ary Relations and Their Applications (not currently included in overheads) Representing Relations.
Unit Unit 04 Relations IT DisiciplineITD1111 Discrete Mathematics & Statistics STDTLP1 Unit 4 Relations.
Discrete Math for CS Binary Relation: A binary relation between sets A and B is a subset of the Cartesian Product A x B. If A = B we say that the relation.
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.
Mathematical Preliminaries. Sets Functions Relations Graphs Proof Techniques.
Fall 2005Costas Busch - RPI1 Mathematical Preliminaries.
Prof. Busch - LSU1 Mathematical Preliminaries. Prof. Busch - LSU2 Mathematical Preliminaries Sets Functions Relations Graphs Proof Techniques.
Discrete Structures1 You Never Escape Your… Relations.
Prof. Busch - LSU1 NFAs accept the Regular Languages.
Discrete Mathematics and Its Applications Sixth Edition By Kenneth Rosen Chapter 8 Relations 歐亞書局.
Chapter 7: Relations Relations(7.1) Relations(7.1) n-any Relations & their Applications (7.2) n-any Relations & their Applications (7.2)
Advanced Counting Techniques CSC-2259 Discrete Structures Konstantin Busch - LSU1.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Relations.
Discrete Mathematics Relation.
Relations and their Properties
Fall 2002CMSC Discrete Structures1 You Never Escape Your… Relations.
Relations. Important Definitions We covered all of these definitions on the board on Monday, November 7 th. Definition 1 Definition 2 Definition 3 Definition.
1 Chapter Equivalence, Order, and Inductive Proof.
Lecture on Relations 1Developed by CSE Dept., CIST Bhopal.
Relation. Combining Relations Because relations from A to B are subsets of A x B, two relations from A to B can be combined in any way two sets can be.
Discrete Structures – CNS2300
Chapter 9. Chapter Summary Relations and Their Properties n-ary Relations and Their Applications (not currently included in overheads) Representing Relations.
Regular Expressions Costas Busch - LSU.
Chapter Relations and Their Properties
1 Section 4.1 Properties of Binary Relations A binary relation R over a set A is a subset of A  A. If (x, y)  R we also write x R y. Example. Some sample.
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.
8.4 Closures of Relations Definition: The closure of a relation R with respect to property P is the relation obtained by adding the minimum number of.
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), (
Section 9.3. Section Summary Representing Relations using Matrices Representing Relations using Digraphs.
Section 9.1. Section Summary Relations and Functions Properties of Relations Reflexive Relations Symmetric and Antisymmetric Relations Transitive Relations.
Binary Relation: A binary relation between sets A and B is a subset of the Cartesian Product A x B. If A = B we say that the relation is a relation on.
Relations Chapter 9.
Representing Relations
CSNB 143 Discrete Mathematical Structures
Mathematical Structures for Computer Science Chapter 6
CMSC Discrete Structures
Applied Discrete Mathematics Week 10: Equivalence Relations
Single Final State for NFA
Mathematical Preliminaries
CSE 321 Discrete Structures
Properties of Relations
Discrete Math (2) Haiming Chen Associate Professor, PhD
Agenda Lecture Content: Relations (Relasi)
Representing Relations Using Matrices
Presentation transcript:

CSC-2259 Discrete Structures Relations CSC-2259 Discrete Structures Konstantin Busch - LSU

Relations and Their Properties A binary relation from set to is a subset of Cartesian product Example: A relation: Konstantin Busch - LSU

A relation on set is a subset of Example: A relation on set : Konstantin Busch - LSU

Reflexive relation on set : Example: Konstantin Busch - LSU

Symmetric relation : Example: Konstantin Busch - LSU

Antisymmetric relation : Example: Konstantin Busch - LSU

Transitive relation : Example: Konstantin Busch - LSU

Combining Relations Konstantin Busch - LSU

Composite relation: Note: Example: Konstantin Busch - LSU

Power of relation: Example: Konstantin Busch - LSU

A relation is transitive if an only if for all Theorem: A relation is transitive if an only if for all Proof: 1. If part: 2. Only if part: use induction Konstantin Busch - LSU

Definition of composition: 1. If part: We will show that if then is transitive Assumption: Definition of power: Definition of composition: Therefore, is transitive Konstantin Busch - LSU

We will show that if is transitive then for all 2. Only if part: We will show that if is transitive then for all Proof by induction on Inductive basis: It trivially holds Konstantin Busch - LSU

Inductive hypothesis: Assume that for all Konstantin Busch - LSU

Inductive step: We will prove Take arbitrary We will show Konstantin Busch - LSU

End of Proof definition of power definition of composition inductive hypothesis is transitive End of Proof Konstantin Busch - LSU

n-ary relations An n-ary relation on sets is a subset of Cartesian product Example: A relation on All triples of numbers with Konstantin Busch - LSU

(all entries are different) Relational data model n-ary relation is represented with table fields R: Teaching assignments Professor Department Course-number Cruz Zoology 335 412 Farber Psychology 501 617 Rosen Comp. Science 518 Mathematics 575 records primary key (all entries are different) Konstantin Busch - LSU

keeps all records that satisfy condition Selection operator: keeps all records that satisfy condition Example: Result of selection operator Professor Department Course-number Farber Psychology 501 617 Konstantin Busch - LSU

Keeps only the fields of Projection operator: Keeps only the fields of Example: Professor Department Cruz Zoology Farber Psychology Rosen Comp. Science Mathematics Konstantin Busch - LSU

Concatenates the records of and where the last fields of Join operator: Concatenates the records of and where the last fields of are the same with the first fields of Konstantin Busch - LSU

S: Class schedule Department Course-number Room Time Comp. Science 518 2:00pm Mathematics 575 N502 3:00pm 611 4:00pm Psychology 501 A100 617 A110 11:00am Zoology 335 9:00am 412 8:00am Konstantin Busch - LSU

J2(R,S) Professor Department Course Number Room Time Cruz Zoology 335 9:00am 412 8:00am Farber Psychology 501 3:00pm 617 A110 11:00am Rosen Comp. Science 518 N521 2:00pm Mathematics 575 N502 Konstantin Busch - LSU

Representing Relations with Matrices Relation Matrix Konstantin Busch - LSU

Reflexive relation on set : Diagonal elements must be 1 Example: Konstantin Busch - LSU

Matrix is equal to its transpose: Symmetric relation : Matrix is equal to its transpose: Example: For all Konstantin Busch - LSU

Antisymmetric relation : Example: For all Konstantin Busch - LSU

Union : Intersection : Konstantin Busch - LSU

Boolean matrix product Composition : Boolean matrix product Konstantin Busch - LSU

Boolean matrix product Power : Boolean matrix product Konstantin Busch - LSU

Digraphs (Directed Graphs) Konstantin Busch - LSU

there is a path of length from to in Theorem: if and only if there is a path of length from to in Konstantin Busch - LSU

Connectivity relation: if and only if there is some path (of any length) from to in Konstantin Busch - LSU

Theorem: Proof: if then for some Repeated node Konstantin Busch - LSU

Closures and Relations Reflexive closure of : Smallest size relation that contains and is reflexive Easy to find Konstantin Busch - LSU

Smallest size relation that contains and is symmetric Symmetric closure of : Smallest size relation that contains and is symmetric Easy to find Konstantin Busch - LSU

Transitive closure of : Smallest size relation that contains and is transitive More difficult to find Konstantin Busch - LSU

is the transitive Closure of Theorem: is the transitive Closure of is transitive Proof: Part 1: Part 2: If and is transitive Then Konstantin Busch - LSU