0% found this document useful (0 votes)
6 views

Ch8_Matrices_Associated_with_Graphs

The document discusses the adjacency matrix and distance matrix associated with graphs, detailing their properties and providing exercises for understanding. It explains that the adjacency matrix is a square (0, 1)-matrix representing connections between vertices, while the distance matrix captures the shortest paths between them. Additionally, it covers the adjacency and distance matrices for directed graphs (digraphs) and includes examples and exercises for practice.

Uploaded by

2491178958
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Ch8_Matrices_Associated_with_Graphs

The document discusses the adjacency matrix and distance matrix associated with graphs, detailing their properties and providing exercises for understanding. It explains that the adjacency matrix is a square (0, 1)-matrix representing connections between vertices, while the distance matrix captures the shortest paths between them. Additionally, it covers the adjacency and distance matrices for directed graphs (digraphs) and includes examples and exercises for practice.

Uploaded by

2491178958
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 8

Graph Theory

MATRICES ASSOCIATED WITH GRAPHS


The Adjacency Matrix
• Let the vertices of G be labeled The adjacency matrix A(G) is the n x n
(0, 1)-matrix, where:

Since a vertex is never adjacent to itself, A(G) has 0s on the diagonal.


• Example: A graph and its adjacency matrix are displayed in the
following:
The Adjacency Matrix: Exercise
• Exercise 1:
a. From the graph G, construct A(G).
b. From the adjacency matrix A(H), construct the graph H.
The Adjacency Matrix: Properties
• An adjacency matrix A(G) for a simple graph G has the following
properties:
1) G is a square matrix, i.e., the number of rows in G equals to the
number of columns,
2) Since G does not have a loop, A(G) has 0s on the diagonal,
3) Each entry of A(G) is 0 or 1,
4) A(G) is symmetric, i.e., switching the rows and columns of A(G) gives
the same matrix,
5) The degree of ,
6) The degree of , where .
Properties of Adjacency Matrix:
Exercises
• Exercise 2: How many 1s exist in the adjacency matrix of ?

• Exercise 3: is a 3-regular graph with 6 vertices. What is the total sum of


diagonal entries for ?

• Exercise 4: How many 0s exist in the adjacency matrix of a tree with 7


edges?
The Distance Matrix
• The distance between , denoted is the length of the shortest path
connecting and . If G is connected, is finite for every pair . When G is
disconnected, for vertices in distinct components and is finite
otherwise. The distance matrix D(G) is the n x n matrix where . Note
also that . That is, the diagonal entries of D(G) are zero.
• Example: Find the distance matrix for the
following graphs:
The adjacency matrix of a digraph
• Let the vertices of the digraph G be labeled The adjacency matrix A(G)
is the n x n (0, 1)-matrix, where:

Since a vertex is never adjacent to itself, A(G) has 0s on the diagonal.


• Example: A digraph and its adjacency matrix are displayed in the
following:
The Distance Matrix of a digraph
• The distance matrix D(G) of a digraph G has equal to the length of the
shortest directed path from to (in a directed path, one must follow
the direction of the arrows on the arcs). Note that if there is no
directed path from to .
• Example: Find D(G) of the following diagraph:

You might also like