# What's the more general case of this puzzler?

There is a puzzle which I remember from many years ago which can be summarised as

It is easy to arrange 20 items in five rows of four items, but how could you arrange just 10 items in five rows of four items?

The answer is this (spoiler-protected for those of you who want to try to solve it first):

which is all very clever, but what is the more general case of this lateral thinking puzzle?

: To clarify what I mean by "general case", I'm not so much asking whether there's a general case, but how to describe it, what values are possible, and how to find them.

For example, for an $n$-sided polygon (n>2), each vertex is in two rows of $2$ items, so the "trivial" general case is that $n$ items can be arranged in $n$ rows of $2$ if you only count the edges. However, for n>3, each vertex can be joined in $n-1$ rows of $2$ items, producing $\frac{1}{2}n(n-1)$ such rows in total.

• What do you mean general case? I assume that we could generalize this to "How can you make $a$ rows of $b$ using $c$ objects" for some $c < ab$, but I get the feeling that isn't what you're looking for. Jul 5, 2014 at 5:11
• Shouldn't "four rows of five items" be "five rows of four items"?
– hvd
Jul 5, 2014 at 7:49
• @hvd Good spot - corrected. Jul 5, 2014 at 9:52
• @DennisMeng It's not so much whether there's a general case, but how to describe it, what values are possible, and how to find them. Jul 5, 2014 at 9:55

Generally, for any two numbers $(n, k)$, where you want to arrange $n$ coins into rows of $k$, there is some maximum number $m$ of rows that you can arrange them into. We can define this to be $m = f(n, k).$
For $(10, 4)$, you showed that $m = 5$ in your question statement. Another famous case is $(9, 3)$, in which case the answer is $m = 10$, as follows:
Another way you could formulate the problem is to find the minimum number $n$ of coins it takes to form $m$ rows of $k$ coins. Then, we define $g(m, k)$ to equal $n$, and as above, we see that $g(5, 4) = 10$ and $g(10, 3) = 9$.