You are on page 1of 16

A man walks into a bar, orders a drink, and starts chatting with the bartender.

After a while, he learns that the bartender has three children. "How old are your children?" he asks. "Well," replies the bartender, "the product of their ages is 72." The man thinks for a moment and then says, "that's not enough information." "All right," continues the bartender, "if you go outside and look at the building number posted over the door to the bar, you'll see the sum of the ages." The man steps outside, and after a few moments he reenters and declares, "Still not enough!" The bartender smiles and says, "My youngest just loves strawberry ice cream." How old are the children? A variant of the problem is for the sum of the ages to be 13 and the product of the ages to be the number posted over the door. In this case, it is the oldest that loves ice cream. Then how old are they? Answer : First, determine all the ways that three ages can multiply together to get 72: 72 1 1 (quite a feat for the bartender) 36 2 1 24 3 1 18 4 1 18 2 2 12 6 1 12 3 2 942 981 833 662 643 As the man says, that's not enough information; there are many possibilities. So the bartender tells him where to find the sum of the ages--the man now knows the sum even though we don't. Yet he still insists that there isn't enough info. This must mean that there are two permutations with the same sum; otherwise the man could have easily deduced the ages. The only pair of permutations with the same sum are 8 3 3 and 6 6 2, which both add up to 14 (the bar's address). Now the bartender mentions his "youngest"--telling us that there is one child who is younger than the other two. This is impossible with 8 3 3--there are two 3 year olds. Therefore the ages of the children are 6, 6, and 2. Pedants have objected that the problem is insoluble because there could be a youngest between two three year olds (even twins are not born exactly at the same time). However, the word "age" is frequently used to denote the number of years since birth. For example, I am the same age as my wife, even though technically she is a few months older than I am. And using the word "youngest" to mean "of lesser age" is also in keeping with common parlance. So I think the solution is fine as stated. In the sum-13 variant, the possibilities are:

11 1 1 10 2 1 931 922 841 832 751 742 733 661 652 643 The two that remain are 9 2 2 and 6 6 1 (both products equal 36). The final bit of info (oldest child) indicates that there is only one child with the highest age. This cancels out the 6 6 1 combination, leaving the childern with ages of 9, 2, and 2.

Extra puzzles:
This Puzzle is asked by Google while they had an interview to a select student for their company. Then many companies asked this Puzzle during their interview or written test in campus. This puzzle is famously known as 2 Egg Problem. The puzzle is given below. Puzzle : Two Egg Problem: * You are given 2 eggs. * You have access to a 100-storey building. * Eggs can be very hard or very fragile means it may break if dropped from the first floor or may not even break if dropped from 100 th floor.Both eggs are identical. * You need to figure out the highest floor of a 100-storey building an egg can be dropped without breaking. * Now the question is how many drops you need to make. You are allowed to break 2 eggs in the process If you are one of the people who likes to solve a puzzle before seeing the answer you must quit the blog now and come back later for checking the answer. Now that this is a Google interview question I am taking the normal "Interview-Style" of solving a problem. Simply saying thinking aloud through the solution from worst to the best correcting the flows optimizing the solution or taking the 5-minute hard thinking acting pause to a problem, which you know already and just want to make your interviewer think that you are a challenge lover. Answer : Let x be the answer we want, the number of drops required.

So if the first egg breaks maximum we can have x-1 drops and so we must always put the first egg from height x. So we have determined that for a given x we must drop the first ball from x height. And now if the first drop of the first egg doesnt breaks we can have x-2 drops for the second egg if the first egg breaks in the second drop. Taking an example, lets say 16 is my answer. That I need 16 drops to find out the answer. Lets see whether we can find out the height in 16 drops. First we drop from height 16,and if it breaks we try all floors from 1 to 15.If the egg dont break then we have left 15 drops, so we will drop it from 16+15+1 =32nd floor. The reason being if it breaks at 32nd floor we can try all the floors from 17 to 31 in 14 drops (total of 16 drops). Now if it did not break then we have left 13 drops. and we can figure out whether we can find out whether we can figure out the floor in 16 drops. Lets take the case with 16 as the answer 1 + 15 16 if breaks at 16 checks from 1 to 15 in 15 drops 1 + 14 31 if breaks at 31 checks from 17 to 30 in 14 drops 1 + 13 45 ..... 1 + 12 58 1 + 11 70 1 + 10 81 1 + 9 91 1 + 8 100 We can easily do in the end as we have enough drops to accomplish the task Now finding out the optimal one we can see that we could have done it in either 15 or 14 drops only but how can we find the optimal one. From the above table we can see that the optimal one will be needing 0 linear trials in the last step. So we could write it as (1+p) + (1+(p-1))+ (1+(p-2)) + .........+ (1+0) >= 100. Let 1+p=q which is the answer we are looking for q (q+1)/2 >=100 Solving for 100 you get q=14. So the answer is: 14 Drop first orb from floors 14, 27, 39, 50, 60, 69, 77, 84, 90, 95, 99, 100... (i.e. move up 14 then 13, then 12 floors, etc) until it breaks (or doesn't at 100).

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) solution for this puzzle is given below. Write your comments.. and any different answers.

Answer :
As per the puzzle given ablove The fewest number of aircraft is 3! Imagine 3 aircraft (A, B and C). A is going to fly round the world. All three aircraft start at the same time in the same direction. After 1/6 of the circumference, B passes 1/3 of its fuel to C and returns home, where it is refuelled and starts immediately again to follow A and C. C continues to fly alongside A until they are 1/4 of the distance around the world. At this point C completely fills the tank of A which is now able to fly to a point 3/4 of the way around the world. C has now only 1/3 of its full fuel capacity left, not enough to get back to the home base. But the first "auxiliary" aircraft reaches it in time in order to refuel it, and both "auxiliary" aircraft are the able to return safely to the home base. Now in the same manner as before both B and C fully refuelled fly towards A. Again B refuels C and returns home to be refuelled. C reaches A at the point where it has flown 3/4 around the world. All 3 aircraft can safely return to the home base, if the refuelling process is applied analogously as for the first phase of the fligh

Mars Rovers thoughtworks puzzles


A squad of robotic rovers are to be landed by NASA on a plateau on Mars. This plateau, which is curiously rectangular, must be navigated by the rovers so that their on-board cameras can get a complete view of the surrounding terrain to send back to Earth. A rover's position and location is represented by a combination of x and y co-ordinates and a letter representing one of the four cardinal compass points. The plateau is divided up into a grid to simplify navigation. An example position might be 0, 0, N, which means the rover is in the bottom left corner and facing North. In order to control a rover, NASA sends a simple string of letters. The possible letters are 'L', 'R' and 'M'. 'L' and 'R' makes the rover spin 90 degrees left or right respectively, without moving from its current spot. 'M' means move forward one grid point, and maintain the same heading. Assume that the square directly North from (x, y) is (x, y+1). INPUT:

The first line of input is the upper-right coordinates of the plateau, the lower-left coordinates are assumed to be 0,0. The rest of the input is information pertaining to the rovers that have been deployed. Each rover has two lines of input. The first line gives the rover's position, and the second line is a series of instructions telling the rover how to explore the plateau. The position is made up of two integers and a letter separated by spaces, corresponding to the x and y co-ordinates and the rover's orientation. Each rover will be finished sequentially, which means that the second rover won't start to move until the first one has finished moving. OUTPUT: The output for each rover should be its final co-ordinates and heading. INPUT AND OUTPUT: Test Input: 55 12N LMLMLMLMM 33E MMRMMRMRRM Expected Output: 13N 51E ========== Prisoners and Hats Puzzles: The prisoners and hats puzzle is an induction puzzle (a kind of logic puzzle) that involves reasoning about the actions of other people, drawing in aspects of Game theory. Generaly interview questions asked from math oriented. Companies expect that IT students have the backround knowledge of problem solving. This puzzle comee under game theory.

Puzzle : Prisoners and three hats


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.

The solution
For the sake of explanation let's 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).

Puzzle : Prisoners and Four - hats.


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)

The solution
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.

Puzzle : Prisoners and Five - hats.


Another different condition. only three prisoners and five hats (supposedly two black and three white) are involved. The three prisoners are ordered to stand in a straight line facing the front, with A in front and C at the back. They are told that there will be two black hats and three white hats. One hat is then put on each prisoner's head; each prisoner can only see the hats of the people in front of him and not on his own's. The first prisoner that is able to announce the colour of his hat correctly will be released. No communication between the prisoners is allowed. After some time, only A is able to announce (correctly) that his hat is white. Why is that so?

The solution
Assuming that A wears a black hat. If B wears a black hat as well, C can immediately tell that he is wearing a white hat after

looking at the two black hats in front of him. If B does not wear a black hat, C will be unable to tell the colour of his hat (since there is a black and a white). Hence, B can deduce from A's black hat and C's response that he (B) is not wearing a black hat (otherwise the above situation will happen) and is therefore wearing a white hat. This therefore proves that A must not be wearing a black hat. Puzzle 1 : 9 cards are there. u have to arrange them in a 3*3 matrix. cards are of 4 colors.they are red,yellow,blue,green. conditions for arrangement: one red card must be in first row or second row.2 green cards should be in 3rd column. Yellow cards must be in the 3 corners only. Two blue cards must be in the 2nd row. Atleast one green card in each row. Answer : Yello Red Blue Blue Yellow Green Green Green Yellow

Puzzle 2 : In a soap company a soap is manufactured with 11 parts. For making one soap you will get 1 part as scrap. At the end of the day u have 251 such scraps. From that how many soaps can be manufactured? Answer : 22 + 2+ 1 = 25. Puzzle 3 : There are five thieves, each loot a bakery one after the other such that the first one takes 1/2 of the total no. of the breads plus 1/2 of a bread. Similarly 2nd, 3rd,4th and 5fth also did the same. After the fifth one no. of breads remained are 3. Initially how many breads were there? Answer : 31 Puzzle 4 : Two candles of equal lengths and of different thickness are there. The thicker one will last of six hours. The thinner 2 hours less than the thicker one. Ramesh light the two candles at the same time. When he went to bed he saw the thicker one is twice the length of the thinner one. For how long did Ramesh lit two candles . Answer : 3 hours Puzzle 5 : There are 5 persons who have won top 5 places in an event Olympics one of them asks all the 5 regarding their positions they reply as a: I am not the last b: c is in third place c: e is behind a d: b is in 1st place e: d is not the first find positions in order. Answer : bdcae

Puzzle 6 : If one tyre of a car suddenly gets stolen. and after sometime u find the tyre without the screws how will u make ur journey complete? Answer : Open 3 screws, 1 from each tyre and fix the tyre. Puzzle 7 : How will you recognize the magnet & magnetic material & non-magnetic material? Answer : Drag one piece of material over another. There is no attractive force in the middle portion of the magnet. OR Get a piece of thread and tie up with the one bar and check for poles. If it iron bar then it moves freely and if it is magnetic bar then it fix in one direction according to poles. Puzzle 8 : You are given a cake; one of its corner is broken. How will u cut the rest into Two equal parts? Answer : Slice the cake Puzzle 9 : What is the height of room if after entering the room with a watch ur head strikes a hanging bulb? Answer: Oscillate the hanging bulb. Calculate the time period for one complete oscillation by Simple Harmonic Motion (SHM) of the handing bulb. Put it in the formula T=2 * 3.14 * (L/G)^1/2 L will be the length of the hanging thread. Add the L with ur height to get the height of the room. OR Drop it from the room and find the time at which it strikes the floor. Using physics formula s = (at^2)/2 (IM NOT SURE ABOUT THIS ONE) Puzzle 10 : Can u make 120 with 5 zeros? Answer : Factorial (factorial (0)+factorial (0)+factorial (0)+factorial (0)+factorial (0)) = 120 Puzzle 11 : There are three people A, B, C. Liars are of same type and Truth speaking people are of same type. Find out who is speaking truth and who is speaking false from the following statements: a) A says: B is a liar. b) B says: A and C are of same type. Answer : lets assume A is speaking truth. It means B is a liar then it means A and C are not of same type. Puzzle 12 : Ann, Boobie, Cathy and Dave are at their monthly business meeting. Their occupations are author, biologist, chemist and doctor, but not necessarily in that order. Dave just told the biologist that Cathy was on her way with doughnuts. Ann is sitting across from the doctor and next to the chemist. The doctor was thinking that Boobie was a goofy name for parent's to choose,but didn't say anything. What is each person's occupation?

Answer: Since Dave spoke to the biologist and Ann sat next to the chemist and across the doctor, Cathy must be the author and Ann the biologist. The doctor didn't speak, but David did, so Bobbie is the doctor and Dave the chemist.

Chess Board Puzzle :


Imagine there are infinite number of Queens (Chess Game Piece) with u. Find the minimum number of queens required so that every square grid on the chess board is under the attack of a queen. Arrange this minimum no. of Queens on a chess board.

Answer :

Indicates Queen.

Einstein's Riddle - Interview puzzles


Einstein said that only 2% of the world could solve this problem. There are 5 houses in 5 different colors. In each house lives a person with a different nationality. The 5 owners drink a certain type of beverage, smoke a certain brand of cigar, and keep a certain pet. No owners have the same pet, smoke the same brand of cigar, or drink the same beverage. Hints:

The Brit lives in the red house. The Swede keeps dogs as pets. The Dane drinks tea. The green house is on the left of the white house. The green homeowner drinks coffee. The person who smokes Pall Mall rears birds. The owner of the yellow house smokes Dunhill. The man living in the center house drinks milk. The Norwegian lives in the first house. The man who smokes Blend lives next to the one who keeps cats. The man who keeps the horse lives next to the man who smokes Dunhill. The owner who smokes Bluemaster drinks beer. The German smokes prince. The Norwegian lives next to the blue house. The man who smokes Blend has a neighbor who drinks water. Who owns the fish?

Image puzzles with Answers


This puzzles are based on the images we need to find out the phrase. It shows the our identification based on the images. This is same as like the puzzles available in Image puzzles with Answers. The images are given below. 1.

2.

3.

4.

5.

Answers :
1. A) An outside chance b) Go for it 2. A) Foreign Language b) Whos in charge 3. A) Im bigger than you b) Platinum 4. A) Ill in bed b) Safety in Numbers 5. A) Tip-toe through the tulips b) Alice in Wonderland c) Highway Overpass c) Neon Lights c) Break in Custom c) Read between the lines c) Merry go round

The given puzzles are asked in many written exams conducted by varies IT companies like Google, Adobe, Amazon, yahoo, Microsoft etc Adobe Interview Puzzles : Weight Puzzle Puzzle 1 : (check this is already posted)

There are 8 Balls available in a box, From that only one odd ball being heavier or Lighter. question is to find out the minimum number of weighings required to spot the odd heavier ball among 8 identically looking balls using a common balance. Solution : This is a little trickier to solve.Let us name the 8 balls as A1,A2,A3,B1,B2,B3,C1 and C2.Now weigh with A1,A2,A3 on one side and B1,B2,B3 on the other side. If both weigh equal then the odd ball is among C1 and C2.Now we know that A's and B's are all normal ones we can weigh C1 with A1 and check whether C1 weighs the same as the normal ball. In this way, we can figure out in one weigh which of C1 and C2 is odd. Now if A's weighed more than B's then we know for sure C's are normal ones. Now lets assume A's heavier than B's and we still don't know whether the odd is among A's or B's. We know A1 A2 A3 < B1 B2 B3 Now we compare A1 B2 B3 to B1 C1 C2 . Now if the A1 B2 B3 is heavier than B1 C1 C2 Then it means the odd ball is among A1 and B1.If A1 B2 B3 is lighter than B1 C1 C2 then the odd ball is among B2 and B3.If A1 B2 B3 equal to B1 C1 C2 then odd ball is among A2 and A3.So we have zeroed down to 2 balls.Now its very easy as we can compare any of the normal ball with one of the 2 balls.So answer is 3,ie in 3 weighings we can find out the odd ball. Puzzle 2: This is same like the above weight puzzle But instead of 8 balls here You are given 13 balls. The odd ball may be either heavier or lighter. Find out the odd ball in 3 weightings. Puzzle 3: You are given a cake; one of its corner is broken. How will u cut the rest into Two equal parts? Solution : Slice the cake(Horigentally). Puzzle 4 : How it is possible to place four points that are equidistance from each other? Solution : place points in the shape of a pyramid. Move 1 stick from the image below to make a valid equation. (inequalities are not allowed).

Solution:

Hundred Numbers in a puzzle This is another one frequently asked puzzle in writtern test taken by IT companies. Anyone can easily understand and try to answer this puzzle. A simple logic is behind this puzzle try to find out.

Puzzle :
A sheet of paper has statements numbered from 1 to 100. Statement n says "exactly n of the statements on this sheet are false." Which statements are true and which are false? What if we replace "exactly" by "at least"?

Answer :
In these 100 statements one and only one statement can be correct. That means 99 statements have to be incorrect and thus statement 99th is true If replaced by "at least", and the "real" number of false statements is x, then statements x+1 to 100 will be false (since they falsely claim that there are more false statements than there actually are). So, 100-x are false, ie. x=100-x, so x=50. The first 50 statements are true, and statements 51 to 100 are false. However, there is a hidden and incorrect assumption in this argument. To see this, suppose that there is one statement on the sheet and it says "One statement is false" or "At least one statement is false," either way it implies "this statement is false," which is a familiar paradoxical statement. We have learned that this paradox arises because of the false assumption that all statements are either true or false. This is the hidden assumption in the above reasoning. If it is acknowledged that some of the statements on the page may be neither true nor false (i.e., meaningless), then nothing whatsoever can be concluded about which statements are true or false.

This problem has been carefully contrived to appear to be solvable (like the vacuous statement "this statement is true"). By changing the numbers in some statements and changing "true" to "false," various circular forms of the liar's paradox can be constructed. A much more complicated version of the same problem is: 1) At least one of the last two statements in this list is true. 2) This is either the first true or the first false statement in the list. 3) There exist three consecutive false statements. 4) The difference beween the numbers of the last true statement and the first true statement is a factor of the unknown number. 5) The sum of the numbers of the true statements is the unknown number. 6) This is not the last true statement. 7) Each true statement's number is a factor of the unknown number. 8) The unknown number equals the percentage of these statements which are true. 9) The number of different factors which the unknown number has (excluding 1 and itself) is more than the sum of the numbers of the true statements. 10) There are no three cosecutive true statements. What is the number? The incorrect but plausible solution is: By 2, either way 1 must be false, and then so must both 9 and 10. 6, if false, says "This is the last true statement", which gives a paradox, thus 6 must be true, and so must 7 and/or 8. 7 and 8 cannot both be true, as the number had to be a multiple of 6,7,8 , that is a multiple of 168 (by 7), and less than 100 (by 8) If 8 is false, then 3 is true (8,9,10 is false), if 8 is true, then 3 is false (3 cannot be true when both 6 and 8 are true, then there are no three consecutive statements left). So we have either A) F X F X X T F T F F or B) F X T X X T T F F F In A), 4 and 5 must be true (by false 10), and 2 may be true or false. So by 5 the number shall be either 27 (2+3+4+5+6+7) or 25 (3+4+5+6+7). None of these can fullfill 8, though, so A) is out leaving us with B) Now, (by 7) 3,6 and 7 are factors, the number must be a multiple of 42, as 2+3+4+5+6+7=27, 5 must be false. By false 10, 2 and 4 must be true, that is 5 shall be a multiple of the number. Now the number must be a multiple of 2,3,4,5,6 and 7, that is a multiple of 3*4*5*7=420. 420 has 22 different

factors (2,3,4,5,6,7,10,12,14,15,20,21,28,30,35,42,60,70,84,105,140,210) 2+3+4+6+7 = 22, so the only multiple of 420 that fulfills false 9 is 420.

and

the

sum

You might also like