Induction of the N-Block Game!

The following problem is about a game played with wooden blocks stacked vertically.

The way the game is played is as so:

  1. There is a stack of n blocks available on a table in front of you;
  2. With every move you make you can split the stack into two piles which, under your choice, can be equal or not;
  3. After every move, your score is increased based on the product of the sizes of the two new stacks;
  4. The game is played until all stacks are of size 1 ;
  5. The sum of all the products is the total score.

The following is a simulation of 8 blocks:

8 4 1 a n d 4 2 = ( 4 4 ) = 16 4 1 3 a n d 1 = ( 3 1 ) = 3 4 2 2 1 a n d 2 2 = ( 2 2 ) = 4 3 2 3 a n d 1 = ( 2 1 ) = 2 2 1 1 a n d 1 = ( 1 1 ) = 1 2 2 1 a n d 1 = ( 1 1 ) = 1 2 3 1 a n d 1 = ( 1 1 ) = 1 T o t a l S c o r e = 16 + 3 + 4 + 2 + 1 + 1 + 1 = 28 \boxed{8\quad \longrightarrow \quad { 4 }_{ 1 }\quad and\quad { 4 }_{ 2 }\quad =\quad (4\quad \cdot \quad 4)\quad =\quad 16\\ { 4 }_{ 1 }\quad \longrightarrow \quad 3\quad and\quad 1\quad =\quad (3\quad \cdot \quad 1)\quad =\quad 3\\ { 4 }_{ 2 }\quad \longrightarrow \quad { 2 }_{ 1 }\quad and\quad { 2 }_{ 2 }\quad =\quad (2\quad \cdot \quad 2)\quad =\quad 4\\ 3\quad \longrightarrow \quad { 2 }_{ 3 }\quad and\quad 1\quad =\quad (2\quad \cdot \quad 1)\quad =\quad 2\\ { 2 }_{ 1 }\quad \longrightarrow \quad 1\quad and\quad 1\quad =\quad (1\quad \cdot \quad 1)\quad =\quad 1\\ { 2 }_{ 2 }\quad \longrightarrow \quad 1\quad and\quad 1\quad =\quad (1\quad \cdot \quad 1)\quad =\quad 1\\ { 2 }_{ 3 }\quad \longrightarrow \quad 1\quad and\quad 1\quad =\quad (1\quad \cdot \quad 1)\quad =\quad 1\\ \\ Total\quad Score\quad =\quad 16+3+4+2+1+1+1\quad =\quad 28}

Let S(n) represent the maximum score one could possibly achieve playing this game with n blocks.

What is S(2014)?


The answer is 2027091.

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

Patrick Corn
Jul 9, 2014

Your score is always the same no matter how you play, and S ( n ) = n ( n 1 ) / 2 S(n) = n(n-1)/2 . This is easy to prove by induction, since your score is a ( n a ) + S ( a ) + S ( n a ) a(n-a) + S(a) + S(n-a) for some a a , and a ( n a ) + a ( a 1 ) / 2 + ( n a ) ( n a 1 ) / 2 = n ( n 1 ) / 2 a(n-a) + a(a-1)/2 + (n-a)(n-a-1)/2 = n(n-1)/2 .

This is not the most satisfying solution; there is a nicer one involving inscribing squares inside isoceles right triangles (where two of the squares' sides lie on the legs of the right triangle). But I will leave this for others to find. (Your score is the total area of the squares you inscribe...)

Love the solution! Good job : )

Hussein Hijazi - 6 years, 11 months ago
Ivan Koswara
Jul 10, 2014

This is IPSC 2013 Problem B . The following solution rephrases the one given in the solution booklet.

Suppose that we have n n blocks. Make a complete graph of n n vertices. Two vertices are connected iff they are in the same pile; additionally, if two vertices are connected, then they must have an edge between them. Thus the graph will be a union of disjoint cliques at all times.

Whenever one splits a pile into two, we remove the corresponding edges from the graph. For example, when one splits a pile of 5 5 into 2 2 and 3 3 , we remove the edges from our clique of 5 5 so that only cliques of 2 2 and 3 3 remains.

Suppose we split a pile into two piles a , b a,b . Our score increases by the product of the sizes of the two piles, namely a b ab . However, we also remove the same number of edges from the graph; the removed edges form a complete bipartite graph K a , b K_{a,b} , and there are a b ab such edges. So we can pretend every edge removed scores 1 1 point.

Now, in a complete graph of n n vertices, there are n ( n 1 ) 2 \dfrac{n(n-1)}{2} edges. At the end, there is no edge (as no pile has more than one block, and if two vertices are connected, it means they belong to the same pile and thus a pile will have more than one block). Thus we have removed all edges, and thus we score n ( n 1 ) 2 \dfrac{n(n-1)}{2} points. For n = 2014 n = 2014 , this results to 2027091 \boxed{2027091} .

Interesting approach to the solution. Bravo!

Hussein Hijazi - 6 years, 11 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...