The 1997 film Good Will Hunting cemented a popular image: the unrecognized genius who casually solves impossible math problems while working a blue-collar job. The scene, where Matt Damon’s character effortlessly tackles a complex equation scrawled on a blackboard at MIT, has become iconic. But the reality is far less dramatic—and the actual math problem presented in the movie is surprisingly simple, even trivial, for anyone with a basic understanding of graph theory.

The Real Inspiration: George Dantzig

The film draws loose inspiration from the story of George Dantzig, a mathematician who, as a graduate student in 1939, accidentally solved two unsolved statistical problems he mistook for homework. Dantzig was not an outsider; he was already immersed in advanced mathematics. His feat was impressive, but fundamentally different from the film’s depiction of instant, untrained brilliance. Good Will Hunting trades accuracy for narrative convenience. The film’s story is more compelling because it exaggerates the premise—a layperson solving a problem that years of expertise couldn’t crack.

The Problem: Easily Solved

The blackboard challenge in the movie involves drawing all “homeomorphically irreducible trees” of size ten. This translates to visualizing all possible tree-like diagrams with ten nodes, following specific rules about how those nodes connect. Once you understand the terminology, the task is not a matter of genius insight but methodical application.

The key to understanding is breaking down the jargon:

  • A tree is simply a graph with no loops (no closed paths).
  • Homeomorphic means the exact shape doesn’t matter, only the connections between nodes.
  • Irreducible ensures that no node connects to exactly two other nodes, as that could be simplified further.

With these definitions, the problem becomes a visual puzzle. One can start by drawing a central node connected to nine others, immediately satisfying the criteria. Other solutions can be found with a bit of systematic doodling.

The Math Behind the Solution

For a more formal approach, the problem can be expressed as a simple set of equations:

  • n1 + n3 + n4 + n5 + n6 + n7 + n8 + n9 = 10 (where n represents the number of nodes with a certain number of connections)
  • n1 + 3n3 + 4n4 + 5n5 + 6n6 + 7n7 + 8n8 + 9n9 = 18 (representing the total number of connections)

Subtracting the first equation from the second yields:

  • 2n3 + 3n4 + 4n5 + 5n6 + 6n7 + 7n8 + 8n9 = 8

This equation provides a framework for systematically constructing all possible tree structures, making the task approachable even without advanced mathematical training.

Better Stories Exist

While the filmmakers may have chosen this problem for simplicity, far more compelling stories exist in real mathematics. One example is David Smith, a retired print technician who, in 2022, discovered the “einstein tile”—a polygon that can tile a plane aperiodically, meaning it never repeats its pattern. This is a true story of an outsider making a significant breakthrough.

In conclusion, Good Will Hunting perpetuates a romanticized myth about mathematical genius. The film’s central challenge is far from insurmountable, and real-world examples demonstrate that true mathematical breakthroughs often come from dedicated work, not overnight brilliance.