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).

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.