COS 226 Programming Assignment 9 - Fix
Updated April 30:
Oops...even the corrected version is not yet correct. For those who
are interested and struggled with this, we have updated the following
yet again to get the new correct algorithm. (Oh please let this be
correct).
The two-way search, as described in the handout, does not necessarily
give back the true shortest path in all instances (this is a problem
using the crow-flies distance as well as the grid-to-grid distance).
At this point, we are not going to change the assignment as it is too
close to the deadline, however for those interested we will offer one
point of extra credit for implementing the correct method described
below.
The bug in the algorithm is the exit condition which we described
for when the algorithm ends.
Originally, we said that as soon as you find a vertex which has been
added to both trees, return the path which goes from s to
this vertex concatenated with the path from this vertex to t.
This certainly gives you a legitimate path connecting s to
t. Unfortunately, there is no gurantee that this path is the
true shortest path.
Corrected algorithm: [Updated April 30]: