Wednesday, October 28, 2009

How to choose the largest birthday cake

You are coming to the bakery to order a cake for your kid's birthday party. Baker tells you that they price their cakes by the perimeter (sum of all the sides). They make only rectangular cakes. You order the cake with the perimeter 100" and contemplate what proportions your rectangular cake should have in order for you to have more of this cake.

Submit your answer on our Family Puzzle Marathon site. Solve three puzzles and get a prize!

4 comments:

Kim said...

You want a square cake. You know that the perimeter is 100, so the sides sum to 50 (that is 2x+2y=100, or x+y=50).

Let's take the extremes: A cake that is 49x1 has an area of 49. But a cake that is 25x25 has an area of 625.

All dimensions between will return a result between 49 and 625 (e.g., a 20x30 take will be 600), a 10x40 cake will be 400...) The closer to square, the closer to your maximum.

prluhmann said...

I agree with Kim. The table below also proves her point.
Len Wid Per Area
1 49 100 49
2 48 100 96
3 47 100 141
4 46 100 184
5 45 100 225
6 44 100 264
7 43 100 301
8 42 100 336
9 41 100 369
10 40 100 400
11 39 100 429
12 38 100 456
13 37 100 481
14 36 100 504
15 35 100 525
16 34 100 544
17 33 100 561
18 32 100 576
19 31 100 589
20 30 100 600
21 29 100 609
22 28 100 616
23 27 100 621
24 26 100 624
25 25 100 625

Maria said...

Good to know that there is such a drastic difference in the cake area, right? You can get 10 times more of the cake while keeping the same perimeter.
Another point for Kim.

We can also derive a theoretical solution to this, but it is too dry. Kim's and prluhmann's practical examples are much more vivid.

Wang said...

Heheh just to be theoretical about it (and eliminate all the tables) you can use calculus to calculate the optimal sides. If the sides of the cake are x and y then x and y are related by the equation

2x + 2y = 100

or in other words, y = 50 - x

What we are trying to optimize is x * y or replacing y, we get:

x ( 50 - x)

In order to optimize using calculus, we find where the derivative is 0 which tells us either a local max or a local min (in this case, it is a local max)

The first derivative is 50 - 2x and the 0 occurs at x = 25. Since the derivative moves from positive to negative from x < 25 to x > 25, we know that it is a local maximum.

Therefore, we can see that the optimal area is when x = 25 and y = 50 - x = 25 (or when it is a square)

Post a Comment

Note: Only a member of this blog may post a comment.