Answers to Prolog coursework from 2011/2012 Imperal MSc