Кошке
А ты подписался на rss?

Воскресная пища для мозгов

by Игорь Лизунов 05.10.2008 12:35

Недавно встретил просто классную головоломку.

Предлагаю попробовать ее решить.

Однажды в тюрьму привезли 23 узника.

Надзиратель собрал их всех и сказал: в нашей тюрьме есть комната с двумя выключателями. Время от времени, когда у меня будет желание, я буду выбирать одного из вас и отводить его в эту комнату. Там он обязан выбрать один из двух выключателей и переключить его состояние. Нельзя переключить два выключателя, нельзя не переключить ни одного.  Я могу выбирать одного и того же узника 3 раза подряд, а могу идти по порядку. Однако, я могу вас сказать, что в течении длительного периода времени все будут в комнате примерно одинаковое число раз. Вы не сможете услышать, что я повел кого-то в камеру. Я так же не скажу вам в каком положении выключатели находятся сейчас. Вы можете посовещаться сегодня, а завтра я разведу вас по одиночным камерам и вы больше не сможете ни с кем разговаривать. Только переключать выключатели:-)

Вы все осуждены пожизненно.  Если кто-либо из вас скажет: мы все были в этой комнате, и это окажется правдой - вы свободны. Если он ошибется - вы все пойдете на корм аллигаторам.

Помогите заключенным:-)

 Я не буду выкладывать ответ, пока кто-нибудь не выложит правильный ответ в комментариях.

UPD: В связи с многочисленными вопросами по условию.

1) Надзиратель может выбирать кого-угодно и как угодно, хоть 100 раз подряд.

2) В будущем обязательно будет ситуация, когда каждый из заключенных побывал в комнате хотя бы 1 раз. Вообще, не только 1, а хотя бы N раз. В каком будущем это случится - неизвестно. Раньше чем все умрут :-)

Tags:

Комментарии

08.10.2008 17:01:47 #

damirych

Группа выбирает одного человека. Он, после того, как сходит в комнату 6 раз говорит, что все здесь были. Если это не так, то значит надзиратель прогнал...
Почему 6? Отвечу в стиле Фатала "5 слишком мало, а 7 слишком много"

damirych | Reply

09.10.2008 14:42:53 #

ilizunov

Smile))))))))
жош.
Ну так нельзя. Начальник ведь может одно шесть раз сначала провести, а потом остальных потихонечку мучить.
У этой задачи есть точное и изящное решение.

ilizunov | Reply

16.10.2008 18:15:31 #

Pat

Мухаха

Pat | Reply

16.10.2008 18:49:19 #

ilizunov

Мухаха
Да, сей дьявольский смех означает одно. Нашелся единственный пока человек под ником Pat, который решил задачу.
Решение он мне поведал в аське, я подтверждаю что оно правильное. По моей просьбе он не стал его тут публиковать, чтобы остальные тоже могли поломать голову.
Кто его знает - можете пытать по поводу ответа Smile.

Остальным же я дам единственную подсказку. Ой, вернее уже дал Smile

ilizunov | Reply

27.10.2008 10:47:46 #

hazzik

http://hazzik.com/files/Prisoners.zip Написал решениеSmile

hazzik | Reply

25.11.2008 10:44:16 #

razon

йопт... я один на работе РАБОТАЮ? )))

razon | Reply

22.07.2010 7:32:10 #

wow gold

Hello I am so delighted I found your blog, I really found you by mistake, while I was looking on Yahoo for something else, Anyways I am here now and would just like to say thanks for a tremendous post and a all round entertaining blog (I also love the theme/design), I don��t have time to read it all at the moment but I have bookmarked it and also added your RSS feeds, so when I have time I will be back to read more, Please do keep up the great work.

wow gold | Reply

22.07.2010 8:03:56 #

game blog

SafeTek USA offers Safety Products and a wide range of safety consulting and engineering services.Buy safety products online and get same day service with FREE SHIPPING and BEST PRICES GUARANTEED!

game blog | Reply

22.07.2010 8:06:47 #

Games News 2010

was very pleased to find this site.I wanted to thank you for this great read!! I definitely enjoying every little bit of it and I have you bookmarked to check out new stuff you post.

Games News 2010 | Reply

25.07.2010 0:32:43 #

wow gold

You will never win if you never begin.

wow gold | Reply

25.07.2010 1:32:55 #

world cup

Hi I found your site by mistake when i was searching Google for this registry cleaner issue, I must say your site is really helpful I also love the design, its amazing!. I don't have the time at the moment to fully read your sitebut I have bookmarked it and also add your RSS feeds. I will be back in a day or two. thanks for this site.

world cup | Reply

25.07.2010 2:41:45 #

2010 game

Thank you for creating valuable information about the issue. I?��m an admirer of your website. Keep up the good job.

2010 game | Reply

28.07.2010 16:56:57 #

wow gold

Hi i must say very nice blog, very good article, i hope your blog gets more visitors good luck.

wow gold | Reply

28.07.2010 17:42:13 #

game happy

Congratulations on having one of the most sophisticated blogs Ive come across in some time!  Its just incredible how much you can take away from something simply because of how visually beautiful it is.  Youve put together a great blog space --great graphics, videos, layout.  This is definitely a must-see blog!

game happy | Reply

28.07.2010 18:25:26 #

metroid prime

Nice information, many thanks to the author. It is incomprehensible to me now, but in general, the usefulness and significance is overwhelming. Thanks again and good luck!

metroid prime | Reply

02.09.2010 16:22:39 #

wow gold

The new Zune browser is surprisingly good, but not as good as the iPod's. It works well, but isn't as fast as Safari, and has a clunkier interface. If you occasionally plan on using the web browser that's not an issue, but if you're planning to browse the web alot from your PMP then the iPod's larger screen and better browser may be important.

wow gold | Reply

02.09.2010 17:21:49 #

wow po

Thanks for taking the time to discuss this, I feel strongly about it and love learning more on this topic. If possible, as you gain expertise, would you mind updating your blog with more information? It is extremely useful for me.

wow po | Reply

03.09.2010 20:34:16 #

buy ff14 gold

I wanted to drop a comment and say I'm feelin' what you're gettin at! You've made some good points and while I don't disagree with everything you've said I think you make a good argument. Keep up the good work 'cus I'll be checkin' up on you later. This blog is on my radar now and I'm interested to see what's next.

buy ff14 gold | Reply

19.10.2010 7:29:44 #

ugg Classic Cardy boots

rafter who uses gems to create his wondrous works only needs to make use of the raw, uncut gemstones. These items that he creates function almost exactly like those that can be discovered throughout the game, although there are some exceptions. One of these exceptions is the creation of a jewelcu

ugg Classic Cardy boots | Reply

03.12.2010 12:23:36 #

dd

/post/2008/10/05/http://www.blu-ray-software.net/blu-ray-ripper/" rel="nofollow">http://www.blu-ray-software.net/blu-ray-ripper/ blu ray ripper, /post/2008/10/05/www.blu-ray-software.net/blu-ray-ripper-for-mac/" rel="nofollow">www.blu-ray-software.net/blu-ray-ripper-for-mac/ mac blu ray ripper, /post/2008/10/05/http://www.blu-ray-software.net/blu-ray-creator/" rel="nofollow">http://www.blu-ray-software.net/blu-ray-creator/ blu ray burner, /post/2008/10/05/http://www.blu-ray-software.net/blu-ray-copy/" rel="nofollow">http://www.blu-ray-software.net/blu-ray-copy/ blu ray copy, www.blu-ray-software.net/blu-ray-video-converter/ blu ray converter and /post/2008/10/05/http://www.blu-ray-software.net/blu-ray-player/" rel="nofollow">http://www.blu-ray-software.net/blu-ray-player/ best blu ray player offer the best solution for blu-ray videos
Duplicate /post/2008/10/05/http://www.blu-ray-software.net/blu-ray-ripper/" rel="nofollow">http://www.blu-ray-software.net/blu-ray-ripper/ blu ray dvd with /post/2008/10/05/http://www.blu-ray-software.net/blu-ray-copy/" rel="nofollow">http://www.blu-ray-software.net/blu-ray-copy/ blu ray dvd copy, /post/2008/10/05/www.blu-ray-software.net/blu-ray-ripper-for-mac/" rel="nofollow">www.blu-ray-software.net/blu-ray-ripper-for-mac/ blu ray ripper mac for Mac OS and /post/2008/10/05/http://www.blu-ray-software.net/blu-ray-creator/" rel="nofollow">http://www.blu-ray-software.net/blu-ray-creator/ blue ray burner are good /post/2008/10/05/http://www.blu-ray-software.net/blu-ray-player/" rel="nofollow">http://www.blu-ray-software.net/blu-ray-player/ blu ray player software

dd | Reply

24.12.2010 4:45:31 #

juicy couture

nice post!!!

juicy couture | Reply

Добавить комментарий




biuquote
  • Комментарий
  • Предпросмотр
Loading



Спасибо BlogEngine.NET за основу блога.

Комментарии

Comment RSS