Mathematical Puzzle Solutions

Mixing

At both the beginning and the end, the two cups have exactly the same amount of liquid in them. Therefore, the amount of tea that ends up in the coffee cup must be exactly equal to the amount of coffee that ends up in the tea cup.






















































8 3 8 3

8 ÷ (3 - (8 ÷ 3)) = 24






















































Sequence 1

0, 1, 2, 720!, 24!!!

The rule is n followed by n factorial signs.






















































Sequence 2

1, 3, 7, 12, 18, 26, 35, 45, 56, 69, 83, 98

The differences between pairs of numbers are all the numbers that are not in the sequence!






















































Sequence 3

1, 2, 4, 8, 16, 77, 145, 668, 1345, 6677, 13444, 55778, 133345

R.A.T.S. means Reverse Add Then Sort. 55778 + 87755 = 143533, and then sorting the digits gives the next number.






















































Mutilated Chess Board

No. A domino must cover one black and one white square, and on the mutilated chess board there are 32 black squares and 30 white squares (or vice versa).






















































Cheese Cube

6 straight cuts are required, regardless of how the pieces are moved around. The center 1×1×1 subcube will require 6 straight cuts to extract, because no straight cut can travel along multiple of its faces.






















































Cube Worm

No. Color the 1×1×1 subcubes in a black and white checkered pattern, such that the worm's path alternates between black and white squares. The 3×3×3 cube contains 13 subcubes that have the same color as the center subcube, and 14 that have the opposite color. Therefore no path that visits all subcubes exactly once can end in the center subcube.






















































Searching Robots

Both robots should follow the below program, where each statement takes 1 time step.

  1. If the current spot contains the other robot then HALT, else move left and proceed to statement 2.
  2. If the current spot contains a parachute then move left and proceed to statement 3, else don't move and jump back to statement 1.
  3. If the current spot contains the other robot then HALT, else move left and repeat statement 3.

If the robots were initially separated by n spots, this will allow them to meet up in about 4n time steps.






















































Devil's Shell Game

Every permutation of n objects can be classified as either even or odd, depending on whether it can written as an even or odd number of transpositions. (The even permutations of n objects form a simple group called the alternating group An.)

There are 6 permutations of 3 objects, of which the 3 even ones are the rotations. Every move the devil makes is a transposition, so just keep track of whether there are an even number or an odd number of them. The final location of the skull with the gold tooth plus knowing whether or not the permutation is a rotation is enough information to determine the precise permutation applied to the skulls, and thus the final location of the bead.






















































Airplane Seating

The probability is one half. Without loss of generality assume there are N passengers and they board in descending order from seat number N to seat number 1. Start the following boarding process with n set to N:

Note that at every iteration of this boarding process there is equal probability of success and failure, and furthermore the boarding process must terminate, so therefore the overall probability of success and failure is equal.






















































Boy Probability

For the first family, consider the following 4 equally likely outcomes:

The information that at least one child is a boy eliminates the last possibility, leaving 3 equally likely outcomes:

Therefore the probability that the other child is also a boy is 1/3.

We can analyze the second family in a similar way by listing all possible outcomes:

The total probabilities add to (1 + 6 + 7 + 6 + 36 + 42 + 7 + 42 + 49) / 196 = 1 as expected. Considering only the scenarios not eliminated by the information that at least one child is a boy born on a Sunday, the probability that the other child is a boy is

((1 + 6 + 6) / 196) / ((1 + 6 + 7 + 6 + 7) / 196) = (1 + 6 + 6) / (1 + 6 + 7 + 6 + 7) = 13/27.

Why is it more likely that the other child is a boy in the second family? The intuition is that the more specific information given about the known boy (he was born on Father's Day, his name is Theodore, etc.), the more the other child is isolated to an independent event, and therefore the closer the probability gets to 1/2.






















































Connecting the Dots

Out of all possible arrangements of connecting every white dot to a unique black dot, pick the one that minimizes the total distance of all the line segments. Suppose 2 line segments AB and CD cross in this arrangement, where A and C are white dots, and B and D are black dots. Removing line segments AB and CD and adding line segments AD and CB gives another valid connection arrangment, and by the triangle inequality |AD| + |CB| < |AB| + |CD|. This is a contradiction, so there are no crossing line segments in the mimimal connection arrangement.






















































Four Corners

Without loss of generality suppose the initial coordinates of the 3 pegs are (0,0), (0,1), and (1,0), and therefore the goal is to get a peg to (1,1).

If peg A is at (m,n) and peg B is at (p,q) then jumping peg A over peg B will take it to (m + 2(p - m), n + 2(q - n)). Observe the following:

Therefore, since none of the 3 initial peg positions have integer coordinates that are both odd, it is impossible for any of them to get to (1,1).






















































Avoiding Points

Eight.

The following argument shows that 2n is the maximum number of points that can be chosen from the set Zn of points (a1, ..., an) in n-dimensional space where each ai is an integer.

Drawing a line between two points (a1, ..., an) and (b1, ..., bn) in Zn will hit another point in Zn iff the greatest common divisor of |a1 - b1|, ..., |an - bn| is greater than 1. Suppose (a1, ..., an) and (b1, ..., bn) have the same pattern of even/odd integers (i.e., they are equal modulo 2). In that case subtracting them elementwise will result in only even numbers, which have a common divisor of 2. Therefore, drawing a straight line between these two points would hit another point in Zn exactly halfway between them. There are only 2n possible patterns of even/odd integers, so this is an upper bound on the maximum number of points that can be chosen from Zn satisfying the condition.

For the lower bound, consider the 2n points (a1, ..., an) where each ai is either 0 or 1. Drawing a straight line between any pair of these points will go through points (x1, ..., xn) in n-dimensional space where every xi is in the range [0,1] and some xi is in the range (0,1). Therefore this line will not hit any other point in Zn.






















































Fake Coin

We begin with some notation:

Now our state of knowledge can be coded as mX.nH.pL.qG, where m+n+p+q=13.






















































Chessboard Coins

Begin by numbering the squares of the chessboard from 0 to 63, and write each square i using 6 booleans i5i4i3i2i1i0. Lift the exclusive or operator ⊕ from booleans to squares by defining ij = (i5j5)(i4j4)(i3j3)(i2j2)(i1j1)(i0j0). At this point we can define a mapping from a chessboard with coins on some squares to a particular square as ⊕{i | square i contains a coin}.

Upon entering the room your friend uses the mapping to compute the square i that is indicated by the current state of the chessboard. The warden points to a square j, and your friend should ask to add a coin or remove the coin on the square ij.

When you enter the room the state of the chessboard now maps to the square i ⊕ (ij) = j, which you can now point to and pass the test.






















































Card Magic

Begin by numbering the cards in the deck from 0 to 51 (keeping suits together), and the permutations of 3 objects from 1 to 6.

The magician's assistant receives 5 cards from an audience member. By the pigeonhole principle two of them a < b must have the same suit, let the other 3 cards be c < d < e.

The magician re-enters the room and sees the card w laid out followed by the cards x < y < z in the permutation p.

Alternative Solution

Begin by numbering the cards in the deck from 0 to 51, and the permutations of 4 objects from 0 to 23.

The magician's assistant receives 5 cards a < b < c < d < e from an audience member.

The magician re-enters the room and sees 4 cards w < x < y < z laid out in the permutation p.

To see how this works, here is a visualization of the magician's mapping from permutation number p to the number of the missing card for the case when both w and z are odd:

Permutation number:  0 _ 1 _ 2 _ 3 ... _ ... _ ... _ ... _ ... 20 __ 21 __ 22 __ 23
Missing card number: 0 1 2 3 4 5 6 ... w ... x ... y ... z ... 45 46 47 48 49 50 51

From the visualization it might appear that if {w, x, y, z} are consecutive then the permutation numbers immediately before w and after z could be the same, resulting in an ill-defined mapping. Luckily this extreme packing is ruled out because in the consecutive case either w is even (adding space on the right by mapping permutation 23 to missing card 50) or z is even (adding space on the left by mapping permutation 0 to missing card 1).






















































Black-Balled

Put 1000 black balls and 999 white balls into one basket, and the remaining white ball into the other basket. Now your chance of survival is nearly 3/4.






















































Subset Sums

Firstly, the disjointness is a red herring, since if you can find any two sets that sum to the same value then you can always remove the elements that they have in common to get two disjoint sets that sum to the same value.

Secondly, there are 20 elements in the set X, so the number of subsets is 2 raised to the power 20, which is more than 1,000,000. But the sum of all the elements in X is 639576, so each subset must sum to less than this. Therefore there must be two subsets that sum to the same value.

A neat application of the pigeon-hole principle. There are more subsets than possible sums, so two subsets must sum to the same value.






















































Mr. Sum and Mr. Product

Sorry, no neat solution to this one. But the unique solution happens to be:

  SUM   PRODUCT   X   Y
   17      52     4  13






















































Truth Tellers

You say to one oracle: "if I was to ask the other oracle if the left path went to heaven, would he say yes?" If the reply is yes then the right path goes to heaven, and if the reply is no then the left path goes to heaven. The proof is by cases: first examine what the oracle would say if he was the truth teller and the other one lied, and then the other way around.

The second problem is a bit more complicated: the hint is to eliminate the random truth teller with the first question.






















































Gameshow

Yes, you should change. There is a 2/3 chance that the other door contains the prize.

To see this, imagine that there are not three doors, but 100. You pick one, and then the gameshow host opens 98 wrong doors. You can then choose to stick with your original door, or switch to the one remaining. Here it's plain that your door still only has 1/100 chance of being right, so the other door must have 99/100 chance of being right.






















































Missing Square

Look carefully at the picture. The long side of the large triangle (the one that contains the four shapes) is not a straight line! (It can't be, it's the join of two triangles: one with gradient 2/5 and the other with gradient 3/8.) In the top picture this bend adds area to the large triangle, and in the bottom picture it subtracts area. The amount of area that it adds or subtracts: exactly 1/2 a square.