You are on page 1of 4

Easy(ish) Riddles

--
An Arab sheikh is old and must will his fortune to one of his two sons. He makes a proposition.
His two sons will ride their camels in a race, and whichever camel crosses the finish line last
will win the fortune for its owner. During the race, the two brothers wander aimlessly for days,
neither willing to cross the finish line. In desperation, they ask a wise man for advice. He tells
them something; then the brothers leap onto the camels and charge toward the finish line.
What did the wise man say?
--
you have two ropes, each of which takes one hour to burn completely. both of these ropes are
nonhomogeneous in thickness, meaning that some parts of the ropes are chunkier than other
parts of the rope. using these nonhomogeneous ropes and a lighter, time 45 minutes.
Note: the riddle is saying that each rope has an inconsistent burn time per unit length. So it
might take 5 minutes to burn 1 inch, but take 20 minutes to burn the next inch.
This riddle is also in Cracking the Coding Interview
--
You have a 6-foot long chain that is suspended at its ends, tacked to a wall. The tacks are
parallel to the floor. Due to gravity, the middle part of the chain hangs down a little bit,
forming a hump; the length of this hump in the vertical direction is 3 feet. Find the distance in
between the tacks.
Note: asked at m$ interview.
--
Why do computer programmers always get Christmas and Halloween mixed up?
Note: dumb joke
--
The mother is 21 years older than the child. In 6 years from now, the mother will be 5 times as
old as the child. Question: Where's the father?
Note: it’s an actual riddle
Medium Riddles
--
Three coworkers would like to know their average salary. However, they are self-conscious
and don't want to tell each other their own salaries, for fear of either being ridiculed or getting
their houses robbed. How can they find their average salary, without disclosing their own
salaries?
--
you die and the devil says he'll let you go to heaven if you beat him in a game. the devil sits
you down at a round table. he gives himself and you a huge pile of quarters. he says "ok, we'll
take turns putting quarters down, no overlapping allowed, and the quarters must rest on the
table surface. the first guy who can't put a quarter down loses." you guys are about to start
playing, and the devil says that he'll go first. however, at this point you immediately interject,
and ask if you can go first instead. you make this interjection because you are very smart, and
you know that if you go first, you can guarantee victory. explain how you can guarantee
victory.
--
While recovering from wounds in the American Civil War, a Captain Fox threw needles at a
surface ruled with parallel lines, and was thus able to experimentally infer the value of pi. True
story! To find out exactly how pi plays into this scenario, solve the following problem: A
surface is ruled with parallel lines. The lines are at distance D apart from each other. Suppose
we throw a needle of length L on the surface at random. What is the probability that the
needle will intersect one of the lines?
Note: requires a lot of math. I also don’t know the answer to this one
Author Note 1: A famous problem posed and solved in 1777 by French naturalist Buffon. It has
long since fascinated scientists, and marks the origin of geometrical probability -- the analysis
of geometrical configurations of randomly placed objects.
Author Note 2: These 19th century experiments began development of the Monte Carlo
method, which uses repeated simulation to approximate true statistics.
Author Note 3: This isn't much of a riddle ... more like just an interesting mathematical
exercise. The most challenging part is setting up the problem.
--
Hard Riddles
--
An evil king has 1000 bottles of wine. A neighboring queen plots to kill the bad king, and sends
a servant to poison the wine. The king's guards catch the servant after he has only poisoned
one bottle. The guards don't know which bottle was poisoned, but they do know that the
poison is so potent that even if it was diluted 1,000,000 times, it would still be fatal.
Furthermore, the effects of the poison take one month to surface. The king decides he will get
some of his prisoners in his vast dungeons to drink the wine. Rather than using 1000 prisoners
each assigned to a particular bottle, this king knows that he needs to murder no more than 10
prisoners to figure out what bottle is poisoned, and will still be able to drink the rest of the
wine in 5 weeks time. How does he pull this off?
--
There is a circular jail with 100 cells numbered 1-100. Each cell has an inmate and the door is
locked. One night the jailor gets drunk and starts running around the jail in circles. In his first
round he opens each door. In his second round he visits every 2nd door (2,4,6---) and shuts the
door. In the 3rd round he visits every 3rd door (3,6,9---) and if the door is shut he opens it, if it
is open he shuts it. This continues for 100 rounds (i.e. 4,8,12 ---; 5,10,15 ---; ---; 49,98 etc.) and
exhausted the jailor falls down. How many prisoners found their doors open after 100 rounds?
--
100 prisoners in solitary cells. There's a central living room with two light bulbs. The initial
states of these light bulbs is unknown. No prisoner can see these light bulbs from his or her
own cell. Every now and then, whenever he feels like it, the warden picks a prisoner at
random, and that prisoner enters the central living room. While there, the prisoner can toggle
the bulbs if he or she wishes. Also, the prisoner has the option of asserting the claim that all
100 prisoners have been to the living room. If this assertion is false (that is, some prisoners still
haven't been to the living room), all 100 prisoners will be executed. However, if it is indeed
true, all prisoners are set free. Thus, the assertion should only be made if the prisoner is 100%
certain of its validity.
Before the warden begins this sick game, the prisoners are allowed to get together one night
in the cafeteria to discuss a plan. What plan should they agree on, so that eventually (given
infinite time), someone will make a correct assertion?
More Hard Riddles
--
you have two eggs. you need to figure out how high an egg can fall from a 100 story building
before it breaks. the eggs might break from the first floor, or might even survive a drop from
the 100th floor -- you have no a priori information. what is the largest number of egg drops
you would ever have to do to find the right floor? (i.e. what's the most efficient way to drop
the eggs and determine an answer?) you are allowed to break both eggs, as long as you
identify the correct floor afterwards.
after you've solved the above problem, generalize. define the "break floor" as the lowest floor
in a building from which an egg would break if dropped. given an n story building and a supply
of d eggs, find the strategy which minimizes (in the worst case) the number of experimental
drops required to determine the break floor.
--
A pirate ship captures a treasure of 100 golden coins. The treasure has to be split among the 5
pirates: 1, 2, 3, 4, and 5 in order of rank. The pirates have the following important
characteristics: infinitely smart, bloodthirsty, greedy. Starting with pirate 5 they can make a
proposal how to split up the treasure. This proposal can either be accepted or the pirate is
thrown overboard. A proposal is accepted if and only if a majority (strictly greater than) of the
pirates agrees on it. What proposal should pirate 5 make?
Note: For example, a proposal could be
{Pirate1: 20, Pirate2: 20, Pirate3: 20, Pirate4: 10, Pirate5:30}
--

You might also like