4.3 Paths in Relations and Digraphs

Slides:



Advertisements
Similar presentations
Matrix.
Advertisements

Lesson 12.2 Matrix Multiplication. 3 Row and Column Order The rows in a matrix are usually indexed 1 to m from top to bottom. The columns are usually.
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.
Planes & Points Introduction Student Activity 1 New words Using ruler and join up points A and B, and let your pencil go beyond the two points at each.
Representing Relations Using Matrices
Fig. 16-CO, p Fig. 16-1, p. 450 Fig. 16-2, p. 450.
Matrix Multiplication To Multiply matrix A by matrix B: Multiply corresponding entries and then add the resulting products (1)(-1)+ (2)(3) Multiply each.
Discrete Math for CS Chapter 8: Directed Graphs. Discrete Math for CS digraph: A digraph is a graph G = (V,E) where V is a finite set of vertices and.
Finding the Inverse of a Matrix
Table of Contents Matrices - Multiplication Assume that matrix A is of order m  n and matrix B is of order p  q. To determine whether or not A can be.
Applied Discrete Mathematics Week 10: Equivalence Relations
Chapter 2 Graph Algorithms.
GRAPH THEORY.  A graph is a collection of vertices and edges.  An edge is a connection between two vertices (or nodes).  One can draw a graph by marking.
Proportion Ratio: A comparison of two numbers or two like quantities by division Rate: A ratio that compares quantities of different units Equivalent Ratios:
Warm-Up 1) 2) 3) 4) Name the dimensions. Quiz – you may not use your notes 1) 2) 3) 4) Name the dimensions Check your work!! Watch out for careless errors.
Chapter 4 Relations and Digraphs
This is to certify that this project is done by by themselves during their training period from 30/11/2005 TO 21/12/2005 at S.M.V.HSS,Trivandrum CERTIFICATE.
Lecture 14 Relations CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.
Chapter 4 sections 1 and 2.  Fig. 1  Not connected  All vertices are even.  Fig. 2  Connected  All vertices are even.
Multiply the following two polynomials: (x + 3)(x+3). x + 3 x2x2.
Overview Definitions Basic matrix operations (+, -, x) Determinants and inverses.
Matrix Determinants and Inverses
Ch X 2 Matrices, Determinants, and Inverses.
1 C ollege A lgebra Systems and Matrices (Chapter5) 1.
If A and B are both m × n matrices then the sum of A and B, denoted A + B, is a matrix obtained by adding corresponding elements of A and B. add these.
3.6 – Multiply Matrices The product of two matrices A and B is defined provided the number of columns in A is equal to the number of rows in B. If A is.
Computing the chromatic number for block intersection graphs of Latin squares Ed Sykes CS 721 project McMaster University, December 2004 Slide 1.
Aim: What is the summation notation?
Discrete Mathematics Relation.
Relations and their Properties
Unit 1 Part 3 Segment Addition & Distance and Midpoint Formulas.
Meeting 18 Matrix Operations. Matrix If A is an m x n matrix - that is, a matrix with m rows and n columns – then the scalar entry in the i th row and.
Vocabulary and Representations of Graphs. NC Standard Course of Study Competency Goal 1: The learner will use matrices and graphs to model relationships.
4.5 Matrices, Determinants, Inverseres -Identity matrices -Inverse matrix (intro) -An application -Finding inverse matrices (by hand) -Finding inverse.
CSNB143 – Discrete Structure Topic 7 – Relations Part II.
Graphs A ‘Graph’ is a diagram that shows how things are connected together. It makes no attempt to draw actual paths or routes and scale is generally inconsequential.
8.2 Operations With Matrices
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.
Problem Statement How do we represent relationship between two related elements ?
4. Relations and Digraphs Binary Relation Geometric and Algebraic Representation Method Properties Equivalence Relations Operations.
Matrices and Determinants
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.
MATRIX A set of numbers arranged in rows and columns enclosed in round or square brackets is called a matrix. The order of a matrix gives the number of.
2.5 – Determinants and Multiplicative Inverses of Matrices.
Section 9.3. Section Summary Representing Relations using Matrices Representing Relations using Digraphs.
Graphs and Matrices Spring 2012 Mills College Dan Ryan Lecture Slides by Dan Ryan is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike.
Shortest Path -Prim’s -Djikstra’s. PRIM’s - Minimum Spanning Tree -A spanning tree of a graph is a tree that has all the vertices of the graph connected.
Chapter8 Relations 8.1: Relations and their properties.
4-2 Multiplying Matrices Warm Up Lesson Presentation Lesson Quiz
13.4 Product of Two Matrices
Matrices and Matrix Operations
Relations and Digraphs
Finding the Inverse of a Matrix
Dr. Ameria Eldosoky Discrete mathematics
Multiplying Matrices GSE Accelerated Pre-Calculus Keeper 2.
Matrix Multiplication
CSNB 143 Discrete Mathematical Structures
8.1 Exploring Ratio and Proportion
Single Source Shortest Paths Bellman-Ford Algorithm
Matrices and Matrix Operations
Matrix Algebra.
3.5 Perform Basic Matrix Operations
Dimensions matching Rows times Columns
3.6 Multiply Matrices.
Chapter 4 Matrices & Determinants
1.1 Getting Started Terms to know!.
Graph Vocabulary.
Design matrix Run A B C D E
GRAPHS.
4.4 Properties of Relations
Presentation transcript:

4.3 Paths in Relations and Digraphs

A path of a finite sequence is denoted: π 1 : 1, 2, 4 π 2: 2,4,3 π 1 : 1, 2, 4 π 2: 2,4,3 A path that begins and ends at the same vertex is called a cycle. 5, 1, 2, 5 1 2 3 5 4

R = {(a,a), (a,b),(b,c), (c,e), (c,d), (d,e)} A = {a,b,c,d,e} B = A R = {(a,a), (a,b),(b,c), (c,e), (c,d), (d,e)} Reachability Relation: R2 shows line connections of length 2. Vertex a has a relation path to vertex a of length 2. a R2a since a R a and a R a a R2 b since a R a and a R b a R2 c since a R b and b R c b R2 d since b R c and c R d c R2 e since c R d and d R e Notice e doesn’t have any out going arrows. R2 = {(a,a),(a,b),(a,c),(b.e),(b,d),(c,e)} b a d c e

The connectivity relation of R is denoted R (infinity symbol) , meaning all paths that are possible. Looking at all starting and ending points, based on the arrows (a,a), (a,b), (a,c), (a,d), (a,e), (b,c),(b,d),(b,e), (c,d),(c,e), (d,e)

The matrix of the relation squared: MR2 = MR MR The matrix of a line connecting verticies of length 2 in a relation is equal to the matrix of the relation times the matrix of the relation. Just multiply it itself.

Example: R = {(a,a),(a,b),(b,c),(c,e),(c,d),(d,e)} Row a of the first matrix times column a of the second matirx: (1 ∧ 1) ∨ (1 ∧ 0) ∨(0 ∧ 0) ∨ (0 ∧ 0) ∨ (0 ∧ 0) Result is shown in (a,a) If we have anywhere in our Comparison, 1 ∧ 1, we know our Result will be 1. Continue to multiply each row with = each column. R2 = {(a,a),(a,b),(a,c),(b,d),(b,e),(c,e)} a b c d e 1 a b c d e 1 a b c d e 1

The composition of π 1 and π 2 is written π 1 π 2 2 Paths π 1 : 1, 2, 3 π 2: 3,5,6,2,4 The composition of π 1 and π 2 is written π 1 π 2 π 1 π 2 = 1,2,3,5,6,2,4 From starting point 1 to ending point 4, is length 6 Notice you only write 3 once because 3 is the ending point of the first path and the starting point of the second path. 1 2 3 4 5 6