Walking downhill, you are on an intersection numbered 4. Its open neighbors are numbered 3, 3 and 5. Where can you step?
- A.To either 3: both lead down to the destination in 3 more steps
- B.Only to the first 3 you check
- C.To the 5, because it is further from the destination
- D.Nowhere: two 3s means there is no path
Answer Why?
Why does the computer take intersections from the FRONT of the to-visit list?
- A.The front holds the oldest, so everything 1 step away is handled before anything 2 steps away
- B.So the search heads toward the start
- C.It doesn't matter: any order gives the right numbers
- D.So blocked intersections are skipped
Answer Why?
What in the algorithm makes sure no intersection is ever numbered twice?
- A.Only a neighbor that does not have a number yet gets one and joins the list
- B.Always taking the intersection at the front of the list
- C.Stopping when the list is empty
- D.Walking downhill from the start
Answer Why?
What makes sure everything 1 step from the destination is numbered before anything 2 steps away?
- A.New intersections join the end of the list, and the next one is always taken from the front
- B.Stopping when the list is empty
- C.Looking at the open neighbors only
- D.Walking downhill from the start
Answer Why?