Last active
November 8, 2019 15:08
-
-
Save batate/f8f02d389c56186d8260a81701be20ae to your computer and use it in GitHub Desktop.
States coloring problem in Prolog
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* see more at grox.io */ | |
different(red, green). different(red, blue). | |
different(green, red). different(green, blue). | |
different(blue, red). different(blue, green). | |
coloring(Alabama, Mississippi, | |
Georgia, Tennessee, Florida) :- | |
different(Mississippi, Tennessee), | |
different(Mississippi, Alabama), | |
different(Alabama, Tennessee), | |
different(Alabama, Mississippi), | |
different(Alabama, Georgia), | |
different(Alabama, Florida), | |
different(Georgia, Florida), | |
different(Georgia, Tennessee). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment