UUtah Data Mining | Fall 2026 | L24: Markov Chains
Overview
The lecture builds a graph-based view of Markov chains: normalize graph adjacency columns into a probability transition matrix, then use repeated matrix-vector multiplication to track a random walk and study its long-run distribution. It explains why convergence can fail through disconnected components, absorbing and transient states, or cycles, and connects a convergent distribution to eigenvectors, graph centrality, and efficient computation.
Key takeaways
- A graph random walk can be represented by a column-stochastic transition matrix: normalize each adjacency column so its probabilities sum to 1, then update a state distribution with P multiplied by that vector.
- The limiting distribution is generally not uniform; nodes with higher stationary probability tend to play a more central role in the graph.
- Disconnected components, absorbing or transient structures, and strict cycles can prevent a chain from satisfying the lecture’s ergodicity condition and can make long-run behavior depend on the initial state or oscillate.
- For a convergent chain, the stationary distribution is unchanged by another transition and is an eigenvector of P with eigenvalue 1.
- For large sparse graphs, repeated matrix-vector multiplication with the power method avoids the dense matrices created by explicitly computing high powers of P.
Chapters
- The final graph homework is a half assignment, intended as practice for the endterm test, and is due Wednesday night before the test.
- The 80-minute endterm covers material after the midterm: streaming, dimensionality reduction, noise, and graphs.
- A practice test is available, and students can use AI to generate additional practice questions and answers.
- The final report is due in one week and allows four pages per student, so a two-person group has an eight-page target.
- Use at least 11-point font and one-inch margins; include figures in the page limit and put essential findings in the main report rather than an appendix.
- Build one coherent project story around the motivation, data and transformations, key findings, and an honest assessment of what worked.
- Include a half-page to two-page ethics discussion identifying stakeholders, potential harms, and benefits.
- The poster session will serve as the final exam, with students presenting their work and visiting other groups’ posters.
- A poster can be built as one large PowerPoint slide, typically with a title block and three columns; Beamer is another option.
- Students should finish the report before assembling the poster, then use feedback to revise the poster before presentation.
- Markov chains provide a framework for turning graph structure into a linear algebra problem that supports large-scale analysis.
- The graph is represented by vertices and edges, with an adjacency matrix containing 1 for an edge and 0 otherwise.
- The lecture focuses initially on undirected graphs, while the transition process introduces direction through the choice of next state.
- A Markov chain has a state set V, a probability transition matrix P, and an initial state or initial distribution.
- For a graph walk, each adjacency-matrix column is normalized so its outgoing transition probabilities sum to 1.
- The resulting matrix is column-stochastic: each column is a probability distribution, although its rows generally are not.
- An n-state probability distribution lies in the simplex: every entry is between 0 and 1, and all n entries sum to 1.
- For three states, the simplex is a triangle with vertices (1,0,0), (0,1,0), and (0,0,1).
- An initial state can be a one-hot vector, such as starting at node B, or a probability distribution across multiple nodes.
- Starting from node B, multiplying P by the initial vector selects the corresponding transition column and gives the distribution after one step.
- In the example, the walk leaves B for A or D with probability 1/2 each.
- Further multiplication updates the distribution; after two steps, states that require at least three hops still have probability zero.
- Repeated transitions produce the state distribution after n steps, written as P to the power n multiplied by the initial distribution.
- The limiting distribution is not necessarily uniform across the graph’s eight states.
- The Markov property means the next-state prediction depends on the current state, not on the path taken to reach it.
- The single-state view follows one frog occupying exactly one node at each step, as in a game character moving on a board.
- The distribution view tracks probability across multiple possible states at once, as if many possible frogs were followed together.
- For a finite discrete graph, multiplying probability vectors is efficient; simulation is useful when the state space is large or continuous.
- The lecture defines an ergodic chain as one where, after some time t, every state has positive probability at every later step.
- Disconnected components, absorbing and transient states, and strict cycles are presented as cases that prevent this condition.
- Checking these structures matters because the long-run analysis and algorithms rely on convergence.
- In a graph where A and B each loop to themselves, a walk starting at A can never reach B.
- Examples with three or six states show that separate components retain their own probability mass.
- The eventual distribution therefore depends on the initial state, rather than producing one shared limiting distribution.
- An absorbing state has a probability-one transition back to itself; in the A/B example, B traps the walk once it is reached.
- Transient states can lose all their probability over time as walks enter an absorbing set.
- An absorbing set can contain multiple states that continue transitioning among themselves, as in the example where A and B alternate while C feeds into B.
- In a two-state cycle where A and B alternate with probability 1, starting at A puts the walk in B after every odd number of steps and A after every even number.
- A three-state cycle repeats the same pattern every three steps, so the distribution does not settle.
- A bipartite graph also alternates between its two node sets; adding a self-loop or an edge that breaks the strict pattern can remove this cyclic obstruction.
- For an ergodic chain, the limiting distribution is independent of the initial vector and remains unchanged after another multiplication by P.
- That stationary distribution is an eigenvector of the transition matrix, with eigenvalue 1, and can be found using eigenvector methods.
- In the illustrated graph, nodes with higher limiting probability are more central, while edge node H has the lowest probability.
- The lecture describes a balance between transition probability flowing from one state to another and flow returning in the opposite direction.
- At equilibrium, the state probabilities and transition probabilities fit together so that another step preserves the distribution.
- This stable flow interpretation helps explain why the limiting distribution can characterize a graph’s structure.
- The eigenvector method finds the leading eigenvector of P and L1-normalizes it to obtain the limiting probability vector.
- The power method repeatedly multiplies an initial vector by the sparse transition matrix, avoiding explicit matrix powers.
- Precomputing P to a large power is slower because the matrix becomes dense; random-walk simulation instead estimates probabilities by counting many frogs at each state.
Transcript excerpt
0:15 Um uh um so welcome back everyone. So let's get started. Um so today we are going to be talking about Markoff chains. Oh. Oh from my view markoff chains are kind of the like intellectual foundation of how to analyze graphs. Um, so we'll be spending time talking about these in general. There's there's one very kind of clear interpretation of them that that so um so operates on graphs and gives you some sort of uh descriptors for graphs. There's another view of Markov chains which we'll also get to towards the end which has a kind of a fairly different uh so so like a fairly different but
1:05 important role within so oh Beijian analysis and sampling that's also very relevant to data mining. So we'll um so we'll we'll touch on this at the end of the lecture today. Um and then the so this will be kind of a lot of kind of the um the the foundational aspects of this and then we'll see kind of the kind of common way how to actually get this applied on to you know a central weight applied in graph analysis on Thursday. Um, so before we get started though, um, I want to talk a bit about the schedule. We're getting very near the end of the
1:53 semester. Um, so it's exciting and sad because the semester is almost over, but there's a lot of stuff happening. Um so um well oh first thing the last homework assignment on graphs was released. You can find it linked off of here. Um it again is like a half assignment. So, it should be pretty simple and straightforward. And I think after today's lecture or maybe um kind of maybe after Thursday's lecture, you should be able to do all of it. It
This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.
In this course
Related notes
Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, UofU Data Science.