Map Colouring

bdy(Colour1, Colour2):-
  % Here you have to specify which colours can be used:
  Colours = [red, blue, green, pink],               
  member(Colour1, Colours),
  member(Colour2, Colours),
  Colour1 \= Colour2.

balkans(Kosovo, Serbia, Macedonia, Albania, Montenegro, BosniaHerzegovina,
        Croatia, Slovenia):-
  % Here you have to specify which countries have a common boundary:
  bdy(Kosovo, Serbia),
  bdy(Kosovo, Macedonia),
  bdy(Kosovo, Albania),
  bdy(Kosovo, Montenegro),
  bdy(Serbia, Macedonia),
  bdy(Serbia, Montenegro), 
  bdy(Serbia, BosniaHerzegovina),
  bdy(Serbia, Croatia),
  bdy(Macedonia, Albania),
  bdy(Albania, Montenegro),
  bdy(Montenegro, BosniaHerzegovina),
  bdy(BosniaHerzegovina, Croatia),
  bdy(Croatia, Slovenia).

LPA Index     Home Page