# 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

• -1 because this is not clear in the slightest -- sorry. It is hopelessly vague. Commented Jul 1, 2019 at 18:55

The way I analyzed this puzzle was by looking at how many "bits" of information can be given and how many are needed. I use bit in reference to a binary digit where $$n$$ bits and represent $$2^n$$ combinations. As long as the number of bits given is greater or equal to the number of bits need then we are good.

Before we start analyzing different cases we need some notation. $$I_l$$ represents the number of bits that comprises "a large amount of information". Similarly, $$I_s$$ denotes "a small amount of information". Each case will relate $$I_l$$ or $$I_s$$ to $$I_l$$ or $$I_s$$ plus additional information. For example, if Bob gives the small information and the slave chooses to give the large information then $$I_s + x \geq I_l + y$$ must be satisfied where $$x$$ and $$y$$ are determined by the strategy. Because of this, we can set $$I_s=1$$ without loss of generality.

Let's start by seeing what happens when Bob chooses to give the slave the small information. As $$I_s=1$$, the most obvious information we can give is the majority color. If there are not two of each color, then we only use one mulligan. This lets us guess the small info which we can obtain during the one losing round (or the last round if all colors are the same). The master gave $$I_s+1$$ bits and the slave used $$1+I_s$$ bits to guess the red/black rounds and Bob's small information. This gives the following satisfied inequality $$I_s+1 \geq 1+I_s$$.

If there are two of each color, we will use two mulligans and need to guess the large info. The master can give two extra bits in the two lost rounds and the slave only uses $$I_l$$ bits to guess the answer. This leads to $$I_s+2 \geq I_l$$ and since we know $$I_s=1$$ it simplifies to $$3 \geq I_l$$. We will want $$I_l$$ to be as high as possible when Bob gives us the large information, so it is likely that $$I_l = 3$$.

Now, what happens when Bob chooses to give the slave the large information. It is impossible to give any additional information when all 4 rounds are won, so only in the cases that be identified with $$I_l-I_s = 3-1 = 2$$ bits (4 cases in total) can the slave guess the small information. Therefore, we are better off always using the mulligan in one of the rounds and always guessing the large information.

One possibility, is to have the slave assume odd parity (a 3-1 split) and have the master give 2 bits for the minority position and 1 bit for the majority color. If the rounds have even parity, the master can choose which round to lose giving 2 bits of information and give an additional bit with what is played during the losing round. These three bits are used to guess the large information.

If the rounds have odd parity, we run into a problem. We can either let the slave win all 4 rounds, but as we analyzed previously, there is not enough information to guess the small information. On the other hand, the master can intentionally fail a round giving 2 bits of information. However the failing card is forced meaning we only have 2 bits when we need 3.

• Even if the Slave gets all 4 rounds right, the Master can still intentionally make a mistake. Commented Oct 5, 2018 at 11:37
• @deepthought I updated the end of my answer, but I still don't see a way to make this work. The problem is that if the parity is odd we cannot give a third bit as the failing card is forced. Commented Oct 5, 2018 at 15:04
• Okay, my next (and probably last) hint is a basic arithmetic equation. I will post it tomorrow. :-) Commented Oct 5, 2018 at 16:44
• $1 = \frac{1}{8} +\frac{1}{8} +\frac{1}{8} +\frac{1}{8} +\frac{1}{2}$. Good luck! Commented Oct 6, 2018 at 15:37

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:

(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.

(This probably isn't the intended answer, but leaving the deck open to interpretation was just asking for it)

The deck consists of 3 Aces of Hearts
The small amount of information is the rank (Always ace)
The large amount of information is the color (Always red)

The game goes like this:

1. Bob selects an ace of hearts, which he reveals to the Master.
2. Bob reveals to the Master the Red/Black plays he will make in the four rounds. All aces of hearts
3. The Master then selects an ace of hearts from the deck, which he reveals to Bob.
4. Bob then decides to do one of two things (doesn't matter which):
• He grants them one Mulligan, and tells the Slave that the Master's card is red; or
• He grants them two Mulligans, and tells the Slave that the Master's card is an ace.
5. Then they play four Red/Black rounds. (Where everybody plays an ace of hearts so no KIIIIIIILLING)
6. Then the Slave tells Bob that his card was red
7. Survive!
• Right, of course :-) Red/Black was supposed to be a separate Deck. Commented Oct 4, 2018 at 17:17
• "...four rounds, in each of the which, the Master, Slave and Bob simulatneously play either Red or Black." and I added just now : "These are their two options in each round (and is not related to the Deck in steps (1),(3),(4) and (6))" Commented Oct 4, 2018 at 17:28