原题:
一个大院子里住了50户人家,每家都养了一条狗,有一天他们接到通知说院子里有狗生病了,并要求所有主人在发现自己家狗生病的当天就要把狗枪杀掉。然而所有主人和他们的狗都不能够离开自己的房子,主人与主人之间也不能通过任何方式进行沟通,他们能做的只是通过窗户观察别人家的狗是否生病从而判断自己的狗病否。(就是说,每个主人只能看出其他49家的狗是不是生病,单独看自己的狗是看不出来的)
第一天没有枪声,第二天还是没有枪声,第三天传出一阵枪声,问有多少条狗被枪杀。
我的答案:
假设只有一只狗生病,那么第一天那个病狗的主人发现别人家的狗都没病,必然
就把自己的狗给杀了,第一天没枪声,说明至少有两只狗生病。
假设只有两只狗生病,那么第二天那两个病狗的主人发现别人家只有一只狗生病,
必然把自己的狗给杀了,第二天没枪声,说明至少有三只狗生病。
第三天有枪声,说明有三只狗生病,因为这样那三只病狗的主人发现别人家只有
两只狗生病,从此判断自己的狗也生病了,于是杀掉自己的狗。
因此有三条狗被杀。
~~~~~~~~~~~~~~~~~~~~~~~~~~~
基本假定:
确实有狗病了。every onwer is smart.
分析(ill dog=ig)
if ig=1, the owner of the dog kill his/her dog in the first day, since he/she
finds there is no ill dog outside his house.
if ig=2, no body kills the dog in the first day, because they see at least
1 ig outside the their house.
the next day, everyone knows ig<>1, so if ig=2, the onwers of the two igs will
kill his/her dos. so ig<>2.
ig=3 following ig=2's analysis, the third day, everone knows that ig<>1 or 2,
the three onwers of the igs kill their dogs one by one or in the same time,
because each of them see two igs outside.
so three dogs are killed.
ig=3 following ig=2's analysis, the third day, everone knows that ig<>1 or 2,
the three onwers of the igs kill their dogs one by one or in the same time,
because each of them see two igs outside.
so three dogs are killed.