A analysis of brownie division algorithims

Apr 17, 2007 14:53

Or "What to say when your kid asks why they need to learn algebra"

The other day geekchick and I had a pan of brownies. She prefers edge pieces and I prefer middle pieces, but after cutting it up in a fairly typical way, (3x6 or so) I realized there were a lot more edge pieces (14 out of 18 for 3x6). Driven by my love of math and chocolate, I set out to find a fairer approach.

Assumptions and terminology:

The brownie pan is X units by Y units, X >= Y.

"Fairness" is determined by the total area of brownie consumed. That's overly simplistic - there should be a weighting factor for the desirability of "crust" area vs "non-crust" area, but that's a refinement for a future post.

It would be nice if all the brownie pieces were the same size. It'd also be nice if the brownies could be cut without needing a ruler, compass, protractor, slide rule or laser measuring equipment. (We have have that stuff in the kitchen, of course, but not all of it is dishwasher safe.)

Analysis:

Given the fairness criterion, the brownies must be divided such that the area of middle pieces is equal to the area of edge pieces. An obvious way to do this is to cut a rectangle in the middle which is sqrt(2)*X by sqrt(2)*Y units. This works, but makes it harder (impossible?) to get equally-sized pieces.

Alternatively one could cut a circle of radius r = sqrt(XY/2*pi) (this is where a square pan comes in handy, as this approach fails when the pan's aspect ratio reaches pi/2), or an ellipse whose major and minor diameters are 2X/sqrt(2pi) and 2Y/sqrt(2pi) respectively.

A non self-abusive approach is to divide the brownie into n pieces by m pieces (where n and m are positive integers) as is typically done, such that the middle pieces amount to half the total area. Since the pieces are the same size, we can just count them. There will be (n-2) * (m-2) middle pieces, which should be half of the total number of pieces, n*m. This gives:

2*(n-2)*(m-2) = n*m, which reduces to
nm - 4(n+m) = -8

I'm ignoring the "double-edge" value of corner pieces for now.*

Note that m and n are interchangeable. For any valid solution you can cut it n by m or m by n, though given typical brownie pan aspect ratios (1.4-1.5 to 1), one way is usually easier. Unless you're a weirdo and like long, narrow brownie strips, in which case please feel free to get down with your bad freaky self, just keep your pervy hands off my brownies.

Trial and error is a viable approach. For convenience we rearrange to
(n-4)m = 4n-8

At n = 2 there are no middle pieces, so any solution would be nonphysical. Likewise with any smaller n. Trying n = 3 and n = 4 we find neither has a valid solution.

Based on the foregoing, there is no solution with either n or m less than 5.

The first solution comes at n = 5
(5-4)m = 20-8
m = 12

For n = 6
(6-4)m = 24 - 8
2m = 16
m = 8

For n = 7
(7-4)m = 28 - 8
3m = 20
m = 20/3, which is not in Z+

n = 8 gives the solution for n=6, (6x8), with n and m reversed
(8-4)m = 32 - 8
4m = 24
m = 6

For n = 9
(9-4)m = 36 - 8
5m = 28
m = 28/5, which is not in Z+

For n = 10
(10-4)m = 40 - 8
6m = 32
m = 16/3, which is not in Z+

It's clear that as n increases, m decreases. At n = 10 the solution for m is already below 6, so the next solution (n = 12) will have m = 5. As n increases further there is no integral m below 5 that can solve the equation. Thus values of n > 12 have no solution.

The valid solutions are therefore 5x12 and 6x8

[Author's note: I prefer 6x8 - it tastes better.]

*If you count each corner piece twice (since it has more edgy goodness) the approach is similar and the valid solutions are 5x16, 6x10 and 7x8. In that case I prefer 7x8. 6x10 might be ok but 5x16 smacks of long narrow brownie strips and you know how I feel about that kind of perversion.
Previous post Next post
Up