a guest Dec 11th, 2019 93 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- path(City1, City2, Road, _, Dist, [City1, City2], _, Travel) :-
- leg(City1, City2, Road, Dist, Travel).
- path(City1, City3, Road, UsedRoads, Dist, [City1 | Path], VisitedCities, Travel) :-
- \+ member(City1, VisitedCities),
- \+ member(Road, UsedRoads),
- leg(City1, City2, Road1, Dist1, Travel1),
- path(City2, City3, Road, [Road, Road1 |UsedRoads], Dist2, Path, [City1|VisitedCities], Travel2),
- Dist1 < Dist2,
- Dist is Dist1 + Dist2,
- Travel1 < Travel2,
- Travel is Travel1 + Travel2.
RAW Paste Data