Eric Lippert recently blogged about this in his article Every Tree There Is. The article refers to code written in the previous article Every Binary Tree There Is.
If you can enumerate all the binary trees then it turns out you can enumerate all the solutions to dozens of different equivalent problems.