Easy | Probability |

Two bullets are put into a gun's round barrel consecutively, which has capacity of 6. The gun is shot once, but no bullet is fired. Does rolling the barrel (shuffling) before next shot increase the probability of firing a bullet?

Hint

Since one empty slot has been used, there must be more probability of shooting a bullet in next chance, than shooting after a shuffle.

Answer

Yes!

Solution

Since there are 6 total slots with 2 bullets, the probabilty of firing a bullet after shuffle is 2/6.

The probability of getting bullet without shuffle is 1/4. To understand this, look at the image, and imagine that one of the empty slots (3,4,5,6) just got shot. Now assumming the barrel turns clockwise, next shot will be 4 ,5 ,6 or 1. and out of these four, only (1) has bullet. Hence probability of firing a bullet is 1/4. Note that this same case stands in anticlockwise direction.

With shuffle its 2/6=1/3. Hence yes, shuffling does increase probability of shooting bullet (from 1/4 to 1/3)

The probability of getting bullet without shuffle is 1/4. To understand this, look at the image, and imagine that one of the empty slots (3,4,5,6) just got shot. Now assumming the barrel turns clockwise, next shot will be 4 ,5 ,6 or 1. and out of these four, only (1) has bullet. Hence probability of firing a bullet is 1/4. Note that this same case stands in anticlockwise direction.

With shuffle its 2/6=1/3. Hence yes, shuffling does increase probability of shooting bullet (from 1/4 to 1/3)

Source: Quant Interview

Enable Like and Comment Easy | Strategy |

Five pirates need to divide 100 Gold Coins. Pirates have hierarchy, from Level 5 to level 1. The level-5 pirate proposes a division plan and all the pirates vote on it. If at least 50% of the pirates agree on the plan, the gold is split according to the proposal. If not, level-5 pirate is kicked from the ship, and the level-4 pirate now proposes a plan. This process continues until a proposal is accepted. All pirates are extremely smart and extremely greedy. How does level-5 Pirate divide the treasure?

Hint

Here n=5, think in terms of what happens if n=1,2,3...

Answer

Division is: 98,0,1,0,1

Solution

To understand the answer, we need to reduce this problem to only 2 pirates. So what happens if there are only 2 pirates. Pirate 2 can easily propose that he gets all the 100 gold coins. Since he constitutes 50% of the pirates, the proposal has to be accepted leaving Pirate 1 with nothing.

Now let's look at 3 pirates situation, Pirate 3 knows that if his proposal does not get accepted, then pirate 2 will get all the gold and pirate 1 will get nothing. So he decides to bribe pirate 1 with one gold coin. Pirate 1 knows that one gold coin is better than nothing so he has to back pirate 3. Pirate 3 proposes {pirate 1, pirate 2, pirate 3} {1, 0, 99}. Since pirate 1 and 3 will vote for it, it will be accepted.

If there are 4 pirates, pirate 4 needs to get one more pirate to vote for his proposal. Pirate 4 realizes that if he dies, pirate 2 will get nothing (according to the proposal with 3 pirates) so he can easily bribe pirate 2 with one gold coin to get his vote. So the distribution will be {0, 1, 0, 99}.

Smart right? Now can you figure out the distribution with 5 pirates? Let's see. Pirate 5 needs 2 votes and he knows that if he dies, pirate 1 and 3 will get nothing. He can easily bribe pirates 1 and 3 with one gold coin each to get their vote. In the end, he proposes {1, 0, 1, 0, 98}. This proposal will get accepted and provide the maximum amount of gold to pirate 5.

PS:This puzzle gives a basic idea of game theory and dynamic programming.

Now let's look at 3 pirates situation, Pirate 3 knows that if his proposal does not get accepted, then pirate 2 will get all the gold and pirate 1 will get nothing. So he decides to bribe pirate 1 with one gold coin. Pirate 1 knows that one gold coin is better than nothing so he has to back pirate 3. Pirate 3 proposes {pirate 1, pirate 2, pirate 3} {1, 0, 99}. Since pirate 1 and 3 will vote for it, it will be accepted.

If there are 4 pirates, pirate 4 needs to get one more pirate to vote for his proposal. Pirate 4 realizes that if he dies, pirate 2 will get nothing (according to the proposal with 3 pirates) so he can easily bribe pirate 2 with one gold coin to get his vote. So the distribution will be {0, 1, 0, 99}.

Smart right? Now can you figure out the distribution with 5 pirates? Let's see. Pirate 5 needs 2 votes and he knows that if he dies, pirate 1 and 3 will get nothing. He can easily bribe pirates 1 and 3 with one gold coin each to get their vote. In the end, he proposes {1, 0, 1, 0, 98}. This proposal will get accepted and provide the maximum amount of gold to pirate 5.

PS:This puzzle gives a basic idea of game theory and dynamic programming.

Source: Technical Interview

Enable Like and Comment Easy | General |

There is a light bulb inside a room and four switches outside. All switches are currently at off state and only one switch controls the light bulb. You may turn any number of switches on or off any number of times you want. How many times do you need to go into the room to figure out which switch controls the light bulb?

Hint

A lighted bulb also emits heat, and gets hot slowly (not instantaneously!)

Answer

1

Solution

I think this puzzle is stupid, but it was asked to my friend in an interview, so I can't skip it. The main point is that bulb gets hot slowly when turned on. Turn on bulb 1 and 2 keeping others off. Wait for 20 minutes. Switch off 2 and turn on 3, quickly enter room and touch the bulb. If the bulb is:

on and hot -> switch 1 controls it

off but hot -> 2

on but cool -> 3

off and cool -> 4

on and hot -> switch 1 controls it

off but hot -> 2

on but cool -> 3

off and cool -> 4

Source: Analytical Interview Puzzle

Enable Like and Comment Easy | Probability |

How do you place 50 good candies and 50 rotten candies in two boxes such that if you choose a box at random and take out a candy at random, it better be good!

That means probability of choosing a good candy should be highest.

That means probability of choosing a good candy should be highest.

Hint

Placing all bad in 1 box and all good in another will give probability of choosing good just half. But placing only one type of candy in one box makes sure that good candy has a probability of at-least 1/2

Answer

Put 1 good candy in one box and all other (49 good and 50 rotten candies) in second box

Solution

Put 1 good candy in one box and all other (49 good and 50 rotten candies) in second box. This will give a probability of (1/2)*1 + (1/2)*(49/100) = 74.5%

Easy | Probability |

In a world where everyone wants a girl child, each family continues having babies till they have a girl. What do you think will the boy to girl ratio be eventually? (Assuming probability of having a boy or a girl is the same)

Answer

1:1

Solution

Suppose there are N couples. First time, N/2 girls and N/2 boys are born (ignoring aberrations). N/2 couples retire, and rest half try another child. Next time, N/4 couples give birth to N/4 girls and rest N/4 boys. Thus, even in second iteration, ratio is 1:1. It can now be seen that this ratio always remain same, no matter how many times people try to give birth to a favored gender.

Latest solved Puzzles

Color Switches Weird Sequences Intersecting Pillars Consecutive sums Scaling a Square Difficulty Level

© BRAINSTELLAR |