A problem about a cake...

87 Views Asked by At

A cake is decorated with berry and caramel flavoured sweets so that they go around the outer edge of it in a circular fashion. There are 2B berry-flavoured sweets and 2C caramel sweets in some order around the boundary of the cake. You want to divide your cake in half, in such a way that each half has B berry sweets and C caramel sweets. Can you always do this, no matter how the berry and caramel sweets are ordered?

1

There are 1 best solutions below

2
On BEST ANSWER

Start at a cut in half that minimizes the count of berry sweets on a chosen half, call the count $x$. By moving the cut along a single sweet there are three possibilities either $x$ stays the same, decreases by 1 or increases by 1.

Now note by the time we have gone half way round the cake we will have gone from $x$ berry sweets on the chosen half to $2B - x$ sweets on a half so in this process at some point we must have had exactly B sweets on the half.