Monday, 19 August 2013

mathematics - Sub-puzzle: Master and Slave versus Bob the Violent but Honest Psychopath


[I created this as a sub-puzzle to "Strategy to beat the Casino reversed", that has been sitting unsolved for months. You may wish to read that puzzle first, but this is self-contained. My answer to that is rather long, and it occurs to me to break it up, into this partial answer, this puzzle here, and later my answer to this puzzle. EDITED: I've divided it into three puzzles, this one, and two followups: easy version and hard version.]


Below is a game that is played by a Master and Slave team versus Bob the Violent but Honest Psychopath. The Master and Slave team starts with a certain number of Mulligans. This number is decided by Bob, with certain restrictions, as we shall see. The main part of the game consists of four rounds in which all three players simultaneously play Red or Black on each round. Unless all three players play the same colour, the Master and Slave team loses one Mulligan... or else, if they have no Mulligans left, Bob will KIIIIIIILL THEEEEEEM BAHAHAAAHAH.


In addition to the four Red/Black rounds, the game has initial and final steps involving a certain Deck of cards, to be explained later. The point of these stages is that they allow us to chain strategies together to give a partial answer to the original puzzle (and also, a complete answer to "Strategy to beat the casino over the long haul").



The Master and Slave can agree upon strategies beforehand, but there is no communication allowed once the game starts, except as provided by the rules. It is for you to come up with strategies for them which guarantee their survival against Bob, who is bloodthirsty and very clever, but who will strictly follow the rules.




The game is this:



  1. Bob selects a card from the Deck, which he reveals to the Master.

  2. Bob reveals to the Master the Red/Black plays he will make in the four rounds. (And yes, Bob is Honest.)

  3. The Master then selects a card from the Deck (possibly the same card), which he reveals to Bob.

  4. Bob then decides to do one of two things:

    • He grants them one Mulligan, and tells the Slave a Large amount of information about the Master's card; or


    • He grants them two Mulligans, and tells the Slave a Small amount of information about the Master's card.



  5. Then they play four Red/Black rounds.

  6. Then the Slave decides to do one of two things:

    • He guesses a Large amount of information about Bob's card (and the guess must be correct, on pain of getting KIIIIIIILLED); or

    • He forfeits one of the team's Mulligans, then (correctly) guesses a Small amount of information about Bob's card.





To be quite clear: step (5) consists of four rounds, in each of the which, the Master, Slave and Bob simulatneously play either Red or Black. These are their two options in each round (and is not related to the Deck in steps (1),(3),(4) and (6)). Unless all three players play the same colour, the Master and Slave team loses one Mulligan. As seen above, the Master knows in advance what Bob will play, but cannot pass this information to the Slave directly. In the first round, the Slave only knows what Bob tells him in step (4). In subsequent rounds, the Slave also knows what was played in previous rounds.


In step (4), the Master also knows what Bob told the Slave.


And of course, in step (6), the Slave is only allowed to choose the latter option if they have a Mulligan left.




I have not yet said what the Deck is. And I have not yet said what Large and Small amounts of information mean. That is because it is up to you, dear puzzle solver! You can choose whatever Deck works for your answer. Of course, it must have the same meaning in all the steps. As I say, that is really the whole point of this, to "chain" answers to solve the original puzzle!


Example: in your answer, you might specify that the Deck is the standard deck of 52 cards; "Large amount" means you know exactly which card it is; and "Small amount" means you only know which suit the card is. This is just an example, if you use it, I'm pretty sure it will get them KIIIIIIILLED.


So, your task is: to come up with a (finite) Deck, and a definition for Large and Small amounts of information, and GUARANTEED (not probabilistic) survival strategies for this game.


Small hint:




You may wish to start by dividing the possibilities for Bob's four Red/Black rounds into odd and even parity.



Medium hint: the Deck I plan to use is



the top four ranks from a standard deck (16 cards). These correspond to the odd parity cases (3-1 split). The colour of the card is the majority colour, and the rank of the card is the position of the minority colour. The difference between clubs and spades, and between hearts and diamonds, is irrelevant (but becomes relevant in the followup puzzle).



And a larger hint



can be found by looking at the edit history of my linked answer





Answer



The Deck I am using is the one I gave in the hints,



A 16-card deck, top four ranks of the standard deck. As I say, only rank and colour matters here, there is no difference between clubs and spades, or between hearts and diamonds. So this is effectively an 8-card deck. A Large amount of information means knowing the rank and colour of the card (effectively complete information), and a Small amount means knowing the colour of the card.



The Master's strategy in step (3) is



first, to decide whether Bob's plays revealed in step (2) have "even or odd parity". "Odd parity" in this case means that the two colours are split 3-1.
- If it is odd, then the Master plays the corresponding card: the colour of the card is the majority colour, and the rank of the card indicates the position of the minority colour. I have chosen K-Q-J-A for rounds 1-2-3-4. So for example a black queen corresponds to black-red-black-black.
- If it is even (2-2 or 4-0 split), then the Master looks at the rank of the card Bob revealed in step (1), and 'flips' the play in the position corresponding to that rank to get an odd parity combination, then plays that card.

So for example, the Master plays a black queen in step (3) under the following circumstances:
strategy for step 3
(Actually this is part of my answer to the followup question (hard version), where the difference between clubs and spades will matter. Here it does not matter.)
The cases where there Master plays a black king follow the same pattern, but starting with red-black-black-black. Similarly for black jack and ace. This covers half the cases, and then reverse the colours to get the other half.



If Bob gives the Slave a Large amount of information in step (4), their strategy in step (5) is:



The Slave plays the odd parity combination corresponding to rank and colour of the Master's card. (e.g. if black queen, then play black-red-black-black.)
- If Bob's plays are even, the Slave will make one mistake. The position of the mistake tells the Slave the rank of Bob's card. The colour of the Master's play in that position tells him the colour of Bob's card. Thus he has a Large amount of information about Bob's card.
- If Bob's plays are odd, the Slave will make no mistakes.

- If Bob's card is the opposite colour as the Master's, the Master intentionally makes one mistake, in the position corresponding to the rank of Bob's card. The fact the Master made a mistake tells the Slave that Bob's card is the opposite colour as the Master's, and the position tells him the rank. Thus he has a Large amount of information about Bob's card.
- If Bob's card is the same colour as the Master's, the Master does not make a mistake. This tells the Slave that Bob's card is the same colour as the Master's. Thus he only has a Small amount of information about Bob's card, but they still have one Mulligan.



If Bob gives the Slave a Small amount of information in step (4), their strategy in step (5) is:



The Slave plays that colour four times.
- If Bob's plays are odd, the Slave will make one mistake. The colour of the Master's play in that position tells him the colour of Bob's card. Thus he only has a Small amount of information about Bob's card, but they still have one Mulligan.
- If Bob's plays are a 2-2 split, the Slave will make two mistakes. The positions of these mistakes will tell the Slave the two possible ranks of Bob's card. The colour of the Master's play in one position tells him which of these two ranks, and the colour in the other position tells him the colour of Bob's card. Thus he has a Large amount of information about Bob's card.
[To explain how the Slave knows that there are only two possible ranks for Bob's card: for example, suppose the Slave knows the Master played a Black card in step (3). Now suppose Bob's plays are red-red-black-black. The Slave deduces that Bob's card is a King or Queen. If Bob's card were a Jack or Ace, the Master would have played a red Ace or Jack in step (3).]
- If Bob's plays are all the same colour, the Slave will make no mistakes. As above, the Master either makes no mistakes, telling the Slave that Bob's card is one colour, or intentionally makes one mistake, telling the Slave that Bob's card is the other colour, and telling him the rank. This gives the Slave a Small or Large amount of information.




So they are guaranteed to survive.


No comments:

Post a Comment

Understanding Stagnation point in pitot fluid

What is stagnation point in fluid mechanics. At the open end of the pitot tube the velocity of the fluid becomes zero.But that should result...