A crew of crafty pirates encounter a group of maidens on a remote beach. The pirates plot to steal the maidens away and marry them in a far-away land. The pirates land their boat and begin to drag away the poor maidens.
The pirates, however, are spotted by the Royal Navy and surrounded. The pirates know they are in trouble, and so they quickly rummage through their stores and dress up as innocent maidens.
The Major-General of the fleet comes aboard. He is unable to tell the maidens and pirates apart, but he is also crafty. He knows that the maidens will always tell the truth and that the pirates will always say whatever will make it hardest to know that they are pirates. He also knows that there are more maidens than pirates.
The Major-General is a very proper man, and Naval rules for dealing with maiden/pirate impostor situations require that he only ask questions of the form “is this person X?”, “is any person in this group X?”, or “are all people in this group X?”, where X is either “maiden” or a “pirate”.
What is the minimal number of question the Major-General needs to ask in order to determine who’s a maiden and who’s a pirate?
Do you love challenges? Then you will love LiveRamp. Apply now to join our team.