This was a tough puzzle, and only two people sent correct answers – Suman Saraf (and his daughter) and Pratik Poddar – hats off to both of you!

I am copying the answer from the original source:

The 2-person case is simpler. Let r denote a red card and b denote a black card. Let’s list Bruce’s card’s color first. Then the 4 distinct possibilities are rr, bb, rb, and br. The following strategy is foolproof. Bruce guesses that his card is the same color as Ava’s (covering the cases rr and bb). Ava takes the opposite approach and assumes that her card’s color is different from Bruce’s (covering the cases rb and br). One of them will necessarily be correct. If Bruce and Ava properly employ these strategies, they cannot lose the game.

Before diving into the 4-person case, let’s reexamine the 2-person case. We could interpret a red card as a 0 and a black card as a 1. Then Bruce’s strategy, as described above, handles the cases 00 and 11. His strategy could be interpreted as “the sum of our cards is even.” (0+0=0, 1+1=2) In this language, Ava’s strategy would be “the sum of our cards is odd.” Again, one of them must be right, no matter the cards. Note that Bruce and Ava have divided the sample space of all possible outcomes into 2 cases, based on the sum of the cards.

The 4-person case is more general and depends upon the notion of modular arithmetic, and in particular remainders when dividing by 4. Rather than purely guessing “the suits are the same,” or “the suits are different,” the players must be more clever. Let’s map each suit to a number. Clubs are 0, diamonds are 1, hearts are 2, and spades are 3. So, if Emily looks out and sees hearts (Charles), hearts (Doug), and spades (Fran), she interprets this as 2+2+3=7. Suppose that Emily’s card’s suit is clubs, which she obviously doesn’t know. Consider the following strategies:

- Emily guesses her suit so that the total sum is a multiple of 4. She sees hearts, hearts, spades and guesses diamonds (2+2+3+1=8).
- Charles guesses his suit so that the total sum is 1 more than a multiple of 4. He sees clubs, hearts, spades and guesses clubs (0+2+3+0=5).
- Doug guesses his suit so that the total sum is 2 more than a multiple of 4. He sees clubs, hearts, spades and guesses diamonds (0+2+3+1=6).
- Fran guesses her suit so that the total sum is 3 more than a multiple of 4. She sees clubs, hearts, hearts and guesses spades (0+2+2+3=7).

In this example, Fran guesses correctly because the total sum is 7, which is 3 more than a multiple of 4. For any combination of suits, one of them must be right. After all, the total sum must be a whole number. And all whole numbers have remainder 0, 1, 2, or 3 when divided by 4. As long as each of them sticks to his/her strategy, the group can ensure they won’t lose the game. Interestingly, it doesn’t matter which numbers they choose to use, as long as they all have different remainders when divided by 4. So, choosing any four consecutive whole numbers is a sufficient mapping.

Hope you all enjoyed the puzzle!