Sponsored by NuSphere - PHP Software for PHP Application Developers - On Sale This Week for $100



Go Back   PHP-Editors > Programming Contests > PHP Programming Contests

PHP Programming Contests Everything to do with the PHP Programming Contests.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 2003-08-09, 02:54 AM
Junior Member
 
Join Date: Aug 2003
Posts: 5
jayant
Default

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.
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 2003-08-09, 03:14 AM
Junior Member
 
Join Date: Aug 2003
Posts: 5
jayant
Default

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.
Reply With Quote
  #3 (permalink)  
Old 2003-08-09, 03:56 AM
stuart's Avatar
Administrator
 
Join Date: Jan 2003
Location: Scotland
Posts: 472
stuart will become famous soon enoughstuart will become famous soon enough
Send a message via MSN to stuart
Default

Quote:
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)
Reply With Quote
  #4 (permalink)  
Old 2003-08-09, 03:58 AM
stuart's Avatar
Administrator
 
Join Date: Jan 2003
Location: Scotland
Posts: 472
stuart will become famous soon enoughstuart will become famous soon enough
Send a message via MSN to stuart
Default

Quote:
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
Reply With Quote
  #5 (permalink)  
Old 2003-08-09, 04:45 AM
Junior Member
 
Join Date: Aug 2003
Posts: 5
jayant
Default

.
.
.
.
Reply With Quote
  #6 (permalink)  
Old 2003-08-09, 05:59 AM
Junior Member
 
Join Date: Aug 2003
Posts: 5
jayant
Default

i just noticed:-
in case we have :-
distance{a,b} > distance{a,c} + distance{c,b}

then in our case P!=NP
hence good tours cannot be found in polynomial time. i.e we will require infinite time => cannot be solved.

=> we must have :-
distance{a,b} <= distance{a,c} + distance{c,b}
for all a,b and c such that
a,c,b belong to list of towns
Reply With Quote
  #7 (permalink)  
Old 2003-08-09, 06:16 AM
stuart's Avatar
Administrator
 
Join Date: Jan 2003
Location: Scotland
Posts: 472
stuart will become famous soon enoughstuart will become famous soon enough
Send a message via MSN to stuart
Default

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.
Reply With Quote
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.

Sponsored Links
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 12:07 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0
© Copyright 2003-2008 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.