Also, that tree is a great representation; it's much more clear to me now. Thanks Weregoose!
Actually, this seems like a by-far better solution. Why weren't we doing this from the beginning?
I think this requires more steps computationally, but it may be simpler to program on a computer, I don't know. Using the same inputs from earlier, make a graph like the one below, then ask, "Which Hamiltonian path gives the greatest sum?" – the only restriction being that you must return to the starting point again after landing on all four vertices (which agrees with the definition of a Hamiltonian path, so rotations are automatically accounted for).
The answer should remain 01011→11110→10100→10001→01011.
That might be simple for me to program. I'll have to ruminate on the possibilities.
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.
» Go to Registration page
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum