Game Of Partitions

Logic Level 2

Alice and Carla are playing a game of their own invention. To both players, a positive integer N > 1 N > 1 is known. Then, the game proceeds as follows:

  1. Carla makes the first move by splitting N N into two (not necessarily distinct) positive integers that add up to it.

  2. The next person picks one of the numbers (greater than 1) and further splits that number into two more positive integers.

  3. If one of the numbers split is a 1, the player gets a point. (If both are 1, the player gets two points.)

  4. The next person takes their turn by repeating steps 2 and 3 until there are only N N ones, meaning there are no longer any numbers that can be split.

If both Alice and Carla play optimally, given a positive integer N N it can be determined who should win the game. For how many positive integers 1 < N 100 1 < N \leq 100 should Carla be the winner?

Example Game:

Carla chooses the number 5 - Numbers: {5}

Carla splits 5 into 2 and 3 - Numbers: {2,3}

Alice splits the 2 into 1 and 1 and scores two points - Numbers: {1,1,3}

Carla splits the 3 into 1 and 2 and scores one point - Numbers: {1,1,1,2}

Alice splits the 2 into 1 and 1 and scores two points - Numbers: {1,1,1,1,1}

The numbers have been split into 5 ones, therefore the game ends 1-4 in favor of Alice.


The answer is 50.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

Garrett Clarke
Aug 16, 2015

The answer ends up being a bit simpler than you might think. The optimal solution for both players is to simply split each number n n into 1 1 and n 1 n-1 , starting with N N and ending with 2 2 being split into two 1 1 s. After N 1 N-1 turns the game is concludes, no matter how the game is played.

If N N is even, then the number of rounds will be odd, meaning that Carla will get an extra turn. Each player gets 1 1 point per turn and then Carla will get an extra 2 points for the last split, meaning that the score will end N 2 + 2 \frac{N}{2}+2 to N 2 \frac{N}{2} in favor of Carla.

If N N is odd, then the number of rounds will be even, but since Alice makes the last move, she will get an extra point for making the last split. This gives us a final score of N 1 2 \frac{N-1}{2} to N + 1 2 \frac{N+1}{2} in favor of Alice.

There are 50 50 even integers less than or equal to 100, therefore Carla has 50 \boxed{50} numbers she can choose from to win the game.

Correct me if I'm wrong, but I don't think this is a complete solution. You still need to explain why splitting into 1 and n-1 is the optimal solution. What if the other player chooses a different strategy? You have to prove that no matter what the other person does, your strategy will work. In other words, you have to prove that if Carla employs that correct strategy, there is no way for Alice to win for even N, regardless of what she does , and the same for Alice with odd N.

Regardless, I thought this was a very interesting question, and I feel that proving it completely is worth far more than 60 points.

Richard Zhou - 5 years, 9 months ago

Log in to reply

You are correct in saying that I haven't proven that it is the optimal solution. I made the problem; what fun would it be for the reader if I posted the full solution as well? Besides, your solution seems to do the trick just fine, and has appropriately received and upvote from me. Thanks a bunch for your contribution!

Garrett Clarke - 5 years, 9 months ago

Good question, I think the question can be more tricky if you asked about Alice, because the condition N > 1 N > 1 will constrain the numbers of integers to 49 instead of 50 :D

Ahmed El-Ȝshry - 5 years, 9 months ago

Log in to reply

Good point! We would have to allow Alice to choose the number then, I chose to ask about Carla because she chooses the number. Carla could always just pick a number where she wins. In essence, whoever picks the number N N should win every time.

Garrett Clarke - 5 years, 9 months ago

Log in to reply

yes, whoever picks the number N N should win every time.

Ahmed El-Ȝshry - 5 years, 9 months ago
Richard Zhou
Aug 25, 2015

It is easy to see from experimentation that Carla wins when N is even and Alice wins when N is odd. Proving this, however, is an interesting problem.

Start with the two simplest cases, when N = 2 and N = 3. Clearly, Carla will win in the first case, and Alice in the second. From here, we can induct upward. Suppose that for some M, we know that all N < M yields a win for Carla for even N, and a win for Alice for odd N.

Now consider the case where we begin with M. If M is even, Carla's strategy is to split it into 1 and M-1. M-1 is an odd number less than M, meaning that the first person who splits it will get less 1's. Since Alice has to start splitting M-1 first, and there is nothing else to split, she will get less 1's than Carla from the M-1, no matter what she does. This, combined with the fact that Carla got a 1 earlier, guarantees Carla will win for even M .

It gets a little trickier when M is odd. Carla's first move will split M into two numbers, denoted by A and B, of opposite parity. WLOG, suppose that A > B. Alice then splits A into B and C, where C = A-B. Because A and B are of opposite parity, C must be odd. Carla is then left with B, C, B (consider everything from here to be an action on one of these "trees").

From here, Alice's strategy is as follows: every time Carla splits a B-tree, Alice will do the exact same thing on the other B-tree. Thus, Carla must be the first person to split the C-tree. Since C < M and Carla split C first, Alice has the winning strategy on C, so she will employ the appropriate move on C every time Carla splits C. Ultimately, Alice will gain more from the C-tree, and they will both gain the same amounts from the B-trees because they do the exact same moves. Thus, Alice wins for odd M .

There are 50 even numbers between 2 and 100, inclusive, so the answer is 50 \boxed{50}

I made a mistake (I think); I thought it was whenever a number was a multiple of two, Carla would win.

Raghav Arora - 5 years, 9 months ago

Log in to reply

I don't see your mistake - Carla does win when the number is a multiple of two, and there are 50 multiples of two between 2 and 100, inclusive.

Richard Zhou - 5 years, 9 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...