The Poison Wine Challenge

1000 bottles ==> 10 rats (2^10=1024)

100 bottles ==> 8 rats (2^7=128)

50 bottles ==> 7 rats (2^6=64)

n bottles ==> ? ( find x such that 2^x > n)

Take log2 on both sides to demote x from power to base…

x = log2(n)

The number of rats needed for poison experiment is log base 2 of the number of wine bottles.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s