Heptavo Get the app

Practice questions · IB Maths AI · HL · 14 marks

3.16 Adjacency matrices, walks and transition matrices

Five IB Maths AI questions on this topic, straight from the Heptavo app: 3 multiple choice and 2 written, climbing from the basics to exam style. Each one comes with its explanation or mark scheme.

Start

Question 1 · Rung 1 · 1 mark

The adjacency matrix of a graph records, in each position,

Show the answer and why

Answer: D

The adjacency matrix counts direct connections and nothing else, so in a simple graph every entry is 0 or 1. Weights belong to a weighted adjacency table, and shortest distances are the output of an algorithm rather than a record of the graph.

Question 2 · Rung 2 · 1 mark

The entry in row P, column Q of the square of the adjacency matrix gives

Show the answer and why

Answer: D

Multiplying adds, over every possible middle vertex, the product of the edges from P into it and out of it into Q — which counts exactly the two-step routes. That is why a zero entry means no two-step route rather than no route at all.

Question 3 · Rung 3 · 1 mark

A graph has vertices P, Q, R, S and edges PQ, PR, QR and RS. In its adjacency matrix, written in the order P, Q, R, S, the entry in row R, column S is

Show the answer and why

Answer: B

RS is listed as an edge, and the graph is simple, so exactly one edge joins R to S. The entry in row S, column R is also 1, because the graph is undirected.

Question 4 · Rung 4 · 5 marks

A graph has vertices P, Q, R, S and edges PQ, PR, QR and RS. Given that the square of its adjacency matrix is (2 1 1 1 ; 1 2 1 1 ; 1 1 3 0 ; 1 1 0 1), state the number of walks of length 2 from Q to S, from R to R and from S to S, and explain what the zero entry in the third row means.

Show the mark scheme

Tick each point your answer made: one mark per point, up to 5.

What the examiner is looking for

A zero in a power of an adjacency matrix never means "unreachable" on its own — it means unreachable in that many steps. Reading it as disconnection is the standard error, and here the two vertices concerned are actually adjacent.

Question 5 · Rung 5 · 6 marks

A graph has vertices P, Q, R, S and edges PQ, PR, QR and RS. Using the adjacency matrix (0 1 1 0 ; 1 0 1 0 ; 1 1 0 1 ; 0 0 1 0) and its square (2 1 1 1 ; 1 2 1 1 ; 1 1 3 0 ; 1 1 0 1), find the number of walks of length at most 2 from P to S, and explain why the corresponding calculation for walks of length at most 3 would need one further matrix.

Show the mark scheme

Tick each point your answer made: one mark per point, up to 6.

What the examiner is looking for

Counting walks "of length at most k" always means adding the first k powers, never taking a single one. Each power answers a question about exactly that length, and there is no shortcut that skips a power.

Your score

0/14

Answer the questions above and your marks add up here.

Heptavo has 55 questions on 3.16 Adjacency matrices, walks and transition matrices: 26 multiple choice and 29 written, each with its mark scheme. Free to start.

Practise 3.16 in Heptavo

What 3.16 asks

Adjacency matrices, counting walks and transition matrices; questions ask for the number of walks of a given length and for long-run probabilities in a Markov chain.

You need to be able to

  • Write the adjacency matrix of a graph and use Aᵏ to count walks of length k.
  • Build a transition matrix whose columns each add to 1, and find the state after n steps as Tⁿs₀.
  • Find the steady state as the vector s with Ts = s whose entries add to 1.

Key terms

  • adjacency matrix
  • walk
  • transition matrix
  • Markov chain
  • steady state
  • eigenvector

Common trap Using A³ alone for walks of length up to 3; A³ counts walks of length exactly 3, so add A + A² + A³.