suppose pizza dude starts from A
follows A L I G N , now does he need to return to A from N or do we stop him at N, this will affect the distance travelled by him and also the route that he needs to take.
suppose we have a direct route from A-B .
will there be a possibility that the there exists routes A-C and C-B such that Distance(A-B) > Distance(A-C) + Distance(C-B)
hence shortest distance from A to B will be via C and not the direct path.
If Distance(A-B) > Distance(A-C) + Distance(C-B) has to be considered then good tours cannot be found in small times.
Originally posted by jayant@Aug 9 2003, 06:54 AM suppose pizza dude starts from A
follows A L I G N , now does he need to return to A from N or do we stop him at N, this will affect the distance travelled by him and also the route that he needs to take.
if A L I G N was the drop-offs, then you can start and stop anywhere. you do NOT have to end in your chosen start point. For example:
A(start)->I->G->N->L(stop)
Originally posted by jayant@Aug 9 2003, 07:13 AM also,
suppose we have a direct route from A-B .
will there be a possibility that the there exists routes A-C and C-B such that Distance(A-B) > Distance(A-C) + Distance(C-B)
hence shortest distance from A to B will be via C and not the direct path.
If Distance(A-B) > Distance(A-C) + Distance(C-B) has to be considered then good tours cannot be found in small times.
That's correct direct routes do NOT always mean the shortest route. And the shortest route wins over shortest time (as long as execution time is not exceeded
use what ever algorithm you thing will work best with this puzzle. It up to you to select the right balance - i.e. find a algorithm that will beat everyone elses, baring in mind the shortest route is more important than time taken (within the contests limits).
That's the fun of it, trying to figure out when to stop looking for the ultimate solution in the allowed time.
Must read Review for Serious PHP Developers
NuSphere PhpED 5.5
: The Staff of php-editors.com recently spent a few days working with NuSphere
PhpED 5.5
(a popular PHP IDE) and
NuCoder 2.0
(a PHP Encoding Utility), read up on all the details.