cmiller: I wish. It's palindromes I seek. I'm hoping to reduce the amount of processing by eliminating pairs of words that don't contain any letters in common.
There was an easy solution for anagrams presented long ago to me, I think in _Programming Pearls_ actually. Sort the letters, compare the sorted results, if they match, they're anagrams.
That's only for single words, though. Palindrome words would be easy enough too. I'm trying to take a nearly 2 meg wordfile and process it so that it can spit out palindromes.
So far I've figured out that you can create palindromes from smaller palindromes, that pivot points in palindromes are always either a position (in the case of even-length palindromes) or else a position and a letter (in the case of odd-length palindromes), and that I have a sort of a system to figure out whether two words can chain together to any degree. Problem is, the system doesn't scale to that amount (which I'm trying to fix with processing the file in other ways first) and the rest of the things I figured out, besides being relatively obvious, don't help reduce the number of word combinations.
Any help is appreciated, but I'm sure eventually I'll get it.