Relationship between Graph Theory and Linear Algebra

advertisement
Relationship between Graph
Theory and Linear Algebra
By
Shannon Jones
Outline
• Overview of Graph Theory
• Linear Algebra in Graph Theory
• Application of Adjacency Matrices in
Graph Theory
• Application of Adjacency Matrices in
Network Graph Analysis
Overview
• Graph Theory
– Vertices V(G)
– Edges E(G)
Linear Algebra in Graph
Theory
• Linear Algebra
– study of linear sets of equations and their
transformation properties.
– Matrices
– Isomorphism
Linear Algebra in Graph
Theory
Matrices of a Graph
– Matrix
– Adjacency Matrix
Linear Algebra in Graph
Theory
• Adjacency Matrix- The adjacency matrix for a simple
graph G, denoted A(G), is defined as the symmetric matrix whose
rows and columns are both indexed by identical ordering of V(G),
such that A(G)[u,v] = 1 if u and v are adjacent, otherwise A(G)[u,v]=
0.
•
Ex:
G=
A(G)=
u
x
w
v
u
v
w
x
u
0
1
1
0
v
1
0
1
0
w
1
1
0
1
x
0
0
1
0
Linear Algebra in Graph
Theory
• Adjacency Matrix- The adjacency matrix of a simple digraph
D, denoted A(D), is the matrix whose rows and columns are both indexed by
identical orderings of V(G), such that A(D)[u,v]= 1 if there is an edge from u
to v, otherwise A(D)[u,v]= 0.
•
Ex:
G=
A(G)=
u
x
W
v
u
v
w
x
u
0
1
0
0
v
0
0
1
0
w
1
0
0
0
x
0
0
1
0
Application of Adjacency
Matrices in Graph Theory
• Graph Isomorphism
– Same adjacency matrix = isomorphic
– Different adjacency matrix = may not be isomorphic
– Ex:
w
y
x
z
– Rearrange A(G)-
w
z
x
y
w
0
0
1
1
w
0
1
1
0
y
1
0
0
1
x
1
0
0
1
z
0
0
1
1
x
1
1
0
0
y
1
1
0
0
z
0
1
1
0
a
b
c
d
a
0
0
1
1
b
0
0
1
1
c
1
1
0
0
d
1
1
0
0
Application of Adjacency
Matrices in Graph Theory
• Walks
– A sequence of alternating vertices and edges
– Let G be a graph with adjacency matrix A(G). The value of
element (A(G))^r [u,v] of the rth power of matrix A(G) equals the
number of u-v walks of length r (or directed walks of length r for a
digraph).
Application of Adjacency
Matrices in Graph Theory
• Walks
u
• Ex:
G=
x
w
v
u
A(G)= v
w
x
u
0
1
1
0
v
1
0
1
0
w
1
1
0
1
x
0
0 A(G)²=
1
0
u
v
w
x
u
2
1
1
1
v
1
2
1
1
w
1
1
3
0
x
1
1
0
1
u
A(G)³= v
w
x
u
2
3
4
1
v
3
2
4
1
w
4
4
2
3
x
1
1
3
0
Application of Adjacency
Matrices in Network Graph
Analysis
• Social Network Graph
– Vertices = people
– Edges = relationship between two people
• “married to”, “friends with”, “related to”
– Corresponding adjacency matrix
Application of Adjacency
Matrices in Network Graph
Analysis
• Social Network Graph
• Degree Centrality
Carol
Ted
Bob
Alice
Bob Carol Ted Alice
Bob
0
1
1
0
Carol 1
0
1
0
Ted
1
1
0
1
Alice 0
0
1
0
Application of Adjacency
Matrices in Network Graph
Analysis
• Social Network Graph
• Directed Graph
Carol
Ted
Bob
Alice
Bob Carol Ted Alice
Bob
0
1
1
0
Carol 0
0
1
0
Ted
1
1
0
0
Alice 0
0
1
0
Application of Adjacency
Matrices in Network Graph
Analysis
• Social Network Graph Adjacency Matrix
– Matrix Operations
• Transpose- rows and columns exchange = the
measure of degrees of the reciprocity of ties within
the graph
• Inverse- (original)(inverse)= identity
• Addition and Subraction
Application of Adjacency
Matrices in Network Graph
Analysis
• Social Network Graph Adjacency Matrix
– Key Matrix Operation
• Powers of the Adjacency Matrix
– number of walks of different lengths between people
– connectivity of a person in the graph
Application of Adjacency
Matrices in Network Graph
Analysis
• Social Network Graph Adjacency Matrix
– Key Matrix Operation
• Powers of the Adjacency Matrix
2
3
7
G=
10
H=
2
3
1
6
4
8
1
9
5
6
4
5
7
2
A(G)
A(G)²
1
2
3
4
5
6
7
1
0
1
1
1
1
1
1
2
1
0
0
0
0
0
0
3
1
0
0
0
0
0
0
4
1
0
0
0
0
0
0
1
2
3
4
5
6
7
1
6
0
0
0
0
0
0
2
0
1
1
1
1
1
1
3
0
1
1
1
1
1
1
4
0
1
1
1
1
1
1
5
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
– Marketers
– Social Network Websites
Sources
Chartrand, Gary, and Gary Chartrand. Introductory Graph Theory. New York: Dover, 1985.
Hanneman, Robert A., and Mark Riddle. Introduction to Social Network Methods. Riverside:
University of California, 2005. Web. 28 Apr.
2011. <http://faculty.ucr.edu/~hanneman/nettext/index.html>.
Farmer, Jesse. "Graph Theory: Part III (Facebook)." 20bits. Web. 28 Apr. 2011.
<http://20bits.com/articles/graph-theory-part-iii-facebook/>.
"Graph." Wolfram MathWorld: The Web's Most Extensive Mathematics Resource. Wolfram
Research, Inc., 1999. Web. 28 Apr. 2011. <http://mathworld.wolfram.com/Graph.html>.
Gross, Jonathan L., and Jay Yellen. Graph Theory and Its Applications. Boca Raton: Chapman &
Hall/CRC, 2006.
"Linear Algebra." Wolfram MathWorld: The Web's Most Extensive Mathematics
Resource. Wolfram
Research, Inc., 1999. Web. 28 Apr.
2011. <http://mathworld.wolfram.com/LinearAlgebra.html>.
West, Douglas Brent. Introduction to Graph Theory. Upper Saddle River, NJ: Prentice Hall,
1996.
Download