A social network is represented by a graph \(G\), where vertices represent people and edges represent friendships. The adjacency matrix \(A\) for graph \(G\) with vertices P, Q, R, S, T is given below.
\(A=\begin{pmatrix}
0&1&1&0&1\\
1&0&1&1&0\\
1&1&0&1&1\\
0&1&1&0&1\\
1&0&1&1&0
\end{pmatrix}\)
(a) Draw the graph \(G\). [2]
(b) Find the number of walks of length 3 starting at vertex Q and ending at vertex T. [3]
The cost (in arbitrary units) of sending a message between connected people is given in the weighted adjacency table below. An entry “–” indicates no direct connection.
|
P |
Q |
R |
S |
T |
| P |
– |
5 |
3 |
– |
4 |
| Q |
5 |
– |
2 |
6 |
– |
| R |
3 |
2 |
– |
4 |
7 |
| S |
– |
6 |
4 |
– |
5 |
| T |
4 |
– |
7 |
5 |
– |
(c) Use Kruskal’s algorithm to find the minimum spanning tree for the network represented by the weighted table. State the total weight of the minimum spanning tree. [4]
(d) State the minimum total length of cable required. [1]
The company now wants to find the shortest route that starts at P, visits every other person exactly once, and returns to P.
(e) (i) State the name of this problem.
(ii) Use the nearest neighbour algorithm, starting at vertex P, to find an upper bound for the length of this route. [4]
(f) By deleting vertex R, find a lower bound for the length of this route. [4]
Question
Find the number of walks of length 3 starting at vertex Q and ending at vertex T. [3]
Hint
Hint
Hint
Compute \(A^3\) and read the (Q,T) entry.
-
Answer
Answer
-
Mark Scheme
Mark Scheme
-
Explanation
Explanation
-
Mark Scheme
Mark Scheme
-
Answer Explanation
Answer Explanation
Question
Use Kruskal’s algorithm to find the minimum spanning tree. State its total weight. [4]
Hint
Hint
Hint
List all edges sorted by weight and add them without creating a cycle.
-
Answer
Answer
-
Mark Scheme
Mark Scheme
-
Explanation
Explanation
Complete Answer
Edges: QR, PR, PT, RS. Total weight = 13.
-
Mark Scheme
Mark Scheme
-
Answer Explanation
Answer Explanation
Question
State the minimum total length of cable required. [1]
Hint
Hint
Hint
It equals the total weight of the MST found in part (c).
-
Answer
Answer
-
Mark Scheme
Mark Scheme
-
Explanation
Explanation
-
Mark Scheme
Mark Scheme
-
Answer Explanation
Answer Explanation
Question
(i) State the name of this problem.
(ii) Use the nearest neighbour algorithm, starting at vertex P, to find an upper bound for the length of this route. [4]
Hint
Hint
Hint
Recall the Travelling Salesman Problem; choose the nearest unvisited neighbour at each step.
-
Answer
Answer
-
Mark Scheme
Mark Scheme
-
Explanation
Explanation
Complete Answer
(i) Travelling Salesman Problem
(ii) Route P – R – Q – S – T – P, total cost = 20
-
Mark Scheme
Mark Scheme
-
Answer Explanation
Answer Explanation
Question
By deleting vertex R, find a lower bound for the length of this route. [4]
Hint
Hint
Hint
Find MST on P,Q,S,T then add the two smallest edges connecting R.
-
Answer
Answer
-
Mark Scheme
Mark Scheme
-
Explanation
Explanation
Complete Answer
Lower bound = 19
-
Mark Scheme
Mark Scheme
-
Answer Explanation
Answer Explanation