Wine

 
Wine.png
 

The Rule of the Realm is hosting a wine tasting event for one thousand of their most loyal citizens, each of whom has been asked to provide one bottle of wine the day before the event, so that it may be prepared properly.   Unfortunately, the Spy Master informs the Ruler that one of the attendees has poisoned a single bottle of wine, and alas, no one knows which one.

The Ruler refuses to cancel the event as the shame would be unthinkable.   Buying another thousand bottles of wine is also out of the question.  Oh, and allowing their guests to die is pretty frowned upon too.

Fortunately, the Spy Master informs the Ruler, that there happens to be ten prisoners in the dungeon, which everyone seems quite comfortable using as test subjects to identify the poisoned wine.

The poison used is undetectable despite being lethal in the most miniscule of amounts.   Astonishingly, the poison also takes twenty four hours to take affect, at which point it is instantaneous, so there is only time for one set of trials with the ten prisoners.

The question is; what action can the Spy Master take to rescue the Rulers' most ridiculous of parties?

 
 
Solution.png
 
 

Firstly, label each bottle of wine, in binary, from one to one thousand (or zero to nine hundred and ninety nine if you prefer).  Place the prisoners in a line and ensure their order does not change.  In turn, take each bottle of wine, look at the number on the bottle, and give a tiny drop to each of the prisoners in positions that correspond to a one in the number.   For example, the forty second bottle (0000101010 in binary) would be tested by the fifth, seventh and ninth prisoner (from left to right).

Then, simply wait twenty four hours and see which prisoners have died.  The dead prisoners now represent ones and the living prisoners zeros.  The bottle of wine with that binary string has been poisoned.

Wine Prisoners.png