Prolog Problems
Offered By: Independent
Course Description
Overview
This is a remake of the P-99: Ninety-Nine Prolog Problems collection that I assembled over several years of teaching at the University of Applied Sciences (Berner Fachhochschule) at Biel-Bienne, Switzerland. The collection is structured into seven sections. I have renumbered the problems in order to get more freedom to rearrange things within the sections.
The purpose of this problem collection is to give you the opportunity to practice your skills in logic programming. Your goal should be to find the most elegant solution of the given problems. Efficiency is important, but logical clarity is even more crucial. Some of the (easy) problems can be trivially solved using built-in predicates. However, in these cases, you learn more if you try to find your own solution.
Every predicate that you write should begin with a comment that describes the predicate in a declarative statement. Do not describe procedurally, whatthe predicate does, but write down a logical statement which includes the arguments of the predicate. You should also indicate the intended data types of the arguments and the allowed flow patterns.
The problems have different levels of difficulty. Those marked with a single asterisk (*) are easy. If you have successfully solved the preceeding problems you should be able to solve them within a few (say 15) minutes. Problems marked with two asterisks (**) are of intermediate difficulty. If you are a skilled Prolog programmer it shouldn't take you more than 30-90 minutes to solve them. Problems marked with three asterisks (***) are more difficult. You may need more time (i.e. a few hours or more) to find a good solution.
The purpose of this problem collection is to give you the opportunity to practice your skills in logic programming. Your goal should be to find the most elegant solution of the given problems. Efficiency is important, but logical clarity is even more crucial. Some of the (easy) problems can be trivially solved using built-in predicates. However, in these cases, you learn more if you try to find your own solution.
Every predicate that you write should begin with a comment that describes the predicate in a declarative statement. Do not describe procedurally, whatthe predicate does, but write down a logical statement which includes the arguments of the predicate. You should also indicate the intended data types of the arguments and the allowed flow patterns.
The problems have different levels of difficulty. Those marked with a single asterisk (*) are easy. If you have successfully solved the preceeding problems you should be able to solve them within a few (say 15) minutes. Problems marked with two asterisks (**) are of intermediate difficulty. If you are a skilled Prolog programmer it shouldn't take you more than 30-90 minutes to solve them. Problems marked with three asterisks (***) are more difficult. You may need more time (i.e. a few hours or more) to find a good solution.
Syllabus
1. Prolog Lists
2. Arithmetic3. Logic and Codes4. Binary Trees 5. Multiway Trees 6. Graphs 7. Miscellaneous
2. Arithmetic3. Logic and Codes4. Binary Trees 5. Multiway Trees 6. Graphs 7. Miscellaneous
Related Courses
An Introduction to Logic for Computer ScienceUniversity of Leeds via Coursera Business Writing
Berkeley University of California via edX Joy of Problem Solving
Brilliant Math Fundamentals (2020)
Brilliant Mathematical Fundamentals
Brilliant