Table of Contents

Archive eFLP 2011: Prolog assignment 1

In the first assignment you are going to revise basic syntax of Prolog, its search strategy and recursion. You are asked to save your work in a file called family.pl and to submit it via the upload system.

You may find the code from the first prolog tutorial pastebin.com/u/radek useful.

1. Introduction

Familiarize yourself with the royal family of the British Monarchy: wikipedia:British_Royal_Family

2. Database

Consider the following people:

and their relationships:

Your task is to encode the genealogy graph about the listed people using the listed relations into Prolog as ground facts.

1 point

3. Basic definitions

1 point

4. Negation by failure

Using the course literature or Google, study the “negation as failure \+” technique or “non-unifiability predicate \=”.

2 points

5. Recursion and search strategy

2 points

Submission

Submit the file to cw.felk.cvut.cz/upload on the 14.4.2011 23:59 CEST the latest. The deadline is strict.