Discrete Math (2) Haiming Chen Associate Professor, PhD

Slides:



Advertisements
Similar presentations
Representing Relations
Advertisements

CSE 211- Discrete Structures
Chapter 3. Relations Definitions Relations Binary relations Domain Range Vertex Direct edge Loops Reflective Relations Sympatric Relations Anti Symmetric.
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.
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.
1 Section 7.3 Representing relations (part 1: matrices)
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.
1 Representing Relations Part 2: directed graphs.
1 Representing Relations Epp section ??? CS 202 Aaron Bloomfield.
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
Properties of Relations In many applications to computer science and applied mathematics, we deal with relations on a set A rather than relations from.
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.
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.
CSC-2259 Discrete Structures
Discrete Structures1 You Never Escape Your… Relations.
Discrete Mathematics and Its Applications Sixth Edition By Kenneth Rosen Chapter 8 Relations 歐亞書局.
Computer Science: A Structured Programming Approach Using C Graphs A graph is a collection of nodes, called vertices, and a collection of segments,
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.
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.
Representing Relations Using Matrices A relation between finite sets can be represented using a zero-one matrix Suppose R is a relation from A = {a 1,
Chapter Relations and Their Properties
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.
Relations. L222 Agenda –Relations 7.3 Representing Relations As subsets of Cartesian products Column/line diagrams Boolean matrix Digraph Operations on.
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 7.3: Representing Relations In this section, we will cover two ways to represent a relation over a finite set other than simply listing the relation.
Section 9.3. Section Summary Representing Relations using Matrices Representing Relations using Digraphs.
Module Code MA1032N: Logic Lecture for Week Autumn.
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.
Representing Relations Using Digraphs
Discrete Mathematical
Relations and Their Properties
Relations.
Introduction to Relations
Relations Binary relations represent relationships between the elements of two sets. A binary relation R from set A to set B is defined by: R  A 
Relations Chapter 9.
Representing Relations
CSE115/ENGR160 Discrete Mathematics 04/28/11
CMSC Discrete Structures
Chapter 2 Sets Homework 3 Given U = { 1, 2, 3, 4, 5, 6, 7, 8, 9 } as a set universe and the sets : A = { 1, 2, 3, 4, 5 }, B = { 4, 5, 6, 7 }, C = { 5,
Discrete Math (2) Haiming Chen Associate Professor, PhD
Applied Discrete Mathematics Week 10: Equivalence Relations
Discrete Math (2) Haiming Chen Associate Professor, PhD
§7.3 Representing Relations Longin Jan Latecki
CS2210 Discrete Structures Relations
Discrete Math (2) Haiming Chen Associate Professor, PhD
Discrete Math (2) Haiming Chen Associate Professor, PhD
Discrete Math (2) Haiming Chen Associate Professor, PhD
10.1 Graphs and Graph Models
Representing Relations
CSE 321 Discrete Structures
Properties of Relations
Discrete Math (2) Haiming Chen Associate Professor, PhD
Combining relations via relational composition
§7.3 Representing Relations Longin Jan Latecki
Chapter 8 (Part 2): Relations
Agenda Lecture Content: Relations (Relasi)
Representing Relations Using Matrices
4.4 Properties of Relations
Presentation transcript:

Discrete Math (2) Haiming Chen Associate Professor, PhD Department of Computer Science, Ningbo University http://www.chenhaiming.cn

Representing Relations n-ary Relations table binary relations matrices directed graphs

Representing Relations Using Matrices Suppose that R is a relation from A = {a1, a2, . . . , am} to B = {b1, b2, . . . , bn}. MR = [mij ], i=1..m, j=1..n

Representing Relations Using Matrices

Representing Relations Using Matrices

Representing Relations Using Matrices a relation R on A is reflexive if (a, a) ∈ R whenever a ∈ A R is reflexive if and only if mii = 1, for i = 1, 2, . . . , n Note that the elements off the main diagonal can be either 0 or 1.

Representing Relations Using Matrices a relation R is symmetric if (a, b) ∈ R implies that (b, a) ∈ R R is symmetric if and only if mji = 1 whenever mij = 1,mji = 0 whenever mij = 0 R is symmetric if and only if mij = mji

Representing Relations Using Matrices

Representing Relations Using Matrices union and intersection of relations Boolean operations of matrices

Representing Relations Using Matrices

Representing Relations Using Matrices composite of relations

Representing Relations Using Matrices

Representing Relations Using Matrices

Representing Relations n-ary Relations table binary relations matrices directed graphs

Representing Relations Using Digraphs elements in set V  nodes ordered pairs of elements of V  arcs (a, b), (a, d), (b, b), (b, d), (c, a), (c, b), and (d, b) R = {(1, 3), (1, 4), (2, 1), (2, 2), (2, 3), (3, 1), (3, 3), (4, 1), (4, 3)}.

Representing Relations Using Digraphs

Representing Relations Using Digraphs Reflexive  loop at every node Symmetric  every edge between distinct vertices in its digraph there is an edge in the opposite direction Antisymmetric  there are never two edges in opposite directions between distinct vertices Transitive whenever there is an edge from a vertex x to a vertex y and an edge from a vertex y to a vertex z, there is an edge from x to z

Homework Page 596, Ex.2(a), 4(a), 14, 27, 32