Two planes take off at the same exact moment. They are flying across the Atlantic. One leaves New York and is flying to Paris at 500 miles per hour. The other leaves Paris and is flying to New York at only 450 miles per hour. Which one will be closer to Paris when they meet?
They will both the same distance from Paris when they meet!
Fred went to a hardware store in Boston with Alex, Ben, and George. He noted that a hammer cost ten times as much as a screwdriver and a power saw cost ten times as much as a hammer. The storekeeper said that Ben could buy a power saw, George could buy a screwdriver and Alex could buy a hammer. Based on this what would the storekeeper let Fred buy?
Alex's full name is Alexander and Ben's full name is Benjamin. George was Alex's boss and good friend.
Fred could buy all three (the power saw, hammer and screw driver) since he had $111 with him (a $1 bill - George Washington, a $10 Alexander Hamilton, and a $100 bill - Ben Franklin). Boston is in the USA and therefore uses the US currency I just described.
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?
Think in terms of binary numbers. (now don’t read the solution, give 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.
Two men working at a construction site were up for a challenge, and they were pretty mad at each other.
Finally, at lunch break, they confronted one another.
One man, obviously stronger, said "See that wheelbarrow? I'm willin' to bet $100 (that's all I have in my wallet here) that you can't wheel something to that cone and back that I can't do twice as far. Do you have a bet?"
The other man, too dignified to decline, shook his hand, but he had a plan formulating.
He looked at the objects lying around: a pile of 400 bricks, a steel beam, the 10 men that had gathered around to watch, his pickup truck, a stack of ten bags of concrete mix, and then he finalized his plan.
"All right," he said, and revealed his object.
That night, the strong man went home thoroughly teased and $100 poorer.
What did the other man choose?
He looked the man right in the eye and said "get in."
A farmer lived in a small village. He had three sons. One day he gave $100 dollars to his sons and told them to go to market. The three sons should buy 100 animals for $100 dollars. In the market there were chickens, hens and goats. Cost of a goat is $10, cost of a hen is $5 and cost of a chicken is $0.50.
There should be at least one animal from each group. The farmer’s sons should spend all the money on buying animals. There should be 100 animals, not a single animal more or less! What do the sons buy?
They purchased 100 animals for 100 dollars.
$10 spent to purchase 1 goat.
$45 spent to purchase 9 hens.
$45 spent to purchase 90 chickens.
There are n coins in a line. (Assume n is even). Two players take turns to take a coin from one of the ends of the line until there are no more coins left. The player with the larger amount of money wins.
Would you rather go first or second? Does it matter?
Assume that you go first, describe an algorithm to compute the maximum amount of money you can win.
Note that the strategy to pick maximum of two corners may not work. In the following example, first player looses the game when he/she uses strategy to pick maximum of two corners.
Example 18 20 15 30 10 14
First Player picks 18, now row of coins is
20 15 30 10 14
Second player picks 20, now row of coins is
15 30 10 14
First Player picks 15, now row of coins is
30 10 14
Second player picks 30, now row of coins is
First Player picks 14, now row of coins is
Second player picks 10, game over.
The total value collected by second player is more (20 + 30 + 10) compared to first player (18 + 15 + 14). So the second player wins.
Going first will guarantee that you will not lose. By following the strategy below, you will always win the game (or get a possible tie).
(1) Count the sum of all coins that are odd-numbered. (Call this X)
(2) Count the sum of all coins that are even-numbered. (Call this Y)
(3) If X > Y, take the left-most coin first. Choose all odd-numbered coins in subsequent moves.
(4) If X < Y, take the right-most coin first. Choose all even-numbered coins in subsequent moves.
(5) If X == Y, you will guarantee to get a tie if you stick with taking only even-numbered/odd-numbered coins.
You might be wondering how you can always choose odd-numbered/even-numbered coins. Let me illustrate this using an example where you have 6 coins:
18 20 15 30 10 14
Sum of odd coins = 18 + 15 + 10 = 43
Sum of even coins = 20 + 30 + 14 = 64.
Since the sum of even coins is more, the first player decides to collect all even coins. He first picks 14, now the other player can only pick a coin (10 or 18). Whichever is picked the other player, the first player again gets an opportunity to pick an even coin and block all even coins.
In the land of Brainopia, there are three races of people: Mikkos, who tell the truth all the time, Kikkos, who always tell lies, and Zikkos, who tell alternate false and true statements, in which the order is not known (i.e. true, false, true or false, true, false). When interviewing three Brainopians, a foreigner received the following statements:
I am a Mikko.
I am a Kikko.
a. They are both lying.
b. I am a Zikko.
Can you help the very confused foreigner determine who is who, assuming each person represents a different race?
Person 1 is a Miko.
Person 2 is a Ziko.
Person 3 is a Kikko.
How to measure exactly 4 gallon of water from 3 gallon and 5 gallon jars, given, you have unlimited water supply from a running tap.
Step 1. Fill 3 gallon jar with water. ( 5p – 0, 3p – 3)
Step 2. Pour all its water into 5 gallon jar. (5p – 3, 3p – 0)
Step 3. Fill 3 gallon jar again. ( 5p – 3, 3p – 3)
Step 4. Pour its water into 5 gallon jar untill it is full. Now you will have exactly 1 gallon water remaining in 3 gallon jar. (5p – 5, 3p – 1)
Step 5. Empty 5 gallon jar, pour 1 gallon water from 3 gallon jar into it. Now 5 gallon jar has exactly 1 gallon of water. (5p – 1, 3p – 0)
Step 6. Fill 3 gallon jar again and pour all its water into 5 gallon jar, thus 5 gallon jar will have exactly 4 gallon of water. (5p – 4, 3p – 0)
Create a number using only the digits 4,4,3,3,2,2,1 and 1.
So I can only be eight digits.
You have to make sure the ones are separated by one digit, the twos are separated by two digits the threes are separated with three digits and the fours are separated by four digits.