Download presentation

1
Quiz 4-26-’07 Search

2
**Dijkstra’s Shortest Path Algorithm:**

Consider the following algorithm to find the shortest distance between two cities (S G) A. Maintain a list of cities C that you have visited so far. Cache the total path-cost g(c) and the predecessor city p(c) for every city c in C. B. Maintain a list of neighboring cities F (the fringe) that are not in C: Cache the total path-cost g(f) and the predecessor city p(f) for every city f in F. Cities in F are ordered according to their total path cost g(f) C. At every iteration of the algorithm, starting at S, visit the city in the fringe that has the lowest path-cost Add it to C and remove it from F. D. Add all new neighboring cities (including their g(f) and p(f)) into the fringe that are not already in C. (They could already be in F though with a different predecessor) E. If more than 1 copy of a city is in the fringe, only retain the one with lowest g(f). Delete all other copies. F. If you reach G, reconstruct the path from SG and report g(G) and the path. 1. [2pts] Work out the first 3 steps of Dijkstra’s algorithm and uniform cost search (UC with repeated states). This means: visit and expand the first 3 nodes starting at 0. Use the graph to the right. “0” is the source and “6” is the goal. 2. [2pts] Is this algorithm an instance of a informed or an uninformed search algorithm? (explain) 3. [2pts] Is this algorithm an instance of a tree search or a graph search 4. [2pts] Is this algorithm complete? (explain) 5. [2pts] Is this algorithm optimal? (explain – you may describe it as an instance of some algorithm in the book and refer to results described in the book)

3
**Solution Notation for Dijkstra: node (total path cost, predecessor)**

Notation for Uniform cost: node (total path cost) Dijkstra Nodes visited and expanded: 0 (0, null), 1 (1.1, 0), 3 (3.5, 1) Uniform cost Nodes visited and expanded: 0 (0), 1 (1.1), 0 (2.2) Uninformed (since does not use any estimate of the cost from node to a goal) Graph search (since the algorithm maintains a list of already expanded nodes) Yes, it is complete (guaranteed to find a solution) Yes, it is optimal (because it is uniform cost search with a detection of repeated states)

Similar presentations

OK

1. 2 3 Shortest Path Problem Weight of the graph –Nonnegative real number assigned to the edges connecting to vertices Weighted graphs –When a graph.

1. 2 3 Shortest Path Problem Weight of the graph –Nonnegative real number assigned to the edges connecting to vertices Weighted graphs –When a graph.

© 2018 SlidePlayer.com Inc.

All rights reserved.

To ensure the functioning of the site, we use **cookies**. We share information about your activities on the site with our partners and Google partners: social networks and companies engaged in advertising and web analytics. For more information, see the Privacy Policy and Google Privacy & Terms.
Your consent to our cookies if you continue to use this website.

Ads by Google

Ppt on aircraft landing gear Ppt on different sectors of economy Ppt on direct and online marketing Ppt on natural disasters Free pdf converter to ppt online Endocrine system anatomy and physiology ppt on cells Ppt on limitation act british columbia Ppt on fuel from plastic waste Ppt on natural disasters in india Ppt on hydraulic free piston engine