Monday, July 9, 2007

Solution to the King and his poisoned wine problem

Number the bottles from 1 to 1000.. The trick to gettin the answer to tis problem is to know that every number frm 1-1000 has a unique binary representation.
The binary representation of 1 is 0000000001, 2 is 0000000010 and so on..
Now we hav 10 wine tasters. Number them from 1 to 10. Now feed the nth wine taster wit the wine from the bottles whenever nth bit in binary number is 1. for eg. for 0000000001 only the 10th taster is fed wit bottle 1. if 1000000011 the 1st,9th,10th tasters r fed.
So by identifyin the tasters who die on the 29th day we will be able to verify the correct bottle.

No comments: