找回密码
 立即注册
搜索
总共850条微博

动态微博

查看: 2745|回复: 5
打印 上一主题 下一主题
收起左侧

囚 犯 问 题 新 版 (自 编 )[:D)]

[复制链接]

226

主题

1358

帖子

1万

积分

跳转到指定楼层
楼主
发表于 2005-4-22 23:10:22 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

一 个 小 屋 子 里 有 1000个 开 关 , 有 些 开 着 有 些 关 着。 每 天 进 去 一 个 囚 犯 , 必 须 也 只 能 动 15个 开 关 。 如 果 某 一 天 囚 犯 能 把 所 有 的 开 关 关 了 , 他  们 可 以 全 部 获 释 。  典 狱 长 让 他 们 在 开 始 前 讨 论  一 下 , 但 并 不 知 道 有 几 个 开 关 是 开 的。 www.ddhw.com
问 他 们 能 否 商 量 出 一 个 必 胜 的 办 法 ? 
 
(就 是 以 下 开 关 的 题 目 一 般 化 , 但 我 想 大 家 对 囚 犯 比 较 有 同 情 心 , 所 有 会 有 动 力 帮 他 们 想 办 法 。 ) 
www.ddhw.com

 
回复

使用道具 举报

53

主题

363

帖子

4139

积分

沙发
发表于 2005-4-22 23:38:41 | 只看该作者

回复:囚 犯 问 题 新 版 (自 编 )[:D)]


Let n = number of current on switches, and a = n mod 15.If a is odd,turn on (15-a)/2 switches and turn off (15+a)/2 switches. If a = 0, turn off 15 switches. If a is even and > 0, turn on 7 and turn off 8 so it becomes odd.

Are there really bad prisoners that should not be released? If so, we change the rule to 14 switches every prizoner, but turn on an odd number of lights at the beginning. :)www.ddhw.com

 
回复 支持 反对

使用道具 举报

5

主题

155

帖子

1115

积分

板凳
发表于 2005-4-22 23:52:53 | 只看该作者

It should be OK.


In the first round, the prisoners enter the room and change the statuses of the lights following this simple rule: shut off a light whenever possible.  Then everybody can predict the process, and after this round, everybody know the current number of lights that are on.
 
Then now we have simplified the problem. There are many algorithms to finish the work. The worst one might be this: in every round, the total effect is to shut off one light People of odd numbers shut off lights, and the others turn on lights). This method would keep the poor prisoners in the prison for aquite a long time (985*15 days, which is roughly 42 or 43 years).
www.ddhw.com

 
回复 支持 反对

使用道具 举报

226

主题

1358

帖子

1万

积分

地板
 楼主| 发表于 2005-4-23 00:50:22 | 只看该作者

[:))]原来的题目的题目没人理,一变成囚犯题马上就有解了,看来大家对囚犯都很同情呀!


   原来的题目的题目没人理,一变成囚犯题马上就有解了,看来大家对囚犯都很同情呀!




回复 支持 反对

使用道具 举报

226

主题

1358

帖子

1万

积分

5#
 楼主| 发表于 2005-4-23 00:54:51 | 只看该作者

You are really saviour of those poor prisoners! [:


Using you method, in at most 68 days, all of them can be released!!
www.ddhw.com

 
回复 支持 反对

使用道具 举报

226

主题

1358

帖子

1万

积分

6#
 楼主| 发表于 2005-4-23 01:04:10 | 只看该作者

回复:It should be OK.


Probabilty you think they deserve to stay there longer, you give them hope but let them be patient.
www.ddhw.com

 
回复 支持 反对

使用道具 举报

24小时热帖
    一周热门
      原创摄影
        美食美文
          您需要登录后才可以回帖 登录 | 立即注册

          本版积分规则

          Archiver|手机版|珍珠湾ART

          Powered by Discuz! X3 © 2001-2013 All Rights Reserved