The First 10 Prolog Programming Contests

The First 10 Prolog Programming Contests

This book shows solutions to problems that were in the first 10 Prolog Programming Contests from 1994 to 2004. Some basic Prolog programming skills are required.

Publication date: 01 Sep 2005

ISBN-10: 9090197826

ISBN-13: n/a

Paperback: n/a

Views: 18,638

Type: N/A

Publisher: n/a

License: n/a

Post time: 01 Oct 2007 06:55:20

The First 10 Prolog Programming Contests

The First 10 Prolog Programming Contests This book shows solutions to problems that were in the first 10 Prolog Programming Contests from 1994 to 2004. Some basic Prolog programming skills are required.
Tag(s): Logic Programming
Publication date: 01 Sep 2005
ISBN-10: 9090197826
ISBN-13: n/a
Paperback: n/a
Views: 18,638
Document Type: N/A
Publisher: n/a
License: n/a
Post time: 01 Oct 2007 06:55:20
:santagrin: This book was suggested by Remko Tronçon.

Terms and Conditions:

Bart Demoen wrote:The contents of this book are meant to be reproduced in every possible form and without further permission of the authors, as long as no profit is made.

Excerpts from the Preface:

Prolog is an excellent programming contest language: Prolog is close enough to the ultimate specification language (logic), so that the distance between problem and solution is not too big. This means that, even if you don't have a clue about a good algorithm, you might still end up with a nice program that computes a useful result (at least for small problem sizes). Prolog is also a real programming language, which means you can express your favorite nifty optimal solution strategy in it.

This book shows solutions to problems that were in the first 10 Prolog Programming Contests. The solutions in this book were not constructed by participants during the contest, since the contest rules always prevented that. However, many of our solutions could have been constructed during the contest under extreme time pressure, and so you will find many solutions using the generate and test strategy, together with a higher than usual deployment of member/2, append/3, findall/3 and even reverse/2. On the other hand, we have avoided dynamic predicates (except in the solution of two problems), and we have often preferred the Prolog if-then-else and once/1 predicate over the use of the !. We have also avoided comments in the programs.

Mind you: this book does not attempt to teach you how to program in Prolog. For that, you will need to read one of the excellent books on Prolog, or go through one of the on-line Prolog tutorials. You can find them in the comp.lang.prolog FAQ. Keep in mind that reading the books is not enough: you must do lots of exercises!

So we assume that you have already some basic Prolog programming skills. Then, how should you use this book? We suggest that you do not try to digest all questions and answers at once. Read one problem statement, skip the hints, and solve the problem, preferably with the clock ticking at your side. Oh well, if you really want, you can read the hints anyway. When you are finished programming, look at our solution, and compare it with yours. You might be inclined to make a judgement like 'My solution is better than yours', or the other way around. Don't just stop there: learn from the differences.




About The Author(s)


No information is available for this author.

Bart Demoen

No information is available for this author.


No information is available for this author.

Phuong-Lan Nguyen

No information is available for this author.


No information is available for this author.

Tom Schrijvers

No information is available for this author.


No information is available for this author.

Remko Troncon

No information is available for this author.


Book Categories
Sponsors