The following problem is about a game played with wooden blocks stacked vertically.
The way the game is played is as so:
The following is a simulation of 8 blocks:
8 ⟶ 4 1 a n d 4 2 = ( 4 ⋅ 4 ) = 1 6 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 = 1 6 + 3 + 4 + 2 + 1 + 1 + 1 = 2 8
Let S(n) represent the maximum score one could possibly achieve playing this game with n blocks.
What is S(2014)?
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.
Love the solution! Good job : )
This is IPSC 2013 Problem B . The following solution rephrases the one given in the solution booklet.
Suppose that we have n blocks. Make a complete graph of 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 into 2 and 3 , we remove the edges from our clique of 5 so that only cliques of 2 and 3 remains.
Suppose we split a pile into two piles a , b . Our score increases by the product of the sizes of the two piles, namely a b . However, we also remove the same number of edges from the graph; the removed edges form a complete bipartite graph K a , b , and there are a b such edges. So we can pretend every edge removed scores 1 point.
Now, in a complete graph of n vertices, there are 2 n ( n − 1 ) 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 2 n ( n − 1 ) points. For n = 2 0 1 4 , this results to 2 0 2 7 0 9 1 .
Interesting approach to the solution. Bravo!
Problem Loading...
Note Loading...
Set Loading...
Your score is always the same no matter how you play, and 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 ) for some a , and 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...)