My entry to the Phraser compo
The1
has posted my entry to his
Phraser programming competition here. It's in C# and shows some basic techniques like clever
usage of a hashtable and recursion. A list of all entries to
the compo can be found
here. Competitions are fun, it keeps the mind fresh
.
My algorithm is based on encoding words as digit sequences and then matching the sequences with the phone number at hand. I first thought an algorithm which calculates all permutations of the phone number in characters which would then be compared with a word list would be more efficient, but a fast calculation showed more than 11,000 different permutations had to be calculated each time. An average human knows roughly about 8,000 words (or less) so a wordlist would be more appropriate. Although I learned from my years in the demoscene that precalculation is key to be efficient in some algorithms, it is also key which precalculation you perform.