This is something like Scrabble or Boggle, right? Well, what do you do, pre-create a dictionary by sorting the letters in each word. So word becomes dorw . Then you push all this into the Trie data structure. So, in your Trie, the dorw sequence will point to the word value.
[Note that since we sorted the words, they lose their uniqueness, so a single sorted word can indicate several different words. those. your Trie must store a list or array on its data nodes]
You can save this structure if you need to load it quickly without any sorting steps.
What you do then is take your introductory letters, and you sort them. Then you start going through your Trie recursively. If the current letter matches an existing path in Trie, you follow it. Since you may have an unused letter, you can also delete the current letter.
And it's that simple. Every time you come across a node in your Trie that matters, it is a word that you can make from the letters you used to do this. You simply add these words to the list when you find them, and when the recursion is complete, you have found all possible words.
If you have duplicate letters at your input, you may need additional logic to prevent multiple instances of the same word (if you do not want it). This logic can be invoked during the step that βleavesβ the letter (you simply skip all duplicate letters) to the next letter.
[edit] It seems you want to do the opposite. My solution above finds all possible words that can be made from a set of letters. But you want to check a specific word to see if it is allowed, given the set of letters that you have.
It's simple.
Store the available letters as a histogram. That is, for each letter you save the number that you have. Then you go through each letter in the test word, creating a new histogram when you go. As soon as one of your histograms exceeds the value in your available letters, the word cannot be made. If you get to the end, you can successfully make a word.