Transcription of Algorithms Graph Search - Stanford University Computer …
{{id}} {{{paragraph}}}
Graph Search AlgorithmsSteve Mussmann and Abi SeeShortest Path ProblemsFind the shortest path from source to targetApplications: RoboticsCommercialSearch & RescueDomesticApplications: Route-PlanningApplications: Game-playingTic-tac-toeGoGraphs have nodes and many nodes are there?How many edges?GraphsGraphsWe cast real-world problems as can be undirected or can have to represent grids as graphs?Each cell is a node. Edges connect adjacent have no edgesHow to represent grids as graphs? Graph TraversalAlgorithmsGraph Traversal Algorithms These Algorithms specify an order to Search through the nodes of a Graph . We start at the source node and keep searching until we find the target node. The frontier contains nodes that we've seen but haven't explored yet. Each iteration, we take a node off the frontier, and add its neighbors to the First Search DFS uses "last in first out".This is a First Search vs. Depth First SearchBFS uses "first in first out".This is a First Search Activity: BFS vs Explore: Try moving the source and target Try drawing wallsDiscussion Does BFS necessarily return the shortest path?
Applications: Game-playing Tic-tac-toe Go. Graphs have nodes and edges. How many nodes are there? How many edges? Graphs . Graphs We cast real-world problems as graphs. Graphs can be undirected or directed. Edges can have weights.
Domain:
Source:
Link to this page:
Please notify us if you found a problem with this document:
{{id}} {{{paragraph}}}