Matrices and graph theory
Goals
- Multiply matrices, find determinants and inverses, and solve systems of equations with matrices.
- Use transition matrices to predict future states and find a steady state.
- Describe graphs with vertices, edges, degrees and adjacency matrices, and count walks.
- Use Kruskal's algorithm for a minimum spanning tree, solve the route inspection (Chinese postman) problem, and find bounds for the travelling salesman problem.
Exercises
Exercise 1
Find for and .
Exercise 2
Find the inverse of .
Exercise 3
A graph has five vertices with degrees . How many edges does it have, and does it have an Eulerian circuit or an Eulerian trail?
Exercise 4
For the graph with edges , , and , write the adjacency matrix and find the number of walks of length from to .
Exercise 5
For , find the steady-state vector.
Exercise 6
A museum sold tickets for dollars. Adult tickets cost dollars, child tickets dollars and senior tickets dollars, and twice as many child tickets as senior tickets were sold. How many of each were sold?
Exercise 7
For the weighted graph in the lesson, find the length of the shortest route that travels along every edge at least once and returns to its start.
Exercise 8
Four towns have the following distances (km): , , , , , . Find an upper bound for the travelling salesman problem with the nearest neighbour algorithm from A, and a lower bound by deleting A. What can you conclude?
Exercise 9 Challenge
Two phone companies share a market. Each year, 70\% of company X's customers stay and 30\% move to Y, while 80\% of Y's customers stay and 20\% move to X. Each company has half the market now. Find the market shares after 2 years and in the long run.
Mini test
15 minutes, without looking back at the lesson. Part I: circle one letter; Part II: write T or F for each statement; Part III: write the answer in the box.
Part I. Multiple choice
Part II. True or false
| a) It is connected. | T / F |
| b) It has no cycles. | T / F |
| c) It has 5 edges. | T / F |
| d) It must have an Eulerian circuit. | T / F |
Part III. Short answer
Score: ........ / 10
Hints (only when stuck)
What you need: entry (i,j) is row i of A times column j of B.
What you need: \det C=4(2)-2(3).
What you need: the sum of the degrees is twice the number of edges.
What you need: a walk of length 2 from A to D goes A\to X\to D.
What you need: solve 0.9p+0.3(1-p)=p.
What you need: three equations in a, c, s; solve with matrices on the GDC.
What you need: the odd vertices are B and D.
What you need: the minimum spanning tree of B,C,D uses BC and CD.
What you need: T=\begin{pmatrix}0.7&0.2\\0.3&0.8\end{pmatrix}, s_0=\begin{pmatrix}0.5\\0.5\end{pmatrix}.
Self-check
| # | Did it alone | Needed a hint | Not yet |
|---|---|---|---|
| 1 | ☐ | ☐ | ☐ |
| 2 | ☐ | ☐ | ☐ |
| 3 | ☐ | ☐ | ☐ |
| 4 | ☐ | ☐ | ☐ |
| 5 | ☐ | ☐ | ☐ |
| 6 | ☐ | ☐ | ☐ |
| 7 | ☐ | ☐ | ☐ |
| 8 | ☐ | ☐ | ☐ |
| 9 | ☐ | ☐ | ☐ |
Redo the ones you missed after: ☐ 1 day ☐ 3 days ☐ 7 days
Scan for step-by-step solutions