Você está na página 1de 85

False Proof 2 = 0

2=1+1
2 = 1 + (1)
2 = 1 + (-1 * -1)
2 = 1 + (-1)(-1)
2 = 1 + i(i)
2 = 1 + i2
2 = 1 + (-1)
2=0
The mistake is between lines 3 and 4.

(-1 * -1) (-1)(-1)

This is a misapplication of the product rule for square roots. The product rule is guaranteed
to work only when both values are positive.

If x, y 0, then
(xy) = (x)(y)

When x = y = -1, the product rule may not apply, and as demonstrated, it is not a valid step
because it leads to the conclusion that 2 = 0.

When you learn a property in math class, make sure to pay attention to the specific
conditions when it applies. If you dont you could end up with an absurd result like 2 = 0!

So how are we supposed to simplify a square root of a negative number? It is actually a


mistake to use the product rule (which KhanAcademy teaches):
(-52) = (-1)(52) = i (52)

This is a mistake! You should not use the product rule unless both terms are positive
although in this case you do get the correct answer.

The correct way is that we define the square root of negative numbers as follows (see page
529 in here):
If b is a real number greater than 0 , then
(-b) = i b

So the correct way to find the answer is by definition:

(-52) = i (52)
You might think this is a nit-picking distinction as the KhanAcademy method gets to the
correct answer. But remember that the process matters in mathit is not about getting the
correct answer, its about getting the correct answer by the correct method.

The Steps to Egyptian Method / Russian Peasant Multiplication

To multiply numbers X and Y, the steps are.

1. Divide X in half repeatedly, ignoring remainders, until you


get to 1.

2. Correspondingly double Y repeatedly, writing each new


value in a row next to the halved X values.

3. Cross out the rows where the halved X values have an


even number.

4. Add up the remaining numbers in the Y column.

For example, to calculate 13 x 24, the first step is to divide 13 in half, ignoring remainders.
So we get the following table.

13
6
3
1

The next step is to double the values of 24.

13 24
6 48
3 96
1 192

Now we remove any rows starting with an even number. The only row in this example is the
one that starts with the number 6.
13 24
6 48
3 96
1 192

Finally we add up the remaining numbers in the second column. Adding up 24, 96, and 192
gets the result of 312. And in fact, 13 x 24 = 312.

Now we explore why this works.

Detailed Example of Egyptian Method / Russian Peasant Multiplication

To understand what is going on, we will go through the mechanics of why this method
works. Since we are dividing numbers in half, and doubling numbers, it is natural that we
consider how the numbers work in binary, or base 2 arithmetic.

Lets consider the example of 13 x 24 in detail. First, lets express 13 as the sum of powers of
2. By testing out some possibilities, you can figure out that 13 is equal to 8 + 4 + 1.

Now we can re-write these terms as powers of 2. Namely we have 1 = 2 0, 4 = 22, and 8 = 23.
So we can write out the following.

13 = 8 + 4 + 1

13 = 23 + 22 + 20

In our summation we have powers of 0, 2, and 3, and we are skipping the power of 1, which
is 21 = 2. This means we have 0 terms of 21. Let us write this missing term in our formula.

13 = 23 + 22 + (0)21 + 20

Now lets emphasize we have 1 term of 23, 22, and 20 each.

13 = (1)23 + (1)22 + (0)21 + (1)20

The bolded coefficients are the binary representation of 13. That is, 13 = 1101.

What happens when we multiply 13 by 24? Lets multiply both sides by 24.

13 x 24 = [(1)23 + (1)22 + (0)21 + (1)20] x 24


We can distribute the term 24 to get the following.

13 x 24 = 24(1)23 + 24(1)22 + 24(0)21 + 24(1)20

Lets reverse the terms on the right side.

13 x 24 = 24(1)20 + 24(0)21 + 24(1)22 + 24(1)23

Now lets write each term of the right-hand side in a table.

1 24(20)
0 24(21)
1 24(22)
1 24(23)

The terms in the right-hand column are found by doubling 24 repeatedlyas each time we are
multiplying by 2. So thats why we repeatedly double the numbers in the right hand column.

Lets add back in the terms for 13 when we repeatedly half it.

1 13 24(20)
0 6 24(21)
1 3 24(22)
1 1 24(23)

This table explains what is going on. Dividing 13 in half repeatedly gets us the binary
representation. The even numbers exactly correspond to the 0 terms, which we cross out and
do not add.

1 13 24
0 6 48
1 3 96
1 1 192

This explains why the specific problem works. Well prove the method formally in the last
part of this post.

Proof of Egyptian Method / Russian Peasant Multiplication

Lets multiply X by Y.
First write X in binary, X = ci 2i

When we multiply by Y, we have the following.

XY = ( ci 2i)Y

XY = Y c0 20 + + Y ck 2k

In other words, XY is equal to the sum of Y times powers of 2. The terms ci are either 1 or 0,
and only the non-zero terms contribute something to the final sum.

If X is odd, then c0 = 1. If X is even, then c0 = 0. In other words, we retain the first row of
our table if and only if X is odd.

Dividing X in half, we get

X/2 = c1 + (c2 21 + + ck 2k 1) + c0/2

The term c0/2 is a remainder in this process that we will discard. So we have

X/2 remainder = c1 + (c2 21 + + ck 2k 1)

Notice that c1 = 1 if and only if X/2 remainder is odd, and it will be equal to 0 if and only if
X/2 remainder is even. In other words, we should retain the second row if and only if X/2
remainder is odd.

If we divide in half once again and ignore the remainder, we can recover the term c2, which
will be 1 if and only if that term is odd. We can continue dividing in half to recover more
terms of the binary expression of X.

Putting it all together, we have:

1. Dividing X in half repeatedly, ignoring the remainder, gives the coefficients for the binary
expression of X.

2. Multiplying the binary expression of X yields a sum of Y times powers of 2. We only need
to add the non-zero terms, which correspond to the halved terms of X that are odd.

Since the large circle has a diameter of 84, its radius is 42. As a small circle spans half the
large circle, its diameter is 42, so its radius is 21.
The area of the large circle is (42)2 = 1764 5541.769.

Method 1: large square

This approach is great because it avoids the overlapping circular portions entirely. The idea is
to draw the diameters of the small circles to form a square.

The area that is removed is equal to the area of the square, whose length is 42, and the area of
4 semi-circles, each with radius 21.
The removed area is therefore:

(area square) + 4(area semi-circle)


422 + 4(212)/2
422 + 2(212)
1764 + 882
4534.885

This amount is subtracted from the area of the large circle, so the answer is:

1764 (1764 + 882)


882 1764
1006.885

Method 2: smaller square

Another approach is to draw a square between the centers of two adjacent circles to their
intersection points to get a square with a side 21.
Let us focus on the geometry of a single square and shade the area between the quarter-
circles.

The area of the square equals the area of the 2 quarter-circles minus their overlapping area.
In other words, the area of the overlapping area is equal to the area of the 2 quarter-circles
minus the area of the square. The overlapping area is then:

(2 quarter-circles) (area square)


2(212)/4 212
220.5 441

Now return to the original problem


The area removed is equal to the area of the 4 smaller squares minus the area of the 4
overlapping regions. As the area of a single overlapping region was just calculated, the area
removed is therefore:

(4 small circles) (4 overlapping regions)


4(212) 4(220.5 441)
1764 (882 1764)
1764 + 882

Once again, this amount is subtracted from the area of the large circle, so the answer is:

1764 (1764 + 882)


882 1764
1006.885

Method 3: triangle and semicircle

Draw an isosceles right triangle in one of the small semi-circles as follows:

The area between the semi-circle and the triangle is 2 halves which together form the
overlapping region between two of the small circles.

This area is then:

(area semi-circle) (area triangle)


(212)/2 (42)(21)/2
220.5 441
Knowing the area of a single overlapping region, we can proceed as in method 2.

In the original problem, the area removed is 4 circles minus the 4 overlapping regions:

(4 small circles) (4 overlapping regions)


4(212) 4(220.5 441)
1764 (882 1764)
1764 + 882

Once again, this amount is subtracted from the area of the large circle, so the answer is:

1764 (1764 + 882)


882 1764
1006.885

Credit for methods 1 and 3

The ratio of the length of a rectangle to its breadth is 5 : 1. Given that the area of the rectangle is 125 cm 2,
find its perimeter.

Solution:
From the model,

Area of one unit = 125 5 = 25cm2

B B = 25 = 5 5

The breadth of the rectangle = 5 cm

The length of the rectangle = 5 5 = 25cm

The perimeter of the rectangle = 5 6 2 = 60cm

Alternative solution:

The length (L) is 5 times the breadth (B)

Area = Length Breadth

5B B = 125

B B = 25

B = 5cm

L = 5 5 = 25cm

Perimeter = 2 30 = 60cm

Martin is a gardener in Mathland. There are 100 poisonous flowers in his garden that he
wants to destroy. On their own, the flowers do not change in number.

Martin has a spray to kill the poisonous flowers, but the spray works in a specific way. The
spray has settings to destroy exactly 3, 5, 14, or 17 flowers instantly. The spray only works if
there are at least as many flowers as the setting (if there are 15 flowers, for example,
attempting to destroy 17 flowers does nothing).

Furthermore, if at least one flower survives after he sprays them, the flowers grow back
instantly depending on how many died. After 3 flowers die, 12 grow back; after 5 die, 17
grow back; after 14 die, 8 grow back; and after 17 die, 2 grow back.

If the number of flowers is ever zero, then the flowers never grow back. Can Martin ever kill
all the poisonous flowers in his garden? Assume he has an unlimited amount of spray.

Martin will not be able to kill all of the poisonous flowers.

We can understand why by thinking from the end. In order that Martin can kill all the
flowers, the number of flowers has to be 3, 5, 14, or 17 before applying the spray. As there
are 100 flowers to start, this would require the number of flowers to decrease by 97, 95, 86,
or 83 from the initial amount.

Is this possible? Consider the net change for each amount of spraying flower killer:

If Martin sprays to kill 3 flowers, then 12 flowers grow back. This is a net of +9 flowers.

If Martin sprays to kill 5 flowers, then 17 flowers grow back. This is a net of +12 flowers.

If Martin sprays to kill 14 flowers, then 8 flowers grow back. This is a net of -6 flowers.

If Martin sprays to kill 17 flowers, then 2 flowers grow back. This is a net of -15 flowers.

In each of these cases (+9, +12, -6, -15), the number of flowers is changed by a multiple of 3.

This means from the initial 100 flowers, the number of flowers is then increased or decreased
by a multiple of 3. Therefore, the number of flowers can never be decreased by 97 (which is
1 more than a multiple of 3), 95 (which is 2 more than a multiple of 3), 86 (which is 2 more
than a multiple of 3), or 83 (which is 2 more than a multiple of 3).

Here is an alternate explanation. The initial number of flowers is 100 1 (mod 3). After each
spray, Martin changes the number of flowers by a multiple of 3, so the number of flowers left
is always equal to 1 (mod 3). In order to kill all the flowers, Martin needs to have 3, 5, 14, or
17 flowers left. But 3 0 (mod 3) and 5 4 17 2 (mod 3), so its never possible to attain
these numbers of flowers as Martin always has a number of flowers equal to 1 (mod 3).

Martin will never be rid of the poisonous flowers.


Answer To The Secret Word Logic Puzzle
At first, there are six choices for the secret word.

cat
dog
has
max
dim
tag

Here is the frequency of each letter in the words:

c1
a4
t2
d2
o1
g2
h1
s1
m2
x1
i1

When asked, Albert replies that he knows the word. This means Albert was given a letter that
is unique to a single wordthe letter appears only once in the list. Albert must have been
given the one of the letters c (cat), o (dog), h or s (has), x (max), or i (dim). This means the
word could not be tag.

Upon hearing Alberts answer, Bernard knows the word could not be tag, and his letter is not
one of those given to Albert. Because Bernard indicates he knows the word, he must have
received a unique identifier from the remaining words and the letters not given to Albert. The
letter could be t (cat), g (dog), or h (if Albert got s in has) or s (if Albert got h in has). The
letter could not be a because a is in multiple words (cat, has, max, tag) and the letter also
could not be m (max and dim). This eliminates the words max and dim. The possible words
are cat, dog, and has.

Upon hearing Alberts and then Bernards answers, Cheryl is also able to deduce the word.
This means she received a unique letter from the three remaining words cat, dog, and has.
And she got a the letter from the letters not given to Albert or Bernard. As the letter a in in
both cat and has, she could not have gotten a. This eliminates the words cat and has. The
only remaining possibility is dog.
Therefore the secret word is dog. Albert received the letter o, Bernard the letter g, and Cheryl
the letter d.

I adapted this problem from the puzzle Yes, Yes, Yes in The Great Book of Mind Teasers &
Mind Puzzlers by George J. Summers. The puzzle has the same setup with a list of five
words.

The length of one leg in a right triangle is equal to 1/5 the sum of the
other two sides. The triangle has a perimeter of 1. What is the area of the
triangle?

I came up with two ways to solve this problem. One method is to set up equations and work
methodically.

Let the triangle have legs a and b and hypotenuse c. One leg is equal to 1/5 the sum of the
other two sides, so we have:

a = (b + c)/5
5a = b + c

Then, because the perimeter is equal to 1, we have:


a+b+c=1
a + (b + c) = 1
a + 5a = 1
a = 1/6

Substituting this value into the perimeter equation, we get:

a+b+c=1
c = 1 b 1/6
c = 5/6 b

Now we use the Pythagorean Theorem:

a2 + b2 = c2

1/36 + b2 = (5/6 b)2

1/36 + b2 = 25/36 (10/6) + b2

(10/6)b = 24/36

b = 2/5

The area of the triangle is then ab/2 = (1/6)(2/5)/2 = 1/30.

Method 2

There is another way to solve the problem that is much faster.

If you know some of the common right triangles (also known as primitive Pythagorean
triples), then you might remember the 5-12-13 right triangle has the same property that one
of its legs is 1/5 the sum of the other two: 5 = (12 + 13)/5.

You can guess, or prove, that the 5-12-13 triangle is similar to the triangle in the problem. As
its perimeter is 30, the triangle with perimeter 1 has lengths that are 1/30 of the 5-12-13
triangle, so its area will be proportional by (1/30) 2 = 1/900.

As the 5-12-13 triangle has an area of (5)(12)/2 = 30, the triangle with perimeter 1 has an
area of 30/900 = 1/30.

Generalization
What if one side has a length that is 1/2 the sum of the other sides and its perimeter is 1what
is the triangles area? You might recall the triple 3-4-5 in which 4 = (3 + 5)/2. The triangles
area is 3(4)/2 = 6 and its perimeter is 12. The triangle with perimeter 1 would then have an
area scaled by 1/122, so its area is then 6/144 = 1/24.

What if one side is equal to 1/n the sum of the other two sides, for a valid value of n? If the
triangles perimeter is equal to 1, we can solve for the area as follows.

a = (b + c)/n
na = b + c

Then, because the perimeter is equal to 1, we have:

a+b+c=1
a + (b + c) = 1
a + na = 1
a = 1/(n + 1)

Substituting this value into the perimeter equation, we get:

a+b+c=1
c = 1 b 1/(n + 1)
c = n/(n + 1) b

Now we use the Pythagorean Theorem:

a2 + b2 = c2

1/(n + 1)2 + b2 = (n/(n + 1) b)2

Simplifying, we end up with:

b = (n 1)/(2n)

The area of the triangle is then ab/2 = (n 1)/(4n2 + 4n).

If the triangles perimeter was equal to some other value, say k, then you could go through
the same exercise. Ultimately you would find that:

a = k/(n + 1)
b = k(n 1)/(2n)
Notice the sides are scaled by k compared to the triangle with perimeter 1. So this triangle is
similar to the one with perimeter 1, and its area is also scaled by k2.

Area = k2(n 1)/(4n2 + 4n)

Another proof of similarity

Consider a right triangles in which one side is 1/n the sum of the other two sides, for a
suitable value of n:

a = (b + c)/n

By the Pythagorean theorem:

a2 + b2 = c2

Now we have:

((b + c)/n)2 + b2 = c2

Now we multiply both sides by n2 and treat the expression as a quadratic polynomial in b:

b2(n2 + 1) + b(2c) + c2(1 n2) = 0

Now we use the quadratic formula to get

A child spent $100.00 to get 100 toy animals. The child bought at least one cat, one fish, and
one bird, and did not buy any other toys. If a cat costs $10.00, a fish costs $3.00, and a bird
costs $0.50, how many of each toy did the child buy?

Let c be the number of cats, f the number of fish, and b the number of birds. Because there
are 100 toys in total, we get one equation:

c + f + b = 100

Furthermore, the child spent $100, and each cat costs $10, each fish cost $3, and each bird
costs $0.50. This leads to another equation:

10c + 3f + (0.5)b = 100


From the first equation, we can solve for the number of birds:

b = 100 c f

We can substitute this into the second equation regarding the total money spent.

10c + 3f + (0.5)(100 c f) = 100


9.5c + 2.5f + 50 = 100
19c + 5f = 100

We now solve for the number of fish.

f = 20 c(19/5)

Now we know the number of each animal is a positive whole number. The number of cats
must therefore be a multiple of 5 to cancel with the denominator of its factor 19/5.

Furthermore, in order that f > 0, we must have:

0 > 20 c(19/5)
100/19 5.26 > c

The number of cats is a positive number, a multiple of 5, and less than 100/19. There is only
one possible value that works, c = 5.

Then, from the equation f = 20 c(19/5), we have f = 1.

As the total number of animals is 100, that means the number of birds has to be 94.

Thus there is a unique solution: c = 5, f = 1, and b = 94.

How smart are you? A guy walks into a store and steals a $100 bill from the register without
the owners knowledge.

He then buys $70 worth of goods using the $100 bill and the owner gives $30 in change.

How much money did the owner lose?

$30, $70, $100, $130, $170, or $200?


The best answer from the choices is the owner lost $100. The $100 bill that was stolen was
then given back to the owner. What the owner loses is the $70 worth of goods and the $30 in
change, which makes for a total of $70 + $30 = $100. The owner has lost $100.

Technically, the owner lost $30 plus the value, V, of the $70 of goods. Since stores typically
sell goods at a markup, the value may be less than $70. But in the case of a loss leader, the
owner may have lost more than $70.

Another strategy to solve the problem is to break it down into two stores.

Story A
A guy walks into a store and steals a $100 bill from the register without the owners
knowledge.

How much money did the owner lose? Clearly the answer is $100. The owner is a net -100.

Story B
He buys $70 worth of goods using a $100 bill and the owner gives $30 in change.

How much money did the owner lose? The owner did not lose any money, this is a routine
transaction! If the goods are valued at V, the owner is a net +100 V 30 = 70 V.

The story in the riddle is the sum of the two stories. This means the owners position is the
sum of the position in those two stories. The owner is a net -100 + (70 V) = -30 V. That
is, the owner lost $30 plus the value of the goods. If the goods are valued at $70, then the
owner lost $100.

Misconceptions

Many people think the answer is 200 dollars. It seems like the owner had $100 stolen, and
then had another $100 stolen in the second story. But remember the thief also paid using the
$100 bill, so the owner actually gets back $100. The owners loss is $100.

Some people think $130 because the owner lost a $100 bill and then gave $30 in change. But
remember the owner also received a $100 bill, and also gave away $70 in goods. Adding up
all the transactions leads to the owner losing $100.

The other incorrect responses are misunderstandings of a similar sort where people are not
sure which numbers to add or subtract, or they are not taking into account all parts of the
story.
It may help to view the two parts as separate stories and then add them up. The fact the thief
paid with the stolen $100 bill seems to be another source of confusion. It does not matter the
$100 was stolen; it only matters that the bill was genuine currency.

A horse is tied to an outside corner of a 20 foot by 10 foot rectangular barn. What is the
maximum area the horse can graze outside, if the rope has length L? Solve for L = 5 feet
and L = 25 feet, and find the exact answer. If you are up for a challenge, solve for L = 50
feet. You can solve for the answer to 3 decimal places. The horse can only move outside of
the barn and not through the barn.:

In a right triangle, the hypotenuse is longer than either leg and all sides are positive values.
So we reject the solution b = c and instead have that:

b = c(n2 1)/(n2 + 1)

This means the ratio b/c is equal to (n2 1)/(n2 + 1), and that only depends on the value of n.

Therefore, any triangle with the property (that one leg is 1/n of the sum of the other two) has
the same ratio of its other leg to its hypotenuse, and so all such right triangles are similar.

Source: I received a similar problem, from a New York competition, by email from a math
teacher Jake.
A horse is tied to an outside corner of a 20 foot by 10 foot rectangular
barn. What is the maximum area the horse can graze outside, if the rope
has length L? Solve for L = 5 feet and L = 25 feet, and find the exact
answer. If you are up for a challenge, solve for L = 50 feet. You can solve
for the answer to 3 decimal places. The horse can only move outside of
the barn and not through the barn.

If the rope has L = 5 feet, then the horse can graze the area of 3/4 of a circle with radius 5.

The horse can graze an area (3/4)(52) = 75/4 58.905 square feet.

If the rope has L = 25 feet, then the horse can graze the area of 3/4 of a circle with radius 25.
But along the 10 foot wall, there is also 15 feet of rope left over. The horse can then graze an
extra 1/4 circle with a radius of 15 feet. Similarly, along the 20 foot wall, the horse can also
graze an extra 1/4 circle with a radius of 5 feet.
The horse can graze an area equal to the sum of these shapes. The horse can therefore graze
an area (1/4)[3(252) + (152) + (52)] = 2125/4 1668.971 square feet.

The case of L = 50 feet is more complicated. The horse can graze 3/4 of a circle with a radius
of 50. Along the 10 foot wall, the rope has an extra 40 feet, so the horse can reach an extra
1/4 circle with a radius of 40. And along the 20 foot wall, the rope has an extra 30 feet, so the
horse can reach an extra 1/4 circle with a radius of 30. But the extra 1/4 circles overlap which
makes the problem much harder to solve.
I will present two ways to solve for the area. One method is to use calculus to solve for the
overlapping area directly. The other method is to use trigonometry to dissect the area into
non-overlapping shapes.

Calculus approach to L = 50

If we add up the areas of the 1/4 circles, we would be double-counting the area of the region
where the circles overlap. If we can solve for the area of the overlap, we could subtract that
out.

grazing area = (area of 3/4 circle radius 50) + (area of 1/4 circle radius 40) + (area of 1/4
circle radius 30) (overlap of 1/4 circles)

What is the area of the overlapping regions?

We can put a coordinate system and then set up integrals. The origin is placed at the left
corner where the barn intersects the circle with a radius of 40. We then have one circle with a
radius of 40 centered at the origin, and we have another circle with a radius of 30 centered at
(20, -10). We can write equations for the y values of these circles (we only care about the
semi-circles above the centers of the circles, so we can disregard the negative square roots):

x2 + y2 = 402
y = (1600 x2)

(x 20)2 + (y + 10)2 = 302


y = -10 + (900 (x 20)2)
We can set the equations for these curves equal to each other, and we can solve that they
intersect at x = 24 + 411.

We now focus on only the overlapping region to illustrate the overlap is the sum of two
definite integrals.

We have solved the overlapping region is approximately 341.77937.

We can now go back and solve for the total grazing area:

grazing area = (area of 3/4 circle radius 50) + (area of 1/4 circle radius 40) + (area of 1/4
circle radius 30) (overlap of 1/4 circles)

grazing area = (/4)[3(50)2 + 402 + 302] (341.77937)

grazing area = 2500 (341.77937) 7512.202


Trigonometry approach to L = 50

The problem can also be solved without calculus, although there are more steps. The key
insight is to connect the point of intersection between the circles to opposite corners of the
barn.

This creates a kite-like shaped quadrilateral. Above the kite-like shaped quadrilateral is a
circular sector from the circle with radius 40. And below the quadrilateral is another circular
sector from the circle with radius 30. We can solve for the angles of these circular sectors and
then solve for their areas.
In other words, we can solve for the total area by adding up the areas of 3 non-overlapping
shapes.

First we solve for the quadrilateral area. Lets add 1/2 of the rectangular barn to make a large
triangle. The diagonal of the rectangular barn is 105 because it is the hypotenuse of a right
triangle with legs 10 and 20. The large triangle has sides of 40 and 30 corresponding to the
radii of the circles. The area of the large triangle can then be found using Herons formula.
And the area of 1/2 the barn is also readily calculated.

We have found the quadrilateral has an area of 10011 100.

Now we need to find the angles for the circular sectors. We can use trigonometry.

We can find the angles of 1/2 of the barn readily using the inverse cosine of an adjacent leg
over the hypotenuse. Then we calculate the angles of the large triangle using the law of
cosines.
The angle of a circular sector with 40 is found by subtracting the upper angle from the right
triangle and the angle from the large triangle opposite the side equal to 30. The angle of a
circular sector with 30 is found by subtracting the lower right angle from the right triangle
and the angle from the large triangle opposite the side equal to 40.

We can use those angles to calculate the area of the circular sectors, which then leads to the
total area of the region.

This region has an area of approximately 1621.716. We add that to the 3/4 circle with a
radius of 50 to get the total grazing area.

grazing area = (3/4)(50)2 + 1621.716 7512.202

We again get to the same answer without using calculus.


Sources
Math StackExchange
http://math.stackexchange.com/questions/1942222/a-goat-tied-to-a-
corner-of-a-rectangle

Sketch of trigonometry approach


http://mathcentral.uregina.ca/QQ/database/QQ.09.08/h/misty1.htm

First convert the letters so G = 11, B = 6, S = 23, P = 20.

Most people thought about making the numbers in the two diagonals have the same sum.
This means 11 + 6 + 23 = ? + 6 + 20, so then 40 = ? + 26, and so ? = 14, which converts into
the letter J.

In front of you are 3 boxes. One box contains only apples, another box contains only
oranges, and the last contains both apples and oranges.

Currently the first box has the label apples, the second oranges, and the third apples and
oranges. Unfortunately all of the labels are wrong. Your job is to fix the labels.

You are not allowed to peek inside any of the boxes. But you can ask for a sample from any
box. You point to a box, and you get a fruit from that box.

What is the minimum number of samples you need to label all of the boxes correctly?

There are 3 choices for the first box, 2 choices for the second, and 1 choice for the last. In
total there are 3(2)(1) = 6 total ways to label the boxes. These can be enumerated as:

box 3
box 1 box 2 (apples and
(apples) (oranges) oranges)
apples oranges apples and oranges
apples and
apples oranges oranges
oranges apples apples and oranges
apples and
oranges oranges apples
apples and
oranges apples oranges
apples and
oranges oranges apples
Of these 6 possible ways, only the rows (oranges, apples and oranges, apples) and (apples
and oranges, apples, oranges) correspond to all of the labels being wrong. A permutation
where all the elements are in the wrong spot is known as a derangement. We have
encountered those before and calculated the formula for the number of derangements in
a previous puzzle.
If we pick from box 1 or box 2, we could be picking from a single fruit box or a box with
both fruits.

If we pick from box 3, it must have a single fruit. The sample provides exactly enough
information to distinguish between the two cases and label all of the boxes correctly.

A man buys a horse for $60. He sells it for $70.

He then buys the horse back for $80. And he sells the horse for $90.

In the end, how much money did the man make or lose? Or did he break even?

Many people are unable to figure out the correct answer. Can you? Watch the video for a
solution.

20 rupees gain
A statistician keeps a simple wardrobe. He only purchases pairs of black socks and white
socks, and he keeps all of the socks in a pile in the drawer.

Recently one of the socks was lost in the laundry, resulting in a mathematical property. If you
select two socks at random from the drawer, the socks will match in color exactly 50% of the
time.

The statistician owns more than 200 socks but less than 250 socks, and there are more black
socks than white socks.

How many socks of each color are there? And which color sock was lost in the laundry?

Lets write b for the number of black socks and w for the number of white socks.

How many ways are there to get a pair of matching socks?


In order to select two black socks, there are b socks for the first draw, and then b 1 socks
available for the second draw (there is one less because a black sock was already drawn).

Matching pair of black socks


b(b 1)

Similarly, the number of ways to get a pair of white socks is:

Matching pair of white socks


w(w 1)

If the two socks do not match, then you either drew a white sock followed by a black sock, or
vice versa.

Unmatched pair of socks


wb
bw

The number of ways to get a pair of matching socks is the sum of the ways to get a pair of
black socks and white socks.

Matching pair of socks


b(b 1) + w(w 1)

The number of ways to end up with a mismatched pair is the sum of the two possible ways to
get an unmatched pair:

Mismatched pair of socks


wb + bw = 2bw

If you draw a pair of socks, half the time you get a matching pair and half the time you get a
mismatched pair. So the number of ways to get a matching pair equals the number of ways to
get a mismatched pair.

b(b 1) + w(w 1) = 2bw

Now we can simplify the above expression:

b(b 1) + w(w 1) = 2bw

b2 b + w2 w = 2bw
b2 2bw + w2 = b + w

(b w)2 = b + w

The total number of socks is b + w. This has to be equal to a number between 200 and 250.
Furthermore, we have deduced this number has to be a perfect square, since (b w)2 is a
perfect square.

The only perfect square between 200 and 250 is 152 = 225.

Therefore:

b + w = 225
(b w)2 = 152

b + w = 225
b w = 15

We can add the two equations to get:

2b = 240
b = 120

We then solve to find w = 105.

As the socks were originally purchased in pairs, the missing sock corresponds to the color
with an odd number of socks. The color of the missing sock is therefore white.

A servant has a method to steal wine. He removes 3 cups from a barrel of wine and replaces
it with 3 cups of water. The next day he wants more wine, so he does the same thing: he
removes 3 cups from the same barrel (now with diluted wine) and replaces it with 3 cups of
water. The following day he repeats this one more time, so he has drawn 3 times from the
same barrel and has poured back 9 cups of water. At this point the barrel is 50% wine and
50% water.

Suppose the barrel started with x cups of wine. We will keep track of how much wine is in
the barrel and the concentration of wine in the barrel. Initially the barrel has x cups of wine
and it is 100% wine (a concentration of 1).

Wine Amount (starting), Wine Concentration (starting)


x, 1
The servant first takes 3 cups of wine and replaces them with water. The amount of wine left
is x 3, and the concentration is the amount of wine, x 3, divided by the total volume of
liquid, which is x.

Wine Amount (step 1), Wine Concentration (step 1)


x 3, (x 3)/x

x 3, 1 3/x

The servant then removes 3 cups from the barrel, and each cup contains a concentration 1
3/x of wine. The amount of wine left is x 3 3(1 3/x)/x, and the concentration is the
amount of wine, x 3 3(1 3/x)/x, divided by the total volume of liquid, which is x.

Wine Amount (step 2), Wine Concentration (step 2)


x 3 3(1 3/x), (x 3 3(x 3)/x)/x

x 6 + 9/x, (x 6 + 9/x)/x

x 6 + 9/x, (1 3/x)2

The servant finally removes 3 more cups from the barrel, and each cup contains a
concentration (1 3/x)2 of wine. The amount of wine left is x 6 + 9/x 3(1 3/x)2, and the
concentration is the amount of wine divided by the total volume of liquid, which is x.

Wine Amount (step 3), Wine Concentration (step 3)


x 6 + 9/x 3(1 3/x)2, (x 6 + 9/x 3(1 3/x)2)/x

x 9 + 27/x 27/x2, (x 9 + 27/x 27/x2)/x

x 9 + 27/x 27/x2, (1 3/x)3

The final concentration should be equal to 50%, or 1/2.

(1 3/x)3 = 1/2

(1 3/x) = 1/21/3

21/3x 3(21/3) = x

x(21/3 1) = 3(21/3)
x = 3(21/3)/(21/3 1) 14.54

Thus the original barrel contained approximately 14.5 cups of wine.

There is a shortcut to solving this problem! You can save many steps by noticing the
concentration is 1 3/x after the first step.

Wine Amount (step 1), Wine Concentration (step 1)


x 3, 1 3/x

The subsequent steps iterate the same process of removing 3 cups and then diluting the wine
with water. Accordingly, the wine is diluted by the same percentage in each step. To find the
new concentration, multiply by the factor 1 3/x.

Wine Concentration (step 2)


(1 3/x)2

Wine Amount (step 3), Wine Concentration (step 3)


(1 3/x)3

Now we can set the concentration equal to 1/2 and find the answer as before.

In this sentence, the number of occurrences


of the digit 0 is __,
of the digit 1 is __,
of the digit 2 is __,
of the digit 3 is __,
of the digit 4 is __,
of the digit 5 is __,
of the digit 6 is __,
of the digit 7 is __,
of the digit 8 is __, and
of the digit 9 is __.

The challenge is to fill in the blanks with numerical digits (1, 2, etc.) so that the sentence is
true.

The answers can be found by experimentation. To start, each of the digits appears at least
once, so fill in 1 for every line (except the digit 1 which is left blank at the moment).
TEST CASE 1
In this sentence, the number of occurrences
of the digit 0 is 1,
of the digit 1 is __,
of the digit 2 is 1,
of the digit 3 is 1,
of the digit 4 is 1,
of the digit 5 is 1,
of the digit 6 is 1,
of the digit 7 is 1,
of the digit 8 is 1, and
of the digit 9 is 1.

How many times does the digit 1 occur? The sentence already contains 10 occurrences of the
digit 1, so let us try that value.

TEST CASE 2
In this sentence, the number of occurrences
of the digit 0 is 1,
of the digit 1 is 10,
of the digit 2 is 1,
of the digit 3 is 1,
of the digit 4 is 1,
of the digit 5 is 1,
of the digit 6 is 1,
of the digit 7 is 1,
of the digit 8 is 1, and
of the digit 9 is 1.

This sentence is false, however, because the digit 1 appears 11 times in total (including the
1 in the number 10.). We can try to adjust the sentence to 11 occurrences of the digit 1.

TEST CASE 3
In this sentence, the number of occurrences
of the digit 0 is 1,
of the digit 1 is 11,
of the digit 2 is 1,
of the digit 3 is 1,
of the digit 4 is 1,
of the digit 5 is 1,
of the digit 6 is 1,
of the digit 7 is 1,
of the digit 8 is 1, and
of the digit 9 is 1.

But now this sentence is also false because it contains 12 occurrences of the digit 1 (the
number 11 adds another 1 to the count). If we increase the count to 12, then the
occurrences of the digit 2 would increase to 2, thereby reducing one of the occurrences of the
digit 1. So lets try keeping the occurrences of the digit 1 as 11, and increasing the
occurrences of the digit 2 to be 2.

TEST CASE 4 = Solution One


In this sentence, the number of occurrences
of the digit 0 is 1,
of the digit 1 is 11,
of the digit 2 is 2,
of the digit 3 is 1,
of the digit 4 is 1,
of the digit 5 is 1,
of the digit 6 is 1,
of the digit 7 is 1,
of the digit 8 is 1, and
of the digit 9 is 1.

This sentence is true and is the first solution to the puzzle. The digit 1 occurs 11 times, the
digit 2 occurs 2 times, and every other digit occurs 1 time.

But theres another solution this problem too! Let us adjust the above solution by considering
if the digit 1 only has 9 occurrences to avoid having a double-digit number.

TEST CASE A
In this sentence, the number of occurrences
of the digit 0 is 1,
of the digit 1 is 9,
of the digit 2 is 2,
of the digit 3 is 1,
of the digit 4 is 1,
of the digit 5 is 1,
of the digit 6 is 1,
of the digit 7 is 1,
of the digit 8 is 1, and
of the digit 9 is 1.

The sentence if false because there are 2 occurrences of the digit 9. If the digit 9 occurs 2
times, then that means the digit 2 has to occur 3 times total. And that also means the digit 3
occurs 2 times.

TEST CASE B
In this sentence, the number of occurrences
of the digit 0 is 1,
of the digit 1 is 9,
of the digit 2 is 3,
of the digit 3 is 2,
of the digit 4 is 1,
of the digit 5 is 1,
of the digit 6 is 1,
of the digit 7 is 1,
of the digit 8 is 1, and
of the digit 9 is 2.

This sentence is false; now there are only 7 occurrences of the digit 1. To fix the sentence, we
can swap the occurrences of the digits 7 and 9. That is, write that the digit 7 occurs 2 times,
and write that the digit 9 occurs 1 time.

TEST CASE C = Solution Two


In this sentence, the number of occurrences
of the digit 0 is 1,
of the digit 1 is 7,
of the digit 2 is 3,
of the digit 3 is 2,
of the digit 4 is 1,
of the digit 5 is 1,
of the digit 6 is 1,
of the digit 7 is 2,
of the digit 8 is 1, and
of the digit 9 is 1.

This sentence is true and it is the second solution. It is in fact the unique solution if all the
digits occur less than 10 times.
On the morning of January 1, a hospital nursery has 3 boys and some number of girls. That
night, a woman gives birth to a child, and the child is placed in the nursery.

On January 2, a statistician conducts a survey and selects a child at random from the nursery
(including the newborn and every child from January 1). The child is a boy.

What is the probability the child born on January 1 was a boy? There are 2 solutions. Can
you find them?

The problem leaves the number of girls unspecified. We can try a sample calculation with 3
girls to match the 3 boys to get started.

There is a 50% chance the child born is a boy. In that case there will be 3 girls and 4 boys.
The conditional probability of selecting a boy will be 4/7. Multiplying by 50% gives a 2/7
chance of selecting a boy and having a boy born.

There is also a 50% chance the child born is a girl. In that case there will be 4 girls and 3
boys. The conditional probability of selecting a boy will be 3/7. Multiplying by 50% gives a
1.5/7 chance of selecting a boy and having a girl born.

The probability of selecting a boy is the sum of the previous two probabilities: it is (2 +
1.5)/7 = 3.5/7. This answer makes sense: there will be 3 or 4 boys, so on average there will
be 3.5 boys. This is divided by 7 total children.

What is the probability the newborn is a boy? There is a 2/7 chance of a boy and selecting a
boy, divided by the total 3.5/7 chance of selecting a boy. This results in a probability of (2/7)/
(3.5/7) = 4/7 57.1%.
The chance of the newborn being a boy, given a boy was randomly selected, is therefore 4/7,
which is larger than 50%.

In fact, this turns out to be true regardless of the number of girls in the nursery.

General case

Let g be the number of girls in the nursery.

If the child born is a boy, there will be g girls, 4 boys, and a total of g + 4 children. The
probability of randomly selecting a boy on January 2 would then be the number of boys
divided by the number of children:

4/(g + 4), (if newborn is a boy, 50% chance)

As there is a 50% chance the child is a boy, we can multiply by 50% to get the probability of
selecting a boy if the newborn is a boy.

Pr(select B and newborn B) = 2/(g + 4)

If the child born is a girl, then there will be g + 1 girls, 3 boys, and a total of g + 4 children.
The probability of randomly selecting a boy on January 2 would then be the number of boys
divided by the number of children:

3/(g + 4) (if newborn is a girl, 50% chance)


As there is a 50% chance the child is a girl (G), we can multiply by 50% to get the
probability of selecting a boy (B) if the newborn is a girl.

Pr(select G and newborn B) = 1.5/(g + 4)

What is the probability that the statistician randomly selected a boy? This is the sum of the
two probabilities computed above:

Pr(select B) = Pr(select B and newborn B) + Pr(select B and newborn G)


= 2/(g + 4) + 1.5/(g + 4)
= 3.5/(g + 4)

Again, this makes sense. There are either 3 or 4 boys the next day, so there are 3.5 boys on
average, divided by the guaranteed total of 7 children.

Now we calculate the proportion of times the newborn was a boy to the proportion of times
the statistician picked a boy, Pr(newborn B | select B). This is the ratio of Pr(select B and
newborn B) to Pr(select B):

Pr(newborn B | select B)
= Pr(select B and newborn B)/Pr(select B)
= [2/(g + 4)]/[3.5/(g + 4)]
= 2/3.5
= 4/7

Notice the term g + 4 nicely cancels outsurprisingly the probability does not depend on the
number of girls in the nursery!

The child born therefore has a 4/7 57.1% chance of being a boy.

What would happen if the nursery started with b boys?


By similar calculation:

Pr(select B and newborn B) = 0.5(b + 1)/(b + g + 1)


Pr(select B and newborn G) = 0.5(b)/(b + g + 1)
Pr(select B) = (b + 0.5)/(b + g + 1)

So we have

Pr(newborn B | select B)
= Pr(select B and newborn B)/Pr(select B)
= (b + 1)/(2b + 1)

As b increases, the probability of a newborn boy gets closer to the limiting value of 1/2.
When b = 50, for example, the probability is 50.5%, which is very close to the unconditional
50% probability that the newborn is a boy.

Here we go again, another order of operations problem. This equation has been shared
on Twitter and Facebook and many people are confused about the correct answer.

7+77+777=

In the following video I explain the answer and present two different ways to simplify the
expression.

The correct answer is 50.


One way to see this is to translate the expression 7 + 7 7 + 7 7 7 = into a situation about
money.

The expression begins with 7, so you start out with $7.

The next part is + 7 7. This means you get a 1/7 share of $7. Since a 1/7 share of $7 is
$1, that means you get $1. At this point you have $7 + $1 = $8.

The next part is + 7 7. This means you get $7 more, repeated 7 times. Since a $7 times 7
is $49, that means you get $49 in total. At this point you have $8 + $49 = $57.

The last part is - 7. That means $7 is taken away from you. You subtract $7, so you end up
with $57 $7 = $50.

The correct answer is therefore 50.

The expression can also be simplified by the order of operations, often remembered by the
acronyms PEMDAS/BODMAS.

First evaluate Parentheses/Brackets, then evaluate Exponents/Orders, then


evaluate Multiplication-Division, and finally evaluate Addition-Subtraction.

The expression 7 + 7 7 + 7 7 7 has no parentheses or exponents, so we evaluate


multiplication and division.

77=1
7 7 = 49

This means

7+77+777
= 7 + 1 + 49 7

Now we can evaluate the addition and the subtraction from left to right.

= 8 + 49 7
= 57 7
= 50

This problem appeared on the admissions test to Harvard in 1869:


A man bought a watch, a chain, and a locket for $216. The watch and locket together cost
three times as much as the chain, and the chain and locket together cost half as much as the
watch. What was the price of each? Can you figure it out?

Let the prices of the items be denoted w for watch, c for chain, and l for locket.

Altogether the cost is $216:

w + c + l = 216

The watch and locket cost 3 times the chain.

w + l = 3c

And the chain and locket cost half as much as the watch. In other words, two chains and two
lockets would cost as much as the watch.

c + l = w/2
2c + 2l = w

We have a system of 3 equations:

(I) w + c + l = 216
(II) w + l = 3c
(III) 2c + 2l = w

Equation II indicates the value of the sum of the watch and the locket is 3 chains. This can be
substituted into the first equation, which also has the sum of the watch and the chain. This
leads to:

3c + c = 216
4c = 216
c = 54

Now we substitute the value of the chain into equations II and III.

w + l = 3c = 3(54) = 162
2c + 2l = w
108 + 2l = w

We can substitute w = 108 + 2l into the equation equaling 162 to get:

(108 + 2l) + l = 162


108 + 3l = 162
3l = 54
l = 18

We now have to solve for the price of the watch. We know the chain is 54 and the locket is
18. Since all three add up to 216, we can solve:

w + c + l = 216
w + 54 + 18 = 216
w = 144

We have solved for the price of each item, where each value is in dollars:

w = 144
l = 18
c = 54
I first approached the problem by considering the area of a quarter circle and then subtracting
out shapes in order to find the area of the shaded region.
The answer is 32 64.
But there is a much more elegant solution! The key is considering the diagonal of the 33
grid. The upper region can be rotated about the center to join with the lower region. The
resulting shape is a segment of a quarter circle that has a segment of a smaller quarter circle
removed.

The area of a segment of a quarter circle is the area of a quarter circle minus the area of an
isosceles right triangle. If the radius r, the area is r2/4 r2/2.

The larger circular segment has radius 12, and the smaller one has radius 4. So we can
calculate the area:
We get to the answer 32 64 in a much more direct manner.

Which of the statements in this list of 10 are false? The line n states there are exactly n false
statements in the list.

#1. Exactly 1 of the statements in this list is false.


#2. Exactly 2 of the statements in this list are false.
#3. Exactly 3 of the statements in this list are false.
#4. Exactly 4 of the statements in this list are false.
#5. Exactly 5 of the statements in this list are false.
#6. Exactly 6 of the statements in this list are false.
#7. Exactly 7 of the statements in this list are false.
#8. Exactly 8 of the statements in this list are false.
#9. Exactly 9 of the statements in this list are false.
#10. Exactly 10 of the statements in this list are false.

How many are false, if line n reads that at least n items are false?

In the first problem, line n states that exactly n statements are true.

#1. Exactly 1 of the statements in this list is false.


#2. Exactly 2 of the statements in this list are false.
#3. Exactly 3 of the statements in this list are false.
#4. Exactly 4 of the statements in this list are false.
#5. Exactly 5 of the statements in this list are false.
#6. Exactly 6 of the statements in this list are false.
#7. Exactly 7 of the statements in this list are false.
#8. Exactly 8 of the statements in this list are false.
#9. Exactly 9 of the statements in this list are false.
#10. Exactly 10 of the statements in this list are false.

Suppose #10 is true. This implies all statements are false, including #10. This is a
contradiction, so #10 must be false. At least 1 of the statements has to be false.

Can 2 of the statements be true simultaneously? The answer is no because the statements are
mutually exclusive. It is not possible to have exactly x statements and exactly y statements be
true for x y. Therefore, at most 1 of the statements is true.

If 1 statement is true, then 9 statements are false.


This is what #9 states. If #9 is true, and all the other statements are false, there will be
exactly 9 false statements and 1 true statement.

Therefore statement #9 is true and statements 1-8 and 10 are false.

Part 2: at least

Now we ask: how many are false, if line n reads that at least n items are false?

#1. At least 1 of the statements in this list is false.


#2. At least 2 of the statements in this list are false.
#3. At least 3 of the statements in this list are false.
#4. At least 4 of the statements in this list are false.
#5. At least 5 of the statements in this list are false.
#6. At least 6 of the statements in this list are false.
#7. At least 7 of the statements in this list are false.
#8. At least 8 of the statements in this list are false.
#9. At least 9 of the statements in this list are false.
#10. At least 10 of the statements in this list are false.

Suppose #10 is true. This would imply all 10 statements are false, including #10, which is a
contradiction. So at least 1 statement has to be false, meaning statement #1 is true.

Now suppose #9 is true. Since statement #1 is true, that means all other statements (#2 to
#10) have to be false, which contradicts that #9 is true. Therefore #9 has to be false, so there
are at least 2 false statements. Hence statements #1 and #2 are true.

We can similarly reason that statements #8, #7, and #6 cannot be true, which implies #3, #4,
and #5 are true, respectively. There must be at least 5 false statements and statements #1 to
#5 have to be true.

This leaves the candidate that there are 5 false statements (#6 to #10) and there are 5 true
statements (#1 to #5).

This works without contradiction. There are 5 false statements (#6 to #10) and 5 true
statements (#1 to #5).

The perpendicular dropped from the vertex of the right angle upon the hypotenuse divides it
into two segments of 9 and 16 feet respectively. Find the lengths of the perpendicular, and
the two legs of the triangle.
Can you figure it out?

Here is a diagram that illustrates the given information.

There are many similar triangles in the figure. The triangle CDA is similar to ADB. This
means the ratio of the shorter leg to longer leg of each triangle is constant, so we have:

CD/AD = AD/BD
9/p = p/16
9(16) = p2
144 = p2
p = 12 (exclude the negative root)

We now need to figure out the legs AC and AB.


We could use the Pythagorean Theorem to solve for the remaining lengths, which are the
hypotenuses of the smaller triangles. But we can solve for it even faster by noticing each
triangle is similar to the 3-4-5 right triangle.

Notice the triangle ADC has two legs 9 and 12, which are triple the legs of 3 and 4 in a 3-4-5
right triangle. The hypotenuse must also be triple the length, so it is 15.

Similarly the triangle ADB has legs 12 and 16, which are four times the legs of 3 and 4 in a
3-4-5 right triangle. The hypotenuse must also be four times the length, so it is 20.
This riddle was posted to Facebook with the claim that only one in a thousand will figure it
out.

1+4=5
2 + 5 = 12
3 + 6 = 21
8 + 11 = ?

What do you think the answer is?

1+4=5
5 + 2 + 5 = 12
12 + 3 + 6 = 21

The game starts on January 1. Each of two players takes turns calling out another date. The
new date has to be a later date in the year with either the same month OR the same day (from
January 1, a player can call out a later day in January or another month with the day 1 like
February 1, March 1, etc.).

The person who calls out December 31 wins the game.


1/20 (first turn)
2/21
3/22
4/23
5/24
6/25
7/26
8/27
9/28
10/29
11/30
12/31

The pattern is:

day = month + 19

In a group of 6 people, you might find that some people are friends with each other on
Facebook, or you might find that no one is friends with each other on Facebook. There are
many combinations for how people can be friends or not.

Show that there is always a group of 3 people in which either:

All 3 people are mutual friends on Facebook.


All 3 people are mutual strangers (no one is friends on Facebook).

Consider 1 person. That person is friends with 0, 1, 2, 3, 4, or 5 people, which pairs with not
being friends with 5, 4, 3, 2, 1, or 0 people.

In every single case, either the person is friends with 3 or more people, or the person
is not friends with 3 or more people.

Consider the first case of 3 or more friends and take 3 of those friends. If any of those are
friends with each other, then that forms a group of 3 people who are mutual friends. If none
of them are friends with each other, then that is a group of 3 people who are mutual strangers
where no one is friends on Facebook.

The other case is similar. Suppose the person is not friends with 3 or more people and take 3
of those people. If any of those 3 people are not friends with each other, then that forms a
group of 3 people who are mutual strangers. If all of them are friends with each other, then
that is a group of 3 people who are mutual friends.

In every possible case, there is always a group of 3 people who are mutual friends or a group
of 3 people who are mutual strangers.

The problem can also be visualized. Each person can be represented as a vertex of a graph.
Draw a blue line between two vertices if the two people are friends, and a red line if the two
people are not friends. No matter how the graph is colored, there will always be a
monochromatic triangleeither a red triangle or a blue triangle. The video illustrates the
proof using the colored graph.

On a successful mission, each spy obtains a unique secret. The n spies need to share all their
secrets with each other, which they accomplish through a series of phone calls between 2
spies at a time. During a call, a spy can share all the secrets the spy knows, including secrets
learned from previous calls.

What is the minimum number of phone calls needed so every spy learns all of the secrets?
Solve the problem for the following two specifications of phone calls.

a) Each phone call is a 1-way call. Only the spy that makes the call can share secret
information to the spy on the receiving end.

b) Each phone call is a 2-way call. Both spies can share their secret information with each
other.

*Warning: it is very difficult to prove minimality for case b).

I will present the answer first and then justify why these are minimal procedures in the proof
section later.

I will label the spies with letters in alphabetical order (A, B, C, etc.). I will write XY to
indicate a 1-way call from X to Y, so spy X shares information to spy Y. I will write XY to
indicate a 2-way call between spies X and Y where both spies exchange information.

Here is an optimal procedure for 1-way calls. Call one of the spies the the hub. All of the
other spies call the hub (n 1 calls), and then the hub calls everyone back (n 1 calls). If spy
A is the hub, for example, the calling procedure with 3 spies would be BA, CA, AB,
AC with the calls in that order.

For n spies, there are 2n 2 calls made:

1-way calls
2 for 2 spies
4 for 3 spies
6 for 4 spies
2n 2 for n 5 spies

The minimum number of 1-way calls is 2n 2.

There can be other minimal methods too. Consider a circular pattern of calls. Imagine
arranging the spies in a circle in alphabetical order. The spies first make a clockwise chain of
calls starting and ending with A, which is n calls. At this point the last spy and spy A are fully
informed. Now spy A starts a clockwise chain of calls which ends two calls before spy A;
this is n 2 calls.
For example, with 4 spies the procedure would be AB, BC, CD, DA for the first
clockwise chain (4 calls), and then AB, BC for the second clockwise chain (2 calls).
This greedy algorithm has the advantage that the first call shares 1 secret, the second call
shares 2 secrets, and so on until n secrets, so each call shares a maximum number of secrets.
This method also requires n + (n 2) = 2n 2 calls.

With 2-way calls, you might expect that about half the number of calls are needed because
both spies can share information during a call. Surprisingly this is not the case! With 2-way
calls you can only save 2 calls, and the minimum number of calls is 2n 4.

For 2 spies, only 1 call is needed: AB. For 3 spies, 3 calls are needed: AB, BC, CA.
For 4 spies, 4 calls are needed: AB, CD, AC, BD. The pattern for 4 spies is
particularly important. The graph shows the pattern and the number on each edge indicates
the order of the call.

For 5 or more spies, the pattern can be generalized by adding 2 calls. The new spy calls A, B,
C, or D at the beginning, and then the new spy gets a call from A, B, C, or D at the end. For
example with spy A, the new spy calls A at the beginning, and the new spy calls A at the end.
In this way the new spy shares information with A (which then gets shared with all other
spies), and then A calls back at the end (so the new spies learns all the other secrets too). For
5 spies, for example, the calling pattern results in 6 calls: AE, AB, CD, AC, BD,
AE.

The pattern continues like this, and we have the result:

2-way calls
1 for 2 spies
3 for 3 spies
4 for 4 spies
2n 4 for n 5 spies

With 2-way calls, the efficient procedures for n > 4 have the following pattern. Designate 4
spies as hubs A, B, C, and D. Each of the other n 4 spies calls one of the hubs. Then the 4
hubs share information in the square pattern for the case n = 4, which takes 4 calls. Finally,
each of the n 4 spies receives a call from exactly one hub spy. The total number of calls is
(n 4) + 4 + (n 4) = 2n 4, and this is the minimum number of calls. The key to the
procedure is that 4 hub spies can share information efficiently in 4 calls. The general pattern
looks like the following graph (here only spy B is being called by all other spies):

This is the least number of calls needed with 2-way calls. Now compare the result with 1-
way calls.

The surprising part is that sharing information is a fairly inefficient process! Although 2-way
calls allow for twice the information exchange as 1-way calls, they only reduce the total
number of calls by 2. The process of sharing secrets is not much better than everyone calling
the hub, and then the hub calling everyone back.

The proofs that these formulas are minimal appear below.

Video with proofs

You can watch the proofs.

Spies Sharing Secrets Proof Minimum Number Calls

Or keep reading.

Proof for 1-way calls


For 1-way calls, each new spy adds on a minimum of 2 callsone to share the secret and one
to learn other secrets. From the base cases where 2n 2 calls are necessary, it is intuitive that
you need 2 more calls for each spy, hence the formula 2n 2 makes sense.

Why is this minimal? The proof comes from Harary and Schwenk in 1974. Consider any n
2 calls. It is impossible for any spy to be fully informed, as fully informing a single spy
requires the transmission of n 1 secrets in n 1 calls. After n 2 calls, it is possible that
each subsequent call could fully inform 1 spy. To inform n spies means n additional calls.
Therefore the minimum number of calls is (n 2) + n = 2n 2. The protocols of calling the
hub and calling circularly do acheive this lower bound, and therefore they are minimal.

Proof for 2-way calls

For 2-way calls, it is not possible to get fewer than 2n 4 calls when n 4. The formal proof
involves many steps. The reason is that if you assume you could make fewer calls to inform
everyone, that would force a specific condition on the calling procedure. The defining
condition is that no spy can share his secret and then have that secret shared back to himself.
This condition then leads to the conclusion, after a series of logical deductions, that each spy
has to make at least 5 calls. This means the total number of 2-way calls is at least 5n/2 > 2n,
which is more than 2n 4 calls. To summarize: assuming fewer than 2n 4 calls are possible
leads to contradiction that more than 2n calls are needed. This proves that 2n 4 is a lower
bound on the calls needed. The procedure to call 4 hub spies above acheives this lower
bound, so this is the theoretical minimal number of calls required.

This proof method is due to Brenda Baker and Robert Shostak Gossips and Telephones
in Discrete Mathematics Volume 2 (1972), 191193. There are other proofs of this problem;
see the references at the end.

Assume that 2n 4 is not the minimal number of calls for some n > 4. Let m be the smallest
value, so that at most 2m 5 calls are sufficient. The m spies call each other in some
procedure.

Claim (NOHOI): The procedure obeys the principle that no one hears their own information
(NOHOI) from another person. That is, no spy shares a secret and then has that secret told
back to them by another person. If the calling procedure is drawn as an ordered graph (the
spies are vertices and the edge number equals order of the call), then NOHOI means that
there is no closed walk of edges in increasing order.

(Side note: the optimal method with 2n 4 calls does not obey NOHOIa spy calls the hub,
and then the hub calls back, so that spy hears his own information.)
Proof (NOHOI): This is a proof by contradiction. If the procedure does not obey NOHOI, we
will show we can share secrets with m 1 spies in fewer than 2(m 1) 4 calls. This would
be a contradiction because m is defined as the smallest value for which spies can share
secrets in at most 2m 5 calls.

Suppose there is a closed walk of edges in increasing order starting and ending with spy X.
This is a sequence of calls XS1, S1S2, , SkX. If there are other people that call X,
denote those calls by the grouped sets E0, E1, , Ek+1, where Ei denotes all the calls made
before SiX and Ek+1 is any calls made after XSk.

Now lets make a new procedure for m 1 agents that shares all secrets in less than 2(m 1)
4 calls.

All calls that do not involve X remain the same (they are omitted in the diagrams below).
Then we will eliminate all calls with X as follows. First, eliminate 2 calls XS 1 and SkX.

Next, keep all the remaining calls in the same order with the following adjustments. Replace
E0X with the call E0S1, and also replace Ek+1X with the call Ek+1Sk. Also replace the
remaining calls EjX with the call EjSj.

This is a new calling procedure excluding spy X in which all the other spies share all their
secrets. The adjustment process looks like the following:
The calling procedure with m spies had at most 2m 5 calls. We eliminated 2 calls, so the
reduced calling procedure with m 1 spies has at most 2m 7 = 2(m 1) 5 calls. If the
original calling procedure informed all spies, then this adjusted calling procedure also
informs all m 1 spies excluding spy X.

But this means we have created a calling procedure with m 1 spies that requires at most
2(m 1) 5 calls. This contradicts that m is the minimal value.

Therefore, we must have NOHOI in the minimal procedure.

Main proof of minimality: If NOHOI holds, then a call between two spies must be the last
call for both, or for neither. Why? Suppose the call is AB. If it is the last call for spy A,
then spy A is fully informed after the call. This means spy B will be be fully informed and
knows all secrets. If spy B calls another spy (say C), then spy B will be sharing the secret of
spy C to spy C. This contradicts NOHOI.

Similarly, a call between two spies must be the initial call for both, or for neither. Otherwise,
imagine BC takes place and then AB, which is As initial call. Since spy A learns the
secret of C, spy As information and spy Cs information will be paired together. Eventually
spy C needs to learn spy As secret. But at that time spy C will learn the secret of C, which
contradicts NOHOI.
The remaining calls are all intermediate calls between spies.

For the m > 4 spies, no initial call can be a final call. Each spy has to make an initial call and
a final call, so there will be m calls that are either initial or final calls. This means there can
be at most m 5 intermediate calls to stay below the 2m 5 limit of calls.

For a graph of m vertices, it takes a minimum of m 1 edges for the graph to be connected.
Since there can be at most m 5 intermediate calls, the graph of intermediate calls has at
most m 5 edges, and so it must have at least 5 disjoint connected components.

Spy A is part of one component, spy As initial call might be with another component of
intermediate calls, and spy As final call might be with a third component of intermediate
calls at most. So at least 2 of the components are not involved, or are wasted, from spy As
perspective of learning secrets. Write w(A) for the number of wasted calls for spy A.

It takes m 1 calls for spy A to be informed, and it takes m 1 calls for spy As secret to be
shared with everyone. By NOHOI, the only calls that can do both involve spy A, which will
be denoted as p(A).

The total calls for spy A to share the secret and learn others is at least 2m 2 p(A). Taking
into account wasted calls, there are at least 2m 2 p(A) + w(A) total calls. The total
number of calls must be less than or equal to the maximum number of calls, 2m 5. So:

2m 2 p(A) + w(A) 2m 5
p(A) 3 + w(A)

Because the number of wasted calls is non-negative, w(A) 0, this implies:

p(A) 3

This means spy A has to make at least 3 calls. Since spy A makes an initial call and a final
call, spy A must also make at least one intermediate call. All of this logic is true for each spy,
and so every spy makes an intermediate call.

There are at least 2 components in the graph of intermediate calls that are wasted from spy
As perspective. Since each spy makes an intermediate call, each of the 2 components has to
have at least 1 edge. This means w(A) 2.

Using this information with a previous inequality gives the following result:
p(A) 3 + w(A)
p(A) 5

This means each spy is involved in at least 5 calls. Since each call involves two spies, this
means there are at least 5m/2 > 2m calls.

This results contradicts that the spies used at most 2m 5 calls.

Therefore, 2n 4 is the minimal number of calls for n spies to share their secrets.

A miser can make 1 cigarette from 5 cigarette butts. What is the most number of cigarettes
the miser can make from 1,000 cigarette butts?

Problem 2
I have posted about this before, and it will become evident in the solution why I am posting it
again.

The number 100 ends with 2 zeroes, call them trailing zeroes. The number 505,000 has 3
trailing zeroes, and the number 3,201 has no trailing zeroes.

How many trailing zeroes are in the number 1000! = 1000 999 . 1?

Problem 1

The miser can make 1000/5 = 200 cigarettes to start, and some people conclude 200 is the
answer. But in this puzzle it is required to think creatively. Notice the miser can smoke the
200 cigarettes to make an additional 200 cigarette butts.

The miser can craft those into new cigarettes, so the miser can create 200/5 = 40 more
cigarettes.

The miser can then smoke those cigarettes to end up with more cigarette butts, so the miser
can make an addition 40/5 = 8 more cigarettes.

Repeating the process once more, the miser can smoke 5 of those cigarettes to make 5
cigarette butts, from which he can craft 1 more cigarette.

In all, the miser can make 200 + 40 + 8 + 1 = 249 cigarettes.

Problem 2 (short explanation)


The number of trailing zeroes is equal to the factors of 10 = 2 5. The number 1000! has an
abundance of factors of 2. The number of trailing zeroes depends on the number of factors of
5.

There are 1000/5 = 200 factors of 5, then 200/5 = 40 factors of 25 = 5 2. Repeating the
process, there are 40/5 = 8 factors of 53. Repeating the process once more, there is 1 factor of
5 4.

In all, there are 200 + 40 + 8 + 1 = 249 factors of 5. Each factor can be paired with a factor of
2 to make a factor of 10.

Therefore, 1000! has 249 trailing zeroes.

Problem 2 (longer explanation)

Take a step back and translate what it means for a number to have trailing zeroes. The
number 10 has 1 trailing zero because it is divisible by 10. The number 100 has 2 because it
is divisible by 100 = 102, and the number 1,000,000 has 6 trailing zeroes as it is divisible by
106. A number like 1,010 has 1 trailing zero because it is divisible by 10 but not by 100 = 10 2.

The question of how many trailing zeroes are there? is really asking whats the highest
power of 10 that the number is divisible by?

The number 1000! by its definition is clearly divisible by 10, 100, and 1,000, so to start, we
know there are at least 3 trailing zeroes. In fact, since 10, 100 and 1000 are factors of 1000!,
we know the number is also divisible by the product 10(100)(1000) = 10 6. Therefore, 1000!
will have at least 6 trailing zeroes.

Whats the highest power of 10 that 1000! is divisible by? Rather than continuing to guess
and check, which gets cumbersome, we can do a more systematic attack. We wish to find the
largest number n such that 1000! is divisible by 10n. The idea, therefore, is to count the
number of factors of 10 in 1000! For instance, the number 10 contributes one factor and the
number 1,000 contributes 3 factors since 1,000 = 103.

Now comes the first trick. The number 10 is factored as 10 = 2 x 5. To find the largest
number n such that 1000! is divisible by 10n, we can equivalently find the largest n such that
1000! is divisible by (2 x 5)n = (2)n(5)n. In other words, we need to count how many factors
of 2 and 5 are in the number 1000!
The second trick is to realize there will be an abundance of factors of 2 in comparison to 5.
This is because every other number contains a factor of 2 whereas only every fifth number
contains a factor of 5. So the problem reduces to counting the number of factors of 5 in the
number 1000!

Now every 5th number contributes at least one factor of 5. That is, the numbers 5, 10, 15, ,
1000 all contribute one factor of 5. There are 1000/5 = 200 numbers that contribute a factor
of 5.

Additionally, every 25th number contributes a second factor of 5, since 25 = 5 2. Therefore,


the numbers 25, 50, , 1000 all contribute a second factor of 5. There are 1000/25 = 40 such
numbers.

The problem is solved by continuing this counting. Every 53 = 125th number contributes a
third factor of 5, and there are 1000/125 = 8 such numbers. Finally the number 625 =
54contributes a fourth factor of 5.

Tabulating these results, there are 200 + 40 + 8 + 1 = 249 factors of 5 in the number 1000!
Each of these factors gets paired with a factor of 2, meaning there are 249 factors of 10 in the
number 1000!

Therefore, 1000! is divisible by 10249 and it will have 249 trailing zeroes.

The same procedure works for finding the trailing zeroes in n! One should look to count the
number of trailing zeroes by counting the factors of 5. The solution is to add up n/5 + n/25
+ n/125 + and so on until the largest power of 5 that is smaller than n.

Update 8 October 2016

I received an email from Gabor that points out there is a small but important difference
between the problems.

In 9!, there is exactly 1 trailing zero, as there is 1 factor of 5.

But if you had 9 cigarette butts, you can first obtain 1 cigarette + 4 butts. Then you smoke
the cigarette and you get 1 more butt. So you have 5 butts to create a 2nd cigarette.

Similarly, for 13! there are 2 trailing zeroes.

But if you had 13 cigarette butts, you can first obtain 2 cigarettes + 3 butts. Then you can
smoke the 2 cigarettes to get 2 more butts. So you have 5 butts to create a 3rd cigarette.
It turns out the cigarette problem is more interesting than I first expected!

Alice is looking at Bob, and Bob is looking at Charlie. Alice is married and Charlie is
unmarried.

Is a married person looking at an unmarried person?

A) Yes
B) No
C) Cannot be determined

Surveys have found that 80 percent get this problem wrong. If you solve it, try out this next
problem with a similar flavor.

You have a drawer with 10 black socks and 10 white socks. You close your eyes and pull out
3 socks. Are you holding a matching pair of socks?

A) Yes
B) No
C) Cannot be determined

A Logic Problem 80 Percent Get Wrong


The correct response to both questions is A) Yes. While each problem is missing information,
the answers can be deduced by considering all possibilities.

For the first problem, Bob is either married or unmarried. If Bob is married, then he is a
married person looking at an unmarried Charlie. If Bob is unmarried, then Alice is a married
person looking at an unmarried Bob. In either case, a married person is looking at an
unmarried person.

The second problem is similar. Imagine picking the 3 socks in order. If the first 2 socks are
the same color, then you will have a matching pair. If not, then the first two socks must be
one black sock and one white sock. The third sock can either be black or white, and therefore
it must match one of the first two socks.

If AA + BB + CC = ABC, what are A, B, and C? The digits are all distinct and positive.

Answer To AA + BB + CC = ABC
There are many possible ways to approach the problem. Here is one method.
First focus on the answer ABC. Notice the largest result can be 99 + 88 + 77 = 264, so the
answer has to be in the 200s or the 100s. This means A = 1 or 2.

Next focus on the sum of the units digits. We know A + B + C = C (units), which means A +
B = 0 (units).

Therefore, we have A = 1 and B = 9 or A = 2 and B = 8. There are two possible cases:

11 + 99 + CC = 19C
22 + 88 + CC = 28C

In the second case, we have 110 + CC = 28C. Focusing on the tens column, we must have 1
+ C = 8, which means C = 7. But then we end up with 110 + 77 = 187, which cannot work
since we need a 2 in the hundreds place. This case does not yield a result.

In the first case, we have 110 + CC = 19C. Focusing on the tens column, we must have 1 + C
= 9, which means C = 8. We then have 110 + 88 = 198, and this works!

The answer is 11 + 99 + 88 = 198.

In 1911, Srinivasa Ramanujan posed this problem involving an infinite nested radical (a
never-ending expression that has square roots inside of square roots).

What is the value of x in the following equation?


The trick is to think in 3 dimensions! You can use the 6 matches to form a tetrahedron which
has 4 faces, each of which is an equilateral triangle.
You probably had to memorize the times table up to 10 in school. A multiplication table
has each entry equal to the product of its row and column numbers.

What is the sum of all the numbers inside the times table? (Only count the entries in the grey
box. That is, you only want to sum the products.)

Imagine you had a times table for the numbers 1 to N. What is the sum of the entries in that
times table?
Can you figure it out in 30 seconds?

Im going to present the algebraic solution first. Then Ill show you a trick of how to solve
this problem geometrically.

The 1st row has a sum:

S = 1 + 2 + 3 + + 10

The 2nd row has the sum of the even numbers from 2 to 20. This is exactly 2 times the sum of
the 1st row.

2S = 2 + 4 + 6 + + 20

If you look at the times table, youll see a pattern. The 3rd row is 3 times the sum of the
1st row, and the kth row is k times the sum of the 1st row.

In a 1010 table, we want to sum up 10 rows. So we have a total sum of:

S + 2S + 3S + + 10S

Now we factor out the common term S to get:

S(1 + 2 + 3 + + 10)

Then we remember S = 1 + 2 + 3 + + 10, so this is

S2 = (1 + 2 + 3 + + 10)2

Now we use a well-known formula: the sum of the numbers from 1 to N is equal to N(N +
1)/2. (I explain the proof in an entertaining fashion in this video.)

So that means S is 10(11)/2 = 55.

The sum of the numbers in a 1010 times table is:

552 = 3025.
Part (i) means the crocodile swims entirely in the water. So x = 20 and substituting we
find T(20) = 5436 104.

Part (ii) is not the best wording. They mean the crocodile swims directly across the river and
then proceeds on land. This is the least amount of distance in the water the crocodile can
swim. So x = 0 and substituting we find T(0) = 110. (Sorry I had written 100 before, which
was a mistake)

Part (iii) is a calculus problem. You can take the derivative of the time function and simplify.
The chain rule is tricky on this one.

T(x) = 5(1/2)(36 + x2)-1/2(2x) 4 = 0

This simplifies to x = 8, and then T(8) = 98.


Make 10 from the numbers 1, 1, 5, 8.

You can use the operations + ().

You have to use all the numbers, and use each number exactly once.

8/(1 1/5) = 10

or

8 (1 1 5) = 10

The trick is that 1 1/5 = 4/5 = 0.8, and then you take 8 divided by this to get to 10.
There are n sweets in a bag.

Six of the sweets are orange. The rest of the sweets are yellow.

Hannah takes a random sweet from the bag. She eats the sweet.

Hannah then takes at random another sweet from the bag. She eats the sweet.

The probability that Hannah eats two orange sweets is 1/3. Show that n2 n 90 = 0.

We are given the probability of drawing two orange sweets, without replacement, is equal to
1/3. Therefore we have the following equation.

Pr(1st orange) Pr(2nd orange | 1st orange) = 1/3

In the first draw, there are 6 orange sweets out of a total of n.

Pr(1st orange) = 6/n

Then Hannah has eating an orange sweet. The number of orange sweets remaining is one
fewer, 5, and the total number of sweets is one fewer, n.

Pr(2nd orange | 1st orange) = 5/(n 1)


We substitute these expressions into the equation equaling 1/3.

(6/n)[5/(n 1)] = 1/3

Now we simplify the left hand side.

30/(n2 n) = 1/3

Now we cross-multiply.

90 = n2 n

Finally we subtract 90 from both sides of the equation.

n2 n 90 = 0

Thats what we needed to prove so we are done. We can check our answer is correct by
solving for the number of sweets. The expression can be factored.

(n 10)(n + 9) = 0

This means n = 10, and we disregard the extraneous solution n = -9 because the number of
sweets should be positive number.

When 6 sweets are orange out of 10, Hannah will get an orange sweet 6/10 times on the first
draw, and then 5/9 on the second draw. Thus Hannah selects two orange sweets in a row
(6/10)(5/9) = 30/90 = 1/3 of the time, which reconciles with the given information.

Before a big celebration, a king receives a delivery of 1,000 kegs of beer. But there is a slight
problem: one of the kegs has been poisoned.

The bad beer is indistinguishable in every way, except that it causes food poisoning about
one hour after ingested.

The king is short on time and bodies. The party is in a few hours and he only has 10 guards
to spare.

How can the king identify the bad keg?

If the king had 1,000 guards, each guard could a sample from a different keg. After one hour,
only one guard would get sick, and that guard would uniquely identify the poisoned keg.
But the king has only 10 guards. So each guard needs to take a sample from multiple kegs.
After one hour, some of the guards will get sick. The question is, can we then figure out
which keg was poisoned? Can we give the beer samples so each combination of guards
getting sick corresponds to a unique keg?

The answer is yes, and the trick is to use binary numbers.

Solving with 8 kegs and 3 guards

First let me explain the procedure in a simpler example, which can be generalized to solve
the puzzle. Imagine there are 8 kegs and the king only has 3 guards.

Number the kegs from 0 to 7, and number the guards from 0 to 2. Here is how the guards
should sample the kegs.

Guard 0 samples from 1, 3, 5, 7


Guard 1 samples from 2, 3, 6, 7
Guard 2 samples from 4, 5, 6, 7

Then see what happens after one hour. If none of the guards get sick, then the poisoned keg
would be 0. Otherwise, some of the guards might get sick. Heres the neat part: every
combination of guards that gets sick uniquely identifies one of the kegs!

For example, if guards 0 and 1 get sick, then that means keg 3 is poisoned. Why? The only
kegs that both mutually drank were 3 and 7. But if keg 7 was poisoned, then guard 2 would
have also gotten sick. So if only guards 0 and 1 get sick, then the poisoned keg must be keg
3.

You can verify that every combination of guards getting sick uniquely identifies a keg
number. And similarly every keg number will uniquely sicken a subset of guards.

How did I come up with this sampling procedure? The method was to use binary numbers
(base 2), which is the number system used in computers. The numbers 0 to 7 can be encoded
in binary as follows.

0 = 000
1 = 001
2 = 010
3 = 011
4 = 100
5 = 101
6 = 110
7 = 111

Guard 0 then samples from a keg if the rightmost digit is a 1; guard 1 samples from a keg if
the middle digit is 1; and guard 2 samples from a keg if the leftmost digit is 1.

In other words, here is the sampling procedure when the kegs are labeled using binary
numbers.

Guard 0 samples from 001, 011, 101, 111


Guard 1 samples from 010, 011, 110, 111
Guard 2 samples from 100, 101, 110, 111

Notice we could do 8 kegs with 3 guards because 8 = 23.

The puzzle asked us to do 1,000 kegs with 10 guards. This will be possible because 2 10 =
1,024, so we can actually test 1,024 kegs in this way. Lets explain the process in detail for
completeness.

Converting to binary

There is an easy way to convert to binary numbers that most people dont know about. I
explain the procedure in the following video.

Convert decimal to binary (base 10 to base 2)

This will be useful if you need to convert each number from 1 to 1,000 into binary quickly.

Solving the 1,000 keg case

First, number the beer kegs from 0 to 999. Then convert the beer keg numbers from decimal
into binary. For example the beer keg 997, as a decimal number, would be written as
1111100101, as a binary number.

Number the 10 guards from 0 to 9. Then make guard k take a sample of a keg N if and only
if the value of 2k is 1 in the binary representation of N. In other words, guard k takes a
sample from a keg if the corresponding digit of N in binary is equal to 1.

The keg 997, for example, has a binary representation 1111100101 = 1(2 9) + 1(28) + 1(27) +
1(26) + 1(25) + 0(24) + 0(23) + 1(22)+ 0(21) + 1(20).
Thus, only the guards 0, 2, 5, 6, 7, 8, and 9 drink a sample of beer from keg 997, and the
other guards do not drink a sample from keg 997.

This process is done for each keg. The tasting should be done quickly, and each guard should
only get a minimal tasting, since many guards will have to sample from many kegs of beer.

After one hour, if none of the guards are sick, then that means keg 0 is poisoned.

Otherwise, some of the guards will be sick, and this data can be used to uniquely figure out
the poisoned keg. Create a binary number using the number of the guard for its position and
write a 0 for each non-sick guard and a 1 for each sick guard. There is a unique binary
number for each combination of guards getting sick, and this number uniquely corresponds
to the poisoned keg.

So even with a few hours and 10 guards, the king can identify the 1 bad barrel from 1,000!

The solution is beautiful because the king can minimize the number of guards needed to find
the bad keg. For N kegs, the king can find the bad keg using only log2N guards.

Albert and Bernard have just become friends with Cheryl, and they want to know when her
birthday is. Cheryl gives them a list of 10 possible dates.

May 15, May 16, May 19


June 17, June 18
July 14, July 16
August 14, August 15, August 17

Cheryl tells Albert only the month and Bernard only the day.

Albert says, I dont know when Cheryls birthday is, but I know that Bernard cannot know
either.

Bernard then says, At first I didnt know when Cheryls birthday is, but now I do know.

Albert concludes, Now I know when Cheryls birthday is.

So when is Cheryls birthday?

Take a look at the dates again.


May 15, May 16, May 19
June 17, June 18
July 14, July 16
August 14, August 15, August 17

Albert is told one of the months May, June, July, or August. And Bernard is told one of the
days 14, 15, 16, 17, 18, or 19.

Albert first says, I dont know when Cheryls birthday is, but I know that Bernard cannot
know either.

The first part of the sentence is meaninglessof course Albert doesnt know the birthday. But
the second part is a clue.

Albert is sure that Bernard cannot know the date. If Bernard was told 19, he would know the
birthday was May 19. If Bernard was told 18, he would know the birthday was June 18. How
is Albert sure that Bernard didnt hear 18 or 19? It must be because Albert knows the
birthday is not in May or June! In other words, Albert was told either July or August.

So the first sentence reduces our list to 5 dates.

July 14, July 16


August 14, August 15, August 17

Bernard then says, At first I didnt know when Cheryls birthday is, but now I do know.

Upon hearing Alberts statement, Bernard figured out the month must be July or August. He
then also said now he could figure out the birthday. If he had been told 14, the month would
still be ambiguous. So he must have been told 15, 16, or 17.

So Albert is left with 3 possible dates.

July 16
August 15, August 17

Albert finally explains, Now I know when Cheryls birthday is.

If Albert was told August, he still would not be sure. So he must have been told July.

Therefore, Cheryl said July to Albert and 16 to Bernard. Cheryls birthday is July 16.

Você também pode gostar