Representing a Digraph with an Adjacency Matrix
G = ? V, E ?, V = { v1, v2, . . . , vn }, E = { e1, e2, . . . , em } ei = ? va(i), vb(i) ?
An adjacency matrix for G contains n rows and n columns.
A[i,j] = 1 if ? vi, vj ? ? E;
0 otherwise.
a b c d
a 0 1 1 1
b 0 0 0 0
c 0 0 0 1
d 0 0 1 0
c
d
a
b
Previous slide
Next slide
Back to first slide
View graphic version