SHARE
TWEET

Untitled

a guest Dec 11th, 2019 93 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. path(City1, City2, Road, _, Dist, [City1, City2], _, Travel) :-
  2.                                  leg(City1, City2, Road, Dist, Travel).
  3.  
  4. path(City1, City3, Road, UsedRoads, Dist, [City1 | Path], VisitedCities, Travel) :-
  5.                                 \+ member(City1, VisitedCities),
  6.                                 \+ member(Road, UsedRoads),
  7.                                  leg(City1, City2, Road1, Dist1, Travel1),
  8.                                  path(City2, City3, Road, [Road, Road1 |UsedRoads], Dist2, Path, [City1|VisitedCities], Travel2),
  9.                                  Dist1 < Dist2,
  10.                                  Dist is Dist1 + Dist2,
  11.                                  Travel1 < Travel2,
  12.                                  Travel is Travel1 + Travel2.
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top