Posts

Showing posts with the label player

Develop an Unbeatable Strategy!

Consider a two player coin game where each player gets turn one by one. There is a row of even number of coins, and a player on his/her turn can pick a coin from any of the two corners of the row. The player that collects coins with more value wins the game. 

Develop a strategy for the player making the first turn, such he/she never looses the game.

Note : The strategy to pick maximum of two corners may not work. In the following example, first player looses the game when he/she uses strategy to pick maximum of two corners.

============================================================

Example :

  18 20 15 30 10 14


First Player picks 18, now row of coins is
  20 15 30 10 14


Second player picks 20, now row of coins is
  15 30 10 14


First Player picks 15, now row of coins is
  30 10 14


Second player picks 30, now row of coins is
  10 14


First Player picks 14, now row of coins is
  10 


Second player picks 10, game over.



Develop an Unbeatable Strategy!

The total value collected by second player is more (20 +
30 + 10) compared to first player (18 + 15 + 14).
So the second player wins.

===================================================================
 
This is the unbeatable strategy! 

The Unbeatable Strategy for a Coin Game!


Why strategy needed in the case?

Let's recall the example given in the question.
-------------------------------------------------------------------

Example

  18 20 15 30 10 14


First Player picks 18, now row of coins is
  20 15 30 10 14


Second player picks 20, now row of coins is
  15 30 10 14


First Player picks 15, now row of coins is
  30 10 14


Second player picks 30, now row of coins is
  10 14


First Player picks 14, now row of coins is
  10 


Second player picks 10, game over.

The total value collected by second player is more (20 +
30 + 10) compared to first player (18 + 15 + 14).
So the second player wins.

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

Here, it's very clear that the player who chooses coins numbered at even positions wins & the one who chooses odd position loses.

So first player who is going to choose coin first need to be smart. All that he/she need to do is make sum of values of all coin at even position, sum of values of all coins at odd positions and compare them. 

If he finds the sum of values of coins at odd position greater then he should choose 1st coin (odd position) followed by 3rd,5th.....(odd positions) & force other to choose even coins

And if he finds the sum of values of coins at even positions greater then he should choose
last coin (which is at even position as number of coins are even).

For example, in above case, 

  18 20 15 30 10 14

first player calculates 

Sum of odd coins = 18 + 15 + 10 = 43
Sum of even coins = 20 + 30 + 14 = 64.  


Since sum of even coins is greater, he should choose 6th coin (which will be followed by 4th and 2nd) and force other player to choose 5th,3rd and 1st coin.

Even in case second player selects 1st coin after 14 at other corner is selected by first, still he can be forced to choose the coin at 3rd position (odd position) if first player selects 2nd coin.

The Unbeatable Strategy for a Coin Game!


In short, first player need to make sure that he collects all the coins that are at even positions or odd position whichever has greater sum!   

Note that the total number of coins in the case can't be odd as then distribution of coins among 2 will be unequal.

The Ping Pong Puzzle

Three friends (A, B and C) are playing ping pong. They play the usual way: the winner stays on, and the loser waits his/her turn again. At the end of the day, they summarize the number of games that each of them played:

A played 10
B played 15
C played 17.

The Ping Pong Puzzle


Who lost the second game? 

This person played & lost the second game! 

Participant of the Second Game!


How games were played?

A played 10, B played 15 and C played 17 games. So total number of presences are 10 + 15 + 17 = 42. Every 2 presences form a game. Hence, the number of games played are 42/2 = 21.

Let's take into consideration the minimum number of games that a player can play. For that, he need to loose every game that he has played. That is, if he has played first game then he must have out in second but replaced looser of second in third game. In short, he must have played odd numbered of games like 1,3,5,7,9,11,13,15,17,19,21.That's 11 games in total.

And if he had made debut in second game then he must had played even numbered games like 2,4,6,8,10,12,14,16,18,20. That's 10 games in total.

Participant of the Second Game!

Since, in the case only A has played 10 games, he must have made debut in second game where he lost that game to make comeback in 4th game thereby replacing looser of third game.

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
 

Who Will Be Not Out?

It is a strange cricket match in which batsman is getting bowled in the very first ball he faced. That means on ten consecutive balls ten players get out.

Assuming no extras in the match, which batsman will be not out at the end of the innings?  

A Strange Cricket Match

Know that lucky player!

Source 

"He Will Be Not Out!"


What happened in the match?

First let's number all the players from 1 to 11 as Batsman 1, Batsman 2, Batsman 3 & so on with last player as Batsman 11. 

Now let's take a look at what must have happened during 1st over.

1st Ball : Batsman-1 got out
2nd Ball : Batsman-3 got out
3rd Ball : Batsman-4 got out
4th Ball : Batsman-5 got out
5th Ball : Batsman-6 got out
6th Ball : Batsman-7 got out


Batsman 8 comes in 

Batsman 2 is still standing at non-striker end watching fall of wickets. Remember in the match all batsman are bowled out so no change in strike because of run out or before catch is taken.

At the end of first over, the strike is rotated and Batsman 2 comes on strike while Batsman 8 at the non striker end.

Now here is what happens in second over.

1st Ball : Batsman-2 got out
2nd Ball : Batsman-9 got out
3rd Ball : Batsman-10 got out
4th Ball : Batsman-11 got out


Batman 8 will remain NOT OUT!

So the only batsman left NOT OUT is Batsman 8 standing at the non-striker end.
 
Follow me on Blogarama