It is all about interview puzzles and HR questions .

Saturday, 31 March 2018

The king and 1000 bottle of wine


Puzzle :-

A king has 1000 bottles of very expensive wine. One of the bottle got poisoned accidentally. Unfortunately, the king does not know which bottle of wine is poisoned . The king decided to use 10 prisoner as taste tester to find the poisoned bottle. The effect of poison is seen only after 24 hours. The king only has 24 hours to find the poisoned bottle.
How can king do this?

Understanding of the puzzle.

We have 1000 bottles of wine, one of which is poisoned and we need to test all of the wine bottles using only 10 prisoners.
We have  only 24 hour to test the wine since effect of prisoner wine is observable only after 24 hours.
There is not enough time nor enough prisoner to test the wine one by one.
Hint :
Number each of the bottle from 1 to 1000.
Write the binary number representation of each bottle corresponding to it's number.
log 1000 with base 2 =9.96=10 (we have enough prisoner)
Answer : -
Assign each prisoner as a placeholder in the binary numbers so formed.
Prisoner 1 is assigned binary place 1
Prisoner 2 is assigned binary place2
Prisoner 3 is assigned binary place3
And so on...
Each prisoner will taste the wine from the bottle if the number on the at the binary place assigned to him is 1 otherwise if it is 0,he doesn't take a sip.
Example consider a bottle number 427
binary form of 427 is 0110101011
 Wait for 24 hours .
If 1st,2nd,4th,6th,8th and 9th prisoner died it means bottle no. 427 is poisoned.
Consider another case:
When  3rd,5th,6th and 8th prisoner Died. It means poisoned bottle would be :
10  9  8  7  6  5  4  3  2  1
 0   0  1  0  1  1  0  1  0  0
0010110100=180
Hence 180th bottle is poisoned. 

Two doors-heaven and hell

Puzzle :-

You are standing before two doors.
One of the path leads to heaven and the other one leads to hell.
There are two guards standing one by each door.
You know one of them always tells the truth and the other always lies, but you don't know who is the honest one and who is the liar.
You can only ask one question to one of them in order to find way to heaven.
What will you ask in order to determine which door leads to heaven?

Hint : -
Try to ask a question in which both the gate keepers will give you same answer.

Answer :-

Ask one of the guard,
" what would be the other guard say if a ask him which way is the hell?  "

And whatever answer he gives that is the way to heaven.

Explanation :-
1.
If you end up asking the question to the truthful one, he will tell the truth and he knows the other guard is going to lie(truth (i.e. other guard will tell the way to heaven when asked for way to hell) so truth will show the way to heaven.
2.
If you end up asking the question to the liar he will lie and he knows the other guard is going to tell truth (i.e.
Other guard will tell the way to hell)
So liar guard will show the way to heaven. 

Friday, 30 March 2018

Popular Posts

Recent Posts

Categories

Unordered List

Join Us On Facebook

Please Wait 10 Seconds...!!!Skip

Text Widget

Blog Archive

Search This Blog

Powered by Blogger.

like us on facebook

Who is the man?

Puzzle :- Brother and sisters is have none but this man's father is my father's son? Who is the man? Answer :- The man is my ...

http://go.oclaserver.com/afu.php?zoneid=1633049