Solution: Cities - 10, Seed - 17, Problem - 1

14 views
Skip to first unread message

Nick Wilson

unread,
Aug 2, 2012, 6:00:27 PM8/2/12
to byu-cs-3...@googlegroups.com
Hi All,

Attached is a picture of the solution I have obtained given the conditions listed in the subject line. My optimal tour costs 2610 units. Does anyone else reach this same result?

Thanks,
Nick
Nick's Solution.png

Sean Hill

unread,
Aug 2, 2012, 9:15:57 PM8/2/12
to byu-cs-3...@googlegroups.com
Hey Nick, I got exactly the same thing.Here's my 15 cities, same seed. What did you get?
tsp.png

Nick Wilson

unread,
Aug 2, 2012, 9:25:15 PM8/2/12
to byu-cs-3...@googlegroups.com
Yes, Sean, my implementation has generated the same results with 15 cities. Thanks for responding.

On Thu, Aug 2, 2012 at 7:15 PM, Sean Hill <sean.da...@gmail.com> wrote:
Hey Nick, I got exactly the same thing.Here's my 15 cities, same seed. What did you get?

--
You received this message because you are subscribed to the Google Groups "BYU CS 312 Summer 2012" group.
To post to this group, send email to byu-cs-3...@googlegroups.com.
To unsubscribe from this group, send email to byu-cs-312-sum...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/byu-cs-312-summer/-/zt6Wa5revoQJ.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Sean Hill

unread,
Aug 2, 2012, 9:45:53 PM8/2/12
to byu-cs-3...@googlegroups.com
What about time wise? And have you had problems with the 60 seconds thing? Mine will stop up to 55 seconds, but then my computer seems to flip out at 60 seconds and won't respond...

Nick Wilson

unread,
Aug 2, 2012, 9:55:49 PM8/2/12
to byu-cs-3...@googlegroups.com
I'm having the same issue.

On Thu, Aug 2, 2012 at 7:45 PM, Sean Hill <sean.da...@gmail.com> wrote:
What about time wise? And have you had problems with the 60 seconds thing? Mine will stop up to 55 seconds, but then my computer seems to flip out at 60 seconds and won't respond...

--
You received this message because you are subscribed to the Google Groups "BYU CS 312 Summer 2012" group.
To post to this group, send email to byu-cs-3...@googlegroups.com.
To unsubscribe from this group, send email to byu-cs-312-sum...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/byu-cs-312-summer/-/fzDF8N7SAokJ.

Nick Wilson

unread,
Aug 2, 2012, 10:05:40 PM8/2/12
to byu-cs-3...@googlegroups.com
Oh, I have figured out my problem; maybe you have committed the same error. My main while loop has this condition:

stopwatch.Elapsed.Seconds < 60

But the elapsed seconds for a stopwatch never reach 60.

Sean Hill

unread,
Aug 2, 2012, 10:18:24 PM8/2/12
to byu-cs-3...@googlegroups.com
So I was trying to do watch.Elasped.Seconds < 60, but the watch resets to 0 once it hits 60. So if you use watch.Elapsed.Minutes < 1, it'll work.

Nick Wilson

unread,
Aug 2, 2012, 10:59:47 PM8/2/12
to byu-cs-3...@googlegroups.com
Is it just me, or does pruning seem to have no effect on elapsed time, max states, and the end solution?

On Thu, Aug 2, 2012 at 8:18 PM, Sean Hill <sean.da...@gmail.com> wrote:
So I was trying to do watch.Elasped.Seconds < 60, but the watch resets to 0 once it hits 60. So if you use watch.Elapsed.Minutes < 1, it'll work.

--
You received this message because you are subscribed to the Google Groups "BYU CS 312 Summer 2012" group.
To post to this group, send email to byu-cs-3...@googlegroups.com.
To unsubscribe from this group, send email to byu-cs-312-sum...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/byu-cs-312-summer/-/Eaz6Mi0BMgQJ.

Jim Kaiser

unread,
Aug 2, 2012, 11:26:00 PM8/2/12
to byu-cs-3...@googlegroups.com
I think that it can have an effect on memory usage, but that will depend on how you implement your algorithm (specifically, your choice of agenda, what you add to it, and when you add to it). A priority queue implementation with pruning may have substantial savings in that regard. Other than that, the only additional effect I see is the run-time cost of pruning may increase the elapsed time a little. 

Jim

Paul Felt

unread,
Aug 3, 2012, 12:21:34 AM8/3/12
to byu-cs-3...@googlegroups.com
Good thoughts. Depending on your design choices, explicit pruning could have a major effect on your performance, a minor effect, or no effect at all. 

--Paul
Reply all
Reply to author
Forward
0 new messages