<<

Inhaltsverzeichnis

1 Santa’s helper is in a bad mood 3 1.1 Exercise ...... 3 1.2 Solution ...... 6 2 Disguised Thieves 7 2.1 Exercise ...... 7 2.2 Solution ...... 10 3 Snowman made of glass 12 3.1 Exercise ...... 12 3.2 Solution ...... 15 4 Transportation costs 20 4.1 Exercise ...... 20 4.2 Solution ...... 22 5 The Big Race 24 5.1 Exercise ...... 24 5.2 Solution ...... 27 6 Explosion 29 6.1 Exercise ...... 29 6.2 Solution ...... 31 7 Cookies 33 7.1 Exercise ...... 33 7.2 Solution ...... 35 8 Distributing presents in Hawaii 36 8.1 Exercise ...... 36 8.2 Solution ...... 39 9 Brain teaser 44 9.1 Exercise ...... 44 9.2 Solution ...... 46 10 The cookie dice game 47 10.1 Problem ...... 47 10.2 Solution ...... 49 11 Card game 52 11.1 Exercise ...... 52 11.2 Solution ...... 54 12 The radio competition 55 12.1 Exercise ...... 55 12.2 Solution ...... 57

2 13 Test for a job interview 59 13.1 Exercise ...... 59 13.2 Solution ...... 61 14 Deep snow 62 14.1 Exercise ...... 62 14.2 Solution ...... 64 15 Crossnumbers 66 15.1 Exercise ...... 66 15.2 Solution ...... 69 16 A secure safe 71 16.1 Exercise ...... 71 16.2 Solution ...... 74 17 Hats 76 17.1 Exercise ...... 76 17.2 Solution ...... 79 18 The dance of the 81 18.1 Exercise ...... 81 18.2 Solution ...... 83 19 Mondrian 87 19.1 Exercise ...... 87 19.2 Solution ...... 89 20 Mixed Doubles 91 20.1 Exercise ...... 91 20.2 Solution ...... 94 21 Raiders of the lost Santa 97 21.1 Exercise ...... 97 21.2 Solution ...... 100 22 Temperature 102 22.1 Exercise ...... 102 22.2 Solution ...... 104 23 A Christmas Crime Story 105 23.1 Exercise ...... 105 23.2 Solution ...... 108 24 Mosquito 110 24.1 Exercise ...... 110 24.2 Solution ...... 112

3 1 Santa’s helper is in a bad mood

Author: Christian Hercher

1.1 Exercise Santa’s helper is in a bad mood. “Same procedure as last year? Same procedure as every year...” *grrr*

“I’m always taking care of the naughty kids, scaring them and the old man gets all the recognition for the good kids’ gifts.” This time, everything will be different. And off he goes to and cries on his shoulder. “What are you suggesting?”, asks Santa. “It’s obvious! I want to switch this year!”

Of course, doesn’t give up his privilege so easily! “Let us play for it. The winner gets to distribute the gifts and the loser visits the naughty boys and girls.”

“Ok, and what are we playing?” answers Santa’s helper, interested. The old man explains the game he has in mind.

“In my gift bag, there are 23 red gifts and 23 blue gifts. Other than by the color, you can’t tell them apart.”

Without looking inside, you pull two gifts out of the gift bag. If they possessed different colors, you must put the red one back in. On the other hand, if they have the same color, a blue gift is added to the gift bag. (I have enough extra blue gifts that are not in the gift bag yet, so you can use them for the game.)

4 This procedure is repeated until there are no more gifts in the gift bag. The color of the last gift that you have to put back in the bag after the last pull according to our rules decides the winner of the game. If it is blue, you win. If it is red, I am declared the winner.”

The little helper ponders a little. “Why do you get to play red?” - “Because I am Santa Claus. Besides, I am the one with the red suit that all the kids love! So red is my color.” “Okay, alright! ...” he responds after giving up. “I feel like I’m being scammed, but I’ll give it a try. Let’s start!”

With what probability (rounded at multiples of 10 %) will Santa’s helper win the game and become the kids’ hero this year?

5 Possible Answers: 1.0%

2. 10 %

3. 20 %

4. 30 %

5. 40 %

6. 50 %

7. 60 %

8. 80 %

9. 90 %

10. 100 %

6 1.2 Solution Answer 1: The probability for Servant Rupert to win the game is ex- actly zero.

After every turn, two gifts are pulled out of the bag and one gift is added back in. The number of gifts in the bag thus goes down by one per turn, which means the game ends when the two last gifts are pulled out of the bag, in which case the color of the gift to put back in decides the winner.

When two gifts of different colors are pulled out, the number of red gifts in the bag doesn’t change. This is also the case when two blue gifts are pulled out since a blue gift is added back in. The number of red gifts in the bag can only change when two red gifts are taken out, but since a blue gift goes back in, the number of red gifts in the bag diminishes by exactly two.

At the beginning, there are 23 red gifts in the bag, which is an odd number. Since every step of the game removes either zero or two red gifts from the bag, the number of red gifts in the bag remains odd at each step since it was odd in the previous step.

In particular, there is always at least one red gift in the bag. This has to be the color of the last gift that has to be put back in, so Santa Claus wins for sure. The winning probability of Santa’s little helper is therefore exactly 0 %.

Note: the strategy used to solve this problem is also called “Invariance Principle”. One finds a property which remains invariant through every step of the game and gives us the solution at the last step. In this case, the invariant property is the oddness of the number of red gifts in the bag, no matter which gifts are pulled out of it.

7 2 Disguised Thieves

Author: Thomas Lütteke

2.1 Exercise Santa is furious. Since he doesn’t enjoy a good wine only when Christmas is ap- proaching, he stores a few bottles in his wine cellar. However, after the Christmas elves’ costumed Halloween party, some of his best bottles went missing. Consi- dering this is not the first time this has happened, he decided to install a video surveillance camera. To his dismay, he could not recognize the thieves on the tape because they were still costumed: one of them is dressed as an Easter bunny, the other one - and that particularly outrages him - dressed up in a Santa Claus costume! Such an enormous one on top of that, as if he had a gigantic belly. Of course, now he wants to find out who was hiding behind those costumes. Actually, he brought it down to five suspects, namely Alex, Benni, Chris, Dieter and Emil. Altogether, they were costumed as Santa, the Easter bunny, a monk, Yoda and Snow White. All five of them sat next to each other at the bar almost all night in the same order and each one of them kept drinking the same thing: one drank vodka, one took milk, one took beer, the other one had a Coca-Cola and the last one had lemonade. As suspects, all five of them made use of their right to remain silent. The other elves at the party were also questioned, but they were pretty drunk and therefore did not have much information to offer. All that Santa got out of them was the following statements:

• The tall Alex only fits into the Santa or monk costumes.

• Dieter always drinks Coca-Cola or vodka at parties.

• Either Snow White or the monk was sitting at the right end of the counter.

• The at the second left position drank beer or lemonade.

8 • The two elves at the right end of the counter did not drink milk.

• The Easter bunny was sitting either at the left end of the bar or exactly in the middle.

• Benni was sitting on Santa’s right and on the left of the elf who drank Coca-Cola.

• Emil was sitting to the right of the elf who drank Coca-Cola and to Snow White’s left.

• Chris did not sit in the middle seat.

• Emil is too tall to fit into the Yoda costume and he likes neither lemonade nor vodka.

• The monk did not drink milk.

Is it possible with this information to figure out the thieves’ identities, or at least reduce the number of suspects by definitely excluding individual Christmas elves?

9 Possible Answers: 1. The thieves are Alex and Chris.

2. The thieves are Benni and Dieter.

3. The thieves are Chris and Emil.

4. The thieves are Dieter and Alex.

5. The thieves are Emil and Benni.

6. Santa Claus can only identify one thief with certainty and only one more elf can definitely be excluded.

7. Santa Claus can only identify one thief with certainty and two further elves can definitely be excluded.

8. Santa Claus cannot identify any of the thieves. All he can do is definitely exclude one of the elves.

9. The information given is insufficient to convict or exonerate any of the elves.

10. The information given is contradictory, i.e. at least one piece of information must be incorrect.

10 2.2 Solution Answer 4: The thieves are Dieter and Alex.

To solve such a logic puzzle, one can set up a table where the information given from the text can be written in:

For every correct assignment (e.g. if we know that Alex is wearing the Santa costume), we put a cross (×) in the appropriate box, and for every assignment that one can exclude, we put a circle (◦). Through deductive reasoning, we must fill in this table step by step. For example, when Benni is disguised as the Easter bunny and the Easter bunny drinks beer, then Benni drinks beer. However, if the Easter bunny drinks beer and Benni doesn’t, then Benni cannot be the Easter bunny. Ideally, one can fill in the entire table via such considerations. With the information given in the text, one obtains the following table:

Costume Position Drink left right Left nd Beer Milk Yoda Santa Monk Right Vodka nd Center 2 2 Coca-cola Lemonade Snow White Easter bunny Alex ø ø ø Benni ø ø ø ø Chris ø

Name Dieter ø ø ø Emil ø ø ø ø ø ø Beer Coca-cola ø ø ø Milk ø ø ø ø

Drink Vodka ø Lemonade Left ø 2nd left ø Center 2nd right ø Position Right ø ø ø

Since we are only given information which excludes possible cases, filling the table is not entirely straightforward. From the fact that Dieter only drinks coca-cola or vodka but that the person sitting in the second seat starting from the left doesn’t drink any of these beverages, one deduces that Dieter cannot be sitting in this

11 seat. A few more boxes can be assigned a circle in this way, but it doesn’t solve the entire puzzle.

An important piece of information at this stage is the fact that Emil sat to the right of the elf who drank coca-cola. Since Emil also sat to the left of Snow White, he cannot have been at the rightmost position, but at most at the second seat starting from the right. The coca-cola drinker must then have been sitting further to the left. With the already given restrictions, only the center position remains for the cola-drinking elf, so that Emil was sitting at the second seat from the right. Starting from here, further simple properties can be assigned and the table can be completely filled: Costume Position Drink left right Left nd Beer Milk Yoda Santa Monk Right Vodka nd Center 2 2 Coca-cola Lemonade Snow White Easter bunny Alex × ø ø ø ø × ø ø ø ø ø ø ø × ø Benni ø ø ø ø × ø × ø ø ø ø ø ø ø × Chris ø ø × ø ø ø ø ø ø × ø ø × ø ø

Name Dieter ø × ø ø ø ø ø × ø ø ø × ø ø ø Emil ø ø ø × ø ø ø ø × ø × ø ø ø ø Beer ø ø ø × ø ø ø ø × ø Cola-cola ø × ø ø ø ø ø × ø ø Milk ø ø × ø ø ø ø ø ø ×

Drink Vodka × ø ø ø ø × ø ø ø ø Lemonade ø ø ø ø × ø × ø ø ø Left × ø ø ø ø 2nd left ø ø ø ø × Center ø × ø ø ø 2nd right ø ø ø × ø Position Right ø ø × ø ø

From this table it is obvious that Alex has been dressed as Santa and Dieter as Easter bunny. Therefore, answer 4 is correct.

12 3 Snowman made of glass

Author: Luise Fehlinger and Robert Jablko Project: ZE-AP1

3.1 Exercise As every child already knows, the laws of physics at the North Pole are somehow crazy. It would be otherwise impossible for Father Christmas to deliver all his presents within one night and manage to squeeze his way in through the smallest of chimneys. However, these are not the only crazy things at the North Pole. When an object is reflected in a sphere there, the following “North Pole reflection law” holds: −−→ The reflection point P 0 lies on the half-line MP r and the following equation determines its position: |MP | · |MP 0| = r2. M P 0 P

This year, Hugo the elf wants to build a snowman made out of hollow glass spheres. He starts with a small (radius r1), a medium (radius r2) and a large sphere (radius r3). From the medium-sized sphere, he cuts off a cap and glues the small sphere in the resulting hole. Then he cuts a cap from the large sphere and glues the medium sphere in it.

13 His glass spheres are translucid, but they also reflect light. There- fore, one can see not only the part of the small sphere which lies in the medium one, but also its reflection in the other spheres and the reflections of its reflections. However, the reflections of the reflec- tions of a reflection are becoming a bit blurry, so they are sort of invisible to the naked eye. Thus Hugo’s snowman really looks like a cloud of spheres. Is there a better way? So Hugo asks his colleagues to help him. How should he build his snowman so that there are as few visible reflections as possible? If possible, the corresponding reflections should lie exactly where the caps were cut off on the existing spheres. The elves come up with many good ideas for conditions satisfied by an optimal snowman. However, one of them is mistaken. Which one?

14 Possible Answers: 1. Elf Cornelius: “The spheres which cut each other must cut each other or- thogonally, so that the radii of the two meeting spheres intersect perpendi- cularly in their intersection points.”

2. Elf Yolanda: “The circle of intersection between two spheres cutting one another lies on the sphere which has as its diameter the line segment bet- ween the centers of the two glass spheres.”

3. Elf Otis: “The distance between the centers of the small and large spheres p 2 2 2 must be equal to r1 + 2r2 + r3.” 4. Elf Milena: “There will always be at least two visible reflections which do not lie completely on the glass spheres.”

5. Elf Julian: “There will always be at least four visible reflections which do not lie completely on the glass spheres.”

6. Elf Lotta: “It is possible to build the snowman so that at most six reflections do not lie completely on the spheres.”

7. Elf Mattie: “To drill the hole in the middle sphere, a drill with a diameter q 2 2 r1·r2 of 2 2 2 is required.” r1+r2 8. Elf Noam: “The square of the radius of the circle of intersection between two spheres cutting each other equals the reciprocal of the sum of the squares of the reciprocals of the radii of the two spheres.”

9. Elf Yves: “If we were to cut off a cap from the medium sphere with a laser, the angle that the laser must do with the tangent plane of the sphere at the point where one starts cutting has to be arctan r1 .” r2 10. Elf Alva: “If the cap of the middle sphere is to be cut using an electric cir- 1 cular saw (decorated with diamonds) with the help of a guide√, the distance 2 2 2 2 r1+r2−r2 r1+r2 between the guide and the saw should be equal to r2 2 2 .” r1+r2

1One carries the sphere along the guide parallel to the circular saw.

15 3.2 Solution Answer 3: The following statement is false: “The distance between the p 2 2 2 centers of the small and large spheres must be equal to r1 + 2r2 + r3.”

In each case, we consider a slice through the center points of the spheres.

M1 r1 Intersection S12

r2 M2

S23

r3 M3

Cornelius We show that this statement is equivalent to that of Yolanda’s. When we have shown this, we will know that both statements are correct, other- wise there would be at least two incorrecct statements but we know that precisely one elf is wrong.

We consider the triangle with the vertices M1 (center point of the small sphere), M2 (center point of the medium sphere) and S12 (a point of inter- section between the small and medium spheres). The line segment M1S12 is a radius of the small sphere and M2S12 is a radius of the medium sphere. When Cornelius’ statement is correct, these two radii intersect perpendicu- larly. By Thales’ theorem, this is equivalent to the statement that the point S12 lies on the circle with diameter M1M2. We deduce that both statements are equivalent and thus correct. Remark: Two spheres which, via reflection, map into themselves, must in- tersect perpendicularly.

Proof: Let K1 be the circle of the small sphere in our transversal cut dia- gram above and K2 the circle of the medium sphere. Let P ∈ K1 be an 0 arbitrary point on the small sphere. Let P = IK2 (P ) be the point P reflec- ted by the medium sphere. By definition of the North Pole reflection law,

16 2 0 |M2S12| = |M2P | · |M2P |.

M2S12 is a radius of the medium sphere. When the small and medium sphe- re intersect perpendicularly, the segment M2S12 becomes a radius for the medium sphere and a tangent for the small sphere simultaneously. Fur- 0 thermore, the segment M2P is a secant through the small sphere and P lies on this secant line segment. By the tangent-secant theorem on a circle, 2 |M2S12| = |M2Pe|·|M2P |, where Pe is the second intersection point of the se- 0 cant M2P with K1. But the points P and Pe coincide since they both satisfy this equation and lie on the half-line from the point M2 through P . There- 0 fore, the point P lies on the sphere K1. This means that when two circles

K1,K2 intersect perpendicularly, then IK2 (K1) ⊂ K1 and IK1 (K2) ⊂ K2.

Conversely, when two spheres map into themselves by reflection, they inter- sect perpendicularly. To see this, we consider the lines M1S12 and M1M2. The line through the center points of the spheres cuts K2 in the points P 0 0 and P , where P lies closer to M1 than P . Since IK1 (K2) = K2 holds, we 0 see that IK1 (P ) = P and therefore

2 0 2 2 r1 = |M1P | · |M1P | = |M1M2| − r2. | {z } | {z } =|M1M2|−r2 =|M1M2|+r2

By the converse of Pythagoras’ theorem, M1S12 and M2S12 meet perpendi- cularly.

Yolanda We have just shown that this statement is correct.

Otis We already know that Cornelius’ statement is correct. We deduce that the triangles ∆M1S12M2 and ∆M2S23M3 are right triangles, where M3 is the center point of the large sphere and S23 is a point of intersection between the medium and large spheres. Therefore, Pythagoras’ theorem applies.

We obtain: |M1M3| = |M1M2| + |M2M3| S.d.P. p 2 2 p 2 2 = r1 + r2 + r2 + r3 p 2 2 2 6= r1 + 2r2 + r3, since otherwise,

p 2 2 p 2 2 p 2 2 2 r1 + r2 + r2 + r3 = r1 + 2r2 + r3 2 2 p 2 2p 2 2 2 2 2 2 2 =⇒ r1 + r2 + 2 r2 + r3 r1 + r2 + r2 + r3 = r1 + 2r2 + r3 p 2 2p 2 2 =⇒ 2 r2 + r3 r1 + r2 = 0.

17 This statement is thus false since all radii are positive. Otherwise, the snow- man would be just a point.

Elf Otis’ statement was incorrect.

Milena The North Pole reflection is a circle inversion. Applying this reflection by the same sphere twice, the doubly reflected sphere becomes the original sphere. When inverting the medium sphere using the small sphere, the in- tersection points between the two are fixed points. In the best case scenario, the medium sphere maps to itself when reflecting along the small sphere, but the part lying on the outer part of the small sphere is reflected in the inner part and vice-versa. The large sphere will also be reflected by the small sphere. It has intersection points together with the medium sphere but differs from it at all other points. This also holds for the reflected large sphere, which means the reflection of the large sphere by the small sphere intersects the medium glass sphere but doesn’t coincide with it. However, the reflection can also not be equal to the small sphere since when perfor- ming reflection by the small sphere, only points on the small sphere are reflected on the small sphere. Therefore, the reflection of the large sphere does not lie within one of the other spheres. Analogously, the same reasoning holds for the reflection of the small sphere by the large sphere. Thus, the statement is correct.

Julian We already know that the reflection of the small sphere by the large sphere (denoted by B13) and the reflection of the large sphere by the small sphere (denoted by B31) do not lie completely within one of the glass sphe- res. The reflection B13 lies within the large sphere, so the reflection of B13 by the small sphere must lie inside B31 and therefore does not lie entirely on a glass sphere. Analogously, the reflection of B31 by the large sphere lies inside B13 and therefore not completely on a glass sphere. The statement is correct.

Lotta When two spheres intersect perpendicularly, one maps by reflection by the other to itself and vice-versa. When we repeat this reflection twice, the second reflected image is equal with the original sphere we reflected. Note that inversions on a circle are angle-preserving.

The glass spheres will be reflected as follows. The symbols K1,K2 and K3

denote the small, medium and large spheres respectively and IK1 ,IK2 and

IK3 are the reflections with respect to the small, medium and large spheres respectively.

18 IK1 K1 −→ K1 for the second reflection, see below IK2 K1 −→ K1 for the second reflection, see below IK3 K1 −→ B13 and B13 intersects K2 perpendicularly IK1 K2 −→ K2 IK2 K2 −→ K2 IK3 K2 −→ K2 IK1 K3 −→ B31 and B31 intersects K2 perpendicularly IK2 K3 −→ K3 IK3 K3 −→ K3 IK1 B13 −→ IK1 (B13) lies inside of B31 IK2 B13 −→ B13 IK3 B13 −→ K1 IK1 B31 −→ K3 IK2 B31 −→ B32 IK3 B31 −→ IK3 (B31) lies inside of B13 This list contains all reflections and reflections of reflections, which means that when K1 and K2 (resp. K2 and K3) intersect perpendicularly, there are exactly four distinct reflections not lying completely on one of the glass spheres. The statement is therefore correct (and could even be sharpened). Mattie The diameter of the drill must be twice the height h of the triangle ∆M1S12M2. By the height formula for a right triangle (where the altitude of height h splits the hypothenuse of the triangle in segments of length p and q), we have h2 = pq. With the theorem on the altitudes of a right triangle and Pythagoras’ theorem, we obtain q q 2 2 2 2 2 2 p · r1 + r2 = r1 and q · r1 + r2 = r2.

q 2 2 r1·r2 With these, we obtain 2h = 2 2 2 . r1+r2 Therefore, the statement is correct.

q 2 2 r1·r2 Noam We already have the diameter of the circle of intersection, which is 2 2 2 . r1+r2 2 2 2 2 r1·r2 r1+r2 Therefore, the square of its radius equals 2 2 . Its reciprocal equals 2 2 = r1+r2 r1·r2 1 1 2 + 2 . r2 r1

19 The statement is thus correct.

Yves The angle of intersection equals the angle between the altitude from S12 down to the line segment M1M2 (meeting the hypotenuse of the triangle ∆M1S12M2 at a point which we denote by H) and the line through M1 and S12. The triangles ∆M1S12H and ∆M1M2S12 are similar since the pair of angles they share on the side M1S12 coincide. Therefore, the desired angle equals arctan r1 . r2 The statement is thus correct.

Alva The distance a between the guide and the circular saw is equal to the radius of the medium sphere minus the length of the line segment q which completely lies within the medium sphere. To compute it, we use the height formula for a right triangle and Pythagoras’ theorem:

r2 r2 q = 2 = 2 c p 2 2 r1 + r2 and by re-arranging a little,

a = r2 − q 2 r2 = r2 − √ r2+r2  1 2  r2 = r2 1 − √ r2+r2 √ 1 2 2 2  r1+r2−r2  = r2 √ r2+r2 1 √2 2 2 2 2 r1+r2−r2 r1+r2 = r2 2 2 r1+r2 We see that this answer is also correct.

20 4 Transportation costs

Author: Sabiene Zänker

4.1 Exercise was sitting with satisfaction at his desk, looking out the window at the magnificent snowy landscape and sipping his hot chocolate with rum. He is pondering. “How nice that Christmas went so smooth this year. I can finally have a weekend to myself with no problems.” That thought didn’t last long. The phone rings! The delivery coor- dinator is calling. “Hey Rupert! How are you doing?” “I got a problem on my hands! I absolutely need your help! We just got a very lucrative contract yesterday. Can you imagine? Normally I would decline it, but with this demand, we could become famous! I would need a specialist like your nephew Willibald, he could compute the transporting costs with us like last time. It’s urgent, I need him this weekend! Long story short, here is the problem: Our gingerbread factory would like to supply in bulk the cities of Aspels, Bum- merang and Cesaria. We have two delivery warehouses, one in Ostopus and one in Westintrigen. The transportation costs, the quantities in stock and the cities’ demands are listed in the table that I just e-mailed to you. Warehouse Transportation costs in ¤/palette Stock ABC O 40 20 10 600 W 20 10 30 400 Demand (palettes) 200 500 300 1000

How should we supply them in order to keep the transportation costs to a mi- nimum? My main concern is to know the optimal cost of the operation. Please, you can surely be of assistance!” “This is your lucky day! Willibald comes to visit me in an hour. I’ll talk to him. I think it’s going to work out! Willibald will come over to see you!”

21 “Thanks, see you later!”

Possible Answers: 1. 12000 ¤

2. 14000 ¤

3. 15000 ¤

4. 16000 ¤

5. 17000 ¤

6. 17500 ¤

7. 18000 ¤

8. 19000 ¤

9. 20000 ¤

10. 21500 ¤

22 4.2 Solution Answer 3: The minimal transportation costs are 15000 Euros.

The table with the information concerning the transportation costs, the quanti- ties in stock and the cities’ demands will be used to define the variables.

Warehouse Transportation allocation in palettes Stock ABC O a0 b0 c0 = 600 − a0 − b0 600

W aw = 200 − a0 bw = 500 − b0 cw = a0 + b0 − 300 400

Demand (palettes) 200 500 300 1000

All the variables a0, b0 , c0, aw, bw and cw are non-negative. Therefore, this implies the following additional conditions:

(1) a0 + b0 ≤ 600 (2) a0 ≤ 200 (3) b0 ≤ 500 (4) a0 + b0 ≥ 300 The transportation costs should be minimized, so the variables are determined by the above given information and with the help of the equations in the table defining the variables, they can be simplified as follows:

(5) K = 40a0 + 20aw + 20b0 + 10bw + 10c0 + 30cw and ∗ −4 (6) K = 40a0 + 30b0 + 600 and (7) K0 = 3 a0. Using the following diagram, it becomes relatively easy to compute the cheapest method of gingerbread delivery from the warehouses O and W to the cities A,B and C.

23 The results are once again summarized in a table. ABC O 0 300 300 W 200 200 0

We can now compute the minimal transportation costs as follows: Km = 20 · 300 + 10 · 300 + 20 · 200 + 10 · 200 = 15000

Thus, the gingerbread factory must pay 15000 ¤ for the delivery. Answer #3 is correct.

24 5 The Big Reindeer Race

Authors: Heide Hoppmann and Kai Hennig Project: B-MI3

5.1 Exercise It’s the day after Christmas and Santa Claus is taking a walk through a beautiful winter landscape after a stressful Christmas night. The polar lights sparkle above the north pole, the snow flakes are falling slowly to the ground and are crunching softly under the weight of Santa’s heavy black boots. All of a sudden, this pea- ceful silence is being disturbed by loud shoutings coming out of the reindeer shed.

Father Christmas’ nine reindeer, who are propelling Santa’s heavy sledge and its countless gifts every year, were arguing furiously. As Santa Claus entered the shed, the reindeer Dancer, Dasher, Prancer, Vixen, Comet, Cupid, Donner, Blitz, and last but not least Rudolph, all with their reddened cheeks (and Rudolph with his red nose, of course!) were facing each other, huffing from exhaustion. “I am by far the fastest reindeer in the world!” says Rudolph, saturated with pride. “You are the fastest one? Are you kidding me? Every year I have to slow down so you can have a chance to catch up at all!”, shouts Comet back at Rudolph. “It’s a miracle that we still manage to get the presents to all children in time the way you keep slowing us down!” adds Dancer while shaking his head in a resigning fashion. “That’s the best one so far. WE slow you down? You are so slow I heard someone calling you a “rein-oh-dear”!” laughed Cupid looking at Dancer. “Ho, ho, ho, guys. Relax. It’s the same thing every year!”, says Santa in his deep laughing voice, trying to calm down the reindeer. “I think it is time to settle this discussion once and for all. What would be better suited for that than a racing competition to determine fair and square who among you is the fastest?”

25 Santa suggests the following rules for the competition: Each reindeer runs exactly one race against every other reindeer. Each race consists of three laps around the shed. For every lap a reindeer finishes in front of his opponent, he is awarded one point (equipped with the latest technology, we can always determine the reindeer in the lead after each lap). If a reindeer manages to be in the lead for all three laps, it is awarded an extra point. After all races are finished, the ranking of the reindeer is determined by the amount of points they managed to collect. If two or more reindeer have the same amount of points, their order is drawn, i.e. a fair lottery is held.

Exactly one of the following statements concerning the Big Reindeer Race is incorrect. Which one is it?

26 Possible Answers: 1. Before the competition starts, Buddy the Christmas elf has to determine the order in which the races are held. However, he is struggling since there are more possible sequences of the races than the number of atoms in Santa Claus’s body (which is approximately 7 · 1027).

2. It is impossible that a reindeer finishes the competition with 31 points.

3. If a reindeer finishes with more than 31 points, the other reindeer have at most 28 points.

4. The sum of the points of all reindeer together is at least 108.

5. The sum of the points of all reindeer together is less than 145.

6. If a reindeer wins a majority of the rounds in each of its races, it finishes with at least 16 points.

7. It is possible to win the competition with 12 points.

8. Even 29 points does not guarantee the first place.

9. If a reindeer manages to collect at least 17 points, it cannot finish last.

10. Rudolph is Buddy’s favourite competitor. He believes that Rudolph will win all rounds in all of his races. Assume that this really happens. In this case, it is possible for a reindeer to finish last with 14 points.

27 5.2 Solution Answer 10: If Rudolph wins all rounds in each of his races, no reindeer can finish last with 14 points.

In order to prove that statement 10 is incorrect while the other nine statements are correct, we first make some easy observations: First, we see that we can model the competition as a league with nine participants playing in single round robin mode (i.e. each participant faces the other exactly ones).

• There are 9 participants.

• Each participant runs in 8 races.

9·8 • 8 + 7 + ··· + 1 = 2 = 36 races are being held. • Each race A vs. B ends with 4:0, 2:1, 1:2, or 0:4 points.

• In each race at least 3 points and at most 4 points are awarded in total.

Next, we prove the correctness of statements 1.) - 9.) and why 10.) is incorrect:

1. There are 36 races. The number of sequences is 36! (speak: 36 factorial) and 36! > 7 · 1027.

2. If a reindeer wins all of its races by 4:0 points it collects 8 · 4 = 32 points in total. If it fails to win 4:0 in only one race, it can collect at most 2+7·4 = 30 points in total. Therefore, it is not possible to finish the competition with 31 points.

3. Considering 2.), the only possibility to earn more than 31 points is to win all races by 4:0, i.e. to finish with 32 points. Hence, if reindeer A wins all of its races by 4:0, this implies that all other collect 0 points in their race against A. Hence, they can win at most 4 points in each of their remaining seven races and finish with at most 0 + 7 · 4 = 28 points total.

4. In each race at least 3 points are awarded. There are 36 races. Hence, there are at least 3 · 36 = 108 points awarded in total.

5. In each race at most 4 points are awarded. There are 36 races. Hence, there are at most 4 · 36 = 144 points awarded in total.

6. To win a majority of the rounds in a race means that a reindeer wins at least two rounds in each of its races. For each of these rounds a point is awarded, and therefore it collects at least 8 · 2 = 16 points total.

28 7. In order to win the competition with 12 points, all other reindeers are allowed to have at most this amount of points, too. Hence, the total number of points in such a scenario can be at most 9 · 12 = 108. Considering 4.), 108 is the smallest amount of points possible and it implies, that all races finish with 2:1 or 1:2 and all reindeers have 12 points after the competition ends. Such a result is possible, as the following example shows: 1 2 3 4 5 6 7 8 9 P 1 2 2 2 2 1 1 1 1 12 2 1 2 2 2 2 1 1 1 12 3 1 1 2 2 2 2 1 1 12 4 1 1 1 2 2 2 2 1 12 5 1 1 1 1 2 2 2 2 12 6 2 1 1 1 1 2 2 2 12 7 2 2 1 1 1 1 2 2 12 8 2 2 2 1 1 1 1 2 12 9 2 2 2 2 1 1 1 1 12 108 Here, entry (i,j) is the number of points that reindeer i ∈ {1 ... 9} won against reindeer j ∈ {1 ... 9}. 8. Assume reindeer A and B both collect 4 points against all the other seven reindeers. Additionally, A wins against B with 2:1 points. In this case, A has exactly 2 + 7 · 4 = 30 points while B has exactly 2 + 7 · 4 = 29 points. Hence, B does not win although he has 29 points. 9. Assume a reindeer finishes last with 17 points. This implies, that all other reindeers have at least this amount of points, too. Hence, the sum of all points must be bigger than 9 · 17 = 153, but this contradicts 5.). Hence, you cannot finish last with 17 points. 10. First, we exclude Rudolph from the competition and consider a league with 8 participants (this can be done, since the other eight reindeers all score 8·7 0 points against Rudolph). In the remaining 7 + 6 + ··· + 1 = 2 = 28 races a total of at most 28 · 4 = 112 can be awarded. In particular, this amount of points can only be distributed if all races end 4:0 or 0:4. Now, in order to finish last with 14 points, all other reindeers must have at least this amount of points, too. Hence, a total of 8 · 14 = 112 points have to be distributed. But as shown above, in order to reach this amount of points, all races have to end 4:0 or 0:4. Hence, all reindeers finish with an amount of points divisible by 4 implying that in order to finish last with 14 points, all other reindeers would have to have 16 points. But this violates the upper bound of 112 points and hence, you cannot finish last with 14 points.

29 6 Explosion

Author: Cor Hurkens (TU Eindhoven)

6.1 Exercise Today, there was an explosion in Santa Claus’ chemistry lab, in which several elves’ beards were burned. The elves Atto, Bilbo, Chico, Dondo, Espo, Frodo, Gumbo, Harpo, Izzo and Jacco nervously explained to Santa what just happened to them over the phone. Unfortunately, they got so upset by the explosino that only one of them was able to give an accurate statement. Who is telling the truth?

30 Possible Answers: 1. Atto says: If both Jacco and I burnt our beards, then either Frodo or Kuffo lost his beard as well. 2. Bilbo says: If both Mirko and I burnt our beards, then either Kuffo or Nemmo lost his beard as well. 3. Chico says: If both Puzzo and I burnt our beards, then either Harpo or Nemmo lost his beard as well. 4. Dondo says: If both Loco and I burnt our beards, then either Gumbo or Nemmo lost his beard as well. 5. Espo says: If both Onno and I burnt our beards, then either Atto or Jacco lost his beard as well. 6. Frodo says: If both Chico and I burnt our beards, then either Bilbo or Mirko lost his beard as well. 7. Gumbo says: If both Onno and I burnt our beards, then either Chico or Puzzo lost his beard as well. 8. Harpo says: If both Bilbo and I burnt our beards, then either Dondo or Izzo lost his beard as well. 9. Izzo says: If both Gumbo and I burnt our beards, then either Espo or Onno lost his beard as well. 10. Jacco says: If both Dondo and I burnt our beards, then either Dondo or Kuffo lost his beard as well.

Reminder: A statement of the form “If X, then Y ” is incorrect if X is true and at the same time, Y is false. In all three remaining cases (X and Y both true; X and Y both false; X false and Y true) the statement is correct. A statement of the form “Either X or Y ” is incorrect only when both X and Y are true or both X and Y are false.

31 6.2 Solution Answer 4: Dondo says the truth.

A statement of the form “If both α and β burned their beards, then either γ or δ burned his beard as well” is true precisely in one of the following three cases:

(i) α didn’t burn his beard

(ii) β didn’t burn his beard

(iii) Exactly one elf from γ und δ has burned his beard.

Furthermore, we introduce the following notation: A stands for “Atto burned his beard”, B stands for “Bilbo burned his beard” and C,D,E, . . . ,P stand for the analogous statements about Chico, Dondo, Espo, . . . , Puzzo.

• If B is false, then Bilbo and Harpo both tell the truth; thus B must be true. • If C is false, then Chico and Frodo both tell the truth; thus C must be true. • If D is false, then Dondo and Jacco both tell the truth; thus D must be true. • If G is false, then Gumbo and Izzo both tell the truth; thus G must be true. • If J is false, then Atto and Jacco both tell the truth; thus J must be true. • If O is false, then Espo and Gumbo both tell the truth; thus O must be true.

To summarize: The six statements B,C,D,G,J,O are true.

• If A is false, then Atto tells the truth (since the if-part of his statement is false). But then Espo also tells the truth (since the then-part of his statement is true). Therefore A must be true. • If E is false, then Espo (if-part is false) and Izzo (then-part is true) tell the truth, so E must be true. • If I is false, then Izzo (if-part is false) and Harpo (then-part is true) tell the truth, so I must be true. • If M is false, then Bilbo (if-part is false) and Frodo (then-part is true) tell the truth, so M must be true. • If P is false, then Chico (if-part is false) and Gumbo (then-part is true) tell the truth, so P must be true.

To summarize: The five statements A,E,I,M,P are also true.

32 • If F and K are both false, then Frodo and Jacco tell the truth, which is impossible. If F is true and K is false, then Atto and Jacco tell the truth, impossible. If F is false and K is true, then Atto and Frodo tell the truth, impossible. Therefore F and K are both true. • If H and N are both false, then Bilbo and Harpo tell the truth, which is impossible. If H is true and N is false, then Bilbo and Chico tell the truth, impossible. If H is false and N is true, then Chico and Harpo tell the truth, impossible. Therefore H and N are both true.

All in all, we now know that the statements A,B,C,D,E,F,G,H,I,J,K, M,N,O,P are true; only the truth of statement L remains open. Since the elves Atto, Bilbo, Chico, Espo, Frodo, Gumbo, Harpo, Izzo and Jacco were confused and made false statements, the elf Dondo must have told the truth. Therefore L is false, hence answer #4 is correct.

33 7 Cookies

Authors: Cor Hurkens (TU Eindhoven) Rudi Pendavingh (TU Eindhoven)

7.1 Exercise The and Servant Rupert are sharing 205 Christmas cookies among them- selves. The sharing process involves multiple rounds. At the start of each round, Rupert picks a number of his choice of (not yet assigned) cookies and places them on a plate. After that, it is up to the Grinch to decide who gets the cookies on the plate; either they all go to the Grinch, or they all go to Rupert. This process is repeated until all cookies have been assigned. The process also ends once one of the two has been assigned the contents of twelve plates. In this case, all the remaining cookies go to the other person, that is, the one who has received up to now no more than eleven plates. Each round, the Grinch and Servant Rupert try to make the decision which gives them the most cookies. What is the maximum number of cookies that Rupert can secure for himself?

34 Possible Answers: 1. 95 cookies 2. 96 cookies 3. 97 cookies 4. 98 cookies 5. 99 cookies 6. 100 cookies 7. 101 cookies 8. 102 cookies 9. 103 cookies 10. 104 cookies

35 7.2 Solution Answer 3: Servant Rupert gets 97 cookies and the Grinch gets 108 cookies; note that 97 + 108 = 205.

The following strategy guarantees the Grinch at least 108 cookies: “Every plate with at most 8 cookies goes to Servant Ruprecht, and every plate with at least 9 cookies goes to the Grinch.”

With this strategy, if the Grinch gets 12 plates, he obtains at least 12 · 9 = 108 cookies; if he were to get 11 or less plates, this means Servant Ruprecht got at most 12 plates, which gives him at most 12·8 = 96 cookies, hence leaving at least 205 − 96 − 109 cookies for the Grinch.

On the other hand, Servant Ruprecht can secure at least 97 cookies for himself if he puts 9 cookies on the first 22 plates. With this strategy, if the Grinch takes 12 of those plates, Servant Ruprecht receives the remaining 205 − 12 · 9 = 97 cookies. If the Grinch takes at most 11 of those plates, then Servant Ruprecht gets at least 11 of these plates, giving him at least 11 · 9 = 99 cookies.

36 8 Distributing presents in Hawaii

Authors: Jan Hackfeld, Julie Meißner, Miriam Schlöter Project: Design and Operation of Infrastructure Networks under Uncertainty; DFG SPP 1736 „Algorithms for Big Data“.

8.1 Exercise Santa Claus almost completed his plan how to deliver all his presents on the night of December 24th just a few days before Christmas. Every year, he starts on the Fiji Islands and then continues distributing presents in all time zones until he reaches the last families on Hawaii. The missing bit of his tour concerns one skyscraper, where three families whom he wants to visit live. Santa explains to Rudolph: “This house really makes me scratch my head! I lost the paper where I noted when the last member of each family arrives at home. All I remember is that they all arrive at some time between midnight and 2:30 in the morning. As they all take the bus, they will arrive at a multiple of 10 minutes after midnight and then immediately go to bed.

Floor Alani 1st floor Olina 6th floor Malu 9th floor

We have to land and take off on a balcony on the 5th floor, as this is where the only access to the ventilation duct is. However, the duct is so narrow that I need 5 minutes to crawl from one floor to the next. What is the best strategy for me to distribute the presents to every family while they’re all asleep? This will determine when we can start our Christmas night party on the Hawaiian beach!" Rudolph is puzzled for a while, but then his nose begins to shine and he suggests the following: “So, you need 5 minutes to crawl from one floor to the next. You can also distribute the presents to the stockings of every family so quickly that

37 we can neglect this time. Furthermore, you can hear when someone comes home by bus from anywhere in the duct, which can only occur every ten minutes. Unfortunately, you don’t currently know when they arrive because the piece of paper on which you wrote that down is lost. Thus you need to take decisions before knowing when Alani, Olina, and Malu arrive at home. Let’s call a strategy reacting to the times when they arrive a strategy-without-prior-information. To evaluate the quality of our strategy-without-prior-information, we can compa- re it to the time when we could leave from the 5th floor if you hadn’t lost the note and you knew the arrival times of the three people. In this case we can describe an optimal strategy-with-prior-information and compute for given arrival times the best route through the ventilation duct, such that you finish distributing all presents as early as possible. The difference between the departure time of a strategy-without-prior-information and a strategy-with-prior-information should be as small as possible, even in the worst case scenario of the three families’ arrival times.” Santa Claus and Rudolph observe several things about an optimal strategy- without-prior-information. Which of their following observations is incorrect?

Possible Answers: 1. It is an optimal strategy to land at midnight on the balcony of the 5th floor. 2. If Alani and Olina arrive first and at the same time, then Santa shouldn’t immediately crawl to the 6th floor. 3. Even if Olina arrives at home at least 50 minutes after Alani and Malu, any optimal strategy-without-prior-information ends 20 minutes later in

38 the worst case than an optimal strategy-with-prior-information.

4. If all three arrive at 2:30 in the morning, there is an optimal strategy- without-prior-information, that finishes at the same time as any optimal strategy-with-prior-information

5. If no one has arrived by 0:30, then Santa must still be in the 5th floor at 0:30.

6. There is a strategy-without-prior-information for Santa such that he can take off from the 5th floor at most 20 minutes after every optimal strategy- with-prior-information.

7. After Santa Claus has distributed the presents on the 9th floor, he must not wait on the 6th floor for Olina or Alani to return home.

8. No matter when Alani, Olina and Malu arrive at home exactly, Santa can assume he will be gone from the 5th floor by 3:30.

9. If Alani arrives at least an hour after Malu, there is an optimal strategy- without-prior-information for Santa such that he can leave from the 5th floor at the same time as with an optimal strategy-with-prior-information.

10. If Alani returns home an hour before Malu, then Santa can take off by 2:50 at the latest.

Connection to the project: In discrete optimization, we study algorithms to find an optimal solution among a huge, but usually finite, set of solutions. You can solve this problem of the Christmas calendar with pen and paper. For a large number of floors and fami- lies, however, we would only be able to solve it with suitable algorithms on a computer. A particular challenge is the fact that in this problem, Santa needs to take decisions without knowing all information about the arrival times. The part of discrete optimization studying such problems is called Online Optimiza- tion and what we call a strategy-without-prior-information is referred to as an online algorithm. In Online Optimization, we search for good algorithms solving problems where decisions have to be taken with partial information, even though these decisions influence the quality of the final solution. In the project that in- spired us to design this problem, we studied algorithms for elevators, which could be used to operate industrial elevators that sort products n a tall shelf. Bemerkungen: Bitte nicht am 7.12. oder 15.12.

39 Malu 9

20

8 minutes

7 minutes

20 5

Olina 6 min.

min. 40 5 5 minutes

20 4 minutes

minutes 40 3 minutes

2 20

Alani 1

Abbildung 1: Possible strategies for Santa Claus

8.2 Solution Answer 9: The following statement is false: “If Alani arrives at least an hour after Malu, there is an optimal strategy-without-prior-information for Santa such that he can leave from the 5th floor at the same time as with an optimal strategy-with-prior-information.”

In a strategy-with-prior-information, there are two possible routes on which San- ta Claus can crawl through the duct. He can either follow the blue or the red route (see figure 1). When following the blue route, Santa Claus first visits Ala- ni’s family on the first floor, then crawls to the 9th floor to visit Malu’s family and finally crawls back to the 5th floor. When crawling without interruption, the whole blue route takes 80 minutes. However, it can happen that Santa Claus has to wait during his tour for one family member to return home before he can distribute the presents for that family.

Alternatively, Santa Claus can follow the red route. Here, he first visits Malu’s family on the 9th floor, then crawls to the first floor to distribute the presents for Alani’s family and finally goes back to the 5th floor. If Santa hasn’t already visited Olina’s family on his tour, he now has to crawl to the 6th floor and back to the 5th floor before he can take off to the Hawaiian beach.

The following strategy is one possible optimal strategy-with-prior-information: If Malu arrives home before Alani, Santa Claus decides to take the red route. In all other cases, he takes the blue route. On the red route, Santa Claus distributes the presents for Olina’s family immediately if Olina has already arrived at home when he passes by the 6th floor. Otherwise, he does the following: while on the red route and on the way to Alani’s family, Santa Claus passes by the 6th floor.

40 If Olina arrives home at least 30 minutes before Alani, Santa waits for Olina on the 6th floor and distributes the present to Olina’s family before proceeding towards Alani’s family. Otherwise, Santa Claus crawls towards Alani’s family wi- thout waiting and visits Olina’s family at the end of his tour.

Our strategy-without-prior-information tries to imitate this strategy-with-prior- information. Santa Claus waits on the 5th floor until he notices that Alani or Malu has returned home. If Alani returns home before or at the same time as Malu, Santa Claus immediately crawls to the first floor and follows the blue rou- te. Otherwise, he follows the red route. On the red route, he passes the 6th floor without waiting for Olina in case she hasn’t returned home yet.

In an optimal strategy-with-prior-information, Santa Claus leaves the 5th floor exactly 20 minutes before Malu or Alani return home in order to be able to distribute the presents exactly when they arrive home. In our strategy-without- prior-information, Santa does not leave the 5th floor before one of the family members has arrived home. Thus, he starts with a delay of 20 minutes compared to the strategy-with-prior-information. This delay of 20 minutes could increa- se when Santa Claus follows our strategy-without-prior-information because he might have to interrupt his tour to wait until a family returns home or because he takes the red route and has to take the detour to visit Olina’s family at the end. We will now argue that this does not happen: when following our strategy- without-prior-information, Santa Claus will always be able to take off from the 5th floor at most 20 minutes after an optimal strategy-with-prior-information.

If Santa has to wait for a family member to return home when following our strategy-without-prior-information, he also would need to wait for this family member when following the optimal strategy-with-prior-information. Thus, in this case Santa Claus is even able to catch up with the optimal strategy-with- prior-information.

If Santa follows the red route and has to visit Olina’s family at the end of his tour, then Olina comes home after Santa has passed by the 6th floor when proceeding towards Alani’s family. In the optimal strategy-with-prior-information, Santa also would have followed the red tour. Thus, when following the optimal strategy-with- prior-information, Santa would have either waited to take the detour to the 6th floor at the end of his tour or waited on the 6th floor for Olina to return home. In the first case, Santa’s delay compared to the optimal tour cannot increase and thus is still at most 20 minutes. In the second case, Olina’s family receives their presents before Alani’s family in the strategy-with-prior-information. Thus, in the strategy-without-prior-information, Alani’s family receives their presents earlier or at the same time as in the optimal strategy-with-prior-information. This means that in this case, Santa is delayed by at most 10 minutes compared to the

41 optimal strategy-with-prior-information.

At 2:10, Santa can leave the 5th floor without knowing if Malu or Alani returns home first, because he knows that all family members return home before 2:30. Thus, at 2:10, Santa can crawl to the first or 9th floor because in this case, it does not matter whether he follows the blue or red route.

Now, let us look at the ten observations concerning an optimal strategy-without- prior-information.

1. It is optimal to land at midnight on the balcony of the 5th floor. Correct. In the strategy-without-prior-information that we described above, Santa Claus lands at midnight and needs at most 20 minutes longer than any strategy-with-prior-information. Because of Observation 3, this is optimal. This means that it is optimal to land at midnight.

2. If Alani and Olina arrive first and at the same time, then Santa shouldn’t immediately crawl to the 6th floor. Correct. Assume Alani and Olina both come home at 0:30 and Malu at 1:10. In an optimal strategy-with-prior-information, Santa visits Alani’s fa- mily at 0:30, Olina’s family at 0:55 and Malu’s family at 1:10. At 1:30, he can take off from the 5th floor. If Santa distributes the presents for Olina’s family at 0:35, he needs to wait until 2:00 to visit all families and return to the 5th floor. This is 30 minutes slower than the optimal strategy-with- prior-information. The strategy-without-prior-information that we descri- bed above only needs 20 minutes more.

3. Even if Olina comes home at least 50 minutes after Alani and Malu, any op- timal strategy-without-prior-information ends 20 minutes later in the worst case than an optimal strategy-with-prior-information. Correct. Assume Alani and Malu both come home at 0:30 and Olina comes home at 1:20. In an optimal strategy-with-prior-information, Santa delivers the presents for Alani’s family at 0:30, the presents for Malu’s family at 1:10 and the presents for Olina’s family at 1:25. At 1:30, Santa can take off from the 5th floor.

Observation 5 implies that in an optimal-strategy-without-prior-information, Santa should wait on the 5th floor until one of the family members has re- turned home. Thus, if Santa is still on the 5th floor at 0:30 and also has not delivered any presents, the earliest he can be ready to take off from the

42 5th floor is at 1:50. Thus, in this case, an optimal strategy-without-prior- information needs 20 minutes longer than an optimal strategy-with-prior- information.

4. There is an optimal strategy-without-prior-information that finishes at the same time as any optimal strategy-with-prior-information if all three arrive at 2:30. Correct. In the strategy-without-prior-information that we described abo- ve, Santa is ready to take off from the 5th floor at 3:30. In an optimal strategy-with-prior-information, Santa still needs to pass by 12 floors at 2:30. Thus, in this case, the optimal strategy-with-prior-information also ends the delivery at 3:30.

5. If no one has arrived by 0:30, then Santa must still be on the 5th floor at 0:30. Correct. Assume Santa Claus is on some floor above the 5th floor at 0:30. Also assume that Alani arrives home at 0:30, Olina at 0:30 and Malu at 1:10. In this case, an optimal strategy-with-prior-information takes off from the 5th floor at 1:30. Since Santa Claus is above the 5th floor at 0:30, he needs more than 20 minutes to reach Alani’s family. Thus, regardless of which family Sants visits first, he cannot not be done delivering the presents by 1:50. Therefore, he needs more than 20 minutes longer than an optimal strategy-with-prior-information. If Santa Claus is below the 5th floor at 0:30, we can swap the arrival times of Alani and Malu to get an example in which Santa Claus is more than 20 minutes slower than an optimal strategy-with-prior-information. Since there is an optimal strategy-without-prior-information which is at most 20 minutes slower than any optimal strategy-with-prior-information, Santa should be on the 5th floor at 0:30.

6. There is a strategy-without-prior-information for Santa such that he can take off from the 5th floor at most 20 minutes after every optimal strategy- with-prior-information. Correct. See the strategy we described above.

7. After Santa Claus has distributed the presents to the 9th floor, he must not wait on the 6th floor for Olina or Alani to return home. Correct. Assume Malu returns home at 0:30, Olina at 1:30 and Alani at 1:10. In a optimal strategy-with-prior-information, Santa Claus distributes the presents to Alani’s and Malu’s families at the moments Alani and Malu come home. Olina’s family gets its presents at 1:35 and Santa can take off

43 at 1:40.

Assume Santa follows a strategy-without-prior-information which first de- livers the presents to Malu’s family and waits for Alani to return home on the 6th floor at 1:10. In this case, Santa can take off no sooner than 2:05 if he visits Alani’s family before Olina’s. If he visits Olina’s family before Alani’s, he can take off at 2:15 at the earliest. In both cases, Santa Claus has at least a 25 minutes delay compared to the optimal strategy-with- prior-information. According to Observation 6, there is a strategy-without- prior-information that has a delay of at most 20 minutes compared to the optimal strategy-with-prior-information. Thus, Santa should not wait on the 6th floor. 8. No matter when Alani, Olina and Malu arrive home exactly, Santa can be sure that he can leave from the 5th floor before 3:30. Correct. No matter when the three arrive home exactly, Santa Claus dis- tributes the presents to Alani’s or Malu’s family before 2:30. At 2:30, all families have arrived home. Thus, Santa needs at most 60 more minutes to deliver the remaining presents and will be for sure ready to leave from the 5th floor by 3:30. 9. If Alani arrives at least an hour after Malu, there is an optimal strategy- without-prior-information for Santa such that he can leave from the 5th floor at the same time as with an optimal strategy-with-prior-information. Wrong. Assume Malu returns at 0:30, Olina at 1:30 and Alani at 2:10 (or alternatively, Malu returns at 0:30, Olina at 2:00 and Alani at 1:30). An optimal strategy-with-prior-information can deliver the presents to all fa- milies at the moments the family members arrive home in both scenarios. In the first case, Santa can take off at 2:20; in the second case, at 2:05. In a strategy-without-prior-information, Santa has to decide on which floor to wait at 1:30 without knowing the exact times when the family members return home. No matter if he waits on the first floor or on the 6th floor or somewhere in between, in one of the cases, he needs longer than the optimal strategy-with-prior-information. 10. If Alani returns home 60 minutes before Malu, then Santa can take off by 2:50 at the latest. Correct. In our strategy-without-prior-information, Santa crawls to the first floor as soon as Alani returns home. After that, he crawls to the 9th floor. Malu returns home at 2:30 at the latest. Thus, Santa starts to crawl towards the 6th floor before 2:30. When Santa arrives on the 6th floor, Olina has already returned home and Santa can deliver the presents right away. Santa thus reaches the 5th floor and is ready to take off before 2:50.

44 9 Brain teaser

Author: Unknown Editor: Matthias Nicol

9.1 Exercise Santa Claus would like to think of a new brain teaser for his elves. Since he has a small prize (two cinema tickets) and a big prize (two concert tickets) to give away, the question should have an easy part and a hard part. He formulates it this way: In a completely dark magic room, there are twenty gloves which are indistinguis- hable inside this room. They consist of

• five white gloves for the right hand,

• five white gloves for the left hand,

• five black gloves for the right hand and

• five black gloves for the left hand.

Two gloves are naturally considered an “appropriate pair” when they are of the same color, one of them is for the left hand and the other one is for the right hand. A “pick” is defined as the withdrawal of a single glove where the color cannot be decided during the selection because of the darkness.

A “pick of n gloves” consists of performing n picks one after the other and only then determining if any two of the n gloves selected form an appropriate pair. When this is the case, we consider the pick of n gloves as conclusive. It soon becomes obvious to Santa that the smallest natural number n with the property that a pick of n gloves is 100% sure conclusive can be really easily and

45 very quickly determined. It thus sounds appropriate to allocate the small prize to this question. To win the concert tickets, the elves must find the correct answer to the following formulation of the question: “How big is the smallest natural number n with the property that a pick of n gloves is conclusive with probability higher than 99%?”

Possible Answers: 1. n = 15 2. n = 14 3. n = 13 4. n = 11 5. n = 10 6. n = 9 7. n = 8 8. n = 7 9. n = 6 10. n = 5

46 9.2 Solution Answer 8: At least n = 7 gloves need to be withdrawn for the pick to be conclusive with 99% probability.

Let f(m) denote the probability that a pick of m gloves is conclusive. For exam- ple, f(1) = 0 and f(11) = 1. It is clear that f is monotone increasing. Therefore, the natural number n we are looking for is the one which satisfies: f(n) > 0,99 and f(n − 1) ≤ 0,99, n ≥ 2

The 20 gloves are separated in four categories:

• five gloves are white left-handed,

• five gloves are white right-handed,

• five gloves are black left-handed and

• five gloves are black right-handed.

We pick m gloves, 6 ≤ m ≤ 10 (therefore out of at least two categories) and con- 20 sider the corresponding set E of selected gloves. There are m possibilities for E.

We now compute the amount of possibilities that E does not contain an appro- priate pair. The m gloves come from at least 2 different categories since m ≥ 6 and at most from two different categories (otherwise, they always contain an ap- propriate pair). As a result, we obtain the following four possible combinations of categories containing no appropriate pair:

• (white left-handed, black left-handed)

• (white left-handed, black right-handed)

• (white right-handed, black left-handed) and

• (white right-handed, black right-handed).

5+5 10 In each of the four cases, there are exactly m = m possibilities for E.

10 4·(m) We deduce: f(m) = 1 − 20 (6 ≤ m ≤ 10). (m) In particular, 10 4·( 6 ) 7 f(6) = 1 − 20 = 1 − 323 < 0,99 ( 6 ) 10 4·( 7 ) 2 f(7) = 1 − 20 = 1 − 323 > 0,99. ( 7 ) Since f is monotonic, n = 7 is the number we were looking for.

47 10 The dice game

Author: Christian Schröder Project: SE 1

10.1 Problem Three of Santa’s elves ask him for some of his famous delicious Christmas cookies. They crave them so much that even just thinking of them makes their mouth water. Santa agrees, but only under the rules of a dice game. The game starts with six empty plates, numbered one through six. The elves take turns rolling a fair dice. The rolled number, say a five, corresponds to a plate, here the fifth plate. In the beginning, this plate is empty. Santa places a cookie on it. Then the next elf rolls the die. Should the plate that corresponds to the rolled number contain a cookie, the elf may have it. But if that plate is empty, Santa will put a cookie there. Either way, now it’s the next elf’s turn. The game continues as described as long as there is at least one empty plate. The game ends when a new cookie fills the last empty plate. In this case the previous rolling elf may eat all six cookies and the elves may go back to work. On average, how many cookies will be eaten in total during this game?

48 Possible Answers: 1.6

2. 6.3

3. 12

4. 27.2

5. 31.4

6. 42

7. 44.6

8. 47

9. 83.2

10. infinitely many

49 10.2 Solution Answer 7: The elves ate on average 44.6 cookies.

First of all, it doesn’t matter how many elves play the game because only the total number of cookies was asked, not who eats them.

The minimal number of eaten cookies required to end the game is obviously six (answer 1); this happens, e.g., when the numbers 1, 2, 3, 4, 5, 6 are rolled. The maximal number of eaten cookies required to end the game is unlimited (answer 10). This happens, e.g., when only ones are rolled. The average number is some- where in between these extremes. It doesn’t have to be an integer. (The average number to be rolled is 3.5 which is also not an integer).

Let’s assume for the moment the game ends after m die rolls. How many cookies have been eaten? At least six dice rolls are required to fill every plate once. At the end of the game, the six plates are emptied at once. Should a plate be emptied during the game, it has to be filled using a further dice roll. Thus, (m − 6)/2 + 6 cookies are consumed in total.

It remains to compute how many dice rolls are required on average to end the game. Let’s assume that at some point in the game, five plates are filled. If the number of the empty plate shows up in the next dice roll, the game ends after this dice roll. This happens with probability 1/6. If, on the other hand, the number of a filled plate shows up, the number of filled plates drops to four. This happens with probability 5/6. Here it doesn’t matter which five of the six plates were filled.

Let m5 denote the average number of remaining turns once there are five filled plates. Then we have 1 5 m = 1 + · 0 + · m , 5 6 6 4 where m4 denotes the average number of remaining turns once there are four filled plates.

What happens with four filled plates? If the number of an empty plate shows up in the next dice roll, the number of filled plates rises to five. This happens with probability 2/6. If, on the other hand, the number of a filled plate shows up, the number of filled plates drops to three. This happens with probability 4/6. It doesn’t matter which four of the six plates were filled. As before, we have 2 4 m = 1 + · m + · m . 4 6 5 6 3

50 and by analogous considerations 3 3 m = 1 + · m + · m , 3 6 4 6 2 4 2 m = 1 + · m + · m , 2 6 3 6 1 5 1 m = 1 + · m + · m . 1 6 2 6 0

Here m2, m1, and m0 denote the average number of remaining turns once the- re are two, one, or no filled plates, respectively. The sought for number is thus m0.

Finally, we assume that at some point in the game all plates are empty, which is the case at the beginning of the game. After one dice roll there will be one filled plate, no matter what number shows up. Hence 6 m = 1 + m . 0 6 1 Summarizing, we have the following linear system of equations (multiplying all equations by six)

6m5 − 5m4 + 0m3 + 0m2 + 0m1 + 0m0 = 6,

−2m5 + 6m4 − 4m3 + 0m2 + 0m1 + 0m0 = 6,

0m5 − 3m4 + 6m3 − 3m2 + 0m1 + 0m0 = 6,

0m5 + 0m4 − 4m3 + 6m2 − 2m1 + 0m0 = 6,

0m5 + 0m4 + 0m3 − 5m2 + 6m1 − 1m0 = 6,

0m5 + 0m4 + 0m3 + 0m2 − 6m1 + 6m0 = 6.

Its solution (obtained e.g. by Gaussian elimination) is 1 [m ,m ,m ,m ,m ,m ] = [630,744,786,808,822,832]. 5 4 3 2 1 0 10

Thus, the game ends on average after m0 = 83,2 dice rolls. (This is answer 9.) Hence the number of consumed cookies is

(m0 − 6)/2 + 6 = (83,2 − 6)/2 + 6 = 44,6.

Therefore, answer 7 is correct.

About the remaining wrong answers: 2. 2π, 3. twice the minimal number, 4. 10e,

51 5. 10π, 6. the Answer to the Ultimate Question of Life, The Universe, and Everything, 8. the most random whole number below 100, 9. the average number of dice rolls.

52 11 Card game

Author: Onno Boxma (TU Eindhoven)

11.1 Exercise The Grinch has a set of cards containing 16 cards which are numbered from 1 to 16. The cards are shuffled properly by Santa Claus and then split into two stacks of 8 cards each. Since Santa shuffled the cards fair and square, every possible distribution of the cards in each pile is equally possible. The Grinch then gets the first stack and Santa Claus gets the second stack. Both pick up their cards and look at their hands.

Both players are asked to put one card at a time face up on the table. Santa Claus lays down the first card. The game ends when the sum of all numbers on the cards on the table is divisible by 17. The winner is the player who put the last card on the table. Santa Claus and the Grinch play flawlessly, so they always perform the best move maximizing their winning chances.

How big is the probability that Santa Claus wins the game?

53 Possible Answers: 1. 0 2. 8! · 8!/16! 3. 1/16! 4. 23/16! 5. 1/17 6. 1/16 7. 1/2 8. 3/4 9. 15/16 10. 1

54 11.2 Solution Answer 1: The probability for Father Christmas to win the game is zero.

First of all, a card lies either face up on the table, in one’s hand or in the op- ponent’s hand. Therefore, both players know their opponent’s hand, so basically, we can assume that the game is played with open hands.

Second of all, if we consider the situation where it’s the Grinch’s turn and he has k cards in his hand, Santa Claus must have k −1 cards left. Let S denote the sum of the numbers visible on the cards already on the table. A card x is bad for the Grinch if Santa Claus has the card y in his hand such that S + x + y is divisible by 17. In this case, the Grinch cannot play the card x, otherwise Santa would win by playing the card y. Since the Grinch has more cards than Santa in his hand, he has at least one card in his hand which is not bad. Therefore, the Grinch can play an arbitrary card in his hand which is not bad and continue to his next turn.

Third of all, Santa Claus cannot win with his first card. The Grinch then keeps playing his cards which are not bad and prevents Santa from winning on his next turn. The game keeps going on and on until Santa has no more cards and the Grinch still has one left. The Grinch plays his last card. The sum on the table now equals to 1 + 2 + 3 + ··· + 16 = 8 · 17, thus the Grinch wins.

We deduce that answer #1 is correct. Father Christmas has no chance of winning at this game.

55 12 The radio competition

Author: Stefan Rüdrich

12.1 Exercise It’s been three years since the Christmas Radio station 83.3 FM has been organi- zing a contest with attractive prizes for Santa’s hard-working elves on December 12th every year. The radio station is looking for gnomes with interest in litera- ture, history, chemistry, physics, and of course mathematics. Santa Claus, being a math fan himself, is supplying the staff with free coffee and his delicious Christ- mas cookies. The winners of the math contest may get their hands on two tickets to the upcoming New Year’s Eve concert, including accomodation in a five-star luxurious hotel in the Land of the Elves. Obviously, the demand is very high for such an exclusive opportunity. Only the 83rd caller gets the chance to play against the radio host for the tickets.

The candidate has to guess which of four cookie jars, labelled with the letters A, B, C and D, contains the concert tickets. Three of them are filled with cookies, while the fourth jar, chosen at random, contains the tickets.

To make the suspense last a bit longer, the game is prolonged in the following way: once the candidate has chosen one of the jars, it is not opened right away. The host, who actually knows where to find the prize, reveals one of the three other jars first, but always one which contains only cookies. Next, the candidate may decide to stick to his choice or switch to one of the two other unopened jars. Only then the host opens the jar which the candidate has ultimately chosen to dedice whether the caller wins the tickets or not.

Is it a sound choice to switch to a different jar when given the chance? Will it increase the likelihood to win the tickets?

56 Possible Answers: 1. Yes, switching to a different jar guarantees to win the tickets.

2. Yes, the probability to win increases to 3/8 after switching.

3. No, the chance to win remains at 1/4 after switching.

4. No, the chance to win drops to 1/8 after switching.

5. No, the chance to win drops to 0 after switching.

6. Yes, the probability to win increases to 3/4 after switching.

7. No, the chance to win drops to 1/6 after switching.

8. It makes no difference whether the candidate switches or not.

9. Yes, the probability to win increases to 1/2 after switching.

10. To maximize the chance to win, a candidate should choose randomly whe- ther to switch.

57 12.2 Solution Answer 2: The likelihood to win the tickets increases from 1/4 to 3/8 by switching to a different jar.

Even famous mathematicians, such as Paul Erdős, had doubts about the correct solution to the underlying problem, as many people intuitively think that all jars are equally likely to contain the prize. Therefore, the game strategy should have no influence on the chance to win.

What seems like a contradiction is really just confusion caused by the new si- tuation which is established when one of the “losing” jars is opened by the radio host. This action reveals new information that was unknown when the candidate made his first decision, thus altering the present choices.

Each of the jars A, B, C and D might hold the tickets with the same probability of 1/4. Without further information, the likelihood of picking the right jar at the very beginning is always 1/4, regardless of how that jar is chosen. For the sake of simplicity, let us assume that a candidate picks jar A and follows the strategy to switch the jar once the host has opened another one.

When the host opens one of the remaininig jars which contains only cookies, say jar C, that jar can be ruled out permanently. Still the likelihood that A is the winning jar is 1/4, while the chance that it is not still sits at 3/4. Now, there are no longer three, but only two other options left: jar B and jar D. As a result, the chance to win after switching to one of them becomes (3/4)/2 = 3/8.

If a candidate decides to stick to the first choice instead no matter what, the probability to win the tickets right away is 1/4. As the candidate does not switch, opening another jar without tickets has no impact on the probability to pick the right jar at the beginning, so the chance to win stays at 1/4.

58 Origin of the problem: The puzzle mimics the final stage of the American game show ‘Let’s Make a Deal’, which was popular enough to spread worldwide in the 90s, e.g. airing on German TV stations as ‘Geh aufs Ganze!’.

The presented problem was originally phrased by the biostatistician Steve Selvin, who published it in the journal American Statistician in 1975. It only became pu- blicly known 15 years later through Marylin vos Savant’s column Ask Marilyn in the magazine Parade, where she answered a letter by Craig F. Whitaker. The original wording of the problem was not totally clear about the rules of the game and the host’s behavior, causing contradicting interpretations and disagreement about the correct solution. After clearing up the misunderstandings, the solution was unanimously accepted.

By now this brain teaser is known to the anglophone world as the ‘Monty Hall problem’, named after the host of the game show it originates from1. In German- speaking countries, they call it ‘Ziegenproblem’ (‘goat problem’), as the game show featured three large doors instead of four cookie jars and goats waited behind the two losing doors as a jokey consolation prize.

1source: https://en.wikipedia.org/wiki/Monty_Hall_problem

59 13 Test for a job interview

Author: unknown Editor: Matthias Nicol

13.1 Exercise Santa Claus has to hire new elves because of the huge workload coming up. As a test for the interview, he thought of a question which is quite easy according to him:

List all triples of real numbers §(x,y,z) which solve the following equations:

2x + x2y = y (1) 2y + y2z = z (2) 2z + z2x = x (3)

Of course, Santa would like to be able to solve this problem himself. After trying a little bit, he starts to freak out very quickly. He’s not making any progress with the methods already known to him. His mathematician friend from the North-North-Eastern University gives him a helpful little piece of advice. “You need to make the change of variables x = tan α.” After concentrating and pondering on it for a while, Santa Claus figures out what the complete set of solutions to the problem is. How many solutions are there to this system of equations?

60 Possible Answers: 1. of course, no solution

2. exactly one solution

3. exactly two solutions

4. exactly three solutions

5. exactly four solutions

6. exactly five solutions

7. exactly six solutions

8. exactly seven solutions

9. exactly eight solutions

10. infinitely many solutions

61 13.2 Solution Answer 8: There are exactly seven solutions.

If a triple §(x,y,z) solves the system of equations, then the following holds:

|x|= 6 1, |y|= 6 1, |z|= 6 1, x := tan α (4)

2x x=tan α 2 tan α (1) ⇐⇒ y = 1−x2 = 1−tan2 α = tan(2α) (5)

2y 5 2 tan(2α) (2) ⇐⇒ z = 1−y2 = 1−tan2(2α) = tan(4α) (6)

2z 6 2 tan(4α) (3) ⇐⇒ x = 1−z2 = 1−tan2(4α) = tan(8α) (7)

(4) ∧ (7) =⇒ tan α = tan(8α)

Because of the periodicity of the tangent function, there exists an integer n sa- tisfying α + nπ = 8α. nπ This implies α = 7 ,n ∈ Z. nπ By equation (4), x must also satisfy x = tan( 7 ),n ∈ Z. We deduce the following possible values for x to consider, namely:

π 2π 3π 4π 5π x = tan(0), x = tan( 7 ), x = tan( 7 ), x = tan( 7 ), x = tan( 7 ), x = tan( 7 ) and 6π x = tan( 7 )). According to the equations (4), (5) and (6) above, we get at most seven triples solving the system of equations:

nπ 2nπ 4nπ (tan( 7 ), tan( 7 ), tan( 7 )), n = 0,1,2,3,4,5,6 (8)

All seven triples of the form (8) satisfy the three equations (1), (2) and (3) since for each triple, we have |x|= 6 1, |y|= 6 1, |z|= 6 1 and

nπ 2x 2 tan( 7 ) 2nπ 2 = 2 nπ = tan( ) = y 1−x 1−tan ( ffl7 ) 7 2nπ 2y 2 tan( 7 ) 4nπ 1−y2 = 2 2nπ = tan( 7 ) = z 1−tan ( ffl7 ) 4nπ 2z 2 tan( 7 ) 8nπ 1−z2 = 2 4nπ = tan( 7 ) = x 1−tan ( ffl7 )

8nπ nπ The latter holds since tan( 7 ) = tan( 7 ).

62 14 Deep snow

Author: Georg Prokert (TU Eindhoven)

14.1 Exercise Servant Rupert is fighting his way through the deep snow. He broke down his hike in several steps.

• In the first step, Rupert makes a step to the North. He then motivates himself with a sip of rum from his flask. • In the second step, he makes a 90 degree turn (maybe to the left, maybe to the right). He makes two steps in the new direction and motivates himself again with his flask. • In the third step, he makes a 90 degree turn (maybe to the left, maybe to the right). He makes three steps in the new direction and motivates himself again with his flask. • This goes on and on. In step k, he makes a 90 degree turn (maybe to the left, maybe to the right) and makes k steps in the new direction with the help of a sip.

After the nth step, Rupert takes a deserved sip from his flask. He looks at his footsteps in the snow and notices that he just walked back right where he started his hike! Which values of n are possible?

63 Possible Answers: 1. The two values 303 and 314 2. The two values 304 and 319 3. The two values 305 and 322 4. The two values 306 and 315 5. The two values 307 and 317 6. The two values 308 and 320 7. The two values 309 and 318 8. The two values 310 and 321 9. The two values 311 and 316 10. The two values 312 and 313

64 14.2 Solution Answer 2: For the number of steps n only the values n = 304 and n = 319 are possible.

Why only values of the form 8m + 7 or 8m + 8 are possible. We model Ruprecht’s walk in cartesian coordinates. He started at the origin (0,0) and his first step to the North brings him to the point (0,1). The second step brings him either to the point (2,1) or (−2,1). In general, when k is even, the x-coordinate change equals ±k at the kth step (while the y-coordinate remains unchanged) and for k odd, the y-coordinate change equals ±k (while the x-coordinate re- mains unchanged).

We now examine the x-coordinate in detail. Every odd-numbered step leaves the x-coordinate unchanged and every even-numbered step changes it by an even number. Thus, the following happens modulo 4: after steps 2,3,4,5,10,11,12,13,18, 19,20,21, etc., the x-coordinate equals 2 (mod 4). After steps 1,6,7,8,9,14,15,16,17, 22,23,24,25, etc., the x-coordinate equals 0 (mod 4). In general, if k has the form 8m + 1, 8m + 6, 8m + 7 or 8m + 8, the x-coordinate is divisible by 4 and has a remainder of 2 after division by 4 otherwise.

It remains to examine the y-coordinate. After steps 1,2,5,6,9,10,13,14,17,18,21,22, etc., the y-coordinate is odd. After steps 3,4,7,8,11,12, 15,16,19,20, etc., the y- coordinate is even. In general, after k steps where k has the form 8m + 3, 8m + 4, 8m + 7 or 8m + 8, the y-coordinate is even; otherwise, it is odd.

If Ruprecht were to stand at (0,0) after n steps, his x-coordinate is divisible by 4 and his y-coordinate is even. From the previous considerations, we deduce that n must be of the form 8m + 7 or 8m + 8.

Why do values of the form 8m + 7 and 8m + 8 can actually happen. First, we show that the values n = 7 and n = 8 are possible. For n = 7, Ruprecht walks along

North 1, East 2, South 3, East 4, South 5, West 6 and North 7.

For n = 8, Ruprecht walks along

North 1, East 2, South 4, West 4, South 5, West 6, North 7 and East 8.

Next, we claim the following: if n is a possible value, then n + 8 is also possible. If Ruprecht lands back at the origin (0,0) after n steps, then he can walk along the following 8 steps n + 1, ··· ,n + 8. When n is even, he walks along

65 North n + 1, East n + 2, South n + 3, West n + 4, South n + 5, West n + 6, North n + 7 and East n + 8.

When n is odd, he walks along the following variant turned by 90 degrees:

East n + 1, South n + 2, West n + 3, North n + 4, West n + 5, North n + 6, East n + 7 and South n + 8.

One easily sees that the steps n + 1, ··· ,n + 8 cancel out and Ruprecht walked back to the origin. Therefore, all the values of the form n = 8m+7 or n = 8m+8 are possible.

Why only the values 303,304,311,312,319 and 320 are possible. Among the 20 numbers given in the list of options, only those numbers have the form 8m + 7 or 8m + 8. Therefore, the correct answer is #2.

66 15 Crossnumbers

Author: Marc Uetz (Universiteit Twente)

15.1 Exercise Every empty square in the following diagram should be filled in with a digit; a digit may be used multiple times. In this puzzle, each of the four elves Alphonso, Bartolomeo, Cristiano and Domingo is at least 10 years old.

a b

c

d

67 Horizontal:

a. Alphonso’s age c. Sum of the ages from three of the four elves d. Domingo’s age

Vertical:

a. Sum of the ages of all four elves b. Bartolomeo’s age c. Cristiano’s age

Question: Which digit appears more than once in the solution?

68 Possible Answers: 1. 1 2. 2 3. 3 4. 4 5. 5 6. 6 7. 7 8. 8 9. 9 10. 0

69 15.2 Solution Answer 10: The number 0 appears more than once.

The left figure shows a possible answer with the digits 2,9,1,0,5,6 and 0. We want to show that there is a unique solution to the crossnumber. To this end, we introduce the notation E,F,G,H,J,K,L for the seven unknown digits as displayed in the right figure. a 2b 9 a E b F c 1 0 5 c GHJ d 6 0 d KL

Thus, Alphonso is 10E + F years old, Bartolomeo 10F + J years old, Cristiano 10G + K years old and Domingo 10K + L years old. Since each elf is at least 10 years old, we obtain the inequalities E,F,G,K ≥ 1. The sum of the ages of all elves (a. vertical) equals 100E + 10H + L and the sum of three of these elves (c. horizontal) is 100G + 10H + J. Since each elf is at most 99 years old, we obtain 100E + 10H + L ≤ 4 · 99 = 396 and 100G + 10H + J ≤ 3 · 99 = 297. This implies

E ≤ 3 and G ≤ 2. (4)

The difference between a. vertical and c. horizontal gives us the age of the fourth elf whose age in c. horizontal has not been taken into account.

x = (100E + 10H + L) − (100G + 10H + J) = 100(E − G) + (L − J). (5)

If E ≤ G, then x ≤ 9, a contradiction. If E ≥ G + 2, a contradiction follows from x ≥ 200 + L − J > 99. Therefore,

E = G + 1. (6)

>From (5) and (6), we obtain x = 100 + L − J ≥ 91. Thus, the first digit of the fourth elf’s age is 9. Equation (4) rules out Alphonso and Cristiano as the fourth elf. If Domingo is the fourth elf, the equations x = 10K + L and x = 100 + L − J imply that 10K + J = 100, which is impossible. Therefore, Bartolomeo has to be the fourth elf, so that F = 9 and x = 90 + J. Together with x = 100 + L − J, we deduce 2J = 10 + L und J ≥ 5. (7)

70 On one hand, the total age of the four elves equals (10E + 9) + (90 + J) + (10G + K) + (10K + L) and on the other hand, 100E + 10H + L (see a. vertical). After examination of (6), we obtain

80G + 10H = 11K + J + 9. (8)

Since 80 ≤ 80G + 10H and 11K + J + 9 ≤ 11K + 18, we observe that K ≥ 6 by (8). If one considers (8) (mod 10), one sees that K + J ≡ 1 mod 10 holds. With 5 ≤ J ≤ 9 plugged in (7) and 6 ≤ K ≤ 9, this forces J = 5 and K = 6. From (8) follows G = 1 and H = 0, and (6) together with (7) imply E = 2 and L = 0.

71 16 A secure safe

Author: Thorsten Eidner

16.1 Exercise Robbery in Christmas Land! It couldn’t have been worse: the wishlists of all children are now in possession of the Grinch! This happened even though all documents were allegedly stored in a secure safe which could only be opened by the right input of a four-digit code. Of course, if the elves are to wrap up the presents and address them to the cor- rect children, they must have access to the wishlists in the safe. But Santa Claus didn’t want to rely on one elf alone, so he chose four elves instead, but didn’t give each of them the complete code; Atto only knew the 1st, 2nd and 3rd digit of the code, Bilbo the 1st, 2nd and 4th, Chico the 1st, 3rd and 4th and finally Dondo only knew the 2nd, 3rd and 4th digit of the code. It was then safe to say that none of the elves alone could open the safe, but any two of them were able to open it together.

Unfortunately, Santa underestimated the corruptibility of Atto, who loved cho- colate above everything else, and Bilbo, who would do anything for gingerbread; the Grinch bought the code from them using their favorite sweets and stole the wishlists. Of course, Christmas will not be cancelled this year, but without the wishlists, the presents can only be distributed at random - that will definitely not be the best Christmas ever! Such a situation must not occur ever again! A new, more secure safe is needed! Fortunately, a brand new product was developed. The code required to unlock the safe has to be defined by Santa initially and this code can have an arbitrary high number of digits. Furthermore, a group of w elves that are especially relia- ble (certainly, Atto and Bilbo are not among them) shall have the possibility to open the safe. But according to a sophisticated plan, each elf gets to know only partial information concerning the code’s digits (and of course, this information

72 is strictly confidential).

All the following conditions should be fulfilled:

(1) The information of a digit of the code is only known by some of the elves, and each digit is known by the same number of elves. These elves form a group. However, no two digits of the code should be known by the same group of elves.

(2) There is a natural number n with the following property: with their know- ledge of the digits of the code, any n of the w elves are unable to open the safe; however, when any (n + 1) of the w elves meet, they can always enter the complete code and open the safe.

(3) n should be at least 2 and at most w − 3.

(4) Every elf should know at most 35 digits of the code.

(5) No elf should know more than one-third of all digits of the code.

In this way, Santa is assuming that on the one hand, the procedure should be reasonably feasible, and on the other hand, it should prevent the Grinch from getting the code. But is such a distribution possible at all? And if yes, with a suitable number of the digits of the code, for which number w of elves is it possible to find a distribution of the information of the digits of the code to the elves so that all above mentioned conditions are fullfilled?

73 Possible Answers: 1. Only for w = 5.

2. Only for w = 6.

3. Only for w = 7.

4. Only for w = 8.

5. Only for w = 9.

6. Only for w = 10.

7. Only for w = 11.

8. There is exactly one such number w with w ≥12.

9. There is not any number w, for which the conditions can be fulfilled.

10. There are at least two values for w, for which such a distribution is possible.

74 16.2 Solution Answer 5: Only with w = 9 is it possible to distribute the information as described.

General solution of the problem for arbitrary w and n (with n < w) together with conditions (1) and (2):

Parameters: w Number of elves with information about the code n Number of elves which cannot open the chest together, whereas any n + 1 elves can always open it; see condition (2) c Number of digits of the code s Number of elves which know a given digit of the code z Number of digits known by a given elf

(For example, in the first part of the question, the variables hold the following values when considering the case of four elves and a four-digit code: w = 4, c = 4, n = 1, s = 3, z = 3.)

We now consider a choice of n of the w elves. Since these n elves cannot open the safe by condition (2), there must be at least one digit that these n elves do not know. Every other elf (i.e. the remaining w − n) need to know this digit since any n + 1 elves among the w elves can always open the safe. Such a distribution of the information needs to be possible for each choice of n elves among the w elves, w so the number of digits in the code must be at least n . However, by condition w (1), there cannot be any extra digits in the code, hence c = n .

With this distribution, not only the value of s is the same for each elf, but also the value of z. For s, after consideration, one deduces s = w − n. When the information concerning each of the c digits is given to w − n elves, each elf must w−n w w−n w−1 receive c w = n w digits, which is the same as n .

To summarize, the following holds for given w and n (n < w):

w w − n w − 1 c = ; s = w − n; z = c · = n w n

Solution of the problem after taking into account conditions (3) to (5):

(3) 2 ≤ n ≤ (w − 3)

75 (4) z ≤ 35 (5) z ≤ c/3

We show that w ≥ 9: w−n w−n 1 2w From z = c · w and (5), we deduce w ≤ 3 and thus n ≥ 3 . By taking into 2w account condition (3), it follows that w − 3 ≥ n ≥ 3 (∗), hence w ≥ 9.

We show that w < 10: w−1 For 2 ≤ n ≤ (w −3), the function z = n is minizmied at n = 2 and n = w −3 w−1 w−1 9 (since 2 = w−3 ). For w ≥ 10, it follows that z ≥ 2 = 36. Therefore, there can be no distribution satisfying w ≥ 10 and conditions (3) and (4).

Under the condition of the exercise, only w = 9 is a possibility. From (∗), we deduce n = 6 and the remaining variables are computed as follows:

9 8 c = = 84; s = 3; z = = 28. 6 6

These values satisfy all the required conditions.

Summary of the solution: Santa Claus chooses a 84-digit code for the safe and gives the information to 9 elves. Each subset of 6 of the nine elves will be assigned a digit of the code; these 6 elves are those who do not receive the information concerning that digit, the other 3 do. When these 6 elves meet, it is guaranteed that they are missing precisely their corresponding digit of the code, which the other 3 elves know. Therefore, when any 7 elves meet, they can open the safe.

76 17 Hats

Authors: Aart Blokhuis (TU Eindhoven) Gerhard Woeginger (TU Eindhoven)

17.1 Exercise Santa Claus speaks to his twelve intelligent elves Atto, Bilbo, Chico, Dondo, Espo, Frodo, Gumbo, Harpo, Izzo, Jacco, Kuffo und Loco:

“My dear intelligent elves! Difficult brain teasers with hats on elves’ heads already have a long tradition in the mathematical Christmas calendar. Therefore, I invite you tomorrow to a cozy afternoon with coffee and cake.

– “Great! We’ll be there!”, cheered the twelve elves.

Father Christmas carries on: “Tonight, I will label some of the elves’ hats with the numbers 0,1,2,3,4. Tomorrow, I will set a hat on each of your heads from behind and so fast that nobody sees the number on their own head. You are able to see the numbers on the other eleven elves’ hats, but you’re not allowed to exchange any information. Then, I will ask you in alphabetical order if you know the number on your own hat. If an elf answers with NO, he’ll be sent home. If he answers with YES, he must whisper the number in my ear. If the number is correct, he’s allowed to enter the hall where he receives a cup of coffee and a big piece of cake. Otherwise, if he whispers the wrong number, he’ll be sent home immediately.”

– “Are we allowed to whisper so loud that the other elves also hear the number?” asks Harpo.

77 – “No, of course not!”, answers Father Christmas. “No cheating!”

– “Are we allowed to decide if we answer with a really loud or really quiet YES?” asks Chico.

– “No!”, retorts Santa Claus. “Like I said: no cheating! A simple YES or NO is good, but you’re not allowed to communicate any additional information. Besides, if you do that, instead of coffee and cake, you’ll only get water and bread!“

The elves began to think. They discussed and argued. And then they argued and discussed. They discussed again and again and argued a bit more. They eventually worked out an amazing strategy which maximizes the number N of elves who will get coffee and cake for sure. Our question is: how big is N?

78 Possible Answers: 1. N = 3 2. N = 4 3. N = 5 4. N = 6 5. N = 7 6. N = 8 7. N = 9 8. N = 10 9. N = 11 10. N = 12

79 17.2 Solution Answer 8: The maximal number of elves who get coffee and cake for sure is N = 10.

One easily sees that N ≤ 10 holds since Atto and Bilbo cannot figure out their own numbers: Atto has no information at all about the number on his hat and Bilbo only gets a yes or no from Atto which cannot help distinguish between 5 numbers.

We now describe a possible strategy (among many) which guarantees coffee and cake for all the elves with the exception of Atto and Bilbo. We denote the number on Bilbo’s hat by B. Furthermore, we denote the sum of the ten numbers on Chico, Dondo, Espo, . . . and Loco’s hats modulo 5 by S. Atto chooses his answer depending on B and S according to the following table:

Atto S = 0 S = 1 S = 2 S = 3 S = 4 B = 0 Yes Yes No Yes No B = 1 No Yes No Yes No B = 2 No Yes Yes Yes No B = 3 No No Yes Yes No B = 4 Yes No Yes Yes No

If Atto says Yes, he guesses some random number. Bilbo chooses his answer depending on S and Atto’s answer according to the following table:

Bilbo S = 0 S = 1 S = 2 S = 3 S = 4 Atto=Yes Yes/0 Yes/2 Yes/4 No No Atto=No Yes/1 Yes/3 Yes/4 No No

We now claim that Chico can deduce the value of S. He sees B in front of him, hears Atto and Bilbo’s answers and thus distinguishes the following cases:

• Bilbo=No: If Atto=Yes, then S = 3. If Atto=No, then S = 4. • Bilbo=Yes and B = 0: If Atto=No, then S = 2. If Atto=Yes and Bil- bo=Saal, then S = 0. If Atto=Yes and Bilbo goes home, then S = 1. • Bilbo=Yes and B = 1: If Atto=Yes, then S = 1. If Atto=No and Bil- bo=Saal, then S = 0. If Atto=No and Bilbo goes home, then S = 2. • Bilbo=Yes and B = 2: If Atto=No, then S = 0. If Atto=Yes and Bil- bo=Saal, then S = 1. If Atto=Yes and Bilbo goes home, then S = 2. • Bilbo=Yes and B = 3: If Atto=Yes, then S = 2. If Atto=No and Bil- bo=Saal, then S = 1. If Atto=No and Bilbo goes home, then S = 0.

80 • Bilbo=Yes and B = 4: If Atto=No, then S = 1. If Atto=Yes and Bil- bo=Saal, then S = 2. If Atto=Yes and Bilbo goes home, then S = 0.

Chico thus knows the sum S of the ten numbers on Chico, Dondo, . . . and Loco’s hats modulo 5. Since Chico also knows the nine numbers on Dondo, Espo, . . . and Loco’s hats, he can easily subtract these from S (mod 5) and deduce the number on his own hat. The remaining nine elves compute their own number analogously.

81 18 The dance of the elves

Authors: Aart Blokhuis (TU Eindhoven) Cor Hurkens (TU Eindhoven)

18.1 Exercise There was a big dance in Elfville last Friday night. Men and women had an incredible time dancing with one another. The (male) elves Atto, Bilbo and Chico, as well as the (female) elf Dunda, tell us about it:

Atto: I only danced with Dunda, Enna and Farra. Bilbo: Each one of us (male) elves has danced with exactly three women during the evening. Chico: For every two of us (male) elves, there was exactly one (fe- male) elf who danced with both of them. Dunda: For every two of us (female) elves, there was exactly one (male) elf who danced with both of them.

We are curious: how many elves (male and female together) were at the dance?

82 Possible Answers: 1. There were 10 elves at the dance. 2. There were 12 elves at the dance. 3. There were 14 elves at the dance. 4. There were 16 elves at the dance. 5. There were 18 elves at the dance. 6. There were 20 elves at the dance. 7. There were 22 elves at the dance. 8. There were 24 elves at the dance. 9. There were 26 elves at the dance. 10. There were 28 elves at the dance.

83 18.2 Solution Answer 3: There were 14 elves at the dance, namely 7 male and 7 fe- male elves.

We give three descriptions of such a dance with 14 elves and show afterwards why none of the other nine answers can be correct.

M1 M2 M3 M4 M5 M6 M7

F1 + + · + ···

F2 + · + ··· +

F3 · + ··· + +

F4 + ··· + + ·

F5 ··· + + · +

F6 ·· + + · + ·

F7 · + + · + ··

Abbildung 2: A possible dance.

A possible solution. Figure 2 displays a possible dance with 7 men M1, . . . ,M7 and seven women F1, . . . ,F7. The symbol + in column i and row j means that Mi and Fj danced together, i,j = 1, ··· ,7. One easily sees that (i) every man danced with exactly three women; (ii) every woman danced with exactly three men; (iii) for every two women, there is exactly one man who danced with both of them; (iv) for every two men, there is exactly one woman who danced with both of them. All in all, this means the conditions of the exercise are satisfied.

An equivalent description. Figure 3 gives a geometric representation of the dance given in Figure 2. Each man is displayed as a point and each woman is displayed as a line or circle. A point dances with a line (resp. a circle) when the point lies on that line (resp. circle).

Another equivalent description. Our third representation relies on the seven three-digit numbers in the set X = {111,112,121,122,211,212,221}. We call a 3- element subset of X female if its elements sum to a number with even digits. For instance, the subset {112,122,212} is female since the sum 112 + 122 + 212 = 446 has even digits 4,4 and 6. However, the subset {111,112,121} is not female because 111 + 112 + 121 = 344 contains the digit 3. One easily sees that X has exactly seven 3-element female subsets.

84 M3

M7 M5

M6

M1 M2

M4

Abbildung 3: Another possible dance.

In a dance evening, the male elves are represented by the elements of X: M1 = 111, M2 = 112, M3 = 121, M4 = 221, M5 = 211, M6 = 122 und M7 = 212. Each female elf corresponds to a 3-element female subset of X. A male elf danced with a female elf if the corresponding number lies in the corresponding set.

Why only answer #3 is correct. We now consider the statements from Atto, Bilbo, Chico and Dunda more in detail and deduce some properties of the dance. We denote by F(M) the set of all women who danced with the man M, and with M(F ) the set of all men who danced with the woman F .A bad configuration consists of two women F1,F2 and two men M1,M2 where both men danced with both women. Chico’s statement rules out the existence of a bad configuration to begin with.

By means of contradiction, we suppose that a woman F danced with only two men M1 and M2. It follows that the union F(M1) ∪ F(M2) contains all wo- men at the dance: if a woman F 0 were not in this set, the women F and F 0 would have had no partner in common by Dunda’s statement. Since there was at least three men there (namely Atto, Bilbo and Chico), there must have been a third man M3 at the dance. By Bilbo’s statement, |F(M3)| ≥ 3, which leads to |F(M3) ∩ F(M1)| ≥ 2 or |F(M3) ∩ F(M2)| ≥ 2. That gives a bad configuration and thus a contradiction. A similar (and easier) argument shows that no women danced with only one man. We summarize these observations together with Bil- bo’s statement:

Fact 1. Each man has danced with at least three women and each woman danced with at least three men.

85 Dunda said that each two woman had at least one dance partner in common. Ho- wever, they can’t have more than one at all, since otherwise a bad configuration happens. We summarize this with Chico’s statement:

Fact 2. Every two women (resp. men) have exactly one dance partner in com- mon.

We now suppose by means of contradiction that there exist two men M1 and M2 for which the set F(M1) ∪ F(M2) contains all women present at the dance. We consider a third man M3 with |F(M3)| ≥ 3. Since one of the sets F(M1) and F(M2) contains at least two women from the set F(M3), we can find a bad configuration, a contradiction. A symmetrical argument shows that there are no two women F1 and F2 for which the set M(F1) ∪ M(F2) contains all men present at the dance:

Fact 3. For every two men (resp. women) at the dance, there is at least one woman (resp. man) who danced with none of them. We now consider a man M and a woman F who did not dance with one another. Let M1, . . . ,Mk be an enumeration of the men in M(F ). By Fact 2, the two men M and Mi (1 ≤ i ≤ k), have exactly one dance partner in common whom we denote by Fi. If Fi = Fj with i 6= j, the men Mi, Mj and women F,Fi = Fj form a bad configuration. Therefore, F1, . . . ,Fk are pairwise distinct and all danced with M. This means |F(M)| ≥ |M(F )|. A symmetric argument considers the women who danced with M and shows that |M(F )| ≥ |F(M)|. One deduces |M(F )| = |F(M)| and comes to the following conclusion:

Fact 4. If a man M and a woman F did not dance with one another, the number of women who danced with M equals the number of men who danced with F . Finally, we consider Atto and an arbitrary second man M at the dance. By Fact 3, there is a woman F who danced with neither Atto nor M. Furthermore, by Fact 4, we have |M(F )| = |F(Atto)| = 3 and |M(F )| = |F(M)|. Therefore, M danced with exactly three women. A similar argument shows that every woman danced with precisely three men, hence:

Fact 5. Every man (resp. woman) danced with three women (resp. men). Atto only danced with Dunda, Enna and Farra. We now consider the sets M(Dunda), M(Enna) und M(Farra) somehow more in detail:

• The intersection from every two of these three sets consists only of Atto, since otherwise there would exist a bad configuration. In other words, every set consists of Atto and two other men.

86 • The union of all three sets contains all men present at the dance; if there was a man M not in this union, Atto and M would have no dance partner in common, contradicting Fact 2.

The total number of men at the dance thus equals 1 + 3 · 2 = 7. A symmetric argument shows that 7 women were present at the dance. Therefore, the exercise has been completely solved.

87 19 Mondrian

Author: Hajo Broersma (University of Twente)

19.1 Exercise The Dutch painter elf Piet Mondrian has designed a and divided it in eleven regions. Mondrian calls two regions neighbours if they share at least one horizontal or vertical side (line segment). (As an example, the region in the left bottom corner has exactly two neighbours; it only shares a corner point with the third region, so this region is not a neighbour.)

Merry Christmas!

The square region in the middle of the card contains the text “Merry Christmas!” and the background should stay white. Mondrian wants to fill the other ten regions with different shades of blue; he denotes the brightness of the different shades of blue by the numbers 1, 2, 3, etc., and he sets the following rules: • All ten regions should have different shades of blue.

88 • All differences in shades of blue between neighbouring regions should also be different: if the difference between the (numbers of the) shades of blue of two neighbouring regions equals d, then this difference d does not appear on any other neighbouring pair of regions.

What is the smallest possible value I of the highest brightness used in the Christ- mas card?

Possible Answers: 1. I = 14 2. I = 15 3. I = 16 4. I = 17 5. I = 18 6. I = 19 7. I = 20 8. I = 21 9. I = 22 10. I = 23

89 19.2 Solution Answer 3: The smallest possible value for the highest brightness used in the Christmas card is I = 16.

We denote the ten regions that have to be painted by A,B,C,D and U,V,W,X,Y,Z according to the following picture:

D A X V Merry Christmas! Y

B W U C Z

We make two observations. Observation 1: There are 14 pairs of neighbouring regions in total (AU, AV , AW , BU, BV , BW , CX, CY , CZ, DX, DY , DZ, AD and BC), hence we need 14 distinct differences between shades of blue for a correct solution. Observation 2: Let us denote the numbers of the shades of blue of the regions by the same A,B, . . . ,Y,Z. Then it is clear that the difference |A − U| and the sum A + U have the same parity (either both are even or both are odd). For that reason, the sum of all the 14 differences has the same parity as

(A + U) + (A + V ) + (A + W ) + (B + U) + (B + V ) + (B + W ) + (C + X) + (C + Y ) + (C + Z) + (D + X) + (D + Y ) + (D + Z) + (A + D) + (B + C) = 4(A + B + C + D) + 2(U + V + W + X + Y + Z).

Therefore, the sum of all the 14 differences is an even number.

We are now ready to give the solution. The answer I = 14 is not correct, since in that case only the 13 numbers 1,2,...,13 could have been used for the 14 differences, which is impossible. The answer I = 15 is also not correct. If it would be correct, then all the 14 differences 1,2,...,14 should be used exactly once. However, the sum 1+2+3+···+13+14 is odd, contradicting Observation 2. The

90 answer I = 16 is the correct answer, since in this case, we can define the following assignment of shades of blue to the regions: We choose A = 16, B = 13, C = 11, D = 15 and U/V/W = 1/2/3 (several choices possible) and X/Y/Z = 6/7/8. In this case, the 14 differences are 1,2,3,4,5 and 7,8,9,10,11,12,13,14,15. Therefore, answer #3 with I = 16 is the correct answer.

91 20 Mixed Doubles

Author: Rudi Pendavingh (TU Eindhoven)

20.1 Exercise The four (female) elves Alix, Bona, Clio, Dana and the four (male) elves Emil, Fred, Gerd, Hans take part in a mixed doubles tennis tournament. Each of the eight elves has strict preferences when it comes to choosing their partner. For example, in decreasing order of preference, Alix would prefer to play with Fred, Hans, Emil, and finally Gerd. The elves’ preferences are summarized in the fol- lowing table:

Alix: Fred, Hans, Emil, Gerd Emil: Alix, Clio, Bona, Dana Bona: Gerd, Emil, Fred, Hans Fred: Bona, Dana, Clio, Alix Clio: Hans, Fred, Gerd, Emil Gerd: Clio, Alix, Dana, Bona Dana: Emil, Gerd, Hans, Fred Hans: Dana, Bona, Alix, Clio

The elves then begin by matching themselves up randomly:

T1: Alix–Gerd Bona–Hans Clio–Emil Dana–Fred

In this team selection T1, Alix and Emil form an unsatisfied team: Alix would rather play with Emil than with her current partner Gerd and Emil would rather play with Alix than with his current partner Clio. Alix and Emil thus decide to team up. The partners left alone form a new team, thus leading to a new team selection:

T2: Alix–Emil Bona–Hans Clio–Gerd Dana–Fred

We say that the team selection T1 transitions to the team selection T2 through the unsatisfied pair Alex and Emil. In the new team selection T2, Bona and Fred

92 form an unsatisfied pair: Bona would rather play with Fred than with her current partner Hans and Fred would rather play with Bona than with his current partner Dana. The team selection T2 transitions in the team selection T3:

T3: Alix–Emil Bona–Fred Clio–Gerd Dana–Hans

Since there are no unsatisfied pairs in T3, the process terminates. We have thus found a chain T1,T2,T3 with three team selections, where each transitions onto the next through unsatisfied pairs. In this exercise, we consider such chains of team selections. A chain begins with an arbitrary team selection T1 and transitions, step by step, in further team selections T2,T3,T4, ··· , etc. A team selection Ti can transition into a new team selection Ti+1 if the selection Ti contains a female elf F and a male elf M with the following property: F would rather play with M rather than with her partner M 0 0 in Ti and M would rather play with F rather than with his current partner F . In this case, we say that (F,M) forms an unsatisfied pair in the team selection 0 0 Ti. The two pairs (F,M ) and (F ,M) will then be exchanged for the pairs (F,M) 0 0 and (F ,M ), which results in the new team selection Ti+1. (It is possible that a team selection T contains two or more unsatisfied pairs. If this is the case, any of these pairs may lead to a new team selection.) We would like to know how long such chains could be. We denote with L the length of the longest such chain and with K the length of the longest such chain where every team shows up at most once.

93 Possible Answers: 1. K = 8 and L = 8 2. K = 9 and L = 9 3. K = 10 and L = 10 4. K = 11 and L = 11 5. K = 12 and L = 12 6. K = 13 and L infinite 7. K = 14 and L infinite 8. K = 15 and L infinite 9. K = 16 and L infinite 10. K = 17 and L infinite

94 20.2 Solution Answer 9: The length L is infinite and K = 16.

Table 1 lists all 24 possible matchups and numbers them with the numbers 1,2, ··· ,24. The rightmost column indicates the unsatisfied pairs in the corre- sponding team selection. Figure 4 shows the 24 team selections again. An arrow from selection x to selection y indicates that x can transition to y through an unsatisfied pair. The four team selections 8,10,19,24 have no arrows attached to them. The selections 1,6,15,17 form a small component, within which no other team selection can be attained. The remaining 16 team selections form a complicated component with many arrows. One easily sees that one can go around the outer circle infinitely many times, hence L is infinite. Furthermore, there is a chain of length 16 which goes through all the team selections in that component:

5, 18, 13, 14, 20, 23, 21, 11, 9, 3, 4, 2, 16, 22, 12, 7

The arrows in this chain are displayed in blue in the picture. Therefore, K = 16 and the correct answer is #9.

95 Nr Paarung Resultierende Paarungen 1 EA FB GC HD 2 EA FB GD HC HA→16 3 EA FC GB HD GD→4 4 EA FC GD HB FB→2 5 EA FD GB HC GD→2 HD→3 HA→18 6 EA FD GC HB FB→1 HD→1 7 EB FA GC HD FC→9 8 EB FA GD HC 9 EB FC GA HD EA→3 10 EB FC GD HA 11 EB FD GA HC EA→5 HD→9 HA→12 12 EB FD GC HA HD→7 13 EC FA GB HD FC→3 GC→7 GD→14 14 EC FA GD HB FB→16 FC→4 GC→20 15 EC FB GA HD EA→1 GC→1 16 EC FB GD HA GC→22 17 EC FD GA HB EA→6 FB→15 GC→6 HD→15 18 EC FD GB HA GC→12 GD→16 HD→13 19 ED FA GB HC 20 ED FA GC HB EB→7 FB→22 FC→23 21 ED FB GA HC EA→2 EB→11 HA→22 22 ED FB GC HA EB→12 23 ED FC GA HB EA→4 EB→9 FB→21 24 ED FC GB HA

Tabelle 1: List of all possible matchups

96 2 16

14 21 4 22

5 18

23 20 13 11 3 12

9 7

6 8 10

17 1 15 19 24

Abbildung 4: All 24 matchups shown as a graph. An arrow from selection x to selection y indicates that x can transition to y through an unsatisfied pair.

97 21 Raiders of the lost Santa

Author: Falk Ebert

21.1 Exercise On a bitterly cold winter evening, an old man is sitting in a bar in Grœnland, far beyond the Arctic circle. He is wearing a leather jacket, a fedora and - curiously - a whip on his belt. He is staring at a map of the surrounding region. He’d been following a lead that Santa should be living no more than 100km from this very bar. Of course, this is still a vast area. Therefore, he made his way here looking for more clues. Right now, he is overhearing a conversation on a neighboring table.

Man: Can you imagine? Just the other day, I drove Father Christmas home. The taximeter showed 108 km and he paid the exact amount. So greedy! No tip, no nothing. Not even a ...

Woman: Well, if your driving was as usual, I cannot blame him. By the way, do you still charge as you did in Manhattan?

Man: Why certainly! I also drive accordingly.

Woman: I thought as much! Well, I had to take an express delivery from here to his present factory. My broomstick showed exactly 105 km. Which I made them pay me down to the last penny.

Mann: You mean your broomstick with the curious tendency for sharp turns?

Frau: What do you expect? It’s a witches’ broomstick. However, most of the time, it is well behaved and travels in a straight line.

The stranger has had enough. Not only are a witch and a former taxi driver from New York having a very weird conversation (this, at least, can be expected at

98 this latitude), but none of them seems to have any notion of how one determines distances. And their stated distances from here to the same goal are not only different. They are also larger than the supposed 100km his informer stated. Di- sappointed, he asks for the tab. Upon seeing his distress, the barman murmurs to the stranger:

“If you find the old red-coated fellow, tell him, there are still 12 eggnoggs unpaid for. I can also give you a hint. The taxi driver is only going in north-south or east-west directions with the occasional sharp turn at a right angle. If you place the bar at the origin of a coordinate system, then the taxi distance to point (x, y) is dtaxi = |x| + |y|. I don’t know in which way the witch is flying. But her broomstick determines the distance from the bar to (x, y) as follows

|x|  |x|  dbroom = √ + max √ , |y| . 3 3 Don’t ask me why!” The stranger lifts his hat and scratches his graying head. How should this be helpful in any way? How many possibilities are there for Santa’s secret hideout, provided that all information is correct?

99 Possible Answers: 1. None! They are all quite silly here.

2. exactly one

3. exactly 2

4. exactly 4

5. exactly 6

6. exactly 8

7. exactly 12

8. exactly 24

9. exactly 42

10. infinitely many...

100 21.2 Solution Answer 4: There are exactly four possibilities for the location of Father Christmas.

This exercise is about seeing that different distances induce different geometries. The classical euclidean distance d of a point (x,y) to the origin is defined as p d(x,y) = x2 + y2.

With it, a circle is also what one clasically expects, namely, a round thing.

Let us have a look at the taxi driver’s “circle”. To simplify the matter, we con- sider the unit circle - the one whose distance to the origin is 1. If one is given an x-value satisfying −1 ≤ x ≤ 1, then it is possible to determine the possible y-values via 1 = |x| + |y|. We deduce that the “unit circle” has the form of a square with corners on the main axes. All the points on this square are at taxi distance 1 from the origin.

One can proceed analogously with the broom distance. As long as |y| < √1 , every √ 3 3 point with |x| = 2 is at broom distance 1 from the origin. Similarly, the points (0, 1) and (0, − 1) are on the “broom unit circle”. One soon realizes that this broom unit circle is a hexagon. It is similar to the taxi distance, only that instead of 90◦ turns, the broom turns in 120◦ angles.

We now consider the circles of the taxi and broom distances with the given radii and plot them together. We obtain 8 points of intersection (W1,W2 and their 6 reflections). From these 8 points, only 4 lie within a classical (i.e. euclidean) distance of 100 km (W1 and its reflections), so the correct answer is: 4.

101 102 22 Temperature

Author: Judith Keijsper (TU Eindhoven)

22.1 Exercise “Well, well, well, isn’t that curious!” says the weather elf Vendelin. “I have been quietly studying the temperature of the last thousand days, thinking everything is going fine, and then this! On the first day, our weather station Sigma-601 picked up a temperature of −6◦C. Good. And then, in the second third of the Sigma- 601 data table, I see the station picked up a temperature of +1◦C. Also good. But here’s the catch: from the second day until the 999th day, the temperature measured equals the sum (in Celsius) of the measurements of the days right before and right after it!” Santa Claus puts his newspaper down on the table: “Really? What a catch! What temperature was measured on the day we baked our Christmas cookies?” If we assume that Vendelin gives the right answer to Santa Claus, what does he answer?

103 Possible Answers: 1. The measurement on the 991st day was of +1◦C. 2. The measurement on the 992nd day was of +2◦C. 3. The measurement on the 993th day was of +3◦C. 4. The measurement on the 994th day was of +4◦C. 5. The measurement on the 995th day was of +5◦C. 6. The measurement on the 996th day was of +6◦C. 7. The measurement on the 997th day was of +7◦C. 8. The measurement on the 998th day was of +8◦C. 9. The measurement on the 999th day was of +9◦C. 10. The measurement on the 1000th day was of +10◦C.

104 22.2 Solution Answer 5: The measurement on the 995th day was of +5◦C.

We denote the measurements in the table by T1, ··· ,T1000 and set x = T2. Then T1 = −6 and T2 = x, and by the exercise, since Tn = Tn−1 − Tn−2, we deduce

T3 = x + 6; T4 = 6; T5 = −x; T6 = −(x + 6); T7 = −6; T8 = x.

With T7 = T1 and T8 = T2, the values repeat themselves in blocks of 6: in other words, Tn = Tn−6 for n = 7, ··· ,1000. By the exercise, there is another measured temperature of +1◦C. The four possible cases x = 1, x + 6 = 1, −x = 1 and −(x+6) = 2 lead to the following four possibilities for the block of 6 temperatures:

• T1 = −6; T2 = +1; T3 = +7; T4 = +6; T5 = −1; T6 = −7

• T1 = −6; T2 = −5; T3 = +1; T4 = +6; T5 = +5; T6 = −1

• T1 = −6; T2 = −1; T3 = +5; T4 = +6; T5 = +1; T6 = −5

• T1 = −6; T2 = −7; T3 = −1; T4 = +6; T5 = +7; T6 = +1

Since T991 = T1 6= 1, T992 = T2 6= 2, T993 = T3 6= 3, T994 = T4 6= 4, T996 = T6 6= 6, T997 = T1 6= 7, T998 = T2 6= 8, T999 = T3 6= 9, and T1000 = T4 6= 10, only answer #5 is compatible with one of these four possibilities. Therefore, x = −5 and T995 = T5 = +5 and answer #5 is correct.

105 23 A Christmas Crime Story

Author: Axel Flinth Project: AG Kutyniok

23.1 Exercise During the very intensive holiday season, Santa’s reindeer often meet up after work to relax and have some Glühwein, a traditional German drink very popular around Christmas. For this reason, they have a huge reserve of the sweet drink in storage.

One night, the reindeer discovered that two – exactly two, that is – of Santa’s little elves stole something from their storage. As soon as Santa was informed about this, he began to investigate which of the elves were guilty. A small group of suspects in which the guilty surely were to be found was quickly determined.

However, the elves in the group of subjects were really close friends and didn’t want Santa to find out which ones in the group had committed the crime. Pre- ferably, they would not tell him anything about who had been stealing how much. Nevertheless, in accordance to the Christmas laws, Santa was obliged to carry out the investigation and to interrogate the elves. The law also strictly prohibits any elf to lie.

To complicate Santa’s life as much as possible, the elves argued that although the Christmas judicial system forces them to answer any of Santa’s questions honestly, there are no laws prescribing exactly in which manner they had to ans- wer them. Thus, they decided to answer questions only in pairs, and also only to answer how much they had stolen altogether. Since the elves also have a ve- ry intensive schedule during the holiday season, Santa had to decide one day in advance which pairs he interrogates in order to make it possible for the elves to

106 fit the interrogations into their schedules. In particular, Father Christmas cannot decide along the way which pair of elves he wants to interrogate based on infor- mation he already collected from the previous interrogated pairs.

The question becomes: how many interrogations must Santa arrange in order to find out which two elves are guilty? It is also of major importance that he finds out how much each elf has stolen in order to determine how much to reimburse the reindeer. The question is to be answered in the three cases where there are exactly i) three, ii) four, and iii) five elves in the group of main suspects.   The result A ist given in the form A = case i), case ii), case iii) .

107 Possible Answers: 1. A = (1,2,3)

2. A = (1,2,4)

3. A = (2,2,3)

4. A = (2,3,4)

5. A = (2,3,5)

6. A = (2,4,5)

7. A = (3,3,4)

8. A = (3,4,5)

9. A = (3,4,6)

10. A = (4,5,5)

Connection to the project: In many applications of mathematics, solutions of linear systems of equation where only few of the variables are unequal zero (i.e. sparse solutions) are of special importance. Such solutions can actually in many cases be determined using fewer equations than is needed for general solutions. This is the main message of the so called theory of Compressed Sensing.

108 23.2 Solution Answer 7: The number of questions that Father Christmas needs to ask is for the three cases: A = (3,3,4).

Let us first point out that we have to interrogate every elf at least once (“within a pair”). If we don’t, the information given to Santa is completely independent of the elves which are not interrogated, which makes it impossible to recover their stolen amounts. We handle each case separately.

Case 1: Three elves. If we choose to interrogate only one pair, at least one elf will be left not interrogated. To ask just one pair is therefore not enough. Two pairs also don’t suffice: let us denote the pairs we interrogate with (A,B) and (B,C) – note that in any case, the two pairs must have an elf in common – the stealing configurations “A steals 0, B steals 2 and C steals 1” and “A steals 2, B steals 0 and C steals 3” (which are both possible) will result in the same interrogations. However, three pairs is sufficient: if we choose (A,B), (A,C) and (B,C), we end up with a linear system of equations admitting a unique solution – consequently, the stolen amount of each elf can be recovered from the information gathered.

Case 2: Four elves. One pair is still not enough, due to the previous argu- ment. Two pairs can be ruled out as follows: if the first interrogated pair is (A,B), the second must be (C,D) – otherwise, one elf is left not interrogated. Therefore, we will only obtain knowledge of the sum of stolen Glühwein in each pair, which is not enough to recover the individual stolen amounts.

Thus, we have to interrogate at least three pairs - however, that suffices: The strategy (A,B), (A,C) and (A,D) will always be successful. This can be seen as follows: if A has not stolen anything, at least one of the three sums has to be equal to zero. If all measurements are not equal to zero, we can thus conclude that A has to be guilty. If we then check which of the sums differs from the others, we determine the other guilty elf and then calculate the stolen amounts. On the other hand, if one sum is equal to zero, we can immediately conclude that both elves in that pair are innocent. The other two elves must therefore be guilty, and we can immediately see how much those two have stolen (since in this case, A has not stolen anything).

Case 3: Five elves. Here, both one and two pairs are ruled out by arguing that not everyone is interrogated. Three pairs is also not enough: since we need to interrogate all elves, we will have to interrogate, up to a permutation, the pairs (A,B), (C,D) and (A,E). In the case that only the second of the corresponding sums does not equal zero, we will never be able to reconstruct the exact amounts

109 C and D have stolen from that information.

Four pairs however suffice: interrogating (A,B), (A,C), (A,D) and (A,E) works. The argument is similar the one above: if all sums are non-zero, A must be guilty and we can find out his partner in crime by comparing the sums of amounts stolen. In the case that there is a pair summing to zero, A is innocent, which implies that we can simply read off from the interrogations which elves are guilty and how much they have stolen.

The correct answer is thus: 7: (3,3,4).

110 24 Mosquito

Author: Hennie ter Morsche (TU Eindhoven)

24.1 Exercise Ruprecht uses the cold winter months to rub out the infinite number of endlessly annoying mosquitoes in its kitchen. These bloodthirsty, buzzing, small, point- shaped pests are frozen on the windowsill, unable to move.

Modelling the windowsill as the interval of real numbers [0,1], the first mosquito sits at the point 1, the second sits at the point 1/2, the third at thepoint 1/3, the fourth at the point 1/4, the kth at the point 1/k, etc.

With a single blow with the fly swatter, Ruprecht can wipe out all mosquitoes within an interval of length L (the two endpoints included). Ruprecht eliminates all mosquitoes by a total of five blows, but for any shorter swatter, he would need at least six blows.

What is the third digit after the decimal point in the decimal representation of L?

111 Possible Answers: 1.1 2.2 3.3 4.4 5.5 6.6 7.7 8.8 9.9 10.0

112 24.2 Solution Two answers are considered correct: Answers 9 and 10: The third number after the decimal point in the decimal representation is 9 or 0.

One easily sees that one of the hits must cover the point 0. If the inequality L < 1/10 were to hold, Ruprecht would need one separate blow for each of the six points 0, 1/10, 1/5, 1/3, 1/2 and 1 since these points are separated by a di- stance strictly greater than 1/10. This shows that L ≥ 1/10.

We now show that a fly swatter of length L = 1/10 is sufficient to kill all the mosquitoes within five blows:

• Blow 1 takes care of the interval [0,L] and kills the mosquitoes at 1/k with k ≥ 10.

• Blow 2 takes care of the interval [1/9, 1/9 + L] and kills the mosquitoes at 1/k with 5 ≤ k ≤ 9.

• Blow 3 takes care of the interval [1/4, 1/4 + L] and kills the mosquitoes at 1/4 and 1/3.

• Blow 4 takes care of the interval [1/2, 1/2 + L] and kills the mosquito at 1/2.

• Blow 5 takes care of the interval [1, 1 + L] and kills the mosquito at 1.

To summarize: the shortest possible length of the fly swatter is L = 1/10. The decimal representation of L is 0.1 and the second, third, fourth and all following digits after the comma are therefore 0. Answer #10 is correct.

However, the same number can also be represented as L = 0.09 = 0.0999 ... Then the third digit in the decimal representation is 9. Therefore, answer #9 is correct as well.

113