These lecture notes are based on the awsome 4 part video about Prolog from The Simple Engineer - Prolog Programming
- Part 1 - Facts, Rules and Queries
- Part 2 - Syntax, Questions and Structs
- Part 3 - Scope, Structures and Arithmetic Operations
- Part 4 - Lists, Pairs and the Member Function
I copied them here because of Markdown`s beautiful formatting. Credits goes to the authors
A says: "It's not me"
B says: "It's D"
C says: "It's B"
D says: "It's not me
There is only one criminal and the rest are telling the truth.
Find who the criminal is.
Given a map divided into regions, can you color the map using a defined amount of colors such that no two adjacent regions have the same color? In the image below, we start with the left map, uncolored, and try to find a map coloring using only four different colors. The right map is one of the possible solutions. You can read more about how the solution is written here: Source
germany(SH, MV, HH, HB, NI, ST, BE, BB, SN, NW, HE, TH, RP, SL, BW, BY).