English 字幕

← Magic Trick - Intro to Algorithms


Showing Revision 2 created 05/24/2016 by Udacity Robot.

  1. If you did this right, it should be the case that all of these edge boxes are checked off,
  2. and you ended up with an actor.
  3. Now--this is the magic trick part--I'm going to tell you which actor you ended up with.
  4. The answer is Kevin Bacon. Ta da! Pretty neat, huh? Let's try it.
  5. I'm going to follow maybe a different path than you did, but I'm going to do my best to try it.
  6. Just to try to thwart this, maybe I'll do directly to Kevin Bacon.
  7. I'll visit this edge. Now I'm at Kevin Bacon.
  8. I go to Dustin Hoffman.
  9. I go to Susan Saradon. I go to Julia Roberts.
  10. I can't go do Kevin Bacon now, because I'll be at a dead end.
  11. I visited all the other edges that have gone through Kevin Bacon,
  12. so I'll go to Dustin Hoffam to Robert Deniro to Meryle Streep again
  13. to Ann Hathaway back to Julia Roberts, and now I can go to Kevin Bacon and be done.
  14. It may or may not have been the same path that you followed,
  15. but I did end up at Kevin Bacon.
  16. You can try this a couple different ways, and you'll see that you'll always end up with Kevin Bacon.
  17. So that's our magic trick.
  18. This example illustrates two things that are central to this course.
  19. The first is the idea of a social network.
  20. We often think of social networks as being particular websites that exist these days,
  21. but really what a social network is is connections between individuals
  22. that capture relationships between them.
  23. These days, of course, they ubiquity and scope of social network data is exploding.
  24. Clever computer software is needed to reveal interesting patterns
  25. and answer important questions about this data.
  26. It's a really neat area.
  27. The second focus of this course is on the magic of algorithms.
  28. Algorithms are just how we organize computations to solve a particular problem.
  29. Some algorithms are really straightforward,
  30. but other algorithms take advantage of subtle mathematical properties
  31. to quickly and accurately provide an answer.
  32. Those are the ones that feel like magic.
  33. With that said, now I'm going to try to tell you how this trick actually worked
  34. and what it tells us about these kinds of structures.
  35. Let me first point out that this kind of structure where you've got a set of circles and lines
  36. connecting between them is what we in computer science and discrete math call graph.
  37. In this particular graph, the actors are playing the role of nodes, sometimes called vertices.
  38. And the movies are playing the role of edges or links.
  39. I'll probably mostly say "nodes" and "edges,"
  40. which kind of mixes a metaphor, but that's how I'm used to saying it.
  41. We can also talk about the degree of a node in a network.
  42. For example, this Dustin Hoffman node here is a node in the network.
  43. It's got degree 4 because there are 4 edges coming out of it--1, 2, 3, 4.