微软的应试题完整版(附答案) 选择自 jswqg 的 Blo
我认同的答案:
五个海盗抢到了100颗宝石,每一颗都一样大小和价值连城。他们决定这么分:
抽签决定自己的号码(1、2、3、4、5)
首先,由1号提出分配方案,然后大家表决,当且仅当超过半数的人同意时,按照他的方案进行分配,否则将被扔进大海喂鲨鱼
如果1号死后,再由2号提出分配方案,然后剩下的4人进行表决,当且仅当超过半数的人同意时,按照他的方案进行分配,否则将被扔入大海喂鲨鱼
依此类推
条件:每个海盗都是很聪明的人,都能很理智地做出判断,从而做出选择。
问题:第一个海盗提出怎样的分配方案才能使自己的收益最大化?
解决这类题目我们要进行逆向推理。
一种认为半数是>50%。
假如死剩D、E两人的话,D的任何方案E均会反对,结果D必死,E独得100;
当死剩C、D、E三人时,D为了保命,肯定会投赞成票,故C提出(100,0,0);
当死剩B、C、D、E时,C绝对会投反对票,B要拉拢D和E才能保命,故B提出(98,0,1,1);
A、B、C、D、E一个都未死时,B绝对会投反对票,A要拉拢C、D、E中的两个人(97,0,1,2,0)或(97,0,1,0,2)
另一种认为半数是>=50%。
假如死剩D、E两人的话,D提示(100,0)的方案,E将颗粒无收;
当死剩C、D、E三人时,D为了100颗钻石,肯定会投反对票,所以C要拉拢E来保命,故C提出(99,0,1);
当死剩B、C、D、E时,C绝对会投反对票,B要拉拢D或E才能保命,拉拢D的方案(99,0,1,0),拉拢E的方案(98,0,0,2),显然拉拢D更好一些;
A、B、C、D、E一个都未死时,B绝对会投反对票,A要拉拢C、D、E中的两个人(98,0,1,0,1)