Social network graph analysis

00:00 18 marks

  • Build Confidence

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]

Part a

3 minutes 2 marks

Question

Draw the graph G. [2]



Hint Hint

Hint

Use the adjacency matrix to list all edges among P, Q, R, S, T.

  • Answer Answer
  • Mark Scheme Mark Scheme
  • Explanation Explanation
  • Answer Answer

Complete Answer

Vertices P, Q, R, S, T with edges: P–Q, P–R, P–T, Q–R, Q–S, R–S, R–T, S–T.

  • Mark Scheme Mark Scheme
  • Answer Explanation Answer Explanation

Part b

3 minutes 3 marks

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
  • Answer Answer

Complete Answer

8

  • Mark Scheme Mark Scheme
  • Answer Explanation Answer Explanation

Part c

5 minutes 4 marks

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
  • Answer Answer

Complete Answer

Edges: QR, PR, PT, RS. Total weight = 13.

  • Mark Scheme Mark Scheme
  • Answer Explanation Answer Explanation

Part d

1 minutes 1 marks

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
  • Answer Answer

Complete Answer

13

  • Mark Scheme Mark Scheme
  • Answer Explanation Answer Explanation

Part e

4 minutes 4 marks

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
  • Answer Answer

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

Part f

4 minutes 4 marks

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
  • Answer Answer

Complete Answer

Lower bound = 19

  • Mark Scheme Mark Scheme
  • Answer Explanation Answer Explanation

Math Editor

Report Question


Please enter keywords