Generalization of Captives Wearing Hats puzzle

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I have been playing with the following puzzle on and off for a few years, but I haven't been able to address this particular generalization.




Background



This problem is somewhat involved, so it's easier to begin by explaining a simpler case.



I've been able to solve this problem:




Consider a scenario where a serial killer kidnaps $n$ mathematicians. He tells them the following scheme before he follows through with it:



He will place them in a line and then put a hat on each of their heads, choosing from $c$ different colors. Each mathematician will be able to see the colors of the hats in front of them, but not the hat on their own head or those on the people behind them. The serial killer will then go to the back of the line and then ask the mathematician what hat she is wearing. If her response, heard aloud by all, is correct, she is let free, else she dies. The serial killer then moves up to the next person now in the back of the line and repeats up through the rest of the line.



The mathematicians are given time to strategize. They all cooperate to form a strategy which maximizes the number of people guaranteed to live. What strategy do they come up with?




This particular variation on this question have been asked on this site before (e.g. Variant of "prisoners and hats" puzzle with more than two colors). Also, another question where the guesses are not heard aloud can be found here: $12$ Prisoner Hat Problem with $5$ different Hats. but no question on Stack Exchange (as far as I am aware) has been asked that generalizes this further:



The Generalization




The serial killer gives the mathematicians a chart, containing the order in which he intends to kill them and the information each will have access to. The specific information that varies is:



  • whose hat colors they get to know

  • whose guesses they get to know

  • and which people got their guess correct.



As an example, consider a problem where three people have to guess between two hat colors.



  1. The first person will know everyone else's hat colors. The other two categories are irrelevant since there are no previous guesses.


  2. The second will know the third's hat color and the first's guess, but not whether or not it was correct.


  3. The third won't know the first person's hat color, but will know the second's. They will know the second's guess, but not the first's, and they will know whether each of their guesses were correct.


Three tables can be made from this information, showing if the person in row $x$ knows the pertinent information about the person in column $y$.



One for knowing hat color:



+----------+----------+----------+----------+
| | Person 1 | Person 2 | Person 3 |
+----------+----------+----------+----------+
| Person 1 | 0 | 1 | 1 |
| Person 2 | 0 | 0 | 1 |
| Person 3 | 0 | 1 | 0 |
+----------+----------+----------+----------+


One for knowing the guess the person made:



+----------+----------+----------+----------+
| | Person 1 | Person 2 | Person 3 |
+----------+----------+----------+----------+
| Person 1 | 1 | 0 | 0 |
| Person 2 | 1 | 1 | 0 |
| Person 3 | 0 | 1 | 1 |
+----------+----------+----------+----------+


And one last table for the accuracy of the given person's guess:



+----------+----------+----------+----------+
| | Person 1 | Person 2 | Person 3 |
+----------+----------+----------+----------+
| Person 1 | 1 | 0 | 0 |
| Person 2 | 0 | 1 | 0 |
| Person 3 | 1 | 1 | 1 |
+----------+----------+----------+----------+


Now, we can finally get to the question at hand:



Given these three tables, is there some general method which the mathematicians can employ to solve the puzzle?



Here "solving" means maximizing the number of people guaranteed to live, as in the original problem. Thanks in advance for your input. One last related link, which is yet another variation on this puzzle which is a special case of this table-form: $N$ perfect logicians wearing hats







share|cite|improve this question


























    up vote
    0
    down vote

    favorite












    I have been playing with the following puzzle on and off for a few years, but I haven't been able to address this particular generalization.




    Background



    This problem is somewhat involved, so it's easier to begin by explaining a simpler case.



    I've been able to solve this problem:




    Consider a scenario where a serial killer kidnaps $n$ mathematicians. He tells them the following scheme before he follows through with it:



    He will place them in a line and then put a hat on each of their heads, choosing from $c$ different colors. Each mathematician will be able to see the colors of the hats in front of them, but not the hat on their own head or those on the people behind them. The serial killer will then go to the back of the line and then ask the mathematician what hat she is wearing. If her response, heard aloud by all, is correct, she is let free, else she dies. The serial killer then moves up to the next person now in the back of the line and repeats up through the rest of the line.



    The mathematicians are given time to strategize. They all cooperate to form a strategy which maximizes the number of people guaranteed to live. What strategy do they come up with?




    This particular variation on this question have been asked on this site before (e.g. Variant of "prisoners and hats" puzzle with more than two colors). Also, another question where the guesses are not heard aloud can be found here: $12$ Prisoner Hat Problem with $5$ different Hats. but no question on Stack Exchange (as far as I am aware) has been asked that generalizes this further:



    The Generalization




    The serial killer gives the mathematicians a chart, containing the order in which he intends to kill them and the information each will have access to. The specific information that varies is:



    • whose hat colors they get to know

    • whose guesses they get to know

    • and which people got their guess correct.



    As an example, consider a problem where three people have to guess between two hat colors.



    1. The first person will know everyone else's hat colors. The other two categories are irrelevant since there are no previous guesses.


    2. The second will know the third's hat color and the first's guess, but not whether or not it was correct.


    3. The third won't know the first person's hat color, but will know the second's. They will know the second's guess, but not the first's, and they will know whether each of their guesses were correct.


    Three tables can be made from this information, showing if the person in row $x$ knows the pertinent information about the person in column $y$.



    One for knowing hat color:



    +----------+----------+----------+----------+
    | | Person 1 | Person 2 | Person 3 |
    +----------+----------+----------+----------+
    | Person 1 | 0 | 1 | 1 |
    | Person 2 | 0 | 0 | 1 |
    | Person 3 | 0 | 1 | 0 |
    +----------+----------+----------+----------+


    One for knowing the guess the person made:



    +----------+----------+----------+----------+
    | | Person 1 | Person 2 | Person 3 |
    +----------+----------+----------+----------+
    | Person 1 | 1 | 0 | 0 |
    | Person 2 | 1 | 1 | 0 |
    | Person 3 | 0 | 1 | 1 |
    +----------+----------+----------+----------+


    And one last table for the accuracy of the given person's guess:



    +----------+----------+----------+----------+
    | | Person 1 | Person 2 | Person 3 |
    +----------+----------+----------+----------+
    | Person 1 | 1 | 0 | 0 |
    | Person 2 | 0 | 1 | 0 |
    | Person 3 | 1 | 1 | 1 |
    +----------+----------+----------+----------+


    Now, we can finally get to the question at hand:



    Given these three tables, is there some general method which the mathematicians can employ to solve the puzzle?



    Here "solving" means maximizing the number of people guaranteed to live, as in the original problem. Thanks in advance for your input. One last related link, which is yet another variation on this puzzle which is a special case of this table-form: $N$ perfect logicians wearing hats







    share|cite|improve this question
























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I have been playing with the following puzzle on and off for a few years, but I haven't been able to address this particular generalization.




      Background



      This problem is somewhat involved, so it's easier to begin by explaining a simpler case.



      I've been able to solve this problem:




      Consider a scenario where a serial killer kidnaps $n$ mathematicians. He tells them the following scheme before he follows through with it:



      He will place them in a line and then put a hat on each of their heads, choosing from $c$ different colors. Each mathematician will be able to see the colors of the hats in front of them, but not the hat on their own head or those on the people behind them. The serial killer will then go to the back of the line and then ask the mathematician what hat she is wearing. If her response, heard aloud by all, is correct, she is let free, else she dies. The serial killer then moves up to the next person now in the back of the line and repeats up through the rest of the line.



      The mathematicians are given time to strategize. They all cooperate to form a strategy which maximizes the number of people guaranteed to live. What strategy do they come up with?




      This particular variation on this question have been asked on this site before (e.g. Variant of "prisoners and hats" puzzle with more than two colors). Also, another question where the guesses are not heard aloud can be found here: $12$ Prisoner Hat Problem with $5$ different Hats. but no question on Stack Exchange (as far as I am aware) has been asked that generalizes this further:



      The Generalization




      The serial killer gives the mathematicians a chart, containing the order in which he intends to kill them and the information each will have access to. The specific information that varies is:



      • whose hat colors they get to know

      • whose guesses they get to know

      • and which people got their guess correct.



      As an example, consider a problem where three people have to guess between two hat colors.



      1. The first person will know everyone else's hat colors. The other two categories are irrelevant since there are no previous guesses.


      2. The second will know the third's hat color and the first's guess, but not whether or not it was correct.


      3. The third won't know the first person's hat color, but will know the second's. They will know the second's guess, but not the first's, and they will know whether each of their guesses were correct.


      Three tables can be made from this information, showing if the person in row $x$ knows the pertinent information about the person in column $y$.



      One for knowing hat color:



      +----------+----------+----------+----------+
      | | Person 1 | Person 2 | Person 3 |
      +----------+----------+----------+----------+
      | Person 1 | 0 | 1 | 1 |
      | Person 2 | 0 | 0 | 1 |
      | Person 3 | 0 | 1 | 0 |
      +----------+----------+----------+----------+


      One for knowing the guess the person made:



      +----------+----------+----------+----------+
      | | Person 1 | Person 2 | Person 3 |
      +----------+----------+----------+----------+
      | Person 1 | 1 | 0 | 0 |
      | Person 2 | 1 | 1 | 0 |
      | Person 3 | 0 | 1 | 1 |
      +----------+----------+----------+----------+


      And one last table for the accuracy of the given person's guess:



      +----------+----------+----------+----------+
      | | Person 1 | Person 2 | Person 3 |
      +----------+----------+----------+----------+
      | Person 1 | 1 | 0 | 0 |
      | Person 2 | 0 | 1 | 0 |
      | Person 3 | 1 | 1 | 1 |
      +----------+----------+----------+----------+


      Now, we can finally get to the question at hand:



      Given these three tables, is there some general method which the mathematicians can employ to solve the puzzle?



      Here "solving" means maximizing the number of people guaranteed to live, as in the original problem. Thanks in advance for your input. One last related link, which is yet another variation on this puzzle which is a special case of this table-form: $N$ perfect logicians wearing hats







      share|cite|improve this question














      I have been playing with the following puzzle on and off for a few years, but I haven't been able to address this particular generalization.




      Background



      This problem is somewhat involved, so it's easier to begin by explaining a simpler case.



      I've been able to solve this problem:




      Consider a scenario where a serial killer kidnaps $n$ mathematicians. He tells them the following scheme before he follows through with it:



      He will place them in a line and then put a hat on each of their heads, choosing from $c$ different colors. Each mathematician will be able to see the colors of the hats in front of them, but not the hat on their own head or those on the people behind them. The serial killer will then go to the back of the line and then ask the mathematician what hat she is wearing. If her response, heard aloud by all, is correct, she is let free, else she dies. The serial killer then moves up to the next person now in the back of the line and repeats up through the rest of the line.



      The mathematicians are given time to strategize. They all cooperate to form a strategy which maximizes the number of people guaranteed to live. What strategy do they come up with?




      This particular variation on this question have been asked on this site before (e.g. Variant of "prisoners and hats" puzzle with more than two colors). Also, another question where the guesses are not heard aloud can be found here: $12$ Prisoner Hat Problem with $5$ different Hats. but no question on Stack Exchange (as far as I am aware) has been asked that generalizes this further:



      The Generalization




      The serial killer gives the mathematicians a chart, containing the order in which he intends to kill them and the information each will have access to. The specific information that varies is:



      • whose hat colors they get to know

      • whose guesses they get to know

      • and which people got their guess correct.



      As an example, consider a problem where three people have to guess between two hat colors.



      1. The first person will know everyone else's hat colors. The other two categories are irrelevant since there are no previous guesses.


      2. The second will know the third's hat color and the first's guess, but not whether or not it was correct.


      3. The third won't know the first person's hat color, but will know the second's. They will know the second's guess, but not the first's, and they will know whether each of their guesses were correct.


      Three tables can be made from this information, showing if the person in row $x$ knows the pertinent information about the person in column $y$.



      One for knowing hat color:



      +----------+----------+----------+----------+
      | | Person 1 | Person 2 | Person 3 |
      +----------+----------+----------+----------+
      | Person 1 | 0 | 1 | 1 |
      | Person 2 | 0 | 0 | 1 |
      | Person 3 | 0 | 1 | 0 |
      +----------+----------+----------+----------+


      One for knowing the guess the person made:



      +----------+----------+----------+----------+
      | | Person 1 | Person 2 | Person 3 |
      +----------+----------+----------+----------+
      | Person 1 | 1 | 0 | 0 |
      | Person 2 | 1 | 1 | 0 |
      | Person 3 | 0 | 1 | 1 |
      +----------+----------+----------+----------+


      And one last table for the accuracy of the given person's guess:



      +----------+----------+----------+----------+
      | | Person 1 | Person 2 | Person 3 |
      +----------+----------+----------+----------+
      | Person 1 | 1 | 0 | 0 |
      | Person 2 | 0 | 1 | 0 |
      | Person 3 | 1 | 1 | 1 |
      +----------+----------+----------+----------+


      Now, we can finally get to the question at hand:



      Given these three tables, is there some general method which the mathematicians can employ to solve the puzzle?



      Here "solving" means maximizing the number of people guaranteed to live, as in the original problem. Thanks in advance for your input. One last related link, which is yet another variation on this puzzle which is a special case of this table-form: $N$ perfect logicians wearing hats









      share|cite|improve this question













      share|cite|improve this question




      share|cite|improve this question








      edited Aug 17 at 3:37









      joriki

      165k10180330




      165k10180330










      asked Aug 17 at 3:20









      David J

      12




      12

























          active

          oldest

          votes











          Your Answer




          StackExchange.ifUsing("editor", function ()
          return StackExchange.using("mathjaxEditing", function ()
          StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
          StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
          );
          );
          , "mathjax-editing");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "69"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          noCode: true, onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );








           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2885372%2fgeneralization-of-captives-wearing-hats-puzzle%23new-answer', 'question_page');

          );

          Post as a guest



































          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes










           

          draft saved


          draft discarded


























           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2885372%2fgeneralization-of-captives-wearing-hats-puzzle%23new-answer', 'question_page');

          );

          Post as a guest













































































          這個網誌中的熱門文章

          How to combine Bézier curves to a surface?

          Why am i infinitely getting the same tweet with the Twitter Search API?

          Carbon dioxide