Ok. I think, I got the idea. I will say it. Correct me if I'm wrong.

Phase1:
First, I will generate numerical codes for all the words available with me.
Then sort it according to the codes.
Done !

Phase2:
Then, in the word generator, when all possible combinations of words are generated based on the string inputted by the user (using one of the methods posted in this thread - permutations).
Then, corresponding numerical codes are also generated for this generated words.
Done !

Phase3:
Then, these codes of the newly generated words are searched with those in which are generated in the first phase (available words list). If a match is found, then display it.
Done !

Am I right ?
Did I missed something ?