1 / 2

Towers of Hanoi

Quiz Tu. Oct.20. Towers of Hanoi. The objective of the puzzle is to move the entire stack to another rod, obeying the following rules: * Only one disk may be moved at a time.

arne
Télécharger la présentation

Towers of Hanoi

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. Quiz Tu. Oct.20 Towers of Hanoi The objective of the puzzle is to move the entire stack to another rod, obeying the following rules: * Only one disk may be moved at a time. * Each move consists of taking the upper disk from one of the rods and sliding it onto another rod, on top of the other disks that may already be present on that rod. * No disk may be placed on top of a smaller disk.

  2. Towers of Hanoi The objective of the puzzle is to move the entire stack to another rod, obeying the following rules: * Only one disk may be moved at a time. * Each move consists of taking the upper disk from one of the rods and sliding it onto another rod, on top of the other disks that may already be present on that rod. * No disk may be placed on top of a smaller disk. We will play Tower of Hanoi with only 3 disks! We will try to solve this problem using search. Identify the states, step-cost, successor function and goal for this problem. Draw the first three levels of the search tree (root node plus 3 levels).Avoid repeated states (i.e. consider it as a graph search problem). Provide the sequence of nodes you visit for Depth-limited search with a depth of L=3.During your search also show the list of nodes in the closed and open set at each iteration. Consider the following search heuristic: first increase the nr. of rods to 4. Then solve this easier problem optimally and use that as your heuristic h(n) for that node.Is this heuristic admissible? Is this heuristic consistent?(explain your answers). What is time and space complexity of A* search (with the above heuristic) expressed as a function of maximal depth (m), depth solution (d) and branching factor (b).

More Related