Problem:
There are 25 horses and only 5 tracks. So only 5 horses can run the race at a time. How many minimum no of races should be conducted to find the 3 best horses?
Sol: The answer is 7.
Round 1: Take 5 horses at a time. 5 winners of each race will go to round2.
Round 2: Winner of this will be top most horse.(call it W1)
Round 3: Final race comprises of following 5 horses.
h1: 2nd horse of round2
h2:3rd horse of round2
h3:2nd horse of W1’s group during round 1
h4:3rd horse of W1’s group during round1
h5:2nd horse of h1’s group during round1
Archive for Logical Interview Puzzles
There are 25 horses and only 5 tracks. No of matches to find top 3 horses.
Hat color problem–most asked question in interviews..
http://en.wikipedia.org/wiki/Prisoners_and_hats_puzzle
Two tribes one always tells true other false….
There were 2 tribes living on an island. The east tribal people always tell a lie. The west tribal people always tell the truth. Alan and Bryan came from the same tribe. However, we do not know which tribe they came from. When they were asked the marital status, Alan said: “Both of us are married.” But Bryan said: “I am not married”. Are they really married?
Ans:
Both are from same tribe. It means either both of them will lie or both will tell true. If we look at the statements both of them contradicts about Bryan’s marital status. It means one of them is not telling truth, as they are from same tribe it concludes that they are from east tribe. It means Bryan is married and Alan’s status is unclear.
Game of Russian roulette!!
You are tied to a chair and can,t get up.Here is the gun , six chambers all empty. Now I put two bullets in the gun and I put these bullets in the adjecent chambers. I close the barrel and spin it. I put the gun to your head and pull the trigger. Clik and the slot was empty. Now before we start the interview I want to pull the trigger one more time , which one do you prefer , that I spon the barrel first or that I just pull the trigger ?
X being a bullet, _ being and empty chamber. The gun rotates from 1 to 6, and the bullets are in adjacent chambers.
The setup: _ X X _ _ _
1 2 3 4 5 6
The interviewer just got a blank, so the current position must be 1,4,5, or 6. If it’s 1, the next one is a bullet. If it’s 4-6, the next one is empty. So if the interviewer just fires again, you have a 1/4 chance of getting shot.
If, on the other hand, the interviewer spins again, you’re back to the initial 2/6 or 1/3 chance of getting shot.
I’ll take the 1/4 chance, myself.
Four people crossing the bridge optimally
Four people need to cross a rickety rope bridge to get back to their camp at night. Unfortunately, they only have one flashlight and it only has enough light left for seventeen minutes. The bridge is too dangerous to cross without a flashlight, and it is only strong enough to support two people at any given time. Each of the campers walks at a different speed. One can cross the bridge in 1 minute, another in 2 minutes, the third in 5 minutes, and the slow poke takes 10 minutes to cross. How do the campers make it across in 17 minutes?
Sol:
When two people walk and their speeds are different then the time taken(cost) to cover some distance will be the time taken by slowest of the two.
first take 1, 2 to side2 cost = 2
get 2 back to side1 cost = 2
then take 5,10 to side2 cost = 10
get 1 back to side 1 cost = 1
get 1 and 2 back to side2 cost =2
total cost = 17
100 couples C cheats problem?
Every man in a village of 100 married couples has cheated on his wife. Every wife in the village instantly knows when a man other than her husband has cheated, but does not know when her own husband has. The village has a law that does not allow for adultery. Any wife who can prove that her husband is unfaithful must kill him that very day. The women of the village would never disobey this law. One day, the queen of the village visits and announces that at least one husband has been unfaithful. What happens?
Sol:
At the end of Cth day all of the cheats get killed if there are C cheats
Five Pirates gold coins division problem.
You have five pirates, ranked from A to E in descending order. The top pirate has the right to propose how 100 gold coins should be divided among them. But the others get to vote on his plan, and if fewer than half agree with him, he gets killed. How should he allocate the gold in order to maximize his share but live to enjoy it? (Assumption : If the top pirate is voted down and gets killed, then the remaining pirates retain their rankings and continue the game, with Pirate 4 now in charge etc.. 2) top pirate also have the voting right and he will not be killed if there is a tie in number of votes)
Ans: 98 coins with top pirate
This is a game theory problem which involves some reasoning.
Lets start to the solution as if there are only 2 pirates. In this case, the top-ranked pirate (Pirate B) would get 100 gold coins, and Pirate A wouldn’t get any, because Pirate A has no way to vote down the plan.
Let’s work backwards from there. Clearly, Pirate A doesn’t want it to come down to just two people. So consider if there were three pirates. Then, Pirate A would accept even just one coin to avoid letting things get down to two people. Thus, if there were three pirates involved, Pirate C should offer Pirate A a single coin; Pirate A would agree because one coin is better than zero. Pirate B could not overrule this plan.
Lets say there are 4 pirates, Pirate B would accept even just one coin to avoid letting things get down to three pirates; if it got down to three, as we have shown above, Pirate B would get nothing. Thus, Pirate D could offer to keep 99 coins and pay Pirate B a single coin; Pirate A and Pirate C would get nothing, but they don’t have enough votes to override the plan.
Coming to actual five pirates case , Pirate A and Pirate C are anxious to avoid letting things get down to four pirates, because then they’d get nothing. So if Pirate E offered Pirate A and Pirate C a single coin each, then they’d vote in favor of the plan, since one coin would be better than nothing.
So Pirate E keeps 98 coins for himself.
Generalized answer is
If there are odd number of pirates then
the number of coins with top pirate = total number of coins - number of odd numbers below the number.
else
the number of coins with top pirate = total number of coins – number of even numbers below the number.
Proff for above formulae can be established by following
In case of 6 pirates: Pirate F would have to offer a coin to Pirates B and D to satisfy everyone’s self-interests.
In case of 7 pirates : Pirate G would have to offer a coin to Pirates A, C, and E.
Ratio of boys and girls.
In a country in which people only want boys, every family continues to have children until they have a boy. if they have a girl, they have another child. if they have a boy, they stop. what is the proportion of boys to girls in the country?
Solution:
It doesn’t matter how many kids a family has. The odds of having a boy or girl are always the same. So number of boys and girls in the village is same.