# 六程度的凯文培根

What do Leonard Nimoy, Stana Katic, and Robert Downey Jr. have in common? They all have a Bacon number of 2. The Six Degrees of Kevin Bacon, a game created early in 1994 by three Albright College students, is a classic problem in graph theory. The object of the game is to find the shortest path between a given actor and Kevin Bacon, where an intermediary connection can only be made between actors who have appeared together in a movie. For example, Stana Katic was inS.tilettoW.一世TH.Kelly Hu, who was in我呼吸的空气与凯文培根。虽然只有一个患有培根0（凯文培根本人）的人，但大多数涉及好莱坞电影业的个人都有6或更少的培根数。截至2013年4月28日，培根的甲骨文computed that of the actors listed on the互联网电影数据库，1,605,485中只有329个培根数为7或更高：

0. 1
1 2769
2 305215.
3. 1021901
4. 253177
5. 20.0.6.0.
6. 20.3.3.
7. 297.
8. 25.
9. 7.

In fact, using this table, we find that the average Bacon number is 2.994.

But why use Kevin Bacon as the “center” of the Hollywood universe? It all started when three college friends, Brian Turtle, Mike Ginelli, and Craig Fass, were snowed in one night watching movies on TV.FootlooseW.as followed by水银那W.一世TH.a commercial for a third Kevin Bacon movie coming on between the other two. This impromptu Kevin Bacon marathon caused the three friends to remark on the multitude of movies which included Bacon. It seemed like he was in everything! This prompted the question: Had Bacon ever worked with Robert De Niro? This was before the movie枕木已被释放，所以答案是否定的。然而，德尼罗在铁面无私与凯文·斯托克人在一起JFK.有培根。所以比赛六程度凯文培根出生。

Turtle, Ginelli, and Fass wrote a letter to Jon Stewart, explaining the game and how “Kevin Bacon was the center of the entertainment universe.” In the months that followed, they appeared onThe Jon Stewart Show霍华德斯特恩秀解释游戏并最终发布一本书，六程度的凯文培根。今天，游戏是众所周知的，既是与朋友一起玩的有趣游戏，以及许多计算机科学课程中的经典作业问题。

The breadth-first search (BFS) algorithm operates by processing vertices in layers: Those closest to the source vertex are evaluated first, and those most distant are evaluated last. The algorithm uses a “roving eyeball” approach, where the eyeball moves from vertex to vertex, starting at the source (Kevin Bacon). Associated with each vertex is a number$D_i$，这是从源顶点到顶点的成本$一世$。在我们的申请中，费用$D_i$运行BFS算法是与顶点相关联的actor的培根数$一世$。如果$S.$是源顶点，我们初始化成本$d_s = 0.$$d_i = \ infty$对所有人$一世\neq S$。算法如下所示，眼球从源顶点开始：

1.如果$V.$是眼球目前正在上的顶点，然后，所有$W.$邻近$V.$， 我们设置$D_w = D_v + 1$一世f$d_w = \ infty$

2.将眼球移动到另一个顶点$你$(which has not already been visited by the eyeball) such that$D_u \equiv D_v$。如果是不可能的话，我们搬到了一个$你$满足$D_u = D_v + 1$。如果TH.at is not possible, we are done.

## 关于Stephanie Blanda.

This entry was posted in数学游戏Math in Pop Culture。Bookmark thepermalink

1. 凯文培根 说：

好的文章
这是一篇非常丰富的文章。