  We study random words in a weighted regular language that achieve the maximal
free energy using thermodynamics formalism. In particular, typical words in the
language are algorithmically generated which have applications in computer
security (anomaly detection) and software enegineering (test case generation).

Formal Languages and Automata Theory