22.02.2014 Views

Discrete Mathematics University of Kentucky CS 275 Spring ... - MGNet

Discrete Mathematics University of Kentucky CS 275 Spring ... - MGNet

Discrete Mathematics University of Kentucky CS 275 Spring ... - MGNet

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Representation: For graphs without multiple edges we can use adjacency lists or<br />

matrices. For general graphs we can use incidence matrices.<br />

Definition: Let G(V,E) have no multiple edges. The adjacency list L G = {a v } v,V ,<br />

where a v = adj(v) = {w,V | w is adjacent to v}.<br />

Definition: Let G(V,E) have no multiple edges. The adjacency matrix A G = [a ij ]<br />

is<br />

!<br />

a ij<br />

= 1 if {v i ,v # } is an edge <strong>of</strong> G,<br />

j<br />

"<br />

# 0 otherwise.<br />

Example:<br />

$<br />

v 1<br />

v 2<br />

v 4<br />

v 3<br />

results in A G<br />

=<br />

0 1 1 0<br />

1 0 0 1<br />

1 0 0 1<br />

0 1 1 0<br />

!<br />

#<br />

#<br />

#<br />

#<br />

#<br />

#<br />

"#<br />

$<br />

&<br />

&<br />

&<br />

&<br />

&<br />

&<br />

%&<br />

and L G<br />

=<br />

v 1<br />

:<br />

v 2<br />

:<br />

v 3<br />

:<br />

v 4<br />

:<br />

!<br />

#<br />

#<br />

"<br />

#<br />

#<br />

#<br />

$<br />

v 2<br />

,v 3<br />

v 1<br />

,v 4<br />

v 1<br />

,v<br />

.<br />

4<br />

v 2<br />

,v 3<br />

175<br />

Note: For an undirected graph, A G<br />

= A G T . However, this is not necessarily true<br />

for a directed graph.<br />

Definition: The incidence matrix M = [m ij ] for G(V,E) is<br />

!<br />

m ij<br />

= 1 when edge e i is incident with v j ,<br />

#<br />

"<br />

# 0 otherwise.<br />

$<br />

Definition: The simple graphs G(V,E) and H = (W,F) are isomorphic if there is<br />

an isomorphism f: V%W, a one to one, onto function, such that a and b are<br />

adjacent in G if and only if f(a) and f(b) are adjacent in H for all a,b,V.<br />

176

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!