But to move the spoiler down a little, my initial solution was to pour all the bottles out into a barrel, mix them together, and refill the bottles. Nothing explodes since you never measure anything, but you know the exact set of years in each bottle.
SPOILER:
T(n) is the number of measurements required for n bits.
If you measure the first bit (of n) of all the bottles, you'll never need to measure the last bottle. At that point, you have grouped the bottles into 2 groups, and need to figure out the remaining n-1 bits. So T(n) = (2^n)-1 + 2T(n-1).
T(1) = 1 (if you have 2 bottles, you only need to measure one.)
T(2) = 2^2-1 + 2*1 = 5
T(3) = 2^3-1 + 2*5 = 17
T(4) = 2^4-1 + 2*17 = 49
In practice, you'd require many fewer measurements. The maximum is only required when your measurements are in the order (01|10)*... and you can stop a bit position early anytime you have found all of the 0s or 1s.I've no idea how to do better than 49 in the worst case, though. Hm... is it necessarily the case that 45 is possible? (log2(16!))? It seems like that is only true if each measurement can divide the total set of possibilities in half, and I'm not sure why that would be the case.
Obligatory: https://xkcd.com/1172/
But the argument is mostly irrelevant here. This is a web platform feature. One of the defining characteristics of the web platform is to be very conservative with backwards compatibility. This has nothing to do with it being OSS.