An interesting question, using 10 ants to find the only poisonous bottle from 1000 bottles of water

Source: Internet
Author: User

In fact, the original is said to be 10 mice, considering a number of bioethics, small Shigo it into 10 ants, but the ant is also life. In fact, not so serious, it is not really to do this thing.

In particular, there are 1000 bottles of water, one of which is poisonous, the ants drink poisonous water after a week of death, now give you 10 ants, and a week's time, you have to find the poisonous bottle from the 1000 bottles of water.

The author gives the answer:

Simplify the problem, 3 ants, 7 bottles.

000=0,001=1,010=2,011=3,100=4,101=5,110=6,111=7

1,3,5,7 bottle of water to the number 1th ant drink, 2,3,6,7 bottle of water to the ant 2nd Drink, 4,5,6,7 bottle of water to the ant 3rd drink. 3 ants correspond to each of the above binary bits, and if the ant dies after a week, mark the location as 1.

Assuming that No. 1th, number 2nd Ant died 3rd alive, is 110, corresponding to the 6th bottle;

And so on ..., you can find the poison bottle. This shows that at least one ant is dead, and up to 3 are all dead.

Back to the topic, because 210=1024, so with 10 ants can be found from 1023 bottles of the poisonous one, 1000 bottles naturally.

An interesting question, using 10 ants to find the only poisonous bottle from 1000 bottles of water

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.