bare bones prog
this problem is a lot harder than i thought!  :)
the algorithm becomes practical with an optimization by the genius of Peter Norvig.  :)