Given input string s, we start the search with the initial string t =" S " and then try to append a word w ∈ V to the tail of t for each step to search for anagrams of s. If we find that t yields no solution by appending any words to it, we pop back the last word from t and continue the search by appending a different word to the tail of t. Since there are |V | N possible sentences consisting of N words, naive DFS is intractable.
we need to reduce the search steps.