Presentation is loading. Please wait.

Presentation is loading. Please wait.

Graphs – Searching for Relationships COMP 200 & COMP 130 John Greiner & Stephen Wong.

Similar presentations


Presentation on theme: "Graphs – Searching for Relationships COMP 200 & COMP 130 John Greiner & Stephen Wong."— Presentation transcript:

1 Graphs – Searching for Relationships COMP 200 & COMP 130 John Greiner & Stephen Wong

2 Graphs – A Reminder Vertices/nodes + edges connecting vertices 1 3 2 5 4 Directed 1 3 2 5 4 Undirected

3 Social graph How are you connected to someone else? Math co-authors, centered on Paul Erdös.

4 Can Introducing Hepocyte Growth Factor Lead to Apoptosis?

5 How are Two Species Related?

6

7 Discovering Your Own Relations 7

8 How to Solve a Maze? 8

9 Solving a Maze: Right-Hand Rule 9 Good when you don’t know the maze layout.

10 How to Get to Work? 10

11 How to Route Email?

12 Focus on Three Algorithms Depth-first Search Breadth-first Search Dijkstra’s Shortest Path 12 First, just quick introductions to each.

13 Depth- vs. Breadth-First Search 13 17 2 3 8 9 5 4 6 12c 2b 2a 3c 4b 3b 3a 4a DFSBFS

14 Dijkstra’s Shortest Path 14 4 5 3 2 7 1 8 2 3 4 0

15 Dijkstra’s Shortest Path 15 4 5 3 2 7 1 8 2 3 4 0 7? 3? 4?

16 Dijkstra’s Shortest Path 16 4 5 3 2 7 1 8 2 3 4 0 7? 3 4?

17 Dijkstra’s Shortest Path 17 4 5 3 2 7 1 8 2 3 4 0 5? 3 4? 8?

18 Dijkstra’s Shortest Path 18 4 5 3 2 7 1 8 2 3 4 0 5? 3 4 8?

19 Dijkstra’s Shortest Path 19 4 5 3 2 7 1 8 2 3 4 0 5? 3 4 8? 6? 12?

20 Dijkstra’s Shortest Path 20 4 5 3 2 7 1 8 2 3 4 0 5 3 4 8? 6? 12?

21 Dijkstra’s Shortest Path 21 4 5 3 2 7 1 8 2 3 4 0 5 3 4 8? 6 12?

22 Dijkstra’s Shortest Path 22 4 5 3 2 7 1 8 2 3 4 0 5 3 4 8 6 12?

23 Dijkstra’s Shortest Path 23 4 5 3 2 7 1 8 2 3 4 0 5 3 4 8 6 9?

24 Dijkstra’s Shortest Path 24 4 5 3 2 7 1 8 2 3 4 0 5 3 4 8 6 9

25 Dijkstra’s Shortest Path 25 4 5 3 2 7 1 8 2 3 4 0 5 3 4 8 6 913? 12?

26 Dijkstra’s Shortest Path 26 4 5 3 2 7 1 8 2 3 4 0 5 3 4 8 6 913? 12

27 Dijkstra’s Shortest Path 27 4 5 3 2 7 1 8 2 3 4 0 5 3 4 8 6 913 12


Download ppt "Graphs – Searching for Relationships COMP 200 & COMP 130 John Greiner & Stephen Wong."

Similar presentations


Ads by Google