I spent a year working on Dandy Candies with around 1,000 educators.

In my workshops, once I stop learning through a particular problem, either learning about mathematics or mathematics education, I move on to a new problem. In my year with Dandy Candies, there was one question that none of us solved, even in a crowd that included mathematics professors and Presidential teaching awardees. So now I’ll put that question to you.

Here is the setup.

At the start of the task, I ask teachers to eyeball the following four packages. I ask them to decide which package uses the least packaging.

With the problem in this state, without dimensions or other information, lots of questions are available to us that numbers and dimensions will eventually foreclose. Teachers estimate and predict. They wonder how many unit cubes are contained in the packages. They wonder about descriptors like “least” and “packaging.”

After those questions have their moment, I tell the teachers there are 24 unit cubes inside each package. Eventually, teachers calculate that package B has the least surface area, with dimensions 6 x 2 x 2.

We then extend the problem. Is there an even *better* way to package 24 unit cubes in a rectangular solid than the four I have selected? It turns out there is: 4 x 3 x 2. When pressed to justify why this package is best and none better will be found, many math teachers claim that this package is the “closest to a cube” we can form given integer factors of 24.

**The Problem We Never Solved**

We then generalize the problem further to *any* number of candies. I tell them that as the CEO of Dandy Candies (DANdy Candies … get it?!) I want to take *any* number of candies – 15, 19, 100, 120, 1,000,000, whatever – and use an easy, efficient algorithm to determine the package that uses the least materials.

Two solutions we reject fairly quickly:

- Take your number.
- Write down all the sets of dimensions that multiply to that number.
- Calculate the packaging for that set of dimensions.
- Write down the set that uses the least packaging.

And:

- Take your number.
- Have a computer do the previous work.

I need a rule of thumb. A series of *steps* that are intuitive and quick and that reveal the best package. And we never found one.

Here was an early suggestion.

- Take your number.
- Write down all of its prime factors from least to greatest.
- If there are three or fewer prime factors, your dimensions are pretty easy to figure out.
- If there are four or more factors, replace the two smallest factors with their product.
- Repeat step four until you have just three factors.

This returned 4 x 3 x 2 for 24 unit candies, which is correct. It returned 4 x 5 x 5 for 100 unit candies, which is also correct. For 1,000 unit candies, though, 10 x 10 x 10 is clearly the most cube-like, but this algorithm returned 5 x 8 x 25.

One might think this was pretty dispiriting for workshop attendees. In point of fact it connected all of these attendees to each other across time and location and it connected them to the mathematical practice of “constructing viable arguments” (as the CCSS calls it) and “hypothesis wrecking” (as David Cox calls it).

These teachers would test their algorithms using known information (like 24, 100, and 1,000 above) and once they felt confident, they’d submit their algorithm to the group for critique. The group would critique the algorithm, as would I, and invariably, one algorithm would resist all of our criticism.

That group would *name* their algorithm (eg. “The Snowball Method” above, soon replaced by “The Rainbow Method”) and I’d take down the email address of one of the group’s members. Then I’d ask the attendees in *every other workshop* to critique that algorithm.

Once someone successfully critiqued the algorithm – and *every single algorithm has been successfully critiqued* – we emailed the author and alerted her. Subject line: RIP Your Algorithm.

So now I invite the readers of this blog to do what I and all the teachers I met last year couldn’t do. Write an algorithm and show us how it would work on 24 or another number. Then check out other people’s algorithms and try to wreck them.

**Featured Comment**

Big ups to Addison for proposing an algorithm and then, several comments later, wrecking it.

**2015 Sep 25**

We’re all witnessing incredible invention in this thread. To help you test the algorithm you’re about to propose, let me summarize the different counterexamples to different rules found so far.

20 should return 5 x 2 x 2

26 should return 13 x 2 x 1

28 should return 2 x 2 x 7

68 should return 2 x 2 x 17

222 should return 37 x 3 x 2

544 should return 4 x 8 x 17

720 should return 8 x 9 x 10

747 should return 3 x 3 x 83

16,807 should give 49 x 49 x 7

54,432 should return 36 x 36 x 42

74,634 should give 6 x 7 x 1777