0% found this document useful (0 votes)
512 views53 pages

Easy Probability

The document contains 23 math and logic puzzles ranging from easy to difficult. Some examples include puzzles about dividing a pizza among different numbers of people using a clock, packing boxes within size restrictions, and placing pebbles on a chessboard without forming parallelograms. The puzzles test a variety of skills like combinatorics, geometry, probability, and algorithmic thinking.

Uploaded by

Shantanu Gawande
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
512 views53 pages

Easy Probability

The document contains 23 math and logic puzzles ranging from easy to difficult. Some examples include puzzles about dividing a pizza among different numbers of people using a clock, packing boxes within size restrictions, and placing pebbles on a chessboard without forming parallelograms. The puzzles test a variety of skills like combinatorics, geometry, probability, and algorithmic thinking.

Uploaded by

Shantanu Gawande
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 53

Puzzles

Puzzles (Easy)
1. Problem: Gold Links Puzzle
Lenox R. Lohr, president of the Museum of Science and Industry in Chicago, was kind enough to pass along the
following deceptively simple version of a type of combinatorial problem that turns up in many fields of applied
mathematics. A traveler finds himself in a strange town without funds; he expects a large check to arrive in a few
weeks. His most valuable possession is a gold watch chain of 23 links. To pay for a room he arranges with a landlady
to give her as collateral one link a day for 23 days. Naturally, the traveler wants to damage his watch chain as little as
possible. Instead of giving the landlady a separate link each day he can give her one link the first day, then on the
second day take back the link and give her a chain of two links. On the third day he can give her the single link again
and on the fourth take back all she has and give her a chain of four links. All that matters is that each day she must be
in possession of a number of links that corresponds to the number of days.
The traveler soon realizes that this can be accomplished by cutting the chain in many different ways. The problem is:
What is the smallest number of links the traveler needs to cut to carry out his agreement for the full 23 days?

2. Problem: Dividing Pizza with a Clock


Part I (Easy): Using a clock, divide a pizza among 12 people
Part II (Difficult): Using a clock, divide a pizza among 11 people?
3. Problem: Box in Box problem
Airline check-in baggage has size restriction by 'so-called 'linear dimension: length + breadth + height should not
exceed 62 inches. Prove that you can't "cheat" by packing a box with higher linear dimension into a box with 'lower'
linear dimension.

4. Problem: Fibonacci Multiple Puzzle

Prove that for any positive K and a natural number n, every (n*K)th number in the Fibonacci sequence is a multiple of
the Kth number in the Fibonacci sequence.

More formally, for any natural number n, let F(n) denote Fibonacci number n. That is, F(0) = 0, F(1) = 1, and F(n+2)
= F(n+1) + F(n). Prove that for any positive K and natural n, F(n*K) is a multiple of F(K).
5. Problem: Gold Silver Numbers Puzzle

The integers greater than zero are painted such that:

- every number is either gold or silver.


- both paints are used.
- silver number + gold number = silver number
- silver number * gold number = gold number

Given only this information, for each of the following decide whether it is a gold number, a silver number, or could be
either:

1.) gold number * gold number


2.) gold number + gold number
3.) silver number * silver number
4.) silver number + silver number

6. Problem: Pebble Placement Puzzle 2


Peggy aims to place pebbles on an n x n chessboard in the following way. She must place each pebble at the center of
a square and no two pebbles can be in the same square. To keep it interesting, Peggy makes sure that no four pebbles
form a non-degenerate parallelogram.

What is the maximum number of pebbles Peggy can place on the chessboard?
7. Problem: Pebble Placement Puzzle 1

There are several pebbles placed on an n x n chessboard, such that each pebble is inside a square and no two pebbles
share the same square.

Perry decides to play the following game. At each turn, he moves one of the pebbles to an empty neighboring square.
After a while, Perry notices that every pebble has passed through every square of the chessboard exactly once and has
come back to its original position.

Prove that there was a moment when no pebble was on its original position.

8. Problem: Mad Robot Puzzle

A mad robot sets off towards the North East on a journey from the point (0,0) in a coordinate system. It travels in
stages by moving forward and then rotating on the spot. It follows these pseudo-code instructions:

SUB JOURNEY
DISTANCE = 1000
WHILE (DISTANCE > 0.001)
MOVE DISTANCE
STOP
ROTATE(90, DEGREES, CLOCKWISE)
DISTANCE = DISTANCE / 2
END WHILE
EXPLODE
END SUB

Where does the robot explode?


9. Problem: Cut the Polygon Puzzle - the solution will make you smile
Given the polygons P and Q as shown in the grid below, cut P into two polygons P1 and P2 such that, when pasted
together differently, they form Q.

10. Problem: Value of Pi - Estimation using Dice


Estimate the value of pi using a dice.
11. Problem: (2n choose n) is never a perfect power
Prove that (2n choose n) is never a perfect power

12. Problem: Odd Even Algorithm Puzzle


If you have an array with random odd and even numbers, what is the most efficient algorithm you can think of to put
all even numbers on one side and all odd numbers on the other side in this array? What is the complexity of your
algorithm?
13. Problem: Minimum Point in a Rotated Sorted Array

What is the optimal algorithm to find the minimum element given a rotated sorted array of integers?
A rotated sorted array of integers is the output array of a rotation operation performed on a sorted array.
Eg: 3 5 6 1 2

14. Problem: Math Game of Zero String

You have a string of bits. You scan from right to left.


If you encounter a '1', you have the option to flip it to a 0 or keep it as is.
If you encounter a '0', your adversary has the option to flip it to a 1 or keep it as is.

Your goal is to zero all the bits once you reach the end of a scan (i.e. at the left most bit), whilst you adversary wishes
to prolong the game indefinitely.
We continually re-scan until we reach the aforementioned goal state.
Can you prove that the game will eventually terminate?
15. Problem: Candy Game - Math Puzzle

A group of students are sitting in a circle with the teacher in the center. They all have an even number of candies (not
necessarily equal). When the teacher blows a whistle, each student passes half his candies to the student on his left.
Then the students who have an odd number of candies obtain an extra candy from the teacher.

Show that after a finite number of whistles, all students have the same number of candies.

16. Problem: Penny Roll Puzzle

Roll a penny around another fixed penny in the center with edges in close contact. After moving half circle around the
center penny, you will find the penny in motion has rotated 360 degrees.
Why?
17. Problem: Broken Clock Puzzle

My fancy new digital alarm clock is broken! The time 'jumps' around.

When I reset it, it reads 12:00:00. Then it runs as it should, but after 12:04:15 it resets back to 12:00:00. It counts up
to 12:04:15 again and then it jumps to ... 12:08:32 ! Weird stuff.

Do you know what's wrong with my alarm clock?

18. Problem: Probability Puzzle: Guess Position of Card

Someone hands you a deck of cards which you thoroughly shuffle. Next, you start to deal them, face-up, counting the
cards as you go. "One, Two, Three ..."

The aim is to predict what the count will be when you encounter the second black Ace in the deck.

If you had to select one position before you started to deal, what number would you select that maximizes your chance
of guessing the location of the second black Ace?
19. Problem: Fermat Theorem Puzzle

A computer scientist claims that he proved somehow that the Fermat theorem is correct for the following 3 numbers:

x=2233445566,
y=7788990011,
z=9988776655

He announces these 3 numbers and calls for a press conference where he is going to present the value of N (to show
that

x^N + y^N = z^N

and that the guy from Princeton was wrong). As the press conference starts, a 10-years old boy raises his hand and
says that the respectable scientist has made a mistake and the Fermat theorem cannot hold for those 3 numbers. The
scientist checks his computer calculations and finds a bug.

How did the boy figure out that the scientist was wrong?
20. Problem: Pizza Distribution Puzzle

The king of the universe has decided to play a game. To start, he selects 1 person. He then flips two fair coins - if they
both come up heads, the person gets a free pizza and the game is over. For any other result, he sends the person home
and selects 2 new people, where he does the same 2-coin flip to decide if they each get a pizza. If they don't, he picks
4 people at random, then 8, and so on, doubling each round. If you are selected but don't win, you can't be selected
again, and you can assume the population is extremely large so there's no chance of running out of contestants.

You are sitting at home when you get a call, you have been selected to play the game. What is the chance that you
will get a free pizza?

You don't know which round number it is, but if you ask, the king will tell you. Does it matter?

21. Problem: Multilingual Hedge Fund - Combinatorics Puzzle


A hedge fund has 70 employees. For any two employees X and Y there is a language that X speaks but Y does not,
and there is a language that Y speaks but X does not. At least how many different languages are spoken by the
employees of this hedge fund?
22. Quick Probability Questions for Interviews
1) If cor(a,b)=0.5 and cor(a,c)=0.0, what is the range for cor(b,c)

2) A deck of pokers. Three choices: A: 26 black, 26 Red; B: 13 black, 13 Red; C: random 26 card from the deck. Take
the first two cards, if same color, the win $1, otherwise lose $1. Which deck is best for you if you are playing? Why?

3) What is the probability of a random generator generating 10 consecutive numbers in ascending order (assume it is a
perfect random generator)

23. Problem: Geometry Puzzle: Center of Square in Circle

What is the probability that two uniform random points (to be precise: i.i.d. with respect to Lebesgue measure) in the
square are such that center of the square lies in the circle formed by taking the points as diameter.
24. Problem: Number of 1s

One of the basics of Computer Science is knowing how numbers are represented in 2's complement. Imagine that you
write down all numbers between A and B inclusive in 2's complement representation using 32 bits. How many 1's will
you write down in all ?

Input:
Two integers A and B

Output:
The number of 1s

Constraints:
-2^31 <= A <= B <= 2^31 - 1

Find the asymptotically optimal algorithm.

25. Problem: Hour Glass - Euclid Algorithm


Using only a four-minute hourglass and a seven-minute hourglass, measure exactly nine minutes, without the process
taking longer than nine minutes.

Bonus made-up Question: Can you come up with a generalized solution of the hour glass problem?

Update: (26/12/2012):
Assume that equal amount of sand slipped down measures equal intervals of time, i.e. amount of sand slipped to
measure the first minute is same as the last minute.
26. Problem: Inequality Problem
Prove the following inequality

1/2 . 3/4 . 5/6 . .... 99/100 < 1/10

1/2 . 3/4 . 5/6 . .... (2n-1)/2n < 1 / sqrt(2n)

27. Problem: Arithmetic Puzzle: Broken Calculator

There is a calculator in which all digits(0-9) and the basic arithmetic operators(+,-,*,/) are disabled. However other
scientific functions are operational like exp, log, sin, cos, arctan, etc. The calculator currently displays a 0. Convert
this first to 2 and then to 3.
28. Problem: Maxima Property Subset
At most, how many subsets can you find of the set A = {1, 2, ..., n} such that any two intersect in exactly one
element?

29. Problem: Lion in a Circular Cage Puzzle

A lion and a lion tamer are enclosed within a circular cage. If they move at the same speed but are both restricted by
the cage, can the lion catch the lion tamer? (Represent the cage by a circle, and the lion and lion tamer as two point
masses within it.)
30. Problem: Number Board Puzzle: Sum of Colours

You have a 8x8 square board with numbers in each cell.

Each number is given a colour (red or white) such that each row and each column has exactly the same number of red
number and white numbers (i.e. four). Prove that the sum of 32 red numbers on the board is equal to the sum of the
other 32 white numbers on the board.

31. Problem: Pile Puzzle

You have 55 matches arranged in some number of piles of different sizes. You now do the following operation: pick
one match from each pile, and form a new pile. You repeat this ad infinitum. What is the steady state? Is it unique?

Update (15th Feb 2012):


Clarification:
Assume steady state exists and try to solve the problem.
A much difficult version: Prove that steady state always exists.

32. Problem: Digit Permutation Puzzle

You have a number that consists of 6 different digits. This number multiplied by 2, 3, 4, 5, and 6 yields, in all cases, a
new 6-digit number, which, in all cases, is a permutation of the original 6 different digits. What's the number?
33. Problem: Number of digits in 125^100
How many digits does the number 125^100 have?

34. Problem: Crossing the Road


If a car passes at the crosswalk on average every 10 seconds and you need 20 seconds to pass the road, how long does
it take you on average to cross the road?

Note that since the problem is not very well specified, make reasonable assumptions to solve it. It would be fun if
before solving mathematically, you try and guess a time estimate. :-)
35. Problem: Matrix Saddle Points
An entry aij in a matrix is called a saddle point if it is strictly greater than all the entries in the ith row and strictly
lesser than all entries in the jth column or vice-versa.

What is the maximum number of saddle points an n x n matrix can have?

36. Problem: Linked List Delete


You are given a pointer to a node (not the tail node) in a singly linked list. Delete that node from the linked list. Write
code in C.
37. Problem: Divisibility of 111...1111
Is it true that among the numbers consisting of only "1"s (1; 11; 111; 1111; etc.) there is a number (maybe many) that
is divisible by 572,003?

Here 572,003 is taken arbitrarily. Is it true for all numbers?

38. Problem: Coin Chain Reaction


We have an unlimited number of dice at our disposal. Let's roll the die. If the outcome is 1, 2, or 3, we stop;
otherwise, if it is 4, 5, or 6, a corresponding number of dice are rolled. For example, if the first roll gives 5, then we
roll 5 dice, and so on. This procedure continues for every rolled dice whose outcome is 4, 5, or 6. Let N denote the N-
th round of rolls. What is the total expected value at the end of the N-th round of rolls?

39. Problems:
Football tables have been the basis of many a brainteaser over the years. These two puzzles ask you to work out what
the scores were in all matches played so far this season.

Puzzle 1: Each team played the others once, what were the scores in each match (2 points for a win, 1 for a draw)?
Puzzle 2: The league table below got smudged in the rain, and is only partly legible. Eventually each team will play
the others once, but the tournament isn't over yet. Can you find all the results?
40. Problem: Wrong Solution
I found this cute problem in the Russian book Sharygin Geometry Olympiad by Zaslavsky, Protasov and Sharygin.

Find numbers p and q that satisfy the equation: x2 + px + q = 0

The book asks you to find a mistake in the following solution:

By Vite's formulae we get a system of equations p + q = -p, pq = q.

Solving the system we get two solutions: p = q = 0 and p = 1, q = -2

What is wrong with this solution?

41. Problem: Keynesian beauty contest


Pick a number from 0 to 100. The winner is the person who chooses the number closest to 2/3rds of the group's
average response. What is the rational answer?
42. Problem: Dividing a Plane
Let's say we have a plane. Draw N straight lines on the plane, any way you wish. Try to divide the plane into as
many different regions as possible. How many regions is that? For example, if we draw 1 line on the plane, we can
divide it into two regions. If we draw 2 lines, we can divide it into four regions.

Follow up questions:
Draw N perfect circles on a plane, of any size, anywhere you want. Into how many regions can you divide the plane?
Next, draw N perfect ellipses on another plane. Into how many regions can you divide the plane?

43. Problem: Derangement - Complete FAIL!


There are n men, n hats, one hat belonging to each person. A random permutation of hats is picked by the men. What
is the probability that no person gets the correct hat?
44. Problem: Sum of 2001 powers of digits
Let f be a function which takes a number x (number with say n digits, digit i represented by d_i) as input and outputs
sum of the 2001 powers of the digits. So, f(327)=3^2001 + 2^2001 + 7^2001. Show that for any x, the set {f(x),
f(f(x)), f(f(f(x))),..} is finite.

45. Problem: Water Jug Problem


Suppose that you are given 'n' red and 'n' blue water jugs, all of different shapes and sizes. All red jugs hold different
amounts of water, as do the blue ones. For every red jug, there is a blue jug that holds the same amount of water and
vice versa.

How can you find the grouping of the jugs into pairs of red and blue jugs that hold the same amount of water, in the
minimum number of comparisons.

The only operations allowed is compare between a red and a blue jar (no two reds, no two blues)
46. Problem: Stick Broken Into Three Pieces
Assume a stick is broken at random into three pieces. What is the probability that the pieces can form a triangle?

Solve it in following cases:


Two break points are selected randomly (and distributed uniformly) on the stick.
The stick is first broken into two pieces. The longest (or rather, not the shortest) is then broken into two.
The stick is first broken into two pieces. A piece randomly selected with probability 1/2 is then broken into two.
The stick is first broken into two pieces. A piece randomly selected with the probability proportional to its length is
then broken into two.

47. Problem: Sorted arrays


Easy: Given 2 sorted arrays of size n, give an efficient algorithm to find the kth largest number.
Hard: Given m sorted arrays of size n each, give an efficient algorithm to find the kth largest number.
48. Problem: Coin Tossing - Lucky Dealer
You bet 1$ on a coin toss. A win gives u 1$ gain, a loss gives you a 1$ loss. The guy tossing the coin gets what he
wants 80% of the time. You start with X$. Find strategy so that you always win.

Assumption:
Note that the dealer is just an employee of the casino. You can take him in your group and make an offer he cannot
refuse.

49. Problem: Number of Colour Changes


You are given an urn with 100 balls (50 black and 50 white). You pick balls from urn one by one without
replacements until all the balls are out. A black followed by a white or a white followed by a black is "a colour
change". Calculate the expected number of colour changes if the balls are being picked randomly from the urn.
50. Problem: Two creepers climbing a tree
Two creepers, one jasmine and other rose, are both climbing up and round a cylindrical tree trunk. jasmine twists
clockwise and rose anticlockwise, both start at the same point on the ground. before they reach the first branch of the
tree the jasmine had made 5 complete twists and the rose 3 twists. not counting the bottom and the top, how many
times do they cross?

51. Problem: Equilateral Triangle Division


Draw an equilateral triangle (all sides same length). Divide it into four identical shapes. remove the bottom left hand
shape. now divide the resulting shape into four identical shapes.
52. Problem: Randomized Ice Cream
A vendor is handing out free ice cream cones in alphabetical order of flavor, each cone being a different flavor. Kids
are lined up at the ice cream truck, and you're first in line! The vendor will hand you ice cream cones one at a time,
and you must decide whether to keep the cone or pass it on to the next kid in line. The first cone is guaranteed to be
chocolate.

You like all flavors equally, so you want to randomly select a cone with each flavor having an equal chance of being
chosen. Unfortunately, you don't know the total number of flavors, but being the little hipster that you are, you are
carrying a pocket calculator which can generate random numbers from 1 to X, where X is a value you punch in. How
can you decide which flavor to keep?

53. Problem: Number Games


Its raining outside and Alfonso and Bernadette are bored.
Alfonso suggests the following games:

(a) Two players alternatively erase some 9 numbers from the sequence 1,2,...,101 until only two remain. The player
that starts wins x-54 dollars from the player that plays second. Here x is the difference between the remaining two
numbers. Would you rather be the first or the second player?

(b) Two players alternatively erase one number from the sequence 1,2,...,27 until only two numbers remain. The first
player wins if the sum of these numbers is divisible by 5; otherwise the second player wins. Who has a winning
strategy?
54. Problem: Equal numbers in a circle
A circle is divided into 6 sectors. The numbers 1, 0, 1, 0, 0, 0 are written into the sectors in the counter clock-wise
direction. You may increase any two neighboring numbers by 1. Is it possible to make all of the numbers equal?

55. Problem: Number of Sons


A man has two children. He says one of them is a son. What is the probability that the other one is also a son? (Hint:
Answer is not 0.5 :P)
56. Problem: Mathematics of Housie/Tambola

Ever played housie/tambola? I played housie once every month for 6 good years of my life. Won some prizes. Each
coupon (a ticket with 15 numbers) cost Rs. 10 then. Full Housie was nearly 150 Rs, exact number depending upon the
number of tickets sold.

I played one such game once again after a lapse of 6 years I think. At the end of the game I saw that 76 numbers out of
90 had been cut on the board. I couldn't help but to think what is the expected number of numbers I expect to be
crossed if N (say 100) tickets have been sold. Also, I wanted to find out what is a good number of people who should
be there to play housie. Of course if there are zillions of people, the game would be over in approximately 15 calls. If
there is one person, we expect the game to go on very close to 90 calls. What is the number of people playing the
game so that the expected number of calls would be say 70.

Of course, I played the game in a homely environment where the "dealer" did not keep any money. So, all the money
collected was given back as prizes. Since every person has equal expectation to win, I should expect to get back my
investment.

The questions posed are:


1) What is the expected number of numbers I expect to be crossed if 100 tickets have been sold?
2) What is the number of people playing the game, i.e. the number of tickets sold so that the expected number of
calls would be 70?
57. Problem: City Planning
A man has built three houses. Nearby there are gas water and electric plants. The man wishes to connect all three
houses to each of the gas, water and electricity supplies.

Unfortunately the pipes and cables must not cross each other. How would you connect connect each of the 3 houses to
each of the gas, water and electricityic supplies?

58. Problem: Street Watch


Salt Lake City looks like a rectangle crossed with M streets going from North to South and with N streets going from
East to West. The city is frequently visited by tourists who suppose to run around in the buses. The Utah governor
wants to vigil all moves of the buses. He plans to put policemen at some intersections to watch all the buses moving
on the streets visible from that intersections. What is the minimum number of policemen needed for the bus watch?

59. Paradox:
The paradox imagines that Sleeping Beauty volunteers to undergo the following experiment. On Sunday she is given a
drug that sends her to sleep. A fair coin is then tossed just once in the course of the experiment to determine which
experimental procedure is undertaken. If the coin comes up heads, Beauty is awakened and interviewed on Monday,
and then the experiment ends. If the coin comes up tails, she is awakened and interviewed on Monday, given a second
dose of the sleeping drug, and awakened and interviewed again on Tuesday. The experiment then ends on Tuesday,
without flipping the coin again. The sleeping drug induces a mild amnesia, so that she cannot remember any previous
awakenings during the course of the experiment (if any). During the experiment, she has no access to anything that
would give a clue as to the day of the week. However, she knows all the details of the experiment.

Each interview consists of one question, "What is your credence now for the proposition that our coin landed heads?"

This problem is considered paradoxical because the answer is often given as either 1/3 or 1/2.
60. Unexpectedly Great Expectations
WARNING: THESE ARE THEORETICAL GAMES. Try not to bias yourself by how much YOU value 1000$
compared to how a millionaire values 1000$ (the utility function of money is a constant for all people). Also, we
assume God has infinite amount of money with him, and does not lie when he says he will pay you, so please dont
give arguments like put the money on the table and I will play (replace 1$ by 0.001$ or any such figure if you want
to satisfy yourself practically).

God offer you the option of playing a game, exactly once, against me. This is how the game works. God will toss a
fair coin until a T turns up. The sequence of coins HnT will earn you 2n dollars. More explicitly, a T on the first toss
gives you 1 dollar, a Head followed by a Tail gives you 2, HHT gives you 4, HHHT gives you 8. As soon as the T
turns up, we settle accounts, and leave, never to see each other again. However, there is a constant pre-agreed charge
P you must pay to play this game against me (say 10000 $). Upto what price P are you willing to play this game?

Analysis: The probability of the T is 1/2, of HT is 1/4, of HHT is 1/8 and so on (1/2 * 1/2 * 1/2 as they are
independent events).

Hence your expected value of earnings for this game,

E(earnings)

= P(T).Earnings(T) + P(HT).Earnings(HT) + P(HHT).Earnings(HHT).

= (1/2 * 1) + (1/4 * 2) + (1/8*4) + (1/16*8) + . = 1/2 + 1/2 + 1/2 + 1/2 . = (infinite).

However the 2000th term of this series of halves is highly improbable (1/2^1000). If you believe expected values, you
should be willing to pay any finite amount of money to play this game.

But if you think over it, the probability that you will get at least 1000$ is 0.0005 which is too small. So, you should
not be willing to pay infinite amount of money. Your intuition will not allow you to play with infinite money. Can you
explain the paradox?

61. Problem: 100 Locomotives Problem


A railroad numbers its locomotives in order 1,2,3.. N. One day you see a locomotive and see that its number is 100.
Guess how many locomotives the company has
You have looked at 5 locomotives and the largest number you have seen is 100. Again guess how many locomotives
does the company have?

Update(26/03/10):
This is not an exact question. I need to see various approaches to solve this problem. I see this as a real problem: I saw
some locomotives and then someone asks me - Guess the number of locomotives.
Since I have not provided enough data, all "creative" answers are correct.

62. Problem: Sink the Submarine


An enemy submarine is somewhere on the number line (consider only integers for this problem). It is moving at some
rate (again, integral units per minute). You know neither its position nor its velocity.

You can launch a torpedo each minute at any integer on the number line. If the the submarine is there, you hit it and it
sinks. You have all the time and torpedoes you want. You must sink this enemy sub - devise a strategy that is
guaranteed to eventually hit the enemy sub.
63. Problem:
You have Some Terminal Condition, which necessitates taking two pills a day:
one Pill A and one Pill B. If you neglect to take either pill, you die; if you take more than one A or more than one B,
you die. If you don't take them at exactly the same time, you die.

This morning you are going through your usual routine. You pick up your bottle of A Pills and gently tap one into
your palm. Then you pick up your bottle of B Pills and tap it, but two pills accidentally fall into your hand. You now
hold three pills (one pill of A and two pills of B), you don't know which are which, and they are completely
indistinguishable from each other. The A Pills are the same color as the B Pills, they are the same shape, same size -
they are identical in every respect. Your doctor is charging you $10,000,000 a pill! So you dare not throw any away.

Thus, the puzzle: what can you do to ensure that you take only one A Pill and only one B Pill today, without wasting
any pills (either today or in the future)?

64. Problem: Sweet Heart Mix Tape


Pratik is organizing a mix tape for his sweetheart, Pratiksha. The tape will have her top N songs of all time. Pratik was
going to determine the order of these songs on his own, but then Pratiksha found out about his little project. Being an
obnoxiously demanding woman, she has now given Pratik a price function f which takes a pair of songs [si,sj] as
input, and returns a real number that quantifies exactly how good song sj sounds after song si, in her opinion. (Note
that f([si,sj]) may not be equal to f([sj,si]).)

Write an O(n^2*2^n) algorithm for Pratik that will determine a song order which maximizes the total transition
goodness of the mix tape. (If the maximum is not achieved, Pratik will be dumped. :()
65. Problem: Drunk Guests
A very large number, N, of people arrive at a convention. There are exactly N single rooms in the hotel where the
convention takes place. Each guest is given a numbered key for a specific room. Before they even go upstairs, they are
all invited to a large party in the banquet hall. To gain admittance to the hall, they have to give up their keys to a
doorman. At the end of the evening, the guests are not sober enough to recall their room numbers, so the doorman
simply hands out the keys randomly. Each guest ends up spending the night in a random room.

What is the probability that at least one guest ends up in a room he or she was originally assigned?
What is the expected number of guests who end up in a room in which they were originally assigned?

66. Problem: Pebble Piles


You are given three piles with 5, 49 and 51 pebbles respectively. Two operations are allowed:
(a) merge two piles together or
(b) divide a pile with an even number of pebbles into two equal piles.

Is there a sequence of operations that would result in 105 piles with one pebble each?
67. Problem: IBM Ponder This January 2010 Puzzle
Present a computation whose result is 5, being a composition of commonly used mathematical functions and field
operators (anything from simple addition to hyperbolic arc-tangent functions will do), but using only two constants,
both of them 2.
It is too easy to do it using round, floor, or ceiling functions, so we do not allow them.

68. Problem: Brave Warrior


In a land far away, there is a village threatened by an hundred-headed beast. This beast can only be killed by cutting of
all the hundred heads. Legend says that any brave warrior can cut off exactly 10, 20, 30 or 40 heads at one time.
However, with each of these, 40, 2, 60 and 4 new heads appear respectively.
The village has lost several brave warriors against this beast. Can you save the village from this beast?
69. Problem: Give and Take
Two people, Give and Take, divide a pile of one hundred coins between themselves as follows. Give chooses a
handful of coins from the pile and Take decides who will get them. This is repeated until all coins have been taken or
until one of them has taken nine handfuls. In the latter case, the other person is allowed to take all of the remaining
coins in the pile. What is the largest number of coins that Give can be sure of getting?

70. Problem: Dont roll more


I will roll a single die not more than three times. You can stop me immediately after the first roll, or immediately after
the second, or you can wait for the third. I will pay you the same number of dollars as there are dots on the single
upturned face on my last roll (roll number three unless you stop me sooner). What is your playing strategy?

71. Problem:

Suppose N mothers live in a city. Half of them have one child and half of them have two children. That means that an
average mother has 1.5 children.
Suppose we pick the sexual orientation of every child by rolling dice. Let's assume that a child has a 10% probability
of being homosexual.
The number of mothers with one child who is homosexual is 0.05N. The number of mothers with two children both of
them homosexual is 0.005N. The number of mothers with two children with only the first child homosexual is
0.045N, which is the same as the number of mothers of two children with only the second child homosexual. The total
number of mothers who have two children with at least one of them homosexual is 0.095N.

Let's calculate the average fertility of a mother with at least one homosexual child. It is (1*0.05N + 2*0.095N)/(0.05N
+ 0.095N) = 0.24/0.145 = 1.66. The resulting number , 1.66 , is much bigger than 1.5, the average number of children
for a mother.

This means there is a correlation between homosexuality and the fertility of mothers. This suggests that there is a gay
gene which at the same time is responsible for female fertility.
But the model is completely random , there can't be any correlation.
Where is the mistake?
72. Problem: Chessboard Circle
A chessboard has squares that are two inches on the side. What is the radius of the largest circle that can be drawn on
the board in such a way that the circle's circumference is entirely on black squares?

73. Problem: Finding a hermit


There are five holes arranged in a line. A hermit hides in one of them. Each night, the hermit moves to a different
hole, either the neighboring hole on the left or the neighboring hole on the right. Once a day, you get to inspect one
hole of your choice. How do you make sure you eventually find the hermit?
74. Problem: Gaadi chalao
A set of fuel dumps on a circular racetrack have just enough gasoline for one car to make one round trip. Prove that
there exists a fuel dump from which one car, starting with an empty gas tank, can complete the round trip.

75. Problem:
You have hired a worker to clean your garage. The wage is a gold bar (which has 7 parts like a chocolate bar) for a
weeks work. However, you don't want to give the complete bar in the start. You want to pay the person 1 part for each
day of his work. So at the end of first day he should have 1 part, at the end of second day 1 part more (a total of 2
parts), third day 1 part more (3 parts total)...at the end of the week all 7 parts. What is the minimum number of pieces
that you should break the gold bar in to pay the worker?

Update: As pointed by Ramdas, this question is not very well framed. There are a few assumptions that you need to
make. :)
76. Problem:
Suppose you have a hotel which has one floor with infinite number of rooms in a row and all of them are occupied. A
new customer wants to check in, how will you accommodate her? What if infinite number of people want to check in,
how will you accommodate them then?

Hint: Define infinity. :)

77. Problem: Weird Number Sequence

What comes next? 1, 11, 21, 1211, 11122 ...


78. Problem: Expected Number of HH
A coin is tossed 10 times and the output written as a string. What is the expected number of HH? Note that in HHH,
number of HH = 2

Example: In 3 tosses
HHH (2 HH)
HHT (1 HH)
HTH (0 HH)
HTT (0 HH)
THH (1 HH)
THT (0 HH)
TTH (0 HH)
TTT (0 HH)
Expected number of HH in 3 tosses = 2/8 + 1/8 + 1/8 = 0.5

79. Three question related to stick breaking. A stick is of length 1.

1) The stick drops and breaks at a random point distributed uniformly across the length. What is the expected length
of the smaller part?
2) In the above experiment, what is the expected length of the larger part?
3) In the third experiment, the stick is dropped and breaks at two points. What is the probability that the three pieces
could form a triangle?
80. Problem:
We have a cube. An ant is on one of the corners. It moves randomly with equal probability in all the three directions.
What is the expected number of steps to reach the opposite corner.

Note that the probability of the ant reaching the opposite corner in 2 steps is 0, in 3 steps is 6/27, in 4 steps is 0 and so
on..

81. Problem:
Suppose two players are playing a game where we call integers. The first person who calls 50 wins. The rules are that
the first person calls a number between 1 and 10. After that any new number that is called must exceed the last
number by at least one and no more than by 10. For example: If the last number called is 15, then the next number that
is called must be between 16-25.
I give you the first mover advantage, devise a strategy to win.
82. Problem:
Given an array of n numbers. Finding minimum takes n-1 comparisons. Finding maximum takes n-1 comparisons. If
you had to simultaneously find both minimum and maximum, can you do it in less than 2n-2 comparisons?

83. Problem:
I write two different numbers in the range [a,b], one on each hand. You choose one of my hands at random, I show
you the number on that hand. You now guess whether the number you've seen is larger than the number you haven't
seen.

Find a strategy for guessing such that, no matter what two numbers I write, you have GREATER THAN a 50%
chance of being correct.
84. HC Verma Problem:
Four bugs are on the corners of a 1 meter square. Each bug always faces the next bug (on the next clockwise corner).
If they all walk forward at the same speed until they meet, how far does each bug travel?

85. Problem:
You can go to a fast food restaurant to buy chicken nuggets in 6-pack, 9-pack or 20-packs. is there such a number N,
such that for all numbers bigger than or equal to N, you can buy that number of chicken nuggets?
86. Google interview question:
There is an array A[N] of N integers. You have to compose an array B[N] such that B[i] will be equal to the product
of all the elements of A[] except A[i].

B[i] = (product from j = 1 to N, j not equal to i) A[i]

Example:
Input:[4, 3, 2, 1, 2]
Output:[12, 16, 24, 48, 24]

Solve it without division operator and in O(n).

87. Problem:
There are 100 coins on the table out of which 50 are tail-face up and 50 are head face up. You are blind folded and
there is no way to determine which side is up by rubbing, etc. You have to divide the 100 coins in two equal halves
such that both have equal number of coins with tails face up. (This obviously implies that the two have equal number
of coins with heads face up)

Second part: There are 100 coins on the table out of which 10 are tail-face up and 90 are head face up. You are blind
folded and there is no way to determine which side is up by rubbing, etc. You have to divide the 100 coins in two
halves (not necessarily equal) such that both have equal number of coins with tails face up.
88. IBM puzzle:
Complete the following sequence:
1, 13, 2, 1, 5, 3, 2, 1, 4, 4, 7, 3, 1, 5, 3, 5, ?, ?

Hint: The solution is related to a quote about mathematicians.


You can do it only if you know it. Thinking does not really help!! :)

89. Problem:
You are the ruler of a medieval empire and you are about to have a celebration tomorrow. The celebration is the most
important party you have ever hosted. You've got 1024 bottles of wine you were planning to open for the celebration,
but you find out that one of them is poisoned.

The poison exhibits no symptoms until death. Death occurs within ten to twenty hours after consuming even the
minutest amount of poison.
You have over a thousand slaves at your disposal and just under 24 hours to determine which single bottle is
poisoned.
You have a handful of prisoners about to be executed, and it would mar your celebration to have anyone else killed.
What is the smallest number of prisoners you must have to drink from the bottles to be absolutely sure to find the
poisoned bottle within 24 hours?
90. Another hat puzzle:
A teacher puts on 10 hats of either red or blue on 10 students. Each one can see the hats on all other 9 students, but not
his own. The teacher tells them that at least one of the hat is blue. The teacher asks each one to write down the color
of his hat if he's sure about it, or he can write down "don't know" if he can't deduce its color. Everyone reveals their
answer at the same time and all of them write "don't know". The second day, they gather again and the teacher puts on
the same hats. Each one has to think about the color of his hat again. This time, still no one can figure out his hat color
(i.e. everyone writes down "don't know"). This game repeats in the same way on third day, fourth day, ..., until the
ninth day. Still no one figures out. However, on the tenth day, everyone writes down the correct color of his hat. So
explain what happened? And what's the color they wrote down? Assume throughout the 10 days, those students do not
communicate with each other. And also assume everyone is smart and knows everyone else is smart, and so on.

91. Problem: See a car


If the probability of observing a car on a highway in 20 minutes time is 609/625 then what is the probability of
observing a car in 5 minutes time on the same highway (considering all the factors involved to be uniform)?
92. Problem:
Roll a die, and you get paid what the dice shows. if you want, but you don't have to, you can roll the die again and get
paid what the second roll shows instead of the first. What is the expected value?

93. Problem:
When six dice are rolled, the number of different numbers which can appear range from 1 to 6. Suppose that once
every minute, the croupier rolls six dice and you bet $1, at even odds, that the number of different numbers which
appear will be exactly 4.

If you start with $10, roughly how long will it be, on average before you are wiped out?
94. Puzzle:
An evil troll once captured a bunch of gnomes and told them, "Tomorrow, I will make you stand in a file, one behind
the other, ordered by height such that the tallest gnome can see everybody in front of him. I will place either a white
cap or a black cap on each head. Then, starting from the tallest, each gnome has to declare aloud what he thinks the
color of his own cap is. In the end, those who were correct will be spared; others will be eaten, silently." The gnomes
set thinking and came up with a strategy. How many of them survived?

95. Problem:
In a country, where people only want boys, every family continues to have children until they have a boy. If they have
a girl, they have another child. If they have a boy, they stop. Who will be more in the country (boys or girls)?
Intuitively, I and many of my friends thought it to be boys. Which seems fine as the society favours boys. But
calculation shows that they would be equal. How? Suppose there are N couples. Note that each couple would have
exactly one boy. So, no. of boys born is equal to N. Counting the no. of girls. N/2 parents would have no girl child.
N/4 would have exactly 1 girl child, N/8 would have exactly two girl children, N/16 would have exactly 3 girl
children and so on... So, Expected no. of girls from N couples would be S: S = 1*N/4 + 2*N/8 + 3*N/16 + 4*N/32 +
..........

2S = N/2 + 2*N/4 + 3*N/8 + 4*N/16 + 5*N/32 + .............

So, S = N/2 + N/4 + N/8 + N/16 + .....

S = N So, Expected no. of boys = Expected no. of girls. Equal sex ratio.:)

You might also like