The Miller next took the company aside and showed them nine sacks of flour that were standing as depicted in the sketch.
"Now, hearken, all and some," said he, "while that I do set ye the riddle of the nine sacks of flour.
And mark ye, my lords and masters, that there be single sacks on the outside, pairs next unto them, and three together in the middle thereof.
By Saint Benedict, it doth so happen that if we do but multiply the pair, 28, by the single one, 7, the answer is 196, which is of a truth the number shown by the sacks in the middle.
Yet it be not true that the other pair, 34, when so multiplied by its neighbour, 5, will also make 196.
Wherefore I do beg you, gentle sirs, so to place anew the nine sacks with as little trouble as possible that each pair when thus multiplied by its single neighbour shall make the number in the middle."
As the Miller has stipulated in effect that as few bags as possible shall be moved, there is only one answer to this puzzle, which everybody should be able to solve.
The way to arrange the sacks of flour is as follows: 2, 78, 156, 39, 4. Here each pair when multiplied by its single neighbour makes the number in the middle, and only five of the sacks need be moved.
There are just three other ways in which they might have been arranged (4, 39, 156, 78, 2; or 3, 58, 174, 29, 6; or 6, 29, 174, 58, 3), but they all require the moving of seven sacks.
See also best riddles or new riddles.logicmath
There are 1 million closed school lockers in a row, labeled 1 through 1,000,000.
You first go through and flip every locker open.
Then you go through and flip every other locker (locker 2, 4, 6, etc...). When you're done, all the even-numbered lockers are closed.
You then go through and flip every third locker (3, 6, 9, etc...). "Flipping" mean you open it if it's closed, and close it if it's open. For example, as you go through this time, you close locker 3 (because it was still open after the previous run through), but you open locker 6, since you had closed it in the previous run through.
Then you go through and flip every fourth locker (4, 8, 12, etc...), then every fifth locker (5, 10, 15, etc...), then every sixth locker (6, 12, 18, etc...) and so on. At the end, you're going through and flipping every 999,998th locker (which is just locker 999,998), then every 999,999th locker (which is just locker 999,999), and finally, every 1,000,000th locker (which is just locker 1,000,000).
At the end of this, is locker 1,000,000 open or closed?
Locker 1,000,000 will be open.
If you think about it, the number of times that each locker is flipped is equal to the number of factors it has. For example, locker 12 has factors 1, 2, 3, 4, 6, and 12, and will thus be flipped 6 times (it will end be flipped when you flip every one, every 2nd, every 3rd, every 4th, every 6th, and every 12th locker). It will end up closed, since flipping an even number of times will return it to its starting position. You can see that if a locker number has an even number of factors, it will end up closed. If it has an odd number of factors, it will end up open.
As it turns out, the only types of numbers that have an odd number of factors are squares. This is because factors come in pairs, and for squares, one of those pairs is the square root, which is duplicated and thus doesn't count twice as a factor. For example, 12's factors are 1 x 12, 2 x 6, and 3 x 4 (6 total factors). On the other hand, 16's factors are 1 x 16, 2 x 8, and 4 x 4 (5 total factors).
So lockers 1, 4, 9, 16, 25, etc... will all be open. Since 1,000,000 is a square number (1000 x 1000), it will be open as well.logicmathshort
A man gave one son 10 cents and another son was given 15 cents. What time is it?
1:45. The man gave away a total of 25 cents. He divided it between two people. Therefore, he gave a quarter to two.interviewlogic
You are standing before two doors. One of the path leads to heaven and the other one leads to hell. There are two guardians, one by each door. You know one of them always tells the truth and the other always lies, but you don’t know who is the honest one and who is the liar. You can only ask one question to one of them in order to find the way to heaven. What is the question?
The question you should ask is “If I ask the other guard about which side leads to heaven, what would he answer?”. It should be fairly easy to see that irrespective of whom do you ask this question, you will always get an answer which leads to hell. So you can chose the other path to continue your journey to heaven.
This idea was famously used in the 1986 film Labyrinth.
Here is the explanation if it is yet not clear.
Let us assume that the left door leads to heaven.
If you ask the guard which speaks truth about which path leads to heaven, as he speaks always the truth, he would say “left”. Now that the liar , when he is asked what “the other guard (truth teller) ” would answer, he would definitely say “right”.
Similarly, if you ask the liar about which path leads to heaven, he would say “right”. As the truth teller speaks nothing but the truth, he would say “right” when he is asked what “the other guard( liar ) ” would answer. So in any case, you would end up having the path to hell as an answer. So you can chose the other path as a way to heaven.logicmath
You have been given the task of transporting 3,000 apples 1,000 miles from Appleland to Bananaville. Your truck can carry 1,000 apples at a time. Every time you travel a mile towards Bananaville you must pay a tax of 1 apple but you pay nothing when going in the other direction (towards Appleland). What is highest number of apples you can get to Bananaville?
Step one: First you want to make 3 trips of 1,000 apples 333 miles. You will be left with 2,001 apples and 667 miles to go.
Step two: Next you want to take 2 trips of 1,000 apples 500 miles. You will be left with 1,000 apples and 167 miles to go (you have to leave an apple behind).
Step three: Finally, you travel the last 167 miles with one load of 1,000 apples and are left with 833 apples in Bananaville.logicmath
Two trains are traveling toward each other on the same track, each at 60 miles per hour. When they are exactly 120 miles apart, a fly takes off from the front of one of the trains, flying toward the other train at a constant rate of 100 miles per hour. When the fly reaches the other train, it instantly changes directions and starts flying toward the other train, still at 100 miles per hour. It keeps doing this back and forth until the trains finally collide.
If you add up all the distances back and forth that the fly has travelled, how much total distance has the fly travelled when the trains finally collide?
The fly has travelled exactly 100 miles. We can figure this out using some simple math. Becuase the trains are 120 miles apart when the fly takes off, and are travelling at 60 mph each, they will collide in exactly 1 hour. This gives the fly exactly 1 hour of flying time, going at a speed of 100 miles per hour. Thus, the fly will travel 100 miles in this hour.logicmath
You are visiting NYC when a man approaches you.
"Not counting bald people, I bet a hundred bucks that there are two people living in New York City with the same number of hairs on their heads," he tells you.
"I'll take that bet!" you say. You talk to the man for a minute, after which you realize you have lost the bet.
What did the man say to prove his case?
This is a classic example of the pigeonhole principle. The argument goes as follows: assume that every non-bald person in New York City has a different number of hairs on their head. Since there are about 9 million people living in NYC, let's say 8 million of them aren't bald.
So 8 million people need to have different numbers of hairs on their head. But on average, people only have about 100,000 hairs. So even if there was someone with 1 hair, someone with 2 hairs, someone with 3 hairs, and so on, all the way up to someone with 100,000 hairs, there are still 7,900,000 other people who all need different numbers of hairs on their heads, and furthermore, who all need MORE than 100,000 hairs on their head.
You can see that additionally, at least one person would need to have at least 8,000,000 hairs on their head, because there's no way to have 8,000,000 people all have different numbers of hairs between 1 and 7,999,999. But someone having 8,000,000 is an essential impossibility (as is even having 1,000,000 hairs), So there's no way this situation could be the case, where everyone has a different number of hairs. Which means that at least two people have the same number of hairs.logicmath
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. logicmath
Every day, Jack arrives at the train station from work at 5 pm. His wife leaves home in her car to meet him there at exactly 5 pm, and drives him home. One day, Jack gets to the station an hour early, and starts walking home, until his wife meets him on the road. They get home 30 minutes earlier than usual. How long was he walking? Distances are unspecified. Speeds are unspecified, but constant. Give a number which represents the answer in minutes.
The best way to think about this problem is to consider it from the perspective of the wife. Her round trip was decreased by 30 minutes, which means each leg of her trip was decreased by 15 minutes. Jack must have been walking for 45 minutes.logicmathshort
1 = 5 ,
2 = 25 ,
3 = 325 ,
4 = 4325
Then 5 = ?
Already stated 1=5 =>5=1logicmath
A women walks into a bank to cash out her check.
By mistake the bank teller gives her rupee amount in change, and her paise amount in rupees.
On the way home she spends 5 paise, and then suddenly she notices that she has twice the amount of her check.
How much was her check amount ?
The check was for Rupees 31.63.
The bank teller gave her Rupees 63.31
She spent .05, and then she had Rupees 63.26, which is twice the check.
Let x be the rupees of the check, and y be the paise.
The check was for 100x + y paise
He was given 100y + x paise
100y + x - 5 = 2(100x + y)
Expanding this out and rearranging, we find:
98y = 199x + 5
or 199x â‰¡ -5 (mod 98)
or 98*2*x + 3x â‰¡ -5 (mod 98)
3x â‰¡ -5 â‰¡ 93 (mod 98)
this quickly leads to x = 31