My solution involves assigning a different prime number to each letter "a" to
"z" (and the same prime numbers to the capital letters). Then assign a value to
each state as the product of the primes corresponding the letters in the state
name.
Then a pair of states can be rearranged into another pair if and only if the
product of the values assigned to the first pair equals the product of the
values assigned to the second pair.
So create a table of all possible such products, each product associated with a
list of pairs. Then any list which contains more than one pair gives a solution.
---------------------------------
Yahoo! Answers - Got a question? Someone out there knows the answer. Tryit now.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Unicon-group mailing list
Unicon-group@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/unicon-group