Computer Laboratory

Course pages 2016–17


A question set is available in pdf form, as are the slides from the first lecture.

Other course materials (such as lecture videos) are available on the dedicated site, If you experience problems with the site, please email one of the course lecturers.

Assessed exercise

Deadlines. The assessed exercise should be completed by midday on 23rd January, with viva examinations taking place on Thursday 26th and Friday 27th January.

Workbook for the assessed exercise (Updated 02/01/2017: added deadlines)

Here is a test program you can use to test your solution: This can be used from the command line on Linux PWF ( as follows: swipl -t "load_files(['',''])". Please make sure you pass the test before submitting!


Errors in the lecture videos and questions are indexed by video number (V), slide number (S) and time (T).

15bNo slide or question indexSlide and question index builtrsa33
1210divintdiv (div is an infix operator in some versions of prolog)hp343
86-94:30Video and audio are not quite in sync(under investigation)awc32, vbt22
7When asking to generalise from 8-Queens to n-Queens its not clear what the chessboard size should doYou should generalise to n-Queens on an nxn chessboardcdk23
38The text typed during the lecture on this slide should read rule2 rather than rule.Correct....jp581
38Implicit binding of the exists quantifier is too large. This is important because otherwise the statement holds when thing(1,2) and thang(2) is true but rule2(1) is false - this happens because false implies anything and the overlarge capture of the exists allows you pick a z for which the LHS is false.There should be an open bracket before the exists and a close bracket before the implication arrowjp581
8610:00eval(mult(A2,B2),C2) :- eval(A2,A3),eval(B2,B3), C2 is A2*B2 is incorrect.It should read C2 is A3*B3.mjh233
1723The domain of P is {1,2,3,4}The domain of P is {1,4}.arg58


None of the materials below are examinable -- these links are provided only for your interest: