Good Node Hunting
Most networks built from movie casts treat a shared film as a connection, and stop there. A lead and an extra count the same as two leads. Scoring each credit by billing order, and adding up every film a pair shares, gives a number for how often two actors worked together, and how big their parts were.
On a phone the figures below run with fewer controls, and the names and numbers that appear on hover are not available. A laptop gets the full set.
GoodFellas lists 141 people. Robert De Niro is billed first and Ray Liotta second, and they are in most of the film's scenes together. Jeffrey Rollins is billed 141st. He is a courtroom defendant, uncredited in the film itself.
In many Hollywood actor networks, a shared film is binary. De Niro to Liotta is a one. De Niro to Jeffrey Rollins is also a one. This essay is about the difference between those credits, and how to make the number representing the shared credit more meaningful. It is the first in a series called The Hollywood Machine. All of it comes from a paper I wrote with Joe DeMaio, who taught me everything I know about graph theory. The paper is about the Hollywood actor network, and how actors cluster together over the course of their careers.
The gameSix Degrees of Kevin Bacon
There's a game played from memory, with no screen, where every shared film counts as one. Name an actor, then get to Kevin Bacon one movie at a time, in as few movies as you can. Tom Hanks was in Apollo 13 with Bacon, so Hanks is one movie away. Everyone who shared a film with Hanks can reach Bacon in two. Some of them can do it in one, and the game only counts the shortest way there. The game gives you six movies to get there, and fewer is better. It is called Six Degrees of Kevin Bacon.
In March 1994 the creators of the game appeared on The Jon Stewart Show and stated their premise in one sentence. "We believe Kevin Bacon is the center of the whole acting universe." You can still watch the clip. That sentence is a claim about a network, and it can be tested. The next essay in this series tests it. This one builds the number the test needs.
The game caught on because it felt true. And it is true: Most of Hollywood is a couple of movies from Kevin Bacon, and a couple of movies from nearly everyone else. There is a century of work behind this. Frigyes Karinthy imagined it in a 1929 short story, guessing that any two people alive could be joined by a short chain of acquaintances. Stanley Milgram went looking for those chains in the 1960s and found they really were short. Networks that behave this way are called small-world networks, and Hollywood is a great example of one.
I saw Jurassic Park the summer it opened, in June 1993, and read Michael Crichton's novel the same summer. The novel is divided into seven sections it calls iterations. Each opens with a fractal curve and one line from Ian Malcolm, the book's mathematician. As the park goes from order to chaos, the curves get more complicated. Until then I didn't think math was cool. Ian Malcolm's epigraphs used math to describe what happened inside the story, and I had never thought of math being used that way. Those seven pages are the first time math got my attention.
The next year, the game arrived. I liked playing the game, but was also intrigued by something underneath the game that I could not name. It was a math puzzle. A graph problem. Every actor is a node. Every film two actors share puts an edge between them. A chain of co-stars is a path, and the game's score is the number of steps on it. I learned that decades later, in a graph theory class. What I liked and could not say was the small-world problem, played on Hollywood.
Tap a name and hear the game the way people say it
Rule oneA credit is worth its place on the poster
Around 2010 I was a stills photographer on independent film sets in Atlanta and making posters for some of those projects. The billing block at the bottom of a one-sheet is negotiated contract by contract, down to the size of the type. Where a name sits in it says how big the part is, or how big the name is.
On one of those posters the director wanted the entire cast in the billing block. They would not fit, so he told me to pick a few names and we would figure it out later. I picked a few names. We never discussed them again, and the placeholder printed. On a studio film the order is written into contracts. On ours it was one designer's guess. Either way the poster went out with an order on it, and an order is a claim about who mattered most.
Jackson is billed 2nd of 36 in Jackie Brown and 54th of 105 in Avengers: Endgame. The game counts both as one step.
Rule one: A credit is worth its place in the cast list. Top billed is worth a full point. The last name in a cast of a hundred is worth almost nothing. Everyone in between is scaled to the size of the cast. Fifth of six is a big part, and fifth of sixty is a part with one or a few scenes. We call the number prominence.
Equation 1. For actor i in film f, n is the number of names in the credited cast. b is the billing position, counting from zero. Prominence is (n minus b) divided by n. Top billed is b = 0, so the score is 1. The last name in a cast of twenty is worth one twentieth.
Scroll the credits
In Figure 5 below, press Rule one: Billing. The edges have thickness now. Here, a path is worth the four credits it passes through, added together. The thickest path is Jackie Brown to Sleepers through Robert De Niro, at 3.90. All four of its credits sit near the top of their cast lists. The thinnest is QT8 to Val through the same man, at 2.65, because nobody on it is billed high except Bacon, and De Niro is 42nd of 61 in Val. The fourteen paths are no longer equal. A number attached to an edge is what graph theorists call a weight.
Billing order is one of several numbers that could have gone in there. Share of dialogue in the screenplay was the first one we considered, but we did not have scripts for every film, and a role with no dialogue would score zero. The other option is to leave the people out of it and weight a shared credit by something about the film. The budget, the box office, the IMDb rating, the number of votes it drew. We tried several. Billing won because it is the only one that describes the job the two people did together, and TMDB has it for every film in the data.
Rule twoRepeated collaborations
Samuel L. Jackson and Brad Pitt have made four movies together. Six Degrees of Kevin Bacon counts only one movie, because one is enough to join two people, and the other three are ignored. Four films together is a stronger connection than one, so the second rule keeps all of this information: Add up every film two actors share. Back in Figure 5, press Rule two: Repeats.
The films come off Figure 5, and what is left is people joined to people. The edge between any two carries the sum of everything they did together. This is called a projection. Jackson to Brad Pitt is now 5.35 across four films, the heaviest edge on the figure. Pitt to Bacon is 1.92, from one film. Replay the three paths and De Niro's comes out at 8.19, Pitt's at 7.27 and Tomei's at 6.40. Pitt has the heaviest edge to Jackson of the three and still loses, because his other edge barely reaches Bacon.
Equation 2. For actors i and j, add both prominence scores in every film they share, then add those totals across all the shared films. Big parts and repeat work both push it up.
Weight says how much two people worked together. Distance is the same fact turned into the form that some network methods need: One divided by the weight. The pairs who worked together most are the closest. Samuel L. Jackson and Brad Pitt are 0.19 apart, the closest pair on Figure 5. Four films did that.
Equation 3. One divided by the edge weight. Two actors who worked together often and near the top of the cast list have a small distance. Two who shared one crowded film have a large one.
Adding distances changes the answer in Figure 5. De Niro's path now has the best score, and Pitt drops from second to last.
What was in the credits all along
Every Hollywood network starts with two people in the same film, and most of them stop there. This network reads the cast list, weighs each credit by its place, and adds up every film a pair shares. De Niro and Liotta end up close. De Niro and Jeffrey Rollins end up far apart. That is the difference the old rule could not see.
The star at the top of the page is the same arithmetic done 5,607 times. Every co-star Samuel L. Jackson has is a node at the end of an edge from him. The angle is the year the two first worked together, 1980 at the top and clockwise to 2025. The farther out a node sits, the heavier the edge. 5,000 of the 5,607 share one film with him, usually a crowded one, and they sit close to the center. 159 people have made three or more films with him, and they are the long edges. The longest belongs to Leonard L. Thomas, twelve films.
What the number measures is how much of two careers happened in the same films. What it does not measure is whether the films were any good, or the performances. Who worked with whom has always been visible. The cast list also says how big each part was, in its billing order. This number is that billing order, added up across every film two people made together.
The score from the paper Joe DeMaio and I wrote is more fun as a game, so I built one. There are two game modes: Play Six Degrees of Kevin Bacon by the original rules, or play Six Degrees of Samuel L. Jackson, where every step costs its distance and the best chain runs through people who shared the biggest parts most often. New sets of puzzles go up from time to time, five in each mode, each set on a theme of its own. Every set that has gone up before is still there to play. This first set is all eighties films. It is harder than it looks, and the most obvious chain is not always the one that wins. Click below to play.
How this was made
- the network
- 259,489 actors, 20,236 films
- the films
- Feature films tied to a U.S. production company, released 1950 to 2025
- sources
- IMDb public data for the films, TMDB for cast lists and billing order
- built as
- An actor and film graph in Neo4j, then projected onto the actors
- edge weight
- Summed billing prominence across every film a pair shares
- distance
- One divided by the edge weight
- rows behind the figures
- 606,472 actor and film credits, after removing duplicates
- figures
- Built from the same tables, drawn in D3
- the paper
- Accepted at CAC 2026, Springer proceedings