Path Finding Algorithm BFS Dijkstra - PowerPoint PPT Presentation

1 / 1
About This Presentation
Title:

Path Finding Algorithm BFS Dijkstra

Description:

deq a path and cost (if takes to the dest, quit) for each edge. Find node at end. if node is not on current path. enq a path including the node and total cost ... – PowerPoint PPT presentation

Number of Views:56
Avg rating:3.0/5.0
Slides: 2
Provided by: Prof568
Category:

less

Transcript and Presenter's Notes

Title: Path Finding Algorithm BFS Dijkstra


1
Path Finding Algorithm (BFS / Dijkstra)
  • create a q priority queue
  • enq the origin with cost of 0
  • while (q is not empty)
  • deq a path and cost (if takes to the dest,
    quit)
  • for each edge
  • Find node at end
  • if node is not on current path
  • enq a path including the node and
    total cost
  • if node is dest, quit not for
    Dijkstra
  • end
  • end
  • end
Write a Comment
User Comments (0)
About PowerShow.com