Re: $100.00 Programming Contest
- Posted by David Cuny <dcuny at LANSET.COM> Mar 02, 2002
- 543 views
Euman wrote: > I would just guess the faster algorythm being something that much like > a syntax highlighter in an editor would change every letter in a select > number of words until all those words match dictionaries then proceed > to the next small chunk of words replacing the already captured tokens > until these words matched then the next set of words until EOF or EOS This sort of thing of brute force generate and test approach is trivial in Prolog. The problem is when it encounters a word it doesn't have in the dictionary. That was why I asked about it earlier. It has to backtrack and run through every possible combination before it figures out that it can't solve the word. At that point, you can flag the word as unknown and continue. But (depending on how efficient your pruning is) you've ended up wasting a lot of time backtracking. -- David Cuny