-
-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wizards and dwarves #13
Comments
That doesn't seem to work. From the puzzle description:
If he speaks out the color of the dwarf in front of him, how would that work? The one in front of him will now know his color, but the current dwarf dies. And it doesn't scale. Because each dwarf can either communicate information (to the one in front of him) or use the tip that he got from the dwarf behind him. |
Ahh, you are right ! :( dwarf can only say one color. About his own hat, or for someone in front. |
Unless I misunderstood something, there is a second "optimal" strategy: The first (tallest) dwarf announces the color which does not correspond to the parity he calculated. All dwarves know that the first one chose the opposite colour (because they know the strategy), so all dwarves smaller than the first one select the right hat and survive analogously to how they do it in the first strategy. |
Okay, but the first dwarf also survives with 50% in the described strategy, right? So this is an alternative strategy, but not better in some sense. Edit: this 50% survival chance should probably be included in the solution. |
The wizards don't know if the dwarves always select the first strategy (the one currently described in the solution), so when they visit the dwarves village the first time, the first dwarf has 50% survival chance. |
I'm not sure if such assumptions about backstory/background knowledge etc. are a tad bit out of scope for such puzzles. |
Ok. That would be an interesting optimization in the "repeated wizards and dwarves" puzzle. But we are talking about one instance here only. |
According to the description, it happens every year:
Maybe it is possible to change the puzzle so that the described solution is optimal, e.g. |
Sorry, I should have re-read the actual puzzle and the solution. Too long ago... I think you are right. Your strategy is better for the once-a-year long-term "game". We could either edit the solution to add your reasoning or modify the puzzle description to phrase it as a one-time event. I would actually vote for the latter (the puzzle is hard enough already), but I'm open for suggestions. |
I'm fine with both options. |
another possible solution to minimize the number of dwarves killed is as follows:
each dwarf has to say 'black' or 'white'.
Each dwarf speaks the color of the hat being worn by the dwarf in front of him/her.
This way, only the first dwarf shall be killed in the worst case. All other dwarves shall know the color of their hat, for certainty.
Am I missing something ? it feels lot more simpler solution as compared with computing parity
The text was updated successfully, but these errors were encountered: