Skip to content

kolarski/PrologTutorialNotes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Programming In Prolog (My sandbox)

Lecture notes

These lecture notes are based on the awsome 4 part video about Prolog from The Simple Engineer - Prolog Programming

Other articles from internet

I copied them here because of Markdown`s beautiful formatting. Credits goes to the authors

Logic Problems & their solutions in Prolog

The Criminal

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. 

Solution

The Graph coloring problem

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 Image

Solution

Query

germany(SH, MV, HH, HB, NI, ST, BE, BB, SN, NW, HE, TH, RP, SL, BW, BY).

Resourses:

About

This is my lecture notes on the prolog youtube tutorial

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages