kosata написа:
Шарки, идеалка си, че намери задачата. Смятам, да ти извадя точно два цитата да видиш къде си се оплел:
http://cseweb.ucsd.edu/classes/wi06/cse120/Lec12ax4.pdf1: "There are n people.." - n на брой шапки е много далеч от 15 черни и 10 сини шапки
2: "what if" хипотезите - като ти е зададен n брой не знаеш точното разпределение и гадаеш - ако е 1 черната шапка, ако са две, ако са три - но не може да са всички, защото условието е, че поне 1 е синя! при n на брой шапки условието поне 1 да е синя си е НА МЯСТОТО, иначе е гробовно малоумно
При 10 сини и 15 черни както си го заковал още в началото всички тия разсъждения отпадат, защото не може да поставиш what if хипотезата при условие ЧЕ ВИЖДАШ, че шапките са точно 10 сини и 15 черни (или там поне 9 сини и поне 14 черни), а уточнението си е безсмислено.
Спориш във сфера, в която си
кръгла 0. Абсолютно нищо не отбираш от написаното...
Слайдът с шапките е разяснение на решението на проблема и каква е логиката, защо е нужна външната информация.
Аз съм бил лично на тази лекция, така че ни ми обяснявай дали съм объркал нещо... Тъй като на мен не ми вярваш погледни лекцията от МИТ, там има зададен конкретен въпрос със решение...
Ето още едно обяснение.
Цитат:
Question: A certain town comprises of 100 married couples. Everyone in the town lives by the following rule: If a husband cheats on his wife, the husband is executed as soon as his wife finds out about him. All the women in the town only gossip about the husbands of other women. No woman ever tells another woman if her husband is cheating on her. So every woman in the town knows about all the cheating husbands in the town except her own. It can also be assumed that a husband remains silent about his infidelity. One day, the mayor of the town announces to the whole town that there is at least 1 cheating husband in the town. What do you think happens?
Answer: Stumped? Let’s solve this methodically. Say there was only 1 cheating husband in the town. There will be 99 women who know exactly who the cheater is. The 1 remaining woman, who is being cheated on, would have assumed there are no cheaters. But now that the mayor has confirmed that there is at least one cheater, she realizes that her own husband must be cheating on her. So her husband gets executed on the day of the announcement.
Now let’s assume there are 2 cheaters in the town. There will be 98 women in the town who know who the 2 cheaters are. The 2 wives, who are being cheated on, would think that there is only 1 cheater in the town. Since neither of these 2 women know that their husbands are cheaters, they both do not report their husbands in on the day of the announcement. The next day, when the 2 women see that no husband was executed, they realize that there could only be one explanation – both their husbands are cheaters. Thus, on the second day, 2 husbands are executed.
Цитат:
Тhrough induction, it can be proved that when this logic is applied to n cheating husbands, they all die on the n th day after the mayor’s announcement.
http://www.mytechinterviews.com/is-your-husband-a-cheatСмятам спорът по тази тема за приключен. И на теб ще повторя, ако пак не го разбираш няма нищо страшно, приеми го на честна дума.