]> AND Private Git Repository - cours-maths-dis.git/blob - tpProlog/tp4/train.pl
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
modif algo euclide
[cours-maths-dis.git] / tpProlog / tp4 / train.pl
1
2 directTrain(forbach,saarbruecken).
3     directTrain(freyming,forbach).
4     directTrain(fahlquemont,stAvold).
5     directTrain(stAvold,forbach).
6     directTrain(saarbruecken,dudweiler).
7     directTrain(metz,fahlquemont).
8     directTrain(nancy,metz).
9     
10     
11 train(X,Y):-directTrain(X,Y).
12 train(X,Y):-directTrain(Y,X).
13
14
15 travelBetween(X,Y):- train(X,Y).
16 travelBetween(X,Y):- train(X,Z), travelBetween(Z,Y).
17
18
19