IBM 50条狗 智力题

来源:互联网 发布:郑爽整了哪些部位知乎 编辑:程序博客网 时间:2024/05/21 10:50

英文:

Title: 50 in the village of individuals, each have a dog in this dog of 50 sick dogs (not transmitted disease), so people want to find disease dog.  
Everyone can observe the other 49 dogs to determine whether they are sick, and (if we can see from the sick), not only with their own dog, the observations are not the result of the exchange, we can not notified of the dog's owner.    Once the masters of their own home projection dog is a dog is shot to death in his dog (found to be shot in one day), but only the right of each shot their dog, not the right to other people's dogs killed. 

The first day we all read, but the gun did not talk to the third day of gunfire came a while, there are a few of the village asked the dog, how to projections from? 

Analysis: 

1). Assumption of only one dog.    At this time, only one person did not see the sick dogs, and 49 other patients to see a dog.    See the dog people immediately disease can be inferred of their dogs are dogs, so do not assume that the establishment.    So more than a dog disease. 

2) the assumption that two of the dog.    At this time, there are only two people see a dog disease, and the remaining 48 were to see two of the dog.    After reading the first days after nobody Plea.    So the next day that only one of the dog's assumption that people can combine the conclusions of a fact that more than one dog, one can only see their own, their dog is a dog disease, and then kill the dog.    So do not assume that the establishment.    Therefore disease more than two dogs. 

3) the assumption that three of the dog.    There are three individuals that have two dogs, and the remaining 47 people to see three dogs.    No one in front of two natural Plea.    By the third day, only to see two of the three individuals dogs (under previous inferred) know of more than two dogs, and he has seen two, the dog is in his own dog, and then shot the three together give .    The assumptions and title matches. 

中文题目:

一个大院子里住了50户人家,每家都养了一条狗,有一天他们接到通知说院子里有狗生病了,并要求所有主人在发现自己家狗生病的当天就要把狗枪杀掉。然而所有主人和他们的狗都不能够离开自己的房子,主人与主人之间也不能通过任何方式进行沟通,他们能做的只是通过窗户观察别人家的狗是否生病从而推断自己的狗病否。(就是说,每个主人只能看出其他49家的狗是不是生病,单单没法看出而只能是根据逻辑推断出自己的狗是不是生病)  第一天没有枪声,第二天还是没有枪声,第三天传出一阵枪声,问有多少条狗被枪杀。  

我的想的方法:
(1)如果只有1只病狗,那么其中有1个人看到的是好狗:49条,病狗:0条。因为必定有病狗,他(虽然他们不知道有多少只狗是生病的)第一天就会杀自己的狗。

(2)如果只有2只病狗,那么其中有2个人看到的是好狗:48条,病狗:1条。那么他们(虽然他们不知道有多少只狗是生病的)所以第一天他们不能确定自己的狗是不是生病的。到了第二天,他们猜想,为第一天没人杀狗呢?如果只有1只病狗的话,那么就如上(1),第一天一定会有人杀狗,所以形成了矛盾,从而必定有2只狗生病。而自己只看到1只狗病了,那么自己看不到自己的狗,所以自己的狗肯定病了,所以第二天就杀了自己的狗。

(3)如果只有3只病狗,那么其中有3个人看到的是好狗:47,病狗:2条。那么他们(虽然他们不知道有多少只狗是生病的)所以第一天他们不能确定自己的狗是不是生病的。第一天过去了,第二天过去了,没有杀狗的。到了第三天,他们猜想为什么第二天没人杀狗呢?如果只有2只病狗的话,那么就如上(2),第二天一定会有人杀狗,所以形成了矛盾,从而必定有3只狗生病。而自己只看到2只狗病了,那么自己看不到自己的狗,所以自己的狗肯定病了,所以第三天就杀了自己的狗。



原创粉丝点击