dragonwasrobot / learn-prolog-now-exercises

My solutions to the exercises and practical sessions of the book 'Learn Prolog Now!' by Patrick Blackburn, Johan Bos, and Kristina Striegnitz.
288 stars 81 forks source link

Generalise the solution to exercise 10.4 #24

Closed ghost closed 8 years ago

ghost commented 8 years ago

Now it solves the general case -- when the cities and the connections between them form an arbitrary graph. This solution tries not to get into loops and therefore does not generate all solutions when there is a loop (in this case there would be infinitely many solutions).