Posts

Three Hat Colors Puzzle

A team of three people decide on a strategy for playing the following game.  

Each player walks into a room.  On the way in, a fair coin is tossed for each player, deciding that player’s hat color, either red or blue.  Each player can see the hat colors of the other two players, but cannot see her own hat color.  

After inspecting each other’s hat colors, each player decides on a response, one of: “I have a red hat”, “I had a blue hat”, or “I pass”.  The responses are recorded, but the responses are not shared until every player has recorded her response.  

The team wins if at least one player responds with a color and every color response correctly describes the hat color of the player making the response.  In other words, the team loses if either everyone responds with “I pass” or someone responds with a color that is different from her hat color.

What strategy should one use to maximize the team’s expected chance of winning?



Three Hat Colors Puzzle


These could be the strategies to maximize the chances of winning!


Three Colors Hats Puzzle - Solution


What's the puzzle? 

There can be two strategies to maximize the chances of winning in the game.

STRATEGY - 1 :   

There are 8 different possible combinations of three color hats on the heads of 3 people. If we assume red is represented by 0 & blue by 1 then those 8 combinations are - 

Three Colors Hats Puzzle - Solution

Here only 2 combinations are there where all are wearing either red or blue hats. That is 2/8 = 25% combinations where all are wearing hat of same color and 6/8 = 75% combinations where either 1 is wearing the different colored hat than the other 2.  In short, at least 2 will be wearing either red or blue in 75% of combinations.

Now for any possible combination, there will be 2 hats of the same color (either blue or red). The one who sees the same color of hats on heads of other two should tell the opposite color as there are 75% such combinations. That will certainly increase the chances of winning to 75%.

STRATEGY 2 :    

Interestingly, here 3 responses from each member of team are possible viz RED (R), BLUE (B) and PASS (P). And every member can see 3 possible combinations of hats on the heads of other 2 which are as 2 RED (2R) 2 BLUE (2B) and 1RED:1BLUE (RB). See below.


Three Colors Hats Puzzle - Solution

Let's think as instructor of this team. We need to cover up all the possible 8 combinations in form of responses in the above table. 

Three Colors Hats Puzzle - Solution

For every possible combination, at least 1 response need to be correct to ensure win. But out of 9 above, 3 responses of 'PASS' are eliminated as they won't be counted as correct responses. So we are left with only 6. Let's see how we can do it.

First of let's take case of 2R. There are 2 responses where A sees 2 RED hats (000,100). We can't make sure A's response correct in both cases. So let A's response for this case be R. So whenever this 000 combination will appear A's response will secure win.

After covering up 000, let's cover up 001. For that, C's response should be B whenever she sees 2 red hats on other 2. And only left response P would be assigned to B.

Three Colors Hats Puzzle - Solution

So far,we have covered up these 2 combination via above responses.  

Three Colors Hats Puzzle - Solution

--------------------------------------------------------------------------

Now, let's take a case of 2B. A can see 2B hats whenever there 011 or 111 appears. Since A's R response is already used previously, let B be her response in the case. So the combination 111 will be covered up with A's response.  

B can see 2B hats in case of 101 or 111. Since 111 is already covered above, to cover up 101, B should say R whenever she sees 2 BLUE hats on the heads of other 2. With this only response left for C in case of 2B is P.

Three Colors Hats Puzzle - Solution
 
With these responses, we have covers of so far,

Three Colors Hats Puzzle - Solution
 
 -------------------------------------------------------------------------

After filling remaining 1 possible response in response table for every team member in case of 1 RED and 1 BLUE hat, 

Three Colors Hats Puzzle - Solution

 B's response as BLUE in this case will ensure win whenever 011 or 110 combination will appear. Similarly, C's response as a RED will secure win whenever 010 or 100 appears as a combination.

Three Colors Hats Puzzle - Solution
------------------------------------------------------------------------------

In this way, there will be at least 1 response correct for every possible 8 combinations. This strategy will give us 100% chances of winning this game!

Three Colors Hats Puzzle - Solution


The above table shows who is going to respond correctly for the given combination ( the block of combination & correct response are painted with the same background color).
 
SIMPLE LOGIC : 

The same strategy can be summarized with very simple logic. 

There must be someone to say RED whenever she sees 2 RED hats; someone should say BLUE and remaining one should say PASS. Similarly, one has to say BLUE; other should say RED & third one should say PASS whenever 2 BLUE hats are seen. Same logic to be followed in case of 1 RED and  1 BLUE hats seen. But while doing this, we need to make sure responses are well distributed & not repeated by single member of team (See table below).

Three Colors Hats Puzzle - Solution
 

Make 7 Using 5 !

In the given picture, you can see that there are two matchsticks that have been used to create five squares. You are allowed to move just two matchsticks and must form seven squares. You can't overlap the matches and you are not allowed to break them. Also, like you can see in the picture, all squares must be closed. 

Make 7 Using  5 !

That's how it can be done!

Steps to Make 7 from 5


What was the challenge?

All we need to do is to re place these 2 match sticks.


Steps to Make 7 from 5

So we get,


Steps to Make 7 from 5

Mathematical Puzzle On The Chess Board

white rook and a black bishop of a standard chess set are randomly placed on a chessboard


Probability On The Chess Board



What is the probability that one is attacking the other?


You can skip to the answer! 
  

Resolving Mathematical Puzzle On Chess Board


But what was the puzzle?

Let's recall the definition of the probability. It's ratio of number of desired combinations to the number of total possible combinations.

A Rook and Bishop can have 64 Permutations 2 = 64 X 63 = 4032 possible combinations on a standard chess board if placed randomly.

Now there are 2 possible cases - The Rook attacking Bishop and the Bishop attacking Rook. Both can't attack each other simultaneously.

CASE 1 : The Rook attacking the Bishop 

The Rook can have 64 possible positions on the chess board and for every position it attacks 14 other position in it's attacking lines. That means 64 X 14 = 896 possible combinations where Rook is attacking Bishop. 

Calculation of Probability On The Chess Board

 CASE 2 : The Bishop attacking the Rook

Now imagine 4 hallow co-centrist squares around the center of the chess board with outermost have side 8 units & innermost having side 2 units.(See below)

Calculation of Probability On The Chess Board

Here each square has side with thickness of 1 unit.

If the Bishop is anywhere on outermost square which has 28 possible positions then it attack 7 other positions.( See below pics).

Calculation of Probability On The Chess Board


Calculation of Probability On The Chess Board

So there are 28 x 7 = 196 possible combinations where Bishop attacking the Rook.

--------------------------------------------------------------------------

Now if the bishop is anywhere on 20 squares of inner square then 9 other positions will be in it's attacking lines. (See below).

Calculation of Probability On The Chess Board
  

Calculation of Probability On The Chess Board

In this way, there will be 20 X 9 = 180 such combinations where the bishop will attack the rook. 

--------------------------------------------------------------------------

Now if the Bishop is placed anywhere on the 12 squares of more inner square then 11 other positions will be in it's lines of attack.( See below).

Calculation of Probability On The Chess Board


Calculation of Probability On The Chess Board

In short, there are 12 X 11 = 132 combination where Bishop will be attacking the rook.

--------------------------------------------------------------------------

And finally, if the bishop is placed at any of 4 positions of the innermost square then it will attack 13 other positions like below.

Calculation of Probability On The Chess Board

Calculation of Probability On The Chess Board

That is, there will be 4 X 13 = 52  such combinations where the Bishop will be attacking the Rook.

-------------------------------------------------------------------------------

Adding all possible combinations of CASE 1 and CASE 2 as - 896 + 196 + 180 + 132 + 52 =  1456. It means there are 1456 possible combinations where either the Rook attacking Bishop or Bishop attacking the Rook.

The Required Probability  = Number of Required Combinations / Number of Total Combinations = 1456 / 4032 = 0.3611

To conclude, 0.3611 is the probability that the Rook or Bishop attacking each other if place randomly on standard chess board.

NOTE : Don't get confused with black Bishop on black square used in illustrations of attacking lines in CASE 2. Even if it was black Bishop on white square then also it would attack same other positions mentioned in that particular consideration. And random placement means it could be anything - on black or on white.

What's the answer?

Just try to find it!

Viral Maths Puzzle


Here is the answer!


Follow me on Blogarama