A question from a 33-year-old University examination paper.

Shown above is Question 5 from the examination paper I was given in April 1990, for ‘Computing Science 3.27: Logic Programming’, part of the BSc(Eng) course I was taking at Imperial College of Science, Technology and Medicine, then affiliated with the University of London. That paper is one of four still in my possession all these years later: I think I might finally get around to throwing them away. It’s not like I did particularly well in these exams - I’d been on track for a 2:1 after my first two years, but had rather lost interest by the start of the third and final year, which, inconveniently, contributed 50% of the overall degree score. I ended up with a ‘Desmond’; a 2:2, which seemed to me a fair reflection of the work I’d put in to it.

I think the answer to the puzzle in part (b) of the question is Chris. My reasoning is as follows. We know from point (i) that three of the men are tall and one is short - so when we are told in point (iv) that Bart and Chris are the same height, they must surely both be tall. And as point (v) says Chris and Don are not both tall, that must mean Don is the short one. It also means that Don can’t be good-looking, as only one of the men has all three desired characteristics, and only one of the four is handsome. In point (iii) we see Alex and Bart have the same complexion, as must, we can deduce, Chris and Don, given that two of the men are dark and two pale. Returning to the proviso that each man must be at least tall or dark or handsome, it tells us that short & plain Don must be dark, therefore Chris can’t be pale; and hence he must also be the pretty boy.

How close I might have got to expressing the above in Prolog I do not recall. I had some familiarity with that language, which at no point appeared to catch on outside academia. At least mentioning it on my CV never did me any good. Indeed, there was regrettably little I could take from that degree as a whole which was of any use in my subsequent career as a software developer.