Download Application: directed graphs

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Matrix multiplication wikipedia , lookup

System of linear equations wikipedia , lookup

Four-vector wikipedia , lookup

Orthogonal matrix wikipedia , lookup

Gaussian elimination wikipedia , lookup

Transcript
Application: directed graphs
1
2
1
• Graphs appear in network analysis
(e.g. internet) or circuit analysis.
• arrow indicates direction of flow
• no edges from a node to itself
2
3
• at most one edge between nodes
3
4
5
4
Definition 1. Let G be a graph with m edges and n nodes.
The edge-node incident matrix of G is the m × n matrix A with

 −1, if edge i leaves node j ,
Ai,j = +1, if edge i enters node j ,

0, otherwise.
Example 2. Give the edge-node incidence matrix of our graph.
Solution.
Meaning of the null space
The x in Ax is assigning values to each node.
You may think of assigning potentials to each node.

So: Ax = 0
Armin Straub
[email protected]


0 =


−1 1
0
−1 0
1
0 −1 1
0 −1 0
0
0 −1
0
0
0
1
1



x
1

 x2 


 x3 =

x4
1
For our graph: Nul(A) is spanned by
This always happens as long as the graph is connected.
Example 3. Give a basis for Nul(A) for the following graph.
1
2
3
4
Solution.
In general:
dim Nul(A) is
For large graphs, disconnection may not be apparent visually.
But we can always find out by computing dim Nul(A) using Gaussian elimination!
Meaning of the left null space
The y in y TA is assigning values to each edge.
You may think of assigning currents to

−1 1
0
 −1 0
1

A =
0
−1
1

 0 −1 0
0
0 −1


−1 −1 0
0
0 

 1
0 −1 −1 0 



 0
1
1
0 −1 

0
0
0
1
1

So: ATy = 0
y1
y2
y3
y4
y5
each edge.


0

0 

T 
0 
, A =
1 
1


−1 −1 0
0
0
1
0 −1 −1 0 

0
1
1
0 −1 
0
0
0
1
1
1
1


=


2
2
3
3
4
5
4
This is Kirchhoff’s first law.
What is the simplest way to balance current?
Armin Straub
[email protected]
2
Example 4. Suppose we did not “see” this.
Let us solve ATy = 0 for our graph:

−1 −1 0 0 0
 1 0 −1 −1 0

 0 1 1 0 −1
0 0 0 1 1




In general:
dim Nul(AT ) is
Meaning of the column space
• FTLA: b is in Col(A)
b is orthogonal to Nul(AT )
• Just found: Nul(AT ) has basis
Hence, b is in Col(A) if and only if
x assigns potentials to each node.
1
2
1
Then: Ax are potential differences.
Ax = b is solvable if the potential differences b satisfy the
constraints coming from Nul(AT ).
So: b is in Col(A)
2
3
3
4
5
4
This is Kirchhoff’s second law.
Armin Straub
[email protected]
3
Meaning of the row space
• FTLA: f is in Col(AT )
f is orthogonal to Nul(A)
• Just found: Nul(A) has basis
Hence, f is in Col(AT ) if and only if
1
y assigns currents to each edge.
2
1
Then: ATy are the net currents at each node.
ATy = f is solvable if the net currents f satisfy the
constraints coming from Nul(A).
So: f is in Col(AT )
2
3
3
4
5
4
• Recall: linear dependencies among rows ! solutions to y TA = 0
• Nul(AT ) has basis
• A subset of the rows is independent
• A subset of the rows is a basis for Col(AT )
Armin Straub
[email protected]
4
1
A spanning tree:
2
1
• includes all nodes (“spans”),
• does not contain loops (“tree”).
2
The choice to the right corresponds to
3
3
4
5
4
for basis of the row space of






−1 1
0
−1 0
1
0 −1 1
0 −1 0
0
0 −1
0
0
0
1
1






Euler’s formula
Let G be a connected graph.
1
2
1
#nodes − #edges + #loops = 1
Here:
2
3
3
4
5
4
Proof. Let A be the m × n edge-node incidence matrix of G.
Armin Straub
[email protected]
5