I still remember the night I saw the movie for the first time good will Hunting With my mother. Matt Damon played a janitor at the Massachusetts Institute of Technology. While cleaning the hallway, he passed by a blackboard with an advanced math problem written on it. He stopped and started solving the problem. I watched, fascinated, as he created apparently vague structures of points and lines – until suddenly a math professor came out of the lecture room and shooed him away.
Audiences were previously told that the problem was incredibly difficult, requiring years of expert thinking to solve, yet Damon’s insightful janitor quickly solved it in a matter of moments. At the time, I was fascinated by the idea that people might have a hidden talent that no one suspected.
As I grew older and became more mathematically savvy, I dismissed the whole thing as Hollywood dictum. good will Hunting It might be a great story, but it’s not very realistic. In fact, the mathematical challenge does not hold up to much scrutiny. With the awards ceremony for the Oscars this month, many people are thinking about past winners — including good will Hunting. It’s worth taking a closer look at the blackboard for that film, which received nine nominations in 1997 and wins for both original screenplay and actor in a supporting role.
On supporting science journalism
If you enjoyed this article, consider supporting our award-winning journalism Subscribing By purchasing a subscription, you are helping ensure a future of impactful stories about the discoveries and ideas shaping our world today.
based on real events
This film was inspired by a true story – which I personally find far more compelling than the fairy tale version good will Hunting. The real story focuses on George Dantzig, who will one day be known as the “Father of Linear Programming”.
Dantzig was not always a top student. he claimed to be struggled with algebra In junior high school. But he was no ordinary man when the incident that inspired the film occurred. By that time, he was a graduate student in mathematics. In 1939 he arrived late for a lecture led by statistics professor Jerzy Neyman at the University of California, Berkeley. Neyman wrote two problems on the blackboard, and Dantzig assumed they were homework.
Dantzig noted that the task seemed more difficult than usual, but he nevertheless solved both problems and presented his solution to Neyman. As it turned out, he had solved two of the most famous unsolved problems in statistics.
That feat was quite impressive. In contrast, the mathematical problems used in Hollywood movies are much easier to solve once you learn some of the jargon. Actually, I will tell you about it. As the movie presents it, the challenge is: Create all homeomorphically invariant trees of size n =10.
Before we go any further, I want to point out two things. First of all, the presentation of this challenge is actually the hardest thing about it. It is quite unrealistic to expect the average person – regardless of their mathematical talents – to be familiar with the technical language used to formulate the problem. But this brings me to the second thing worth noting: once you’ve translated the technical terms, the actual work becomes simpler. With a little patience and guidance, you can even pass it on to children.
to resolve good will Hunting crisis
Let’s get into the terminology. In mathematics, a tree is a type of graph – that is, a collection of points that are connected to each other. In particular, trees cannot have loops, so you cannot connect points in such a way that they close into one. The size of a tree is given in terms of the number of points or nodes in the graph. In this case, we know that we have to create all possible tree graphs with 10 nodes.
The term “homeomorphic” originally referred to the idea that the nodes in this network always follow a particular sequence; The exact size of the tree is not as important as the order of the connections. When I make a connection between nodes A and B, I can make that link longer or shorter or rotate it slightly, and it will not make any difference as long as the overall structure of the network remains the same. The important thing is that A connects to B.
To think about this in a different way, imagine an X-shaped tree with five nodes and a K-shaped tree with five nodes. These trees are considered Same Tree because the number of nodes and the order of connections between two shapes is unchanged.
And “irreducible” in this case means that every node in the graph must be connected by a line or three or more lines so that no node is connected by only two lines: if a node was connected by only two lines, it could be reduced to only one line.

So in simple language, the task is to draw all trees with specified properties, each having 10 nodes. There are several approaches to this. For example, you can write a computer program that solves the task in a matter of seconds. Or you can start drawing by hand all the graphs that meet these criteria. It turns out that you may only need a few minutes of doodling if you decide to go the latter route.
To demonstrate this, you can first create a tree consisting of a central node that radiates out with nine connections, giving us a total of 10 nodes. That design satisfies the required criteria – it is one of our homeomorphically invariant trees of size n = 10. Good work!
Next, create a tree with eight connections – you will find that this design leads to a deadlock because you will not be able to add a node without recreating the previous tree or introducing a reducible line. Proceed to illustrate a tree that starts with a node that has seven connections. You will still need to place two more nodes, but you can imagine connecting them to one of the seven you just drew. At this point, you should be able to keep considering the possibilities.

If you prefer a more systematic approach – although this may take you a little longer depending on your comfort with graph theory-A clever solution involves considering what mathematical conditions trees must satisfy and representing them with equations.
For this approach, we can define nOf as the number of nodes n with Of Connection. Because the tree must be insoluble, there is no such situation n2 may exist, therefore n2 = 0. Furthermore, we know that the tree must have a total of 10 nodes—this means that you will never have n10 Or n11And so on. is maximum n9.
We can then represent what we know with a mathematical formula:
n1 + n3 + n4 + n5 + n6 + n7 + n8 + n9 =10

Note that we left n2 Because we know that it will be equal to 0.
There is one more obstacle that we can express. Our tree with 10 nodes will eventually have 18 lines or connections between them, if we count in such a way that the link between node A and node B is counted twice, one of which is AB, and the other BA. We can use this to create an equation where we represent each connection and node individually. For example, if a node links to another node, it creates a connection: 1.n1. If one node links to three other nodes, three connections will be made, so 3n3And so on. This leads us to the next equation:
n1 +3n3 +4n4 +5n5 +6n6 +7n7 +8n8 +9n9 =18
You have now created two equations that constrain and constrain our tree-diagramming choices. But we need to combine them to identify the words most relevant to our task. You can subtract the first equation from the second to get:
2n3 +3n4 +4n5 +5n6 +6n7 +7n8 +8n9 = 8
This equation serves as a reference for drawing your different trees. The idea is to get terms that together will equal 8 when you sum their first integers, or coefficients. look at 8n9 For example. It tells us that we only need one n9 To build our tree, which matches the drawing in which a node has nine connections.
If you try to draw n8You will hit a dead-end scenario, with no trees meeting our criteria. If you were using our equation for reference, you wouldn’t even bother trying to make it because you would see that you can’t add 7.n8 With another term, the first number of each of which will be equal to 8.
But a node with seven connections, n7,it might work if you mix it with n3Which means you can connect a tree with seven connections (represented by 6)n7 in equation ) and a tree with three connections (2n3) to find another solution to the problem. and you can move on with the process From there!

There are better examples
i can understand why good will HuntingThe filmmakers moved away from Dantzig’s actual work. The solution they devised was not trivial – and trees probably look more attractive to a cinematographer.
But I still think the filmmakers chose this particular math problem poorly, even for a Hollywood movie. There are many amazing stories in the history of mathematics, including true stories of real ordinary people solving an open problem, that could be great fodder for movies.
For example, in the field of geometry, many successes regarding tiling on the plane have been achieved by ambitious people who had not studied mathematics or anything similar. One of my personal favorites occurred in 2022, when retired print technician David Smith finally found the long-sought “Einstein tile”, a polygon that can completely fill a plane without any gaps and without the resulting pattern ever repeating.
This article was originally published in spectrum der wissenschaft And was reproduced with permission. It was translated from the original German version with the help of artificial intelligence and reviewed by our editors.
