Author was pretty clear about the spirit of the riddle:
>Note: this question was originally set in a maths exam, so the answer assumes some basic assumptions about formal logic.