Used Telecom Equipment: Adjacency Matrix of A Graph
Used Telecom Equipment: Adjacency Matrix of A Graph
1 of 4
http://people.revoledu.com/kardi/tutorial/GraphTheory/Adjacency-Mat...
Home
Numerical Excel Tutorial
Microscopic Pedestrian Simulation
Kardi Teknomo's Tutorial
Micro-PedSim Free Download
Personal Development Handbook
Research
Publications
Tutorials
Resume
Service
Resources
Contact
Used Telecom
Equipment
600000+ Multi-Vendor Parts
in Stock Global Supplier,
Request Free Quote
The graph family argues that one of the best ways to represent them into a matrix is by
counting the number of edge between two adjacent vertices.
Two vertices is said to be adjacent or neighbor if it support at least one common edge.
Let us start with example
Graph below has three vertices. Thus, we make adjacency matrix of size 3 by 3. Then we
put the name of vertices on the side of the matrix. Look at the picture and we start with an
empty matrix. Only the names of vertices are there
To fill the adjacency matrix, we look at the name of the vertex in row and column. If those
vertices are connected by an edge or more, we count number of edges and put this number
as matrix element.
2/05/2016 2:07 PM
2 of 4
http://people.revoledu.com/kardi/tutorial/GraphTheory/Adjacency-Mat...
Vertex and vertex has one common edge, we say that Vertex and vertex are
adjacent (neighbor). We input the number of edge in the matrix cell that correspond to
vertex
and vertex
Vertex and is adjacent by one edge. Thus, we input the number of edge in the matrix
cell that correspond to Vertex and .
Similarly, vertex
and
and
There is no other edge on the graph, thus we put the rest of unfilled cells in the matrix as
zero
The size of adjacency matrix is equal to the number of vertices in the graph. It is a square
matrix (that is the number of rows is equal to the number of columns).
The adjacency matrix of a graph is symmetric because it has no direction. Two vertices
share the same edge can be called from the first one to the second one, or from the second
one to the first one. For example, Vertex and vertex
element (a, b) = 1 and element (b, a) = 1.
Can you make the adjacency matrix of this graph? Try it first before you look at the answer
2/05/2016 2:07 PM
3 of 4
http://people.revoledu.com/kardi/tutorial/GraphTheory/Adjacency-Mat...
below.
The graph has 3 vertices, thus we make a matrix size 3 by 3. We put the name of vertices
on the side of the matrix.
and vertex
Since there is no other edge in the graph, we can fill the empty cell with zeros. Thus, we
have the answer
Some of you may ask about the diagonal part of the matrix, are these cells always zero? No,
if you find the graph has some loop in some vertices, you can fill the diagonal element of
adjacency matrix with the number of loop.
If a graph has some vertex that is not connected to any other vertices, the adjacency matrix
correspond to that single vertex is zero.
2/05/2016 2:07 PM
4 of 4
http://people.revoledu.com/kardi/tutorial/GraphTheory/Adjacency-Mat...
Given the adjacency matrix, can you draw back the graph?
2/05/2016 2:07 PM