![]() Fall 2003 |
|
| In the movie "Good Will Hunting", the main character Will Hunting (Matt Damon) solves a blackboard problem, which had been assigned as a challenge to a linear algebra class. |
|
| The adjacency matrix L encodes the graph. The entry Lij is equal to k if there are k connections between node i and j. Otherwise, the entry is zero. Problem 2 asks to find the matrix which encodes all possible paths of length 3. |
Generating function. To a graph one can assign for
pair of nodes i,j a series
,
where an(ij) is the number of walks from i to j with n steps.
Problem 3) asks for a formula for f(z) and in
problem 4) an explicit expression in the case i=1,j=3.
|
| Solution to 1). The adjacency matrix L is |
|
| Solution to 2). [L2]ij is by definition of the matrix product the sum Li 1 L1 j + Li 2 L2 j +... + Li n Ln j. Each term Li 1 L1 j is 1 if and only if there is a path of length 2 going from i to j passing through k. Therefore [L2]ij is the number of paths of length 2 leading from node i to j. Similarly, [Ln]ij is the number of paths of length n going from i to j. The answer is |
|
Solution to 3). The
for the summation of a geometric series holds also for matrices:
.
Cramers formula for the inverse of a matrix
is A-1 = det(Aij)/det(A) leads
to det(1-z Lij)/det(1-z L) which can also be written as
det(Lij-z)/det(L-z).
| |
Solution to 4). Especially, when i=1 and j=3,
.
The result can be written as (-z3+3z2-z-2)/(z4-7z2-2z+4).
| |
|
|