Alice and Bob play the following game. To start, Alice arranges the numbers 1,2,…,n in some order in a row and then Bob chooses one of the numbers and places a pebble on it. A player's turn consists of picking up and placing the pebble on an adjacent number under the restriction that the pebble can be placed on the number k at most k times. The two players alternate taking turns beginning with Alice. The first player who cannot make a move loses. For each positive integer n, determine who has a winning strategy.
Problem
Source: XIX Olimpíada Matemática Rioplatense (2010)
Tags: combinatorics, game, game strategy, Game Theory
27.07.2011 15:02
If I interpreted the task correctly it's pretty clear that Bob has a winning strategy for every n. It's obvious he wins when n=1. Otherwise, he just places the pebble on n. After that Alice is forced to move the pebble on number n−1 and after that he can just move it back to number n. And then the process repeats itself for n−1 times. One can easily check that Bob is the one who makes the last move.
27.07.2011 15:06
NO. Moreover, I think "adjacent" means not in value, but in position on the row ...
31.07.2011 22:55
Hmm yeah my bad. :S Sorry. I have one more question about the problem statment: When Bob first places the peable - does that count in the limit imposed on the number of times the peable can be placed on that number? So, if for example Bob places the peable on number 1 in the beginning, can the peable be moved to 1 once again during the game?
04.08.2011 11:20
Instead of numbers and pebble on it, let have some sets of objects of 1, 2, ...,n elements respectively, which Alice arange a permutation of them in positions 1,2,...,n. Then first player marks some object and subsequently a player's turn consists of picking up a object on adjacent position and marking it. No object can be marked twice. If sum of objects(i.e. n⋅(n+1)2 is even then first player(Alice) has a winning strategy, else second player has a winning strategy. Case1: Let n=4k or n=4k+3. The idea is Alice to place the objects in such a way, that they can be matched in pairs (x,y),x,y are objects that belongs to adjacent positions and each object belongs to one and only one pair. Then, after Bob marks some object, Alice marks the other one in the same pair. For example Alice can initially arange objects in such a way: 1,3,5,...,6,4,2. Matching can be done from left to right: First object matches one of the three ones on the right, two that left from second column, match two of the 3th column,... so on, till we get to the n-th column. Case2: n=4k+1 or n=4k+2. Whatever initial arrangement Alice make, Bob has a winning strategy. The same idea. Let try to match objects in the same way as in case 1. We will reach position(possibly before the end column) after that no matching is possible. There are 2 possible cases: 1) there remains one unmatched object in the n-th column- in that case Bob marks this object. 2) There are one (or more) objects on the i-th column that remain and can not be match to those on i+1 column, because all of them are already matched. In this case Bob marks some of these objects. Subsequently Bob plays as if Alice in case 1.
15.01.2017 19:14
I am sorry dgrozev, but I am not quite sure I understand your matchings and how it can guarantee that Alice can play on the other pair, for example. I was wondering if anyone has a solution to this challenging problem? Thanks!
15.01.2017 20:13
We can define a tower to be a number such that the two adjacent (or one adjacent in corner cases) numbers sum up to less than it. It may be easier to interpret the problem as having n piles of pebbles with numbers of pebbles ranging from 1 to n, and each turn taking one pebble. In case 1, if Alice places them like 1,3,5,7,8,6,4,2, for example, we have ensured that there are no towers, so therefore the pairing strategy works; just pair a pebble from 1 with a pebble from 3, pair the remaining pebbles in 3 with two pebbles in 5, etc. and we know that this works because there are no towers. In the case 2, if there exist any towers, then Bob simply plays on a tower and returns to it every turn and wins. If there are no towers, then we can pair stuff up until we get to the rightmost stack of pebbles, and then we win.
16.01.2017 20:20
That is really quite clever! Thank you so much!
25.11.2017 08:59
Use to be a wrong solution there...
25.11.2017 12:44
I don't agree with solutions above. If n=4, with solution suggested by dgrozev, we would have : 1,3,4,2, where I indicate the number of time we can go on the i-th case. But if Bob places the pebble on the first case (which doesn't count, along to what I understood of the problem), then here's the steps A- > 1,2,4,2 (A on second place) B-> 0,2,4,2 (Bob on first) A -> 0,1,4,2 (A on second) B -> 0,1,3,2 : Then Bob is on the thrd place "3", which is greater or equal to the sum of its neighbors. Then he can assure a win staying at this place (as defined by Kaladesh, it's a "tower"). The trick is that "tower" can appear anywhere, even if there wasn't any at the beginning.
25.11.2017 12:59
I may be wrong, but I think Bob has always a winning strategy. Please tell me if I'm wrong : We note i the i-th case from left to right and a_i the number of times we're allowed to go on this case. Bob put the pebble on the first case, which I remind doesn't count. If it's a winning position we're done. Otherwise, if Bob can't assure a win on the first case, it means that Alice can on the second case with a_2-1 other allowed movement to this one. So the second place is a winning position for Alice. Similarly, if Bob put the pebble on the 3-rd case, then Alice can go on the second and assure a win. So, let's put Bob's pebble on the second case at the beginning. Our aim is to show there exists a strategy to win for Bob. Forst of all, note that Bob we'll have a_2 authorized movement on this case, when Alice had only a_2-1. The fact that is greater is not relevant, but he can do the same strategy as Alice if needed. If Alice goes right, then she loses. Indeed, the third case was not a winning position with a_3 allowed movements for Bob by assumption. Therefore Alice can't assure a win with a_3-1 movement, as if she could Bob could have done so using a_3-1 movement, which contradicts our assumption. Similarly, if Alice goes left, then she can't assure a win with a_1-1 other movements allowed on this case, as Bob could have done so in first place. So the second place is a winning position for Bob. Then Bob can assure a win. Is there a flaw somewhere ?
25.11.2017 19:28
ok, suppose n=4 and I, as Alice, arrange the numbers as 1,3,4,2 see the attachment bellow. You, as Bob, make the first move as placing a stone somewhere (or mark one of the squares on the picture). My next move would be to mark the matching square of that you've marked. On every round I just do the same. I believe the last move will be mine. Now, the question is: would you still bet that you would win?! The key idea in that problem is matching. We match the squares (or placeholders) by pairs and then follow the strategy to mark the square which matches that marked by the other player.
Attachments:

25.11.2017 20:12
I got what you mean, but I disagree. Actually, as I understand the problem, the first pebble that Bob put is not count as a move. As said in the statement, the first turn is done by Alice, not by Bob. So, as I understood, Bob can go back from the second column to the first. Maybe I don't understand the statement as it should be... If we count when Bob places the first pebble I agree you're right. The problem is a little bit ambiguous for me. Edit : I must admit your interpretation and solution are wayyyyy more interesting than mine (especially solution) and you must be right... I must say I'm a bit disappointed that I spent time on a problem I musunderstood :p In particular becuase I pointed out the "tower" argument but it was pointless in my solution.
25.11.2017 20:44
It doesn't matter what you would call first and second player. What does matter is that at first Alice does the arrangement of the objects(numbers, placeholders, etc.), then Bob places a stone, after that Alice, Bob, ..., so on and Quote: The first player who cannot make a move loses . Thus, in this case, n=4, Alice wins (Bob loses).
08.10.2019 17:49
The initial move of Bob does count
12.10.2019 18:40