Adjacency matrices (incl. weighted) + building transition matrices: notes and practice questions
- Adjacency Matrix: Represents graph connections between vertices.
- Complete Graph: Each vertex connected to every other vertex by a single edge.
- Directed Graph: Edges have a specific travel direction.
- In-degree: Number of edges leading into a specific vertex.
- Strongly Connected Graph: Directed graph allowing walks in either direction between any two vertices.
- Weighted Graph: Edges assigned numerical values (e.g., distance, time).
- Weighted Adjacency Table: Shows exact edge weights; empty cells mean no direct connection.
- Undirected Weighted Graph: Table of least values has symmetry along the leading diagonal.
- Markov Chain States: Mutually exclusive events that change over time.
- Transition State Diagram: Visual representation of a Markov Chain; edges show transition probabilities.
- Markov Chain Probability Rule: Probabilities on arrows out of a single state sum to 1.
- Transition Matrix (): Shows transition probabilities. Columns = current states, Rows = next states. Column probabilities sum to 1.
- Walks of length : Number of walks found by raising adjacency matrix to power :
- Walks of length or less: Total walks found by summing successive powers of :
- Future States (Markov Chains): Probability vector for next state () found by multiplying transition matrix () by initial state vector ():
- Matrix Diagonalisation (for ): where is a diagonal matrix of eigenvalues and is a matrix of corresponding eigenvectors.
- Steady State Limits: As , has identical columns; every transition matrix has an eigenvalue of 1.
- Shortest Route Method: Fill direct connections, then check for shorter paths via intermediate vertices.
- Expected Populations (Markov Chains): Multiply by total population to find expected numbers in each state.
- Graph Theory (adjacency matrices, walks) and Markov Chains (transition matrices, steady states, diagonalisation) are HL topics.
- GDC: Store matrices, calculate or , check transition matrix column sums (must be 1).
- Exam Tip: Draw transition state diagrams to visualise problems.
- Exam Tip: For undirected graphs, use symmetry of least values table.
- Exam Tip: Verify steady state calculations by checking for identical columns in .
- Exam Tip: Always check for hidden shorter routes via intermediate nodes in least weights tables.
How it is examined
The result is the reliable question: raise the matrix to a power on the GDC, read one entry. "Walks of less than length" means summing , and students often forget the sum and give only . Building a transition matrix from a graph is the bridge into AHL 4.19, and the column-versus-row convention has to be stated in the question or the answer is ambiguous.
- Adjacency matrices.
- Walks.
- The number of -length walks, or walks of less than length, between two vertices.
- Weighted adjacency tables.
Linking questions
- International-mindedness: the "Bridges of Konigsberg" problem.
- Links to websites: adjacency matrices and airlines. PageRank is one method for determining the importance rank of a webpage, simulation at www.eprisner.de/MAT103/PageRank.html
Practice questions
2 questions · 1 medium · 1 hardQuestion 1
MediumPaper 1 · calculator7 marksA streaming service offers two subscription plans: Premium and Basic. The service has found that customers' choices follow a pattern. If a customer has the Premium plan in a given month, the probability they will keep the Premium plan the next month is 0.8. If a customer has the Basic plan in a given month, the probability they will upgrade to the Premium plan the next month is 0.1.
(a) Let the states be Premium (State 1) and Basic (State 2). Write down the transition matrix, T, for this Markov chain.
(b) A new customer subscribes to the Premium plan in their first month, January. Find the probability that this customer will have the Premium plan in March of the same year.
(c) Find the steady state probability vector for this Markov chain.
The columns of the transition matrix represent the current state (Premium, Basic) and the rows represent the next state (Premium, Basic). Remember that the probabilities in each column must sum to 1.
The initial state is that the customer has the Premium plan, so the initial state vector is . March is two months after January, so you need to calculate the state after two transitions.
The steady state vector, , is a probability vector that does not change from one state to the next. It must satisfy the equation . Let and solve for .
Question 2
HardPaper 2 · calculator27 marks(a) A single data packet can be transferred between three servers, S1, S2, and S3, in a network. The possible direct transfers are:
- From S1, the packet can be sent to S2 or stay in S1.
- From S2, the packet can be sent to S1 or S3.
- From S3, the packet can be sent to S2 or stay in S3.
Write down the adjacency matrix for the directed graph representing these possible direct data transfers, ordering the servers S1, S2, S3.
(b) Find the total number of distinct data paths of length 5 from server S1 to server S2.
(c.i) Every possible sequence of 5 data transfers has the same probability of occurring. State this probability.
(c.ii) Use your answer to part (b) to find the probability that if a data packet was initially on server S1, it will be on server S2 after 5 transfers.
(d.i) A network administrator monitors the movement of two data packets. The possible combined states of the two packets (assuming they occupy distinct servers) are (packets on S1 and S2), (packets on S1 and S3), and (packets on S2 and S3).
The transitions between these states are modelled by the following transition matrix , where rows represent the current state and columns represent the next state, in the order :
State the probability that if the packets are currently in state , they will be in state after one transfer.
(d.ii) Using the transition matrix from part (d.i), state the probability that if the packets are currently in state , they will be in state after one transfer.
(d.iii) Using the transition matrix from part (d.i), state the probability that if the packets are currently in state , they will be in state after one transfer.
(e) Given that the two data packets are initially in state (on servers S1 and S2), find the probability that they will be in state (on servers S2 and S3) after 5 transfers.
(f) The data packets continue this pattern of transfers for a long period. Find the server that is occupied least and the proportion of the time it is free.
An adjacency matrix for a directed graph has if there is an edge from node to node , and otherwise. Remember to consider self-loops.
The number of walks of length between two nodes can be found by raising the adjacency matrix to the power of . The entry in the resulting matrix gives the number of walks from node to node .
Consider the number of choices for each individual transfer and how probabilities combine for a sequence of independent events.
The probability is the number of successful paths divided by the total number of possible paths of that length.
Identify the correct entry in the transition matrix based on the given order of states.
Identify the correct entry in the transition matrix based on the given order of states.
Identify the correct entry in the transition matrix based on the given order of states.
To find the probabilities after multiple steps, you need to raise the transition matrix to the power corresponding to the number of transfers. Then, select the entry that corresponds to the initial and final states.
For a long period, the system reaches a steady state. Calculate the steady-state probability vector for the combined states. Then, use these probabilities to determine the proportion of time each individual server is occupied.
No question on this page matches those filters. Try another difficulty or paper.
Every Adjacency matrices (incl. weighted) + building transition matrices question, marked for you
Every answer is marked mark by mark, IB-style, and the AI tutor helps when you are stuck.
Where marks are lost
- Leaving an answer in calculator notation. Never accepted in a final answer, and AI's constant calculator use makes this the easiest slip in the whole subject.