Here's another one, so-called Kevin Bacon number, and nowadays actually

you can type Bacon and an actor's name and get the answer to this.

So there's,

if you're not familiar with it, you can become familiar with it by Kevin Bacon,

or the idea is you have a graph where the vertices are actors.

And the edge,

you think of an edge connecting two actors, if they were in a movie together.

And so, what you want to find is given an actor,

[COUGH] what's the shortest way to get to

Kevin Bacon connected by, so, we have ed is for

actors and edge is for movies in a connection of actors in the movie.

So Buzz Mauro and Tina Ramirez were in Sweet Dreams together and

these two actors were in this movie together and so forth.

And you get away to Kevin Bacon from any actor and

this is another pop culture application.

This is the so-called six degrees, which you can get to anyone with six steps

in this way, so that's all implementation of breadth first search.

On the Kevin Bacon graph, where we include one vertex for

each performer, one vertex for each movie.

Connect the movie to all performers that appear in the movie, and the shortest

path from Kevin Bacon to every actor if you follow back through that path.

You get the proof of the got a Kevin Bacon number for

each actor and we have implementation of that on the book site.