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 bee
When was the last date that this occurred on?See Solution : Palindrome dates
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.
The first grad says to the second: “how have you been?”
Second: “great! i got married and i have three daughters now”
First: “really? how old are they?”
Second: “well, the product of their ages is 72, and the sum of their ages is the same as the number on that building over there..”
First: “right, ok.. oh wait.. hmm, i still don’t know”
Second: “oh sorry, the oldest one just started to play the piano”
First: “wonderful! my oldest is the same age!”
How old are the daughters ?See Solution : Daughter's ages
We know that there are 3 daughters whose ages multiply to 72. Let’s look at the possibilities…
Ages: Sum of ages: 1 1 72 74 1 2 36 39 1 3 24 28 1 4 18 23 1 6 12 19 1 8 9 18 2 2 18 22 2 3 12 17 2 4 9 15 2 6 6 14 3 3 8 14 3 4 6 13
Red and blue marbles
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, you’ll 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.See Solution : Red and blue marbles
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 B : (1/2)*0 = 0 (selecting the jar B = 1/2, red marble from jar B = o/50)
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)
Ants on a triangle
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 don’t collide ?See Solution : Ants on a triangle
Let the three ants are a, b, c.
So probability that they will not collide is 2/(2+6) i.e. 1/4
Solution 2 :
Total no. of movements: 8
A->B, B->C, C->A; A->B, B->A, C->A; A->B, B->A, C->B; A->B, B->C, C->B; A->C, B->C, C->A; A->C, B->A, C->A; A->C, B->A, C->B; A->C, B->C, C->B
Non-colliding movements: 2
A->B, B->C, C->A; A->C, B->A, C->B
(i.e. the all ants move either in the clockwise or anti-clockwise direction at the same time)
So probability of not colliding = 2/8 = 1/4
Balls in a bag
Once you tackle that, what if there are 20 blue balls and 13 red balls to start with?See Solution : Balls in a bag
There are 3 possible cases of removing the two balls…
1) 20 Blue, 14 Red balls
2) 20 Blue, 13 Red balls
A man has two cubes on his desk. Every day he arranges both cubes so that the front faces show the current day of the month. what numbers are on the faces of the cubes to allow this?See Solution : Calendar cube
So that means we need to have 0 on both the cubes, but that makes it 13, but there are only 12 faces. Thats the trick in this question, we can place cubes upside down too, now which is the number we can use both the ways, yes its 6, it can be used as 9 and then we can have all the possible dates.
so first cube : 0, 1, 2, 3, 4, 5
second cube : 0, 1, 2, 6, 7, 8
Zeroes in 100 factorial
How many trailing zeroes are there in 100! (100 factorial) ?See Solution : Zeroes in 100!
10, 20,…., 90 = 9 zeros
100 = 2 zeros
5, 15, 25……95 = 10 zeros
and 1 extra 5 in each of 25, 50 and 75 = 3 zeros
so total 9+2+10+3 = 24 zeros.
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 ?See Solution : 100 doors
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 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?
Different means that the cubes can not be rotated so that they look the same. This is important! If you give me two cubes and i can rotate them so that they appear identical in color, they are the same cube.See Solution : Cube puzzle
Let X be the number of “different” cubes (using the same definition as in the problem). Let Y be the number of ways you can “align” a given cube in space such that one face is pointed north, one is east, one is south, one is west, one is up, and one is down. (We’re on the equator.) Then the total number of possibilities is X * Y. Each of these possibilities “looks” different, because if you could take a cube painted one way, and align it a certain way to make it look the same as a differently painted cube aligned a certain way, then those would not really be different cubes. Also note that if you start with an aligned cube and paint it however you want, you will always arrive at one of those X * Y possibilities.
How many ways can you paint a cube that is already “aligned” (as defined above)? You have six options for the north side, five options for the east side, etc. So the total number is 6! (that’s six factorial, or 6 * 5 * 4 * 3 * 2 * 1). Note that each way you do it makes the cube “look” different (in the same way the word is used above). So 6! = X * Y.
How many ways can you align a given cube? Choose one face, and point it north; you have six options here. Now choose one to point east. There are only four sides that can point east, because the side opposite the one you chose to point north is already pointing south. There are no further options for alignment, so the total number of ways you can align the cube is 6 * 4.
Remember, Y is defined as the number of ways you can align the cube, so Y = 6 * 4. This gives us 6! = X * 6 * 4, so X = 5 * 3 * 2 * 1 = 30.
Reference : http://www.techinterview.org/Solutions/fog0000000128.html