  We extract brilliant ideas of Sandi Klavzar, Michel Mollard, and Marko
Petkovsek who used them to solve one very specific enumeration problem, namely
counting the number of words in the alphabet {0,1} of length n avoiding two
consecutive ones, and having exactly k such neighbors, to a much more general
setting where one has any (finite) alphabet, and any (finite) set of forbidden
subwords. More important, we fully implement it in Maple.
