My problem is conceptually similar to solving anagrams, except I can\'t just use a dictionary lookup. I am trying to find plausible words rather than real words.
I h
Consider the set of K letters as vertices in a graph.
Add directed edges to represent the 2-grams from each letter to all the others, with weights that correspond to their probabilities.
A "word", then, is a path through the (complete, directed) graph.
You are looking for the best (least- or most-weighted) "word" (path) that uses all the letters (visits all the vertices).
This is the asymmetric Traveling Salesman Problem. It's NP-complete. I don't think it's going to get easier if you use N-grams bigger than N=2, so you're not likely to find an efficient algorithm, but let us know if you do
(Simulated Annealing or something like it is probably the way to go)