# Packing in the Cookies

Consider packing circles inside a circular container, or less abstractly, placing cookie dough on a cookie sheet. In the case of cookies, which expand to be a roughly circular shape, you don’t want them so close that they run into each other. At the same time, you don’t want them too far apart, because that would mean fewer cookies.

One of the latest features of Wolfram|Alpha is the ability to get information about packing circles into circles.

For instance, suppose you have a circular baking sheet with a diameter of 12 inches, and you want to make 20 cookies. You can ask Wolfram|Alpha “pack 20 circles in a diameter 12 inch circle”; not only does it give you a diagram of the densest packing, but also the largest radius of the circular cookies on the 12-inch baking sheet.

Or you might know the size of the cookies and want to know how many can fit? One way to get the answer would be “pack r=1 circles in a diameter 12 circle”.

You can also get information about hexagonal and square arrangements, which are packings that you get when you space out the cookies in a regular pattern. In the latter query above, you discover that the densest packing of radius-1 cookies on a 12-inch diameter baking sheet is 27: better than with a hexagonal grid where you can only fit 24, or with a square grid where you can only fit 22.

Suppose we’ve made two batches of 27 cookies, making a total of 54 cookies. How big of a serving platter would you need so that none overlap? One way to ask Wolfram|Alpha this question is “pack 54 r=1 circles in a circle”. You learn that the densest packing requires the serving platter to have a radius just a little more than 8.2 inches, while a hexagonal arrangement is almost as efficient, and a square arrangement requires a platter with a little more than a 9-inch radius.

At this point, you might be wondering, “How many calories is that?” and “How many miles do I need to jog to compensate?” These are beyond the scope of this blog. Still, not surprisingly, Wolfram|Alpha will answer these questions, but I leave them as an exercise for the reader. (Hint: “calories 54 cookies” and “running 3693 calories“.)

Try “pack 1 circle in circle”… Or “pack 1 circle in a diameter 12 circle”.

“pack 2″x3″ rectangles in a 10″ diameter circle” is my problem. I wish wolfram alpha could do it! Instead it thinks I want to know about airplanes.

“pack 2″ diameter circles in a 10″ diameter circle” is the same… airplanes.

“pack r=2 circles in a 10 diameter circle” is the same… more airplanes.

It’d be nice if there was a “It looks like you’re trying to pack things… here’s the tool” then it could show drop down boxes “What shape do you want to pack?” “Into what shape do you want to pack it”, etc.

I love wolfram alpha, but often I can’t get it to do what I want it to, despite knowing that it should be able to do it…

Hi Dan, Thank you for your feedback. Wolfram|Alpha can’t do this at the moment but it is something that we’re working on. We’ll keep you posted as more develops. Thank you.

This seems cool – does Alpha do any search for non-lattice packings or just rely on a list of known construtions? Off topic, but are you by any chance the same Todd Rowland I was in grad school with at the Univ. of Chicago (if so, please contact me, I’d love to catch up).