1 / 85

233-234

233-234. Sedgewick & Wayne (2004); Chazelle (2005). Adjacency lists. Hansel & Gretel. random walk. 1. Birds eat the bread crumbs. DFS/BFS. 2. They don’t. Diffusion equation. Random walk. Diffusion equation. Normal distribution. 3 views of the same thing. Hansel & Gretel.

easter
Download Presentation

233-234

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 233-234 Sedgewick & Wayne (2004); Chazelle (2005)

  2. Adjacency lists

  3. Hansel & Gretel random walk 1. Birds eat the bread crumbs DFS/BFS 2. They don’t

  4. Diffusion equation

  5. Random walk Diffusion equation Normal distribution 3 views of the same thing

  6. Hansel & Gretel With bread crumbs one can find exit in time proportional to V+E DFS/BFS

  7. Breadth First Search

  8. Breadth First Search A H B C G D E F

  9. Breadth First Search 0 A distance from A H visit(A) B C G D E F get Queue: A

  10. Breadth First Search F 1 0 A H F discovered B C G D E F Queue:

  11. Breadth First Search B 1 0 A H B discovered B C G D E F 1 Queue: F

  12. Breadth First Search C 1 0 A H C discovered B C G 1 D E F 1 Queue: F B

  13. Breadth First Search 1 G 0 A H G discovered B C G 1 1 D E F 1 Queue: F B C

  14. Breadth First Search 0 A H 1 A finished B C G 1 1 D E F 1 get Queue: F B C G

  15. Breadth First Search 0 A H 1 A alreadyvisited B C G 1 1 D E F 1 Queue: B C G

  16. Breadth First Search D 2 0 A H 1 D discovered B C G 1 1 D E F 1 Queue: B C G

  17. Breadth First Search 2 E 0 A H 1 E discovered B C G 1 1 D E 2 F 1 Queue: B C G D

  18. Breadth First Search 0 A H 1 F finished B C G 1 1 2 D E 2 F 1 get Queue: B C G D E

  19. Breadth First Search 0 A H 1 B C G 1 1 2 D E 2 F 1 Queue: C G D E

  20. Breadth First Search 0 A H 1 A alreadyvisited B C G 1 1 2 D E 2 F 1 Queue: C G D E

  21. Breadth First Search 0 A H 1 B finished B C G 1 1 2 D E 2 F 1 get Queue: C G D E

  22. Breadth First Search 0 A H 1 A alreadyvisited B C G 1 1 2 D E 2 F 1 Queue: G D E

  23. Breadth First Search 0 A H 1 C finished B C G 1 1 2 D E 2 F 1 get Queue: G D E

  24. Breadth First Search 0 A H 1 A alreadyvisited B C G 1 1 2 D E 2 F 1 Queue: D E

  25. Breadth First Search 0 A H 1 E alreadyvisited B C G 1 1 2 D E 2 F 1 Queue: D E

  26. Breadth First Search 0 A H 1 G finished B C G 1 1 2 D E 2 F 1 get Queue: D E

  27. Breadth First Search 0 A H 1 E alreadyvisited B C G 1 1 2 D E 2 F 1 Queue: E

  28. Breadth First Search 0 A H 1 F alreadyvisited B C G 1 1 2 D E 2 F 1 Queue: E

  29. Breadth First Search 0 A H 1 D finished B C G 1 1 2 D E 2 F 1 get Queue: E

  30. Breadth First Search 0 A H 1 D alreadyvisited B C G 1 1 2 D E 2 F 1 Queue:

  31. Breadth First Search 0 A H 1 F alreadyvisited B C G 1 1 2 D E 2 F 1 Queue:

  32. Breadth First Search 0 A H 1 G alreadyvisited B C G 1 1 2 D E 2 F 1 Queue:

  33. Breadth First Search H 3 0 A H 1 H discovered B C G 1 1 2 D E 2 F 1 Queue:

  34. Breadth First Search 0 A H 3 1 E finished B C G 1 1 2 D E 2 F 1 get Queue: H

  35. Breadth First Search 0 A H 3 1 E alreadyvisited B C G 1 1 2 D E 2 F 1 Queue:

  36. Breadth First Search 0 A H 3 1 H finished B C G 1 1 2 D E 2 F 1 STOP Queue:

  37. Breadth First Search 0 A distance from A H 3 1 B C G 1 1 2 D E 2 F 1

  38. Breadth-First Search

  39. a v a b c d b c d

  40. #876 Kevin Bacon #1 Rod Steiger Donald Pleasence #2 #3 Martin Sheen Barabasi

More Related