Graph Theory and the Movies - New Mexico State...

51
Graph Theory and the Movies Graphs 3 1/51

Transcript of Graph Theory and the Movies - New Mexico State...

Graph Theory and the Movies

Graphs 3 1/51

You may wonder what could graph theory have to do with movies.We’ll see two connections today.

The first comes from a variation of the idea of Six degrees ofseparation.

The second comes, as you might have guessed if you are familiar withthe picture from today’s title page, from the movie Good WillHunting.

Graphs 3 2/51

Six Degrees of Separation

Six degrees of separation refers to the theory everybody is at most sixsteps apart from anybody else. Said in graph theory language, ifpeople are the vertices, and we connect two people if they know eachother, then there is a path between any two people using at most sixedges.

This theory was proposed by Frigyes Karinthy in 1929. It becomebetter known through the play of the same name, written by JohnGuare in 1990.

This theory shows up in several examples of math and popular culture.

Graphs 3 3/51

Erdos Numbers

One example in math has to do with the mathematician Paul Erdos.

Graphs 3 4/51

Erdos, who lived through most of the 20th century, was one of themost prolific researchers, publishing over 1,500 articles with over 500coauthors. He was also quite eccentric. He was virtually homeless,traveling from university to university collaborating with a largenumber of mathematicians.

The idea of an Erdos number was introduced and mentioned in a1969 article. The number refers to how many connections is takes toget to Erdos, when a connection between people occurs when theypublish a joint paper.

The American Mathematical Society has a program that computesthe Erdos number for anybody. It is atwww.ams.org/mathscinet/collaborationDistance.html

Graphs 3 5/51

Kevin Bacon Numbers

Graphs 3 6/51

The Kevin Bacon game is played by picking an actor, and seeing ifyou can connect that actor with Kevin Bacon, where a connection ismade if two actors were in the same movie. The goal is to connect anactor with six or fewer connections.

The fewest number of connections it takes to reach Kevin Bacon iscalled the Kevin Bacon number.

Google has programmed the computation of the Kevin Baconnumber. You can find the number by typing “Kevin Bacon NumberActor” into a Google search for a given actor.

For example, Charlie Chaplin’s Kevin Bacon number is 2.

Graphs 3 7/51

How Large Can a Kevin Bacon Number Be?

Let’s try to find actors with large Kevin Bacon numbers.

Enter on your clicker the last name of an actor. Try to think ofpeople who you expect to have large Kevin Bacon numbers.

While Kevin Bacon found the game irritating at first, he ended upstarting a charitable organization, SixDegrees.org, based on it.

Graphs 3 8/51

Combined Erdos and Kevin Bacon Numbers

The Erdos-Bacon of a person is the sum of their Erdos number andtheir Kevin Bacon number. Who would have such a number?

Q Try to think of somebody who might have an Erdos-Bacon number.They need to have both an Erdos number and a Kevin Bacon number.

Let’s see some examples of people with an Erdos-Bacon number.

Graphs 3 9/51

Scientists with an Erdos-Bacon Number

Albert Einstein has an Erdos-Bacon number of 5.

Stephen Hawking has an Erdos-Bacon of 7. Surprisingly his Baconnumber is smaller than his Erdos number.

Carl Sagan has an Erdos-Bacon number of 5, although this can’t beconfirmed with the AMS website.

Graphs 3 10/51

Actors with an Erdos-Bacon Number

Danica McKellar, from the Wonder Years, has an Erdos-Baconnumber of 6.

Natalie Portman has an Erdos-Bacon number of 7.

Colin Firth has an Erdos-Bacon number of 7.

Graphs 3 11/51

A Few Others

If you allow signing a baseball as counting as co-authoring a paper,Hank Aaron has an Erdos-Bacon number of 3. He signed the samebaseball as Erdos did and has a Bacon number of 2.

Bill Gates’ Erdos-Bacon number is 6. His Bacon number is 2.

The policial commentator Noam Chomsky has an Erdos-Baconnumber of 6.

Graphs 3 12/51

Clicker Question

Q Does Erdos have an Erdos-Bacon number? If you think he does, enterthe number you’d guess he has. If not enter 99. By the way, bydefinition, his Erdos number is 0.

A He has a number, and it is 5, because his Kevin Bacon number is 5.

Q Does Kevin Bacon have an Erdos-Bacon number? Answer in thesame was as the previous question.

A He does not.

Graphs 3 13/51

Clicker Question

Q What is the smallest known Erdos-Bacon number?

A According to the book “The Simpsons and their MathematicalSecrets, by Simon Singh, Bruce Reznick, a mathematician at theUniversity of Illinois, has an Erdos-Bacon number number of 3, andthat this is the smallest known number.

The data above, if not confirmed by google/AMS searches, camefrom that book or the Wikipedia pageen.wikipedia.org/wiki/Erdos-Bacon number.

Graphs 3 14/51

Facebook

There have been a number of stories in the media about Facebookand the six degrees theory and sociological research based on theconnection. Here are a few of them.

www.nytimes.com/2011/11/22/technology/between-you-and-me-4-74-degrees.html? r=0

www.telegraph.co.uk/technology/facebook/8906693/Facebook-cuts-six-degrees-of-separation-to-four.html

www.facebook.com/notes/facebook-data-team/anatomy-of-facebook/10150388519243859

Graphs 3 15/51

Good Will Hunting

Graphs 3 16/51

We will watch a bit of the movie Good Will Hunting, staring MattDamon and Robin Williams, and talk about the math that shows up.Here is a bit of information about the movie from IMDB.com.

Though Will Hunting (Matt Damon) has genius-level intelligence(such as a talent for memorizing facts and an intuitive ability to provesophisticated mathematical theorems), he works as a janitor at MITand lives alone in a sparsely furnished apartment in an impoverishedSouth Boston neighborhood. An abused foster child, hesubconsciously blames himself for his unhappy upbringing and turnsthis self-loathing into a form of self-sabotage in both his professionaland emotional lives. Hence, he is unable to maintain either a steadyjob or a steady romantic relationship.

Graphs 3 17/51

The first week of classes, Will solves a difficult graduate-level mathproblem that Professor Gerald Lambeau (Stellan Skarsgard), a FieldsMedalist and combinatorialist, left on a chalkboard as a challenge tohis students, hoping someone might solve it by the semester’s end.Everyone wonders who solved it, and Lambeau puts another problemon the board – one that took him and his colleagues two years toprove. Will is discovered in the act of solving it, and Lambeau initiallybelieves that Will is vandalizing the board and chases him away.When Will turns out to have solved it correctly, Lambeau tries totrack Will down.

Graphs 3 18/51

Clicker Question

Do you think somebody who is untrained in mathematics could solvecomplicated math problems?

A Yes

B No

C I don’t know

Graphs 3 19/51

Answer

This has happened. Ramanujan, who will be mentioned in the movie,had no formal education in mathematics yet ended up as one of themost influential mathematicians of the first half of the 20th century inspite of dying when he was 33 years old.

We’ll watch some bits of the movie now.

Graphs 3 20/51

Clicker Question

Do you think Matt Damon is convincing as an untrainedmathematical genius?

A Yes

B No

Graphs 3 21/51

Here is an image of Will solving the problem. Notice that the picturesinvolved dots and lines connecting them. These are graphs.

Graphs 3 22/51

Trees

The problem Will solves is one of graph theory. A tree is a specialtype of graph. It is a graph for which there are no cycles. The graphson the left are all examples of trees. The graph on the right (from the7 bridges problem) is not a tree. Vertices of a tree which areconnected to only one other vertex are called leaves.

Graphs 3 23/51

Here is an example of a tree which indicates more why these kinds ofgraphs are called trees.

Graphs 3 24/51

Homeomorphically Irreducible Trees

Graphs 3 25/51

The problem Will solves is to determine all “homeomorphicallyirreducible trees with 10 vertices”.

Let’s look at a short video talking about what this means. But, wemention one point in a little more detail than in the video. Thedegree of a vertex on a graph is the number of edges going into it.This notion came up while solving the 7 bridges of Konigsbergproblem. A tree is irreducible if the degree of a vertex is never 2.

The problem in Good Will Hunting

NPR story on the math of the movie

Graphs 3 26/51

The 10 Homeomorphically Irreducible Trees with 10Vertices

Graphs 3 27/51

Graphs 3 28/51

Determination of all the Trees

It is correct that the problem Will Hunting solved is much easier thanindicated in the movie. Here is one approach to solving it. Theproblem is to find all 10 vertex trees which are irreducible. So, wecan’t have any vertex of degree 2.

We approach the problem by focusing on a vertex of largest possibledegree. Since a vertex can be connected to at most every othervertex, the largest possible degree is 9.

Perhaps what is most important is to find a systematic approach tolisting all possible trees. Drawing some trees satisfying therequirement is not terribly hard. Knowing when you have them all isthe harder part of the problem.

Graphs 3 29/51

A Vertex of Degree 9

If one vertex has degree 9, then it must be connected to every othervertex. There can be no other connections else there is a cycle. Hereis a drawing of such a tree.

Graphs 3 30/51

A Vertex of Degree 8?

If there is a vertex of degree 8, then it is connected to all but oneother vertices, as in the following picture. The 10th vertex must beconnected to another vertex, but that will make such a vertex havedegree 2. This is then not allowed, so this possibility cannot happen.

Graphs 3 31/51

A Vertex of Degree 7

If there is a vertex of degree 7, there aren’t too many options. Thefollowing picture shows one vertex connected to 7 others.

Graphs 3 32/51

We have to add two more vertices. We cannot connect them to thebase and keep it having degree 7. We can’t connect one each to twoof the other vertices else these will have degree 2. So, both must beconnected to just one of the top vertices.

Graphs 3 33/51

A Vertex of Degree 6

If there is a vertex of degree 6 then, as with the case of degree 7,there is only one possibility. The reasoning is very similar to thatcase. The following picture shows the only possibility.

Graphs 3 34/51

There are different ways to draw these options. For example, here isanother way to draw the degree 7 option.

Graphs 3 35/51

There are different ways to draw these options. For example, here isanother way to draw the degree 7 option.

Graphs 3 36/51

There are different ways to draw these options. For example, here isanother way to draw the degree 7 option.

These two represent the same graph; we can just drag the threevertices on the top right along with edges connecting them to thebottom or the picture.

Graphs 3 37/51

A Vertex of Degree 5

It turns out that having a vertex of degree 5 is perhaps the mostcomplicated case.

If we have one vertex connected to five others, then we have this aspart of the tree.

Graphs 3 38/51

We need to add four more vertices. We have to avoid vertices ofdegree 2. So, if we connect vertices to one of the top vertices, wehave to connect more than 1.

One option is to connect 4 vertices to one of them. Another is toconnect 2 vertices each to two of them.

Graphs 3 39/51

The final option is to connect two vertices to one of the original fivevertices at the top, and then the final two vertices to one of those justadded.

Graphs 3 40/51

A Vertex of Degree 4

With similar reasoning we can see that there are two trees whoselargest degree is 4, and two trees which have no vertex of degreelarger than 3. Without going through the details, here are pictures ofthem.

Graphs 3 41/51

And, finally, the trees with no vertex of degree larger than 3.

Graphs 3 42/51

All 10 trees

Here is a picture from the web listing all 10 trees.

1 2 3 4

5

9 10

6 7

8

Graphs 3 43/51

These pictures look different than the ones shown earlier, but theyrepresent the same information. The idea of the word“homeomorphically” is that how a tree is drawn isn’t important; ifyou can shift the vertices around without changing the edges, youhave the same graph, essentially.

We’ll compare the graphs in this latest picture with the ones drawnearlier. The issue will be to try to figure out, given one of the treesdrawn before, which one of the 10 in the latest picture has the sameinformation.

Graphs 3 44/51

Clicker Question

Which of these trees is the same as the tree on the left? Enter thenumber on your clicker.

1 2 3 4

5

9 10

6 7

8

Graphs 3 45/51

Answer

8 It is the tree with a vertex connected to all other vertices.

1 2 3 4

5

9 10

6 7

8

Graphs 3 46/51

Clicker Question

Which of these trees is the same as the tree on the left? Enter thenumber on your clicker.

1 2 3 4

5

9 10

6 7

8

Graphs 3 47/51

Answer

9 It is a tree with one vertex of degree 5. Those are 4, 6, and 9. It has7 leaves so cannot be 6, which has 8 leaves. If we look at the degree5 vertex, it is connected to only one vertex of degree 3. The degree 5vertex in tree 4 is connected to two degree 3 vertices. So, it must betree 9.

1 2 3 4

5

9 10

6 7

8

Graphs 3 48/51

Clicker Question

Which of these trees is the same as the tree on the left? Enter thenumber on your clicker.

1 2 3 4

5

9 10

6 7

8

Graphs 3 49/51

Answer

5 It is a tree with no vertex of degree larger than 3. There are twosuch, 5 and 7. The way to distinguish 5 and 7 is that the tree on theleft has a vertex of degree 3 that is not connected to any leaf. Thathappens in 5 but not in 7.

1 2 3 4

5

9 10

6 7

8

Graphs 3 50/51

Next Time and Assignment 7

Next time we’ll watch the movie Sphereland. This is a followup to themovie Flatland we saw a couple weeks ago. In the movie Sphereland,the idea of dimensional higher than the third comes up.

Assignment 7 is now on the course websites. It is about the last twoweeks of class material. It is due a week from Thursday.

Graphs 3 51/51