It’s that time of year again where I am forced to come face to face with my one and only flaw: wrapping presents. Yes, the great staff of Debenhams may as well be superheroes to me, expertly taping seams and tying ribbons while I look on with envious bewilderment. My efforts in comparison look like they’ve washed ashore after six months at sea due to a tragically festive shipping accident. In an attempt to reclaim some Christmas pride then, let’s see if there is anything interesting in the present wrapping process, without, you know, actually doing any wrapping.

To keep things simple, let’s consider the wrapping of a cuboid present with side lengths :

We also make the prescription that this box has a well defined volume , so (easy as 1,2,3?). I will also use my own, most likely inefficient, wrapping procedure:

First I take two opposite edges and fold them over the top of the box to meet on the upper surface. I then take the other edges and fold them up to cover the vertical sides of the box, not needing to cover the upper surface this time. Let’s assume we’re being lazy and just cutting out rectangles of wrapping paper. The layout of the wrapping paper then looks like the following, from which we can deduce how much paper we need:

As expected, my chosen wrapping procedure is quite wasteful, but maybe there is a shape of present where the wastage is minimised (spoiler alert: yes).

The side lengths of the rectangle are and , so the total area of the paper is then

We’d like to know the minimum possible area of paper we need for a present of volume . This condition allows us to express where is fixed, so this three-dimensional problem is reduced to a two-dimensional problem. We need to do a bit of calculus then, and find the point where

Doing the algebra we arrive at the coupled cubic equations for and :

Oh dear, this looks a bit evil to solve which is a shame. However, curiously there is a way to arrive at a solution without needing to solve any nasty cubics, it just requires a bit more mathematical machinery.

The problem we’re having is that we have to substitute in for , which is giving us an extra power of and in our equations and making them difficult to solve. We need to do this to enforce our constraint of constant volume. Lets then look at a different way of enforcing this constraint, with the use of a Lagrange multiplier.

Instead of finding a stationary point of , we will find a stationary point of an auxiliary function

where is the volume of the box and the constant is known as a Lagrange multiplier. It isn’t immediately obvious why we should do this, but you can think of the constraint as representing a surface in 3D space. The area of our wrapping paper is a function which fills this space like a gas, but we are only interested in its values where it touches the surface . With enough squinting (and reading Wikipedia pages), you can convince yourself that at the stationary point, the gradients of the function and the constraint are in the same direction, so by minimising a linear combination of both we find the point where the gradients are parallel (and the correct value of along the way).

Chundering along then, we have

and we now need to find a stationary point of , i.e. where

Doing this, we have 3 equations in 4 unknowns:

but now we remember our constraint , allowing us to substitute for . We can then solve for in the first of our equations:

and substitute in the second to find . Amazingly, lots of things cancel and we get the simple result

Lovely. Continuing to the third equation, we end up at

which at first glance looks horrible. We’ve done our GCSE maths though, and noticed this sneaky exam question before: substitute and solve the simple quadratic in . We do this, end up with 6 solutions, discard those which are negative or imaginary, and finally arrive at

So for a box of fixed volume, to use as little wrapping paper as possible with my naive method, it should have sides in the ratio 1:2:4, and the area of paper will be . Simple!

As always, we should double-check to make sure we’ve found a minimum rather than a maximum, but rather than do any more algebra I’ll simply do it numerically. For a range of and , I calculate the required paper area, and find the result we calculated:

If there is a more optimal wrapping procedure I’d like to hear about it, it will change the ‘optimal’ box shape. This technique will also extend itself naturally to higher-dimensional gifts, appropriate for that mathematician in your life. Unfortunately I can’t convince Sainsburys to sell me a festively-decorated holiday hypersurface with which to wrap such a gift, perhaps when the Christmas industry catches up we can revisit this topic in the future.

Thanks for reading, have a great holiday break and a decidedly optimal new year.

Nice work. How about this method? https://www.youtube.com/watch?v=fh_Rg6e4SY8

LikeLike

Wow! I wonder if that’s some optimal method. The side lengths of those boxes do look almost 1:2:4…

LikeLike

I believe that I get a slightly better result with the following method. Wrap a sheet around bottom, left, top, and right of the cuboid, and make sure that there is enough sticking out at all sides to cover the front and back. That means that the length of the paper needs to be 2b + 2c, and the width needs to be a + 2 * 1/2 * min(b, c). Since the procedure is symmetrical in b and c, we may assume wlog that b <= c to obtain a paper area of 2*(b+c)*(a+b). The minimum area subject to a*b*c = V is now attained if a:b:c = 2:1:2. If we take the length of b as a unit, we get A=18 and V=4, so A/V^(2/3) is 18 / 16^(1/3) is approximately 7.14.

LikeLike

Thanks for the comment, I agree your method leads to better efficiency – nice! Let’s see if anyone else can beat your record.

LikeLike

You can do much better by orienting the box diagonally:

LikeLike

Thanks, I’ve had this pointed out to me, let’s see if anyone does the maths!

LikeLike

You can do better by wrapping diagonally. See:

LikeLike

When you derive the equations:

a^3 – \frac{2V}{b}a – \frac{4V}{b^3} = 0

b^3 – \frac{V}{a}b – \frac{4V}{a^3}=0

Shouldn’t the V at the end be squared?

LikeLike

Yes it should! Thanks for picking up the typo, I’ll correct it now.

LikeLike