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.






















































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.