News for hackers. Stuff that matters.
Re:Sixteen Bottles of Wine Riddle by alkyon on Thursday August 21, 2025 @07:15AM (#44971341)
I wasn't familiar with 'Poison and Rat' puzzle that the post mentions as an inspiration of the title riddle.

Without looking at the answer I came up with a geometric interpretation of it (explained below as this is a spoiler to the Poison and Rat puzzle).

Re:Sixteen Bottles of Wine Riddle by alkyon on Thursday August 21, 2025 @07:15AM (#44971342)
Obviously 1000 rats is a wrong solution, you could remove one and still get the answer. But we could get better than that when you think about a thousand as three dimensional cube (10^3). Treating a rat with just one layer of the cube we could optimize to 30 rats. At this point I looked the answer they suggested and it was 10 (binary representation). Obviously one can construct a mulitdimensional cube with just two as a base - 2^10 and then its 20 rats. But know I realized I forgot the very first optimization I mentioned here that you could just use 1000-1 rat in the first place. So it will be fine with just (2-1)x10 rats (and 30-3=27 rats in the case of plain 3-dimensional cube).
Re:Sixteen Bottles of Wine Riddle by alkyon on Thursday August 21, 2025 @12:11PM (#44974499)