程序代写代做代考 prolog Prolog Workshop 7: Recursive Rules

Prolog Workshop 7: Recursive Rules
Exercises:
Task 1: Please read Chapter 3 of Mastering Prolog by Rob Lucas (also available on Blackboard), working your way through the examples in Prolog.
You should attempt questions 2, 4 and 5 in the Exercises at the end of Chapter 3.
Task2: Please work through the online Prolog tutorial provided at the following website:
http://www.doc.gold.ac.uk/~mas02gw/prolog_tutorial/prologpages/recursion.html
Attempt Exercise 8 (of Mastering Prolog) and write Prolog code to solve Recursion Exercises 2 and 3.
Please make sure you fully understood the previous workshops on rules and recursive rules (Chapters 2 and 3 of Mastering Prolog).
Try the other exercises in Chapters 2 and 3 that you didn¡¯t attempt before.
You should try using the Trace and Step functions to fully understand and debug your recursive programs.
Another useful website explaining rules and recursion can be found here:
http://www.amzi.com/AdventureInProlog/advfrtop.htm
When you have finished, please present your answers to the Demonstrator.