[Purdue-pm] Mark's Travelling Capital Problem

Dave Jacoby jacoby at purdue.edu
Fri Feb 18 06:16:48 PST 2011


I wrote code to determine Mark Senn's shortest and longest path using 
what I thought was the obvious most-remote capital in the lower 48 
(Maine) and the obvious method, choosing the closest capital (or the 
longest, depending on the decision.

I think the decision for the longest is sound. I cannot imagine a more 
convoluted path than longest.png, but I'm seeing problems with the 
"shortest" graph. Clearly, UT AZ CA NV OR WA would be a better choice 
than leaving AZ for last. I'm not sure the New England path is optimal, 
either.

Which means I'll have to come up with something better, that recurses 
more. I don't want to check all possible choices, as that's going to be 
48! choices and I want an answer before the sun burns out. But maybe 
starting out with all 48 and definitely checking through the 5 closest 
capitals at each time. This will kick up the search time, which right 
now sits at less than a second on my desktop system.

Upon request, I can share my state data and distance algorithm, although 
I did find both through Google searches.
-- 
Dave Jacoby                         Address: WSLR S049
Code Maker                          Mail:    jacoby at purdue.edu
Purdue University                   Phone:   765.49.67368
-------------- next part --------------
A non-text attachment was scrubbed...
Name: longest.png
Type: image/png
Size: 51555 bytes
Desc: not available
URL: <http://mail.pm.org/pipermail/purdue-pm/attachments/20110218/ea35d2dc/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: shortest.png
Type: image/png
Size: 53651 bytes
Desc: not available
URL: <http://mail.pm.org/pipermail/purdue-pm/attachments/20110218/ea35d2dc/attachment-0003.png>


More information about the Purdue-pm mailing list