The grid at the top of my homepage is a live Markov chain. It comes from a lecture in CS 4850, Probability, Vectors, and Matrices in Computing, taught by Bobby Kleinberg. It stuck with me long after the semester ended.
The idea
Each dot is a vertex labeled (bright) or (faint), and neighbors like to agree. A labeling gets weight
where is the inverse temperature. We want to sample from , but sums over states. You can’t compute it.
The trick is to never compute it. Pick a random vertex , propose flipping it to get , and accept with probability
cancels in the ratio, and for a single flip it only depends on ’s four neighbors:
Run the chain long enough and its state is a sample from .
Near Exactly , the critical point Onsager found. something sudden happens: noise snaps into large aligned domains. Drag the slider above to cross it yourself, or hover over the grid to melt the domains and click to cool a spot.
Fig. 2 puts a number on it: how often two neighboring dots agree. The curve is the exact answer for an infinite grid, from Lars Onsager’s 1944 solution,Lars Onsager, “Crystal Statistics. I. A Two-Dimensional Model with an Order-Disorder Transition,” Physical Review 65, 117 (1944). and the dots are Fig. 1’s own count as drifts.
On CS 4850
4850 has been my favorite class at Cornell. I didn’t take it to satisfy a requirement. I took it because the description sounded cool. It was challenging to keep up with, but learning such unique topics was incredibly rewarding.
It was a reminder that education shouldn’t be treated as a means to an end. The point of college is to get good at learning, and grades and job outcomes were supposed to be how we measure that. But once they become the goal, it’s easy to end up graduating as fast as possible, checking off requirements, and only taking classes that help with recruiting. Goodhart’s law, basically. I think a better metric is a much simpler one: what sounds cool, and what you find interesting.
Rather than going deep on one subject, the course let me explore the combination of fields I find most interesting: linear algebra, probability theory, and algorithm design. This lecture was one of my favorite examples of that. It pulls together Markov chains from probability, transition matrices from linear algebra, and a simple, intuitive algorithm you can describe in a couple sentences.