After watching my brother cheating in an iphone game like scrabble I was wondering what was the algotithm behing it.
Given some letters: A B C T E E
And SQL table full of correct words.
How would I create all combinations of letters for making afterwars a select like: Select * from words where word IN ('A','AT',...), just to take from those combinations the ones that are correct ?¿
Another possible way could be a SQL table with every letter in a column for each word. But afterwards the system should verify that any word form the select has more time the same letter given.
Ex:
c1 c2 c3 c4 t e e a i r
This question is just for feeding curiosity, and learning witch algorithm it might be used in for creating all those combinations (with full and partial given letters) to check afterwards if they exist.
Thanks!