Sie sind auf Seite 1von 19

There are n bulbs in a circle, each bulb has one switch associated with it, on operating the switch,

it toggles
the state of the corresponding bulb as well as two bulbs adjacent to that one. Given all bulbs are in off state
initially, give a plan to turn all bulbs on finally.
There is a simpler solution, if n is a multiple of 3 do it as done by author, first 1 the 1+3=4 then 4+3=7 and so on upto
n/3 the number of steps taken will be n/3
otherwise, start from bulb number 1 and keep switching it on till the last bulb i.e switch on 1, then 2 then 3 and so on
upto n, it will take n steps and all bulbs will be in the on state finally
A farmer is returning from market, where he bought a she-goat, a wolf and cabbage. On the way home he
must cross a river. His boat is little, allowing him to take only one of the three things. He cant keep the shegoat and the cabbage together (because the she-goat would eat it), nor the she-goat with the wolf (because
the she-goat would be eaten). How shall the farmer get everything on the other side (without any harm)?
First he take goat to the other side... than he take wolf to the other side and take goat with him...then he take
cabbage and then goat again...
Four glasses are placed on the corners of a square table. Some of the glasses are upright (up) and some
upside-down (down). You have to arrange the glasses so that they are all up or all down (while keeping your
eyes closed all the time). The glasses may be re-arranged in turns subject to the following rules.
1.

Any two glasses may be inspected in one turn and after feeling their orientation you may reverse the
orientation of either, neither or both glasses.

2.

After each turn table is rotated through a random angle.

3.

At any point of time if all four glasses are of the same orientation a ring will bell
1.On the first turn choose a diagonally opposite pair of glasses and turn both glasses up.
2.On the second turn choose two adjacent glasses. At least one will be up as a result of the previous step. If
the other is down, turn it up as well. If the bell does not ring then there are now three glasses up and one
down(3U and 1D).
3.On the third turn choose a diagonally opposite pair of glasses. If one is down, turn it up and the bell will
ring. If both are up, turn one down. There are now two glasses down, and they must be adjacent.
4.On the fourth turn choose two adjacent glasses and reverse both. If both were in the same orientation then
the bell will ring. Otherwise there are now two glasses down and they must be diagonally opposite.
5.On the fifth turn choose a diagonally opposite pair of glasses and reverse both. The bell will ring for sure

One fine day, Santa and banta were playing cards, but suddenly power went off and they were getting bored.
So santa randomly inverted position of 10 cards out of 52 cards(and shuffled it) and asked banta to divide
the card in two pile with equal number of inverted cards(number of cards in each pile need not be equal). It
was very dark in the room and banta could not see the cards, after thinking a bit banta divided the cards in
two piles and quite surprisingly on counting number of inverted cards in both the piles were equal.
What do you think banta must have done?
Just take top 10 cards from the pile and reverse them, now you will two piles of 10 cards and 42 cards and both of
them will have same number of inverted cards.

You can write one number on each face of the dice from 0 to 9 and you have to represent days from 1 to 31,
for example for 1, one dice should show 0 and another should show 1, similarly for 31 one dice should show
3 and another should show 1.
Answer is:
Dice 1: 0 1 2 3 5 7
Dice 2: 0 1 2 4 6 8
Basically you have to show 11, 22 so 1 and 2 should be present in both dices, similarly to show 01, 09 0 should be
present in both dices, now the trick is for showing 9 you can use dice with 6 printed on one of the face.

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.
Hide 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]

You have 12 balls all look identical (in shape, color etc.). All of them have same weight except one defective
ball. You dont 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.
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 dont 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) = 3Case (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. 1M and 1L 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 A has less weight than other 7 balls
2. The 1M in B 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.
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 kings
guards catch the servant after he has only poisoned one bottle. Alas, the guards dont 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)
Hide Solution

Hint : Think in terms of binary numbers. (now dont 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.
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 cant cut the one wire in half because the
wires are non-homogeneous and he cant be sure how long it will burn)
Hide 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.
You have two identical eggs. Standing in front of a 100 floor building, you wonder what is the maximum
number of floors from which the egg can be dropped without breaking it. What is the minimum number of
tries needed to find out the solution?
Instead of taking equal intervals, we can increase the number of floors by one less than the previous increment. For
example, lets first try at floor 14. If it breaks, then we need 13 more tries to find the solution. If it doesnt break, then
we should try floor 27 (14 + 13). If it breaks, we need 12 more tries to find the solution. So the initial 2 tries plus the
additional 12 tries would still be 14 tries in total. If it doesnt break, we can try 39 (27 + 12) and so on. Using 14 as the
initial floor, we can reach up to floor 105 (14 + 13 + 12 + + 1) before we need more than 14 tries. Since we only
need to cover 100 floors, 14 tries is sufficient to find the solution.
Therefore, 14 is the least number of tries to find out the solution.
Solution.. for n floor is k => k(k+1)/2 >=n

In a country where everyone wants a boy, each family continues having babies till they have a boy. After
some time, what is the proportion of boys to girls in the country? (Assuming probability of having a boy or a
girl is the same)
Answer: This is a very simple probability question in a software interview. This question might be a little old to be
ever asked again but it is a good warm up.

Assume there are C number of couples so there would be C boys. The number of girls can be calculated by the
following method.
Number of girls = 0*(Probability of 0 girls) + 1*(Probability of 1 girl) + 2*(Probability of 2 girls) +
Number of girls = 0*(C*1/2) + 1*(C*1/2*1/2) + 2*(C*1/2*1/2*1/2) +
Number of girls = 0 + C/4 + 2*C/8 + 3*C/16 +
Number of girls = C
(using mathematical formulas; it becomes apparent if you just sum up the first 4-5 terms)
The proportion of boys to girls is 1 : 1.
Or, Every time a couple has a child half the time its a boy no matter what.

Two old friends, Jack and Bill, meet after a long time.

Jack: Hey, how are you man?


Bill: Not bad, got married and I have three kids now.
Jack: Thats awesome. How old are they?
Bill: The product of their ages is 72 and the sum of their ages is the same as your birth date.
Jack: Cool But I still dont know.
Bill: My eldest kid just started taking piano lessons.
Jack: Oh now I get it.
How old are Bills kids?
Lets break it down. The product of their ages is 72. So what are the possible choices?
2, 2, 18 sum(2, 2, 18) = 22
2, 4, 9 sum(2, 4, 9) = 15
2, 6, 6 sum(2, 6, 6) = 14
2, 3, 12 sum(2, 3, 12) = 17
3, 4, 6 sum(3, 4, 6) = 13
3, 3, 8 sum(3, 3, 8 ) = 14
1, 8, 9 sum(1,8,9) = 18
1, 3, 24 sum(1, 3, 24) = 28
1, 4, 18 sum(1, 4, 18) = 23
1, 2, 36 sum(1, 2, 36) = 39
1, 6, 12 sum(1, 6, 12) = 19
The sum of their ages is the same as your birth date. That could be anything from 1 to 31 but the fact that Jack was
unable to find out the ages, it means there are two or more combinations with the same sum. From the choices
above, only two of them are possible now.
2, 6, 6 sum(2, 6, 6) = 14
3, 3, 8 sum(3, 3, 8 ) = 14

Since the eldest kid is taking piano lessons, we can eliminate combination 1 since there are two eldest ones. The
answer is 3, 3 and 8. MY logic two children cant have same age.

Four people are on this side of the bridge. The bridge will be destroyed by a bomb in 17 minutes. Everyone
has to get across before that. Problem is that its dark and so you cant cross the bridge without a flashlight
and they only have one flashlight. Plus the bridge is only big enough for two people to cross at once. The
four people walk at different speeds: one fella is so fast it only takes him 1 minute to cross the bridge,
another 2 minutes, a third 5 minutes, the last it takes 10 minutes to cross the bridge. When two people cross
the bridge together (sharing the flashlight), they both walk at the slower persons pace. Can they all get
across before the bridge blows up? if yes, then how ?
-Person A : 1 minute
Person B : 2 minutes
Person C : 5 minutes
Person D : 10 minutes
Let F represents Flashlight.
Person C and D are the slowest guys, if they dont walk together that it self will make it 15 minutes, In this case (the
best way to save time is) :
A,D,F -Bridge-> = 10 min
<-Bridge-A,F = 1 min (returning with flash light) A,C,F -Bridge-> = 5 min
<-Bridge-A,F = 1 min A,B,F -Bridge-> = 2 min
That makes a total of 19 minutes, but thats not what we want.
It means they both should walk together, in this case if they both are walking together, then there should be another
person(because if one of them will bring it will take 5 minutes) to bring the flashlight back. So here is the solution
A,B,F -Bridge-> = 2 min
<-Bridge-A,F = 1 min C,D,F -Bridge-> = 10 min
<-Bridge-B,F = 2 min A,B,F -Bridge-> = 2 min
Total time = 17 minutes.
You have two jars, 50 red marbles and 50 blue marbles. You need to place all the marbles into the jars such
that when you blindly pick one marble out of one jar, you maximize the chances that it will be red. When
picking, youll first randomly pick a jar, and then randomly pick a marble out of that jar. You can arrange the
marbles however you like, but each marble must be in a jar.
Lets say, we put all the red marbles in jar A and all blue marbles in jar B. Then the probability of getting a red marble
is :
jar A : (1/2)*1 = 1/2 (selecting the jar A = 1/2, red marble from jar A = 50/50)
jar B : (1/2)*0 = 0 (selecting the jar B = 1/2, red marble from jar B = o/50)
So probability of getting red marble is 1/2 . Now as we need to maximize the P(getting a red marble), we have to
increase the prob of getting a red marble in jar B. If we select jar A, then getting a red marble is guaranteed, but it will
also be guaranteed if there is only one red marble in that jar, then also the probability of getting a red marble from jar

A is 1/1=1. So now we can place remaining 49 red marbles in jar B, so it increases the prob of getting red marbles in
jar B.
So the maximum probability will be :
jar A : (1/2)*1 = 1/2 (selecting the jar A = 1/2, red marble from jar A = 1/1)
jar B : (1/2)*(49/99) = 0 (selecting the jar B = 1/2, red marble from jar B = 49/99)
Total probability = 74/99 (~3/4)
There are three ants on a triangle, one at each corner. At a given moment in time, they all set off for a
different corner at random. What is the probability that they dont collide ?
Let the three ants are a, b, c.
There are two cases when they will not collide, the one is when they all move clockwise and the other is when they all
move anticlockwise.
They will collide if any two ants move towards each other, at the same time the third ant can move in clockwise or in
anticlockwise. so for each pair there are 2 such cases. And there are 3 pairs possible (a,b), (b,c) and (c,a). So total
3*2 = 6 cases when they will collide.
So probability that they will not collide is 2/(2+6) i.e. 1/4

How cn u get a fair coin toss if sm1 hands u a coin that is biased
Assume HT= H and TH=T and flip the coins when you get HH and TT.
There are 100 doors, all closed. In a nearby cage are 100 monkeys. The first monkey is let out, and runs along
the doors opening every one. The second monkey is then let out, and runs along the doors closing the 2nd,
4th, 6th, all the even-numbered doors. The third monkey is let out. He attends only to the 3rd, 6th, 9th,
doors (every third door, in other words), closing any that is open and opening any that is closed, and so on.
After all 100 monkeys have done their work in this way, what state are the doors in after the last pass, which
doors are left open and which are closed ?
Consider door number 56, monkeys will visit it for every divisor it has. So 56 has 1 & 56, 2 & 28, 4 & 14, 7 & 8. So on
pass 1 1st monkey will open the door, pass 2 2nd one will close it, pass 4 open, pass 7 close, pass 8 open, pass 14
close, pass 28 open, pass 56 close. For every pair of divisors the door will just end up back in its initial state. But
there are cases in which the pair of divisor has same number for example door number 16. 16 has the divisors 1 &
16, 2 & 8, 4&4. But 4 is repeated because 16 is a perfect square, so you will only visit door number 16, on pass 1, 2,
4, 8 and 16 leaving it open at the end. So only the perfect square doors will be open at the end.
You have a normal six sided cube. I give you six different colors that you can paint each side of the cube with
(one color to each side). How many different cubes can you make? What in case of n colors (n>6) ?
Paint one of the faces red and make it the top face.
5 options for the bottom face.
Now, four side faces can be painted in (4-1)! = 3! = 6 ways (circular arrangements of 4 colors).
Total = 5*6 = 30.
In case of n colors, total different cubes= 30 * nC6

5 pirates of different ages have a treasure of 100 gold coins. On their ship, they decide to split the coins
using this scheme:
The oldest pirate proposes how to share the coins, and ALL pirates (including the oldest) vote for or against
it. If 50% or more of the pirates vote for it, then the coins will be shared that way. Otherwise, the pirate
proposing the scheme will be thrown overboard, and the process is repeated with the pirates that remain.
As pirates tend to be a bloodthirsty bunch, if a pirate would get the same number of coins if he voted for or
against a proposal, he will vote against so that the pirate who proposed the plan will be thrown overboard.
Assuming that all 5 pirates are intelligent, rational, greedy, and do not wish to die, (and are rather good at
math for pirates) what will happen?
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 lets 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? Lets 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.

Bonus: Think about what would happen if there are 15 pirates or 25 pirates. Post the answer in the comments section.

{1,0,1,0,1,0,1,0,1,0,1,0,1,0,93}
{1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,88}

There are four dogs each at the corner of a unit square. Each of the dogs starts chasing the dog in the
clockwise direction. They all run at the same speed and continuously change their direction accordingly so
that they are always heading straight towards the other dog. How long does it take for the dogs to catch each
other and where?

In the mice problem, also called the beetle problem, mice start at the corners of a regular -gon of unit side length, each heading towards
its closest neighboring mouse in a counterclockwise direction at constant speed. The mice each trace out a logarithmic spiral, meet in the
center of the polygon, and travel a distance

N.B. here v is the speed with which the mouse is moving and not the velocity.
Time= distance / velocity

A person dies, and he arrives at the gate to heaven. There are three doors in the heaven. one of them leads to
heaven, another one leads to a 1-day stay at hell, and then back to the gate, and the other leads to a 2-day
stay at hell, and then back to the gate. every time the person is back at the gate, the three doors are
reshuffled. How long will it take the person to reach heaven?
Suppose the average days spent is X. 1/3 of the cases are done in zero days as before. 1/3 of the cases are 1 day
plus X. 1/3 are 2 + X. So:
X = 1/3 * 0 + 1/3 * (1 + X) + 1/3 * (2 + X)
= 0 + 1/3 + X/3 + 2/3 + X/3
= 1 + 2X/3
Therefore,
X/3 = 1
X=3
On average, it takes three days to get to heaven.

In a city, The police has surrounded the Bank. There are 50 people in the building. Each person is either an
engineer or a manager of the bank. All computer files have been deleted, and all documents have been
shredded by the managers. The problem confronting the police is to separate the people into these two

classes, so that all the managers are locked in a room and all the engineers are freed. every people knows
the status of all others. The interrogation consists entirely of asking person i if person j is an engineer or a
manager. The engineers always tell the truth. What makes it hard is that the managers may not tell the truth.
In fact, the managers are evil geniuses who are conspiring to confuse the interrogators.
1. Under the assumption that more than half of the people are engineers, can you find a strategy for the
Police to find one engineer with at most 49 questions?
2. Is this possible in any number of questions if half the people are managers?
3. Once an engineer is found, he/she can classify everybody else. Is there a way to classify everybody in
fewer questions?
Part 1:
Here's an n-1 query solution to part 1. Maintain three sets of people: UNSEEN, STACK, and DISCARD. Initialize the
process by picking one arbitrarily to be the STACK, everything else is UNSEEN. Repeat the following step until
UNSEEN is empty:
Pick an UNSEEN element x, remove it from UNSEEN. Ask the top of the STACK y about x. If y says "manager" pop
y off the stack and DISCARD both x and y. If it says "engineer" add x to the top of the STACK.
After all elements have been processed in this way (n-1 comparisons), the top of the stack must be an engineer.
Why does this work? First observe that whenever we discard a pair, at least one of them is a manager. So among the
rest of them (STACK and UNSEEN) a majority must still be engineers. So at the end, when UNSEEN is empty, there
must be an engineer in the stack, therefore the top of the stack must be an engineer.
This can be improved to 48 simply by stopping one earlier. When there's one UNSEEN left, if the stack is empty, that
UNSEEN one is an engineer. Otherwise, the top of the stack must be an engineer.
first step we can just throw out one person, and appy this algorithm to the remaining 49 obtaining 47 comparisons.
This gives the optimal algorithm.
This is optimal. The proof appears in the solution of homework assignment 7 of Steven Rudich's course 15-251 taught
at CMU in the spring semester of 2002. See Solution 7.
Part 2: If half or more of the people are managers, then the problem cannot be solved. The managers can ensure this
simply by always lying. Now there's way to separate the two sets of people. Each one simply claims the others are
Managers.
Part 3: I don't know any better solution than to simply using the solution to Part 1 to identify everybody.

Four ships are sailing on a 2D planet in four different directions. Each ship traverses a straight line at
constant speed. No two ships are traveling parallel to each other. Their journeys started at some time in the
distant past. Sometimes, a pair of ships collides. A ship continues its journey even after a collision. However,
it is strong enough only to survive two collisions; it dies when it collides a third time. The situation is grim.

Five of six possible collisions have already taken place (no collision involved more than 2 ships) and two
ships are out of commission. What fate awaits the remaining two?

Let z-axis denote time. let x- and y- axes denote the 2D planet. Then the four trajectories are straight lines. Since no
collision involved more than two ships, these four lines must all lie in a plane. So, one might be tempted to believe that
the two other ships will also collide. But, they might have collided in negative time. So, it cannot be decided from the
given information that the two ships will collide or not?
This can be made clearer through the following two diagrams. In the first one, the four ships move such that there is
no collision between the two ships. In the other diagram, the four ships move such that there is a collision between
them.

The puzzle question is : On Bagshot Island, there is an airport. The airport is the homebase of an unlimited
number of identical airplanes. Each airplane has a fuel capacity to allow it to fly exactly 1/2 way around the
world, along a great circle. The planes have the ability to refuel in flight without loss of speed or spillage of
fuel. Though the fuel is unlimited, the island is the only source of fuel.
What is the fewest number of aircraft necessary to get one plane all the way around the world assuming that
all of the aircraft must return safely to the airport? How did you get to your answer?
Notes:
(a) Each airplane must depart and return to the same airport, and that is the only airport they can land and
refuel on ground.
(b) Each airplane must have enough fuel to return to airport.
(c) The time and fuel consumption of refueling can be ignored. (so we can also assume that one airplane can
refuel more than one airplanes in air at the same time.)
(d) The amount of fuel airplanes carrying can be zero as long as the other airplane is refueling these
airplanes. What is the fewest number of airplanes and number of tanks of fuel needed to accomplish this
work? (we only need airplane to go around the world)
Let the total distance is 8 kms and the plane has a capacity of 4 litres and the plane has a capacity to store 4 kms
such that it covers 1km in 1litre.
The picture below depicts the amount of petrol in planes at various stages.

Figures inside the circle reflect the fuel tank initially at the stage while figures outside the circle reflect the fuel tank
after gas has been exchanged between planes.

How many points are there on the globe where, by walking one mile south, then one mile east and then one
mile north, you would reach the place where you started? Answer for this puzzle is given below.
The trivial answer to this question is one point, namely, the North Pole. But if you think that answer should
suffice, you might want to think again!
Lets think this through methodically. If we consider the southern hemisphere, there is a ring near the South Pole that
has a circumference of one mile. So what if we were standing at any point one mile north of this ring? If we walked
one mile south, we would be on the ring. Then one mile east would bring us back to same point on the ring (since its
circumference is one mile). One mile north from that point would bring us back to the point were we started from. If we
count, there would be an infinite number of points north of this one mile ring.
So whats our running total of possible points? We have 1 + infinite points. But were not done yet!

Consider a ring that is half a mile in circumference near the South Pole. Walking a mile along this ring would cause us
to circle twice, but still bring us to back to the point we started from. As a result, starting from a point that is one mile
north of a half mile ring would also be valid. Similarly, for any positive integer n, there is a circle with radius
r = 1 / (2 * pi * n)
centered at the South Pole. Walking one mile along these rings would cause us to circle n times and return to the
same point as we started. There are infinite possible values for n. Furthermore, there are infinite ways of determining
a starting point that is one mile north of these n rings, thus giving us (infinity * infinity) possible points that satisfy the
required condition.
So the real answer to this question is 1 + infinity * infinity = infinite possible points!
Consider there are 10 soldiers on the one side of the river. They need to go to the over side of the rever.
There is no bridge in the rever and no one can swin in the rever. One of the soldiers spots the boat with two
boys inside. The boat is very small and the boys in the boats also very small. The boat can either hold two
boys or one soldier. Now tell me how can all soldiers go to the other side of the river using this boat ?
First you have the two boys take the boat to one side of the river and leave a boy on that side of the river. One
boy takes the boat back to the other side and stands on the shore. Then a soldier gets in the boat and rides it to the
other side. When he arrives on the other side, then the boy gets in the boat and takes it back to the other side and
picks up the other boy. They ride back to the other shore and drop off one of the boys and continue this process until
all the soldiers are on the other side of the river

A certain town comprises of 100 married couples. Everyone in the town lives by the following rule: If a
husband cheats on his wife, the husband is executed as soon as his wife finds out about him. All the women
in the town only gossip about the husbands of other women. No woman ever tells another woman if her
husband is cheating on her. So every woman in the town knows about all the cheating husbands in the town
except her own. It can also be assumed that a husband remains silent about his infidelity. One day, the mayor
of the town announces to the whole town that there is at least 1 cheating husband in the town. What do you
think happens?
Answer : Stumped? Lets solve this methodically. Say there was only 1 cheating husband in the town. There will be
99 women who know exactly who the cheater is. The 1 remaining woman, who is being cheated on, would have
assumed there are no cheaters. But now that the mayor has confirmed that there is at least one cheater, she realizes
that her own husband must be cheating on her. So her husband gets executed on the day of the announcement.
Now lets assume there are 2 cheaters in the town. There will be 98 women in the town who know who the 2 cheaters
are. The 2 wives, who are being cheated on, would think that there is only 1 cheater in the town. Since neither of
these 2 women know that their husbands are cheaters, they both do not report their husbands in on the day of the
announcement. The next day, when the 2 women see that no husband was executed, they realize that there could
only be one explanation both their husbands are cheaters. Thus, on the second day, 2 husbands are executed.
Through induction, it can be proved that when this logic is applied to n cheating husbands, they all die on the n th day
after the mayors announcement.

100 prisoners are stuck in the prison in solitary cells. The warden of the prison got bored one day and
offered them a challenge. He will put one prisoner per day, selected at random (a prisoner can be selected
more than once), into a special room with a light bulb and a switch which controls the bulb. No other
prisoners can see or control the light bulb. The prisoner in the special room can either turn on the bulb or
turn off the bulb or do nothing. On any day, the prisoners can stop this process and say Every prisoner has
been in the special room at least once. If that happens to be true, all the prisoners will be set free. If it is

false, then all the prisoners will be executed. The prisoners are given some time to discuss and figure out a
solution. How do they ensure they all go free?
Since this is the only way they will EVER get out of that prison, they decide to work together and make a plan. They
select one prisoner (Bob, easier to refer) as the counter.
Every time any prisoner is selected other than Bob, they follow these steps. If they have never turned on the light bulb
before and the light bulb is off, they turn it on. If not, they dont do anything (simple as that). Now if Bob is selected
and the light bulb is already on, he adds one to his count and turns off the bulb. If the bulb is off, he just sits there
meditates or whatever he wants to. The day his count reaches 99, he calls the warden and tells him Every prisoner
has been in the special room at least once.
So how does this solution work? Every time a prisoner enters the room first, he turns on the bulb if it is off. This way
every prisoner turns on the bulb only once. When Bob enters and sees the bulb on, he knows that one new prisoner
has entered the room so he adds one to his count. So when his counter reaches 99, he knows the rest of them have
all been in the special room and obviously, he has been in the special room.
(My doubt- what if Bob enters the special cell first day and founds the bulb to be ON and put his counter=1 even
when no other prisoner has been to special cell. Also if on the first day a person enters and finds the bulb to be ON.
He will do nothing. Then when Bob enters he sets his counter=1 and switch it off. Now next day the same person
enters and since he has never switched ON the bulb he switches it ON. The next day Bob when enters he will set his
counter=2 even when there has been only 1 person inside other than him. This can be solved only when prisoners
know the staring day and the person going in counts never switches the bulb ON again even if the bulb is On on the
first day and he doesnt have it switch it ON and Bob doesnt increase his counter on the first day if bulb is ON)

Lets us consider someone working for you seven days. You have a Gold bar to pay him. You must pay the
worker for their work at the end of every day. If you are only allowed to make two breaks in the gold bar, how
do you pay your worker? (Assuming equal amount of work is done during each day thus requiring equal
amount of pay for each day).
The trick is not to try and how to cut in such a way to make 7 equal pieces but rather to make transactions with the
worker. Make two cuts on the gold bar such that you have the following sizes of bars.
1/7, 2/7 and 4/7. For convenience sake, I would just refer to the bars as 1, 2 and 4.
At the end of Day 1: Give Bar 1 (You- 2 and 4, Worker- 1)
At the end of Day 2: Give Bar 2, Take back Bar 1 (You- 1 and 4, Worker- 2)
At the end of Day 3: Give Bar 1 (You- 4, Worker- 1 and 2)
At the end of Day 4: Give Bar 4, Take back Bar 1 and Bar 2 (You- 1 and 2, Worker- 4)
At the end of Day 5: Give Bar 1 (You- 2, Worker- 1 and 4)
At the end of Day 6: Give Bar 2, Take back Bar 1 (You- 1, Worker- 2 and 4)
At the end of Day 7: Give Bar 1 (You- Empty, Worker- 1, 2 and 4)

Four prisoners are arrested for a crime, but the jail is full and the jailer has nowhere to put them. He
eventually comes up with the solution of giving them a puzzle so if they succeed they can go free but if they
fail they are executed.
The jailer puts three of the men sitting in a line. The fourth man is put behind a screen (or in a separate
room). He gives all four men party hats (as in diagram). The jailer explains that there are two red and two blue
hats. The prisoners can see the hats in front of them but not on themselves or behind. The fourth man

behind the screen can't see or be seen by any other prisoner. No communication between the men is
allowed.
If any prisoner can figure out and say (out loud) to the jailer what colour hat he has on his head all four
prisoners go free. The puzzle is to find how the prisoners can escape.

Lets label the prisoners in line order A B and C. Thus B can see A (and his hat colour) and C can see A and B.
The prisoners know that there are only two hats of each colour. So if C observes that A and B have hats of the same
colour, C would deduce that his own hat is the opposite colour. However, If A and B have hats of different colours,
then C can say nothing. The key is that prisoner B, after allowing an appropriate interval, and knowing what C would
do, can deduce that if C says nothing the hats on A and B must be different. Being able to see A's hat he can deduce
his own hat colour. (The fourth prisoner is irrelevant to the puzzle: his only purpose is to wear the fourth hat).

Now the same puzzle with different condition. Instead of two red and two blue hats there are 3 hats of one
colour and only 1 hat of another, and the 3 prisoners can see each other i.e. A sees B & C, B sees A & C and
C sees A & B. As like shown in diagram (D again not to be seen and only there to wear the last hat)

There are two cases:


In first case, one of the three prisoners (in A, B, C) wears the single off-colour hat, thus the other two can easily
deduce the colour of theirs. For example if A is single color then B can see that C and A have different color hats.
From this he concludes that his color is not single so he shouts his color.
In second case, the three prisoners wear hats of the same colour, while D wears the off-colour hat. After a while, all
four prisoners should be able to deduce that, since none of the others was able to state the colour of his own hat, D
must wear the off-colour hat.
This is another hats puzzle same like as prisoners and hats puzzle. The puzzle is Nine IIT students were
sitting in a classroom. Their professor wanted them to test. Next day the professor told all of his 9 students
that he has 9 hats, The hats either red or black color. 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. The professor keeps those hats on their
heads and ask them tell me how many red and black hats the professor have? Obviously students can not
talk to each other or no written communication, or looking into each other eyes; no such stupid options and
no tricks. students can see the hats of everyone except his.
Professor 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?
Answer :
After 20 minutes :
Lets assume that there 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 cannot 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.

The warden meets with 23 new prisoners when they arrive. He tells them, "You may meet today and plan a
strategy. But after today, you will be in isolated cells and will have no communication with one another.
"In the prison is a switch room, which contains two light switches labeled 1 and 2, each of which can be in
either up or the down position. I am not telling you their present positions. The switches are not connected
to anything.
"After today, from time to time whenever I feel so inclined, I will select one prisoner at random and escort him
to the switch room. This prisoner will select one of the two switches and reverse its position. He must flip
one switch when he visits the switch room, and may only flip one of the switches. Then he'll be led back to
his cell.
"No one else will be allowed to alter the switches until I lead the next prisoner into the switch room. I'm going
to choose prisoners at random. I may choose the same guy three times in a row, or I may jump around and
come back. I will not touch the switches, if I wanted you dead you would already be dead.
"Given enough time, everyone will eventually visit the switch room the same number of times as everyone
else. At any time, anyone may declare to me, 'We have all visited the switch room.'
"If it is true, then you will all be set free. If it is false, and somebody has not yet visited the switch room, you
will all die horribly. You will be carefully monitored, and any attempt to break any of these rules will result in
instant death to all of you"
What is the strategy they come up with so that they can be free?
Solution:
The team nominates a leader. The group agrees upon the following rules:
The leader is the only person who will announce that everyone has visited the switch room. All the prisoners (except
for the leader) will flip the first switch up at their very first opportunity, and again on the second opportunity. If the first
switch is already up, or they have already flipped the first switch up two times, they will then flip the second switch.
Only the leader may flip the first switch down, if the first switch is already down, then the leader will flip the second
switch. The leader remembers how many times he has flipped the first switch down. Once the leader has flipped the
first switch down 44 times, he announces that all have visited the room.
It does not matter how many times a prisoner has visited the room, in which order the prisoners were sent or even if
the first switch was initially up. Once the leader has flipped the switch down 44 times then the leader knows everyone

has visited the room. If the switch was initially down, then all 22 prisoners will flip the switch up twice. If the switch
was initially up, then there will be one prisoner who only flips the switch up once and the rest will flip it up twice.
The prisoners can not be certain that all have visited the room after the leader flips the switch down 23 times, as the
first 12 prisoners plus the leader might be taken to the room 24 times before anyone else is allowed into the room.
Because the initial state of the switch might be up, the prisoners must flip the first switch up twice. If they decide to flip
it up only once, the leader will not know if he should count to 22 or 23.
In the example of three prisoners, the leader must flip the first switch down three times to be sure all prisoners have
visited the room, twice for the two other prisoners and once more in case the switch was initially up.
The puzzle is there are 25 horses among which you need to find out the fastest 3 horses. You can conduct
race among at most 5 horses to find out their relative speed. At no point you can find out the actual speed of
the horse in a race. Find out how many races are required to get the top 3 horses.
Seven.

Match
1
a
1
2
3
4
5

Match
2
b
1
2
3
4
5

Match
3
c
1
2
3
4
5

Match
4
d
1
2
3
4
5

Match
5
e

Match
6

Match
7

1
2
3
4
5

first 5 matches to decide the top 3 winners in each match. Thus bottom 2
are eliminated in each race

Match
1
a
1
2
3
4
5

Match
2
b
1
2
3
4
5

Match
3
c
1
2
3
4
5

Match
4
d
1
2
3
4
5

Match
5
e
1
2
3
4
5

Match
6

Match
7

1a
1b
1c
1d
1e

6th race between the fastest of all the 5 races. Bottom 2 of the
fastest are eliminated.
Since 1 c has occupied 3rd position thus those below him in race C are eliminated as t
can obtain min 4th and 5th position

Match
1
a
1

Match
2
b
1

Match
3
c
1

Match
4
d
1

Match
5
e
1

Match
6

1a

Match
7

2a

2
3
4
5

2
3
4
5

2
3
4
5

2
3
4
5

2
3
4
5

1b
1c
1d
1e

3a
1b
2b
3c

7th race is held for 2nd and 3rd spot as fastest is


determined in 6th race.
The first 5 to find the 3 fastest in each group and the sixth with the winners of each group.Now we know the fastest
horse.
The second fastest horse must either be the second fastest in the sixth race or the second fastest horse in the final
winners first race.
In the first case, the third fastest horse can either be the third fastest horse in the sixth race or the second fastest
horse in either the fastest or second fastest horses first race.
Otherwise the third fastest horse could either be the second fastest horse in the sixth race or the third fastest horse in
the final winners first race.
This makes for a total of five horses for the seventh, and final, race.

Das könnte Ihnen auch gefallen