May 16, 2004

سلول انفرادي

در يک کشور فرضي! صد نفر روزنامه نگار در سلولهاي انفرادي زنداني هستند.

سلول ها کاملا بسته هستند ( آکوستيک و بدون پنجره براي نور ). زندانبان هر روز يک نفر از زندانيان را به صورت تصادفي انتخاب کرده و به سالني مي برد. در سالن چراغي هست که زنداني مي تواند در طول روزي که در سالن به سر مي برد آن چراغ را روشن يا خاموش کند.

چراغ در روز نخست خاموش است. به هر زنداني امکان اين داده مي شود که اعتراف کند که هر نود و نه زنداني ديگر حداقل يک بار به سالن برده شده اند. اگر يک زنداني اين اعتراف را بنويسد و دروغ گفته باشد٬ تمام يکصد زنداني همان شب يا به طور تصادفي بر اثر کوبيدن سر خودشان به جسم سخت يا به علت خوردن داروي نظافت يا به هر دليلي که اصلا به من و شما مربوط نيست اندکي فوت خواهند کرد.

در حاليکه اگر صحت داشته باشد تمام زنداني ها فردا صبح آزاد مي شوند تا از کشورشان مهاجرانده شوند تا يک وبلاگ درست کنند و راه هاي حل اين معما را در زندانهاي ديگر هم بررسي کنند. پيش از روز نخست زندانيها را يک بار با هم به حياط زندان مي برند تا اگر مي خواهند از هم خداحافظي کنند!

زندانيها چه کنند؟

Posted by Shauheen at 05:40 PM | Comments (473)

May 08, 2004

5 pirates

updated
This problem contributed by Bahram:

There are 5 pirates who steal 100 diamonds and they want to divide them. They decide to do so as follows:

They create a circle and choose a person by chance so that he assigns diamonds according to his wish. Nevertheless, to have a little more reasoning, they decide to add a second rule: once the division is made, everyone will vote if he is OK with this division or not. If the majority accept the division, then the division becomes final.
Otherwise, they kill the person who made the division, and the next pirate in the circle will do the division with the same rules.

The question is: what is an optimal strategy for the first person,
knowing that everyone would want to maximize his share and that everyone is excellent in logical deduction!

Another thing: when one makes the vote between 5, assuming that he himself votes O.K., 3 negative votes will be regarded as "NO". When one makes the vote between 4, still assuming that he votes O.K., 2 negative votes will be a "NO".

Posted by Shauheen at 10:37 PM | Comments (1551)

May 06, 2004

پازل

يک مجموعه عالي از پازل ها به صورت . Java Applet

گول چندتاي اول رو نخوريد٬ ادامه بديد تا به شماره ۱۲+۱ برسيد (من خرافاتي نيستم) ولي نحسي اين يکي بد اعصاب منو خورد کرده.


Posted by Shauheen at 04:11 PM | Comments (96)

May 03, 2004

Firing Squad Synchronization

Well Siamak has sent this one to start with, He will post himself from now on:

There is this squad, consisting of a General, and a number of finite-minded Soldiers arranged in a line.
Each soldier can pass commands, subcommands, ... to the guys next to him.
How should the General program the mind of the soldiers, so that whenever he gives a firing command to the first guy in the line, all the soldiers fire
simultanuously (and for the first time), after a number of time steps?
(Note that your solution must be independant of the number of soldiers!)


Since this is the first serious post, just let me set some regulations for the authors,
Please do not post any answers in the main log. anything regarding an answer should go in the comments section.

Posted by Shauheen at 10:05 PM | Comments (1)