Päevaülesanne

Juhuslik

Harjutuskomplekt

Balti Tee 2010 · Ülesanne 9

Kombinatoorika

There is a pile of 1000 matches. Two players each take turns and can take 1 to 5 matches. It is also allowed at most 10 times during the whole game to take 6 matches, for example 7 exceptional moves can be done by the first player and 3 moves by the second and then no more exceptional moves are allowed. Whoever takes the last match wins. Determine which player has a winning strategy.

Muuda valikut

Kui oled valmis

Ülevaatematerjal muutub kättesaadavaks järgmise päevaülesannete komplektiga.

Ülevaade

Teemad

Mängud ja strateegiad · Algoritmid ja protsessid · Invariandid ja monovariandid

Lahendused

Lahendus

Let rr be the number of the remaining exceptional moves in the current position (at the beginning of the game r=10r=10 and rr decreases during the game). The winning strategy of the second player is the following. After his move the number of matches in the pile must have the form 6n+r6n + r, where n>rn > r, or 7n7n, where n≤rn \le r (observe that 6n+r=7n6n + r = 7n for n=rn = r).

At the beginning of the game the initial number of matches 1000=6⋅165+101000 = 6 \cdot 165 + 10 agrees with this strategy.

What happens during two consecutive moves?

Consider the case n>rn > r first. If the first player takes k=1,2,…,5k = 1, 2, \dots, 5 matches (and hence rr is not changing during his move) then the second player takes 6−k6 - k matches. So players take 66 matches together and the pile contains now 6(n−1)+r6(n-1) + r matches.

Võistluse kontekst

Balti Tee tulemused 2010

10 võistkonda

Keskmine tulemus
2,5 / 5
4 või 5 punkti
5 / 10
Eesti
4 / 5

Punktijaotus

04
11
20
30
41
54
Kõigi võistkondade punktid
VõistkondPunktid
Poland0 / 5
Lithuania5 / 5
Germany1 / 5
Latvia5 / 5
Denmark5 / 5
Sweden5 / 5
Estonia4 / 5
Norway0 / 5
Finland0 / 5
Iceland0 / 5