PuzzlersWorld.com

  • Hacker Puzzle
  • Interview Puzzles
  • Number Puzzles
  • Maths Puzzles

Hats and IIT students

December 7, 2007 by Ankur 5 Comments

Nine IITians were sitting in a classroom. Their prof wanted to test them. One day he told all of his 9 students that he has 9 hats, colored either in red or black. He also added that he has at least one hat with red color and the no. of black hats is greater than the no. of red hats. He keeps those hats on their heads and ask them tell me how many red and black hats I have? Obviously students can not talk to each other or no written communication, or looking into each other eyes; no such stupid options.
Prof goes out and comes back after 20 minutes but nobody was able to answer the question. So he gave them 10 more minuets but the result was the same. So he decides to give them final 5 minutes. When he comes everybody was able to answer him correctly.

So what is the answer? and why?

See Solution : Hats and IIT studentsHide Solution

After first interval of 20 minutes :

Lets assume that their is 1 hat of red color and 8 hats of black color. The student with red hat on his head can see all 8 black hats, so he knows that he must be wearing a red hat.
Now we know that after first interval nobody was able to answer the prof that means our assumption is wrong.

So there can not be 1 red and 8 black hats.

After second interval of 10 minutes :

Assume that their are 2 hats of red color and 7 hats of black color. The students with red hat on their head can see all 7 black hats and 1 red hat, so they know that they must be wearing a red hat.
Now we know that after second interval nobody was able to answer the prof that means our assumption is again wrong.

So there can not be 2 red and 7 black hats.

After third interval of final 5 minutes :

Now assume that their is 3 hats of red color and 6 hats of black color. The students with red hat on their head can see all 6 black hats and 2 red hats, so they know that they must be wearing a red hat.
Now we know that this time everybody was able to answer the prof that means our assumption is right.

So there are 3 red hats and 6 black hats.

Now as everybody gave the answer so there can be a doubt that only those 3 students know about it how everybody came to know ?
Then here is what i think, the professor gave them FINAL 5 minutes to answer, so other guys will think that the professor expects the answer after 3rd interval (according to prof it must be solved after 3 intervals), so this is the clue for others.

Checkout more Logical Puzzles Tags: Hats Puzzles, Interview, Solved Puzzles

Heavier ball

December 7, 2007 by Ankur 2 Comments

You have 8 balls all look identical (in shape, color etc.). All of them have same weight except one defective ball which is heavier than others. You can use a two sided balance system (not the electronic one). Find the minimum no. of measures required to separate the defective ball and the way you separate it.

If you have solved it then try it for N no. of identical balls with one defective ball.

See Solution : Heavier BallHide Solution

The minimum no. of measures required are 2. Now can you solve it… ? Give it a try…

Here is the solution which tells you that how can you do it in 2 measurements.

Divide 8 balls into groups of 3, 3 and 2.

First weigh :
Weigh the two groups of 3 ball, now there are two possibilities
a) They are balanced (all 6 balls are of equal weight)
b) One side is heavier then the other.

case (a) :
The group of 2 has the defective ball. Weigh them with one on each side of balancing machine. The side which has more weigh has the heavier/defective ball.

case (b) :
We got the three balls of the side which is heavier. Now take any two balls and weigh them, then again there are two cases.
(i) They both are of equal weight.
(ii) One is heavier than the other.

for case (b)(i) :
The third ball is heavier/defective than all other balls

for case (b)(ii) :
The heavier ball is defective.
——————————————–

Solution for N no. of balls.

If there is 1 ball, No measurement is required.
If there are 2-3 balls, we need 1 measurement.[(3^0 +1) to 3^1] If there are 4-9 balls, we need 2 measurement. [(3^1 +1) to 3^2]

Now if there are N balls
and lets say it lies between (3^(x-1) +1) to 3^x
then x = [logN/log3] = Greatest integer of logN to the base 3.
Then minimum no. of measures is equal to x = [logN/log3]

Checkout more Interview Puzzles Tags: Interview, Puzzle, Solved Puzzles

Defective ball

December 7, 2007 by Ankur 1 Comment

You have 12 balls all look identical (in shape, color etc.). All of them have same weight except one defective ball. You don’t know that the defective one is heavier or lighter than other balls. You can use a two sided balance system (not the electronic one). It is given that the minimum no. of measures required to separate the defective ball is three. Find the way you separate the defective ball.

See Solution : Defective ballHide Solution

Divide the balls into 3 groups of 4 balls.

First weigh :
weigh 2 groups, one on each side.
There will be two cases
a) The weight on both side is equal i. e. these two groups don’t have the defective ball.
b) One side has less weight than the other side.
Case (a) :
You know 8 balls are of equal weight and one of the remaining 4 balls have a defective one. Name these four as B1, B2, B3, B4.
Second weigh :
Take B1, B2 and weight them.
(i) If they are unequal then either B1 is defective or B2. Compare B1 with one of eight balls. If B1 is equal to that then B2 is defective otherwise B1.
Total measurements in this case : 1 (first weigh) + 1 (second weigh) + 1 (B1 with other ball) = 3
(ii) If B1 and B2 are equal then either B3 is defective or B4. Compare B3 with one of eight balls. If B3 is equal to that then B4 is defective otherwise B3.
Total measurements in this case : 1 (first weigh) + 1 (second weigh) + 1 (B3 with other ball) = 3
Case (b) :
Mark the balls in the side with less weight as L and with more weight as M. We get 4L and 4M.
Second weigh :
Take 2L and 1M in One side say A and take 2L and 1M in Other side say B of balance system. 2M are reserved for now.(i) If side A is down and next side goes up then it has two possibilities.
1. One of 2L in B has less weight than other 7 balls
2. The 1M in A has more weight(ii) If side B is down then it also has two possibilities.
1. One of 2L in A has less weight than other 7 balls
2. One of 1M in B has more weight than other 7 balls(iii) Both sides are balanced

Third weigh :
In cases (i) or (ii) we will get 3 balls (2L and 1M) after the second weigh.
For case (i) and (ii)of (b) :
Weigh two L balls with each other, if they are equal then the 1M is heavier and if they are not then the ball with less weight is defective.
For case (iii) of (b) :
In this case one of the two reserved balls is defective. We have 2M balls. Weigh them, the one which is heavier is defectives. because we know that issue is with the ball with more weight.

Checkout more Interview Puzzles Tags: Interview, Solved Puzzles, Very Difficult

River crossing

December 6, 2007 by Ankur 1 Comment

Three cannibals and three anthropologists have to cross a river. The boat they have is only big enough for two people. If at any point in time there are more cannibals on one side of the river than anthropologists, the cannibals will eat them. What plan can the anthropologists use for crossing the river so they don’t get eaten? (remember! the boat can’t cross the river by itself, someone has to be in it to row it across)
Note that if a boat with a cannibal and an anthropologist travels to a shore with one cannibal on it, then no. of cannibals > no. of anthropologists, even if you say the anthropologist immediately takes the boat back.See Solution : River crossingHide Solution

Let

A = Anthropologist
C = Cannibal
B = the boat
W = the west shore (which they are all on)
and E = the east shore (where they want to go)Step 1 : A and C crosses
W [A, A, C, C] E [A, C, B]Step 2 : A returns
W [A, A, A, C, C, B] E [C]Step 3 : Two C crosses
W [A, A, A] E [C, C, C, B]Step 4 : C returns
W [A, A, A, C, B] E [C, C]Step 5 : Two A crosses
W [A, C] E [A, A, C, C, B]Step 6 : A and C returns
W [A, A, C, C, B] E [A, C]Step 7 : Two A crosses
W [C, C] E [A, A, A, C, B]Step 8 : C returns
W [C, C, C, B] E [A, A, A]Step 9 : Two C crosses
W [C] E [A, A, A, C, C, B]Step 10 : C returns
W [C, C, B] E [A, A, A, C]

Step 11 : Two C crosses
W [Empty] E [A, A, A, C, C, C, B]

Checkout more Logical Puzzles Tags: Solved Puzzles

King and wine bottles

December 6, 2007 by Ankur 13 Comments

A bad king has a cellar of 1000 bottles of delightful and very expensive wine. A neighboring queen plots to kill the bad king and sends a servant to poison the wine. Fortunately (or say unfortunately) the bad king’s guards catch the servant after he has only poisoned one bottle. Alas, the guards don’t know which bottle but know that the poison is so strong that even if diluted 100,000 times it would still kill the king. Furthermore, it takes one month to have an effect. The bad king decides he will get some of the prisoners in his vast dungeons to drink the wine. Being a clever bad king he knows he needs to murder no more than 10 prisoners – believing he can fob off such a low death rate – and will still be able to drink the rest of the wine (999 bottles) at his anniversary party in 5 weeks time. Explain what is in mind of the king, how will he be able to do so ? (of course he has less then 1000 prisoners in his prisons)

See Solution : King and wine bottlesHide Solution
Hint : Think in terms of binary numbers. (now don’t read the solution without giving a try…)

Number the bottles 1 to 1000 and write the number in binary format.

bottle 1 = 0000000001 (10 digit binary)
bottle 2 = 0000000010
bottle 500 = 0111110100
bottle 1000 = 1111101000

Now take 10 prisoners and number them 1 to 10, now let prisoner 1 take a sip from every bottle that has a 1 in its least significant bit. Let prisoner 10 take a sip from every bottle with a 1 in its most significant bit. etc.

prisoner = 10 9 8 7 6 5 4 3 2 1
bottle 924 = 1 1 1 0 0 1 1 1 0 0
For instance, bottle no. 924 would be sipped by 10,9,8,5,4 and 3. That way if bottle no. 924 was the poisoned one, only those prisoners would die.
After four weeks, line the prisoners up in their bit order and read each living prisoner as a 0 bit and each dead prisoner as a 1 bit. The number that you get is the bottle of wine that was poisoned.
1000 is less than 1024 (2^10). If there were 1024 or more bottles of wine it would take more than 10 prisoners.

Checkout more Interview Puzzles Tags: Interview, Solved Puzzles

Wires on fire

December 6, 2007 by Ankur 1 Comment

A guy has two wires of varying thickness, which each burns in 60 minutes. He actually wants to measure 45 mins. How can he measure 45 mins using only these two wires. (he can’t cut the one wire in half because the wires are non-homogeneous and he can’t be sure how long it will burn)

See Solution : Wires on fireHide Solution

He will burn the first wire at both the ends and the second wire at one end. After half an hour, the first one burns completely and at this point of time, he will burn the other end of the second wire so now it will take 15 mins more to completely burn.. so total time is 30+15 i.e. 45mins.

Checkout more Interview Puzzles Tags: Interview, Puzzle, Solved Puzzles

Jelly beans

December 2, 2007 by Ankur 2 Comments

You have three jars that are all mislabeled. One contains peanut butter jelly beans, another grape jelly jelly beans and the third has a mix of both (not necessarily half-half mix). How many jelly beans would you have to pull out and out of which jars, to find out how to fix the labels on the jars?

Labels on jars are as follows
Jar 1 : Peanut butter
Jar 2 : Grape
Jar 3 : P.b. / Grape

See Solution : Jelly beansHide Solution

Only one jelly bean from the p.b./grape jar will do the trick.

The trick here is to realize that every jar is mislabeled. Therefore you know that the peanut butter jelly bean jar is not the peanut butter jelly bean jar and the same goes for the rest.
You also need to realize that it is the jar labeled p.b./grape, labelled as the mix jar, that is your best hope. If you choose a jelly bean out of there, then you will know whether that jar is peanut butter or grape jelly jelly beans. It can’t be the mix jar because i already said that every jar is mislabeled.
Once you know that jar 3 is either peanut butter, or grape jelly, then you know the other jars also. If it is peanut butter, then jar 2 must be mixed because it can’t be grape (as its labeled) and it can’t be peanut butter (that’s jar 3). Hence jar 1 is grape.
If jar 3 is grape, then you know jar 1 must be the mix because it can’t be p.b. (as its labeled) and it can’t be grape (that’s jar 3). Hence jar 2 is peanut butter.

Checkout more Interview Puzzles Tags: Interview, Puzzle, Solved Puzzles

Bridge

December 2, 2007 by Ankur Leave a Comment

Four friends A, B, C, D
Need to cross a bridge..
A maximum of 2 people can cross at a time..
It is night and they have just 1 lamp.
People that cross the bridge must carry the lamp to see the way..
A pair must walk together at the speed of slower person…

Speeds of
A: 1 minute to cross bridge
B: 2 minutes to cross bridge
C: 5 minutes to cross bridge
D: 10 minutes to cross bridge

Now question is… “what is the total minimum time required by all 4 friends to cross the bridge….?

See Solution : BridgeHide Solution

Person A : 1 minute
Person B : 2 minutes
Person C : 5 minutes
Person D : 10 minutes

Person C and D are the slowest guys, if they don’t walk together that it self will make it 15 minutes, In this case (the best way to save time is) :
Initially A,B,C,D  ========
First A& B will cross the bridge and A will come back  => time taken 2 + 1 => 3
A,C,D ======== B
Now C & D should cross the bridge together and B will come back => time taken 10 + 2 => 12
Now A & B will cross the bridge together => time taken 2
total time 3 + 12 + 2 => 17

Checkout more Interview Puzzles Tags: Interview, Solved Puzzles

Supersonic bee

December 2, 2007 by Ankur 2 Comments

Two trains enter a tunnel 200 miles long, traveling at 100 mph at the same time from opposite directions. As soon as they enter the tunnel a supersonic bee flying at 1000 mph starts from one train and heads toward the other one. As soon as it reaches the other one it turns around and heads back toward the first, going back and forth between the trains until the trains collide in a fiery explosion in the middle of the tunnel. How far did the bee travel?

See Solution : Supersonic beeHide Solution
This puzzle is a little tricky one. One’s thinking about solving this problem goes like this “ok, so i just need to sum up the distances that the bee travels…” but then you quickly realize that its a difficult (not impossible) summation.
The tunnel is 200 miles long. The trains meet in the middle traveling at 100 mph, so it takes them an hour to reach the middle. The bee is traveling 1000 mph for an hour (since its flying the whole time the trains are racing toward one another) – so basically the bee goes 1000 miles.

Checkout more Interview Puzzles Tags: Interview, Solved Puzzles

Palindrome dates

December 2, 2007 by Ankur 4 Comments

This year on October 2, 2001, the date in MMDDYYYY format will be a palindrome (same forwards as backwards).
10/02/2001
When was the last date that this occurred on?See Solution : Palindrome datesHide Solution

One year can have only one palindrome as the year fixes the month and date too, so the year has to be less than 2001 since we already have the palindrome for 10/02. It can’t be any year in 1900 because that would result in a day of 91, same for 1800 down to 1400. it could be a year in 1300 because that would be the 31st day. So whats the latest year in 1300 that would make a month? When i first solved it, 12th month came to my mind as we have to find the latest date, so i thought it would be 1321. But we have to keep in mind that we want the maximum year in 1300 century with a valid date, so lets think about 1390 that will give the date as 09/31, is this a valid date… ? No, because September has on 30 days, so last will be the 31st August. Which means the correct date would be 08/31/1380.

Checkout more Interview Puzzles Tags: Easy, Interview, Puzzle, Solved Puzzles

  • « Previous Page
  • 1
  • …
  • 7
  • 8
  • 9
  • 10
  • Next Page »
Submit your Puzzle

You may also like

    Categories

    • Aive hi Puzzles
    • Akbar and Birbal
    • Alphabetical Puzzles
    • Bollywood Puzzles
    • Google Code jam
    • Hindi Riddles
    • Interview Puzzles
    • Interview Questions
    • Logical Puzzles
    • Malayalam Puzzles
    • Maths Puzzles
    • Miscellaneous
    • Number Puzzles
    • Picture Puzzles
    • Riddles
    • Tamil Puzzles
    • Technical

    Social

    • View puzzlersworld’s profile on Twitter
    privacy policy

    Copyright © 2025 · eleven40 Pro Theme on Genesis Framework · WordPress · Log in

    • Hacker Puzzle
    • Logo Puzzles
    • Optical Illusions
    • WhatsApp Puzzles
    • Picture Puzzles
    • Riddles
      ▼
      • Hindi Riddles
    • Bollywood Puzzles
    • Alphabetical Puzzles
    • Aive hi Puzzles
    • Interview Puzzles
    • Logical Puzzles
    • Interview Questions
      ▼
      • Data Structures
      • Binary Tree
      • Algorithms
      • Recursion Questions
      • Amazon Interview Questions
      • Snapdeal Interview Questions
      • Google Code jam
    • Technical
    • Akbar and Birbal
    • Number Puzzles
    • Maths Puzzles
    • Miscellaneous