# Cutting sticks puzzle

This was asked on sci.math ages ago, and never got a satisfactory answer.

Given a number of sticks of integral length $\ge n$ whose lengths add to $n(n+1)/2$. Can these always be broken (by cuts) into sticks of lengths $1,2,3, \ldots ,n$?

You are not allowed to glue sticks back together. Assume you have an accurate measuring device.

More formally, is the following conjecture true? (Taken from iwriteiam link below).

Cutting Sticks Conjecture: For all natural numbers $n$, and any given sequence $a_1, .., a_k$ of natural numbers greater or equal $n$ of which the sum equals $n(n+1)/2$, there exists a partitioning $(P_1, .., P_k)$ of $\{1, .., n\}$ such that sum of the numbers in $P_i$ equals $a_i$, for all $1 \leq i \leq k$.

Some links which discuss this problem:

-
My interpretation: all sticks' length are ≥ n, and the number of stick is variable. For example, if n = 5, then the stick lengths may be {15}, {10,5}, {9,6}, {8,7} or {5,5,5}. Then we try to break these sticks into {1,2,3,4,5}. – kennytm Aug 16 '10 at 13:30
@Kenny, Yes, that is correct. – deinst Aug 16 '10 at 14:16
@Deinst: Did you see this link : iwriteiam.nl/cutsticks.html. I think the same problem is posted there. – anonymous Aug 16 '10 at 15:16
You could check MathOverflow – Casebash Aug 16 '10 at 21:04
I wonder if there is an analytic way of approaching this, similar to the use of the circle method in Waring's problem? The number of ways of partitioning the set $\{1,\ldots,n\}$ to give lengths $a=(a_1,\ldots,a_k)$ can be written as $$\int_{[0,1]^k}e^{-2\pi ia\cdot x}\prod_{r=1}^n(e^{2\pi irx_1}+\cdots+e^{2\pi irx_k})\,dx_1\ldots dx_k.$$ Maybe it is possible to approximate this integral and show that it is nonzero for $a$ satisfying the required conditions? – George Lowther Sep 18 '11 at 13:53

This is not a solution, just something I found that might be relevant.

On the page linked to in the question, a reduction and various strategies are considered. I'll briefly reproduce the reduction, both because I think it's the most useful part of that page and perhaps not everyone will want to read that entire page, and also because I need it to say what I found.

Let a counterexample with minimal $n$ be given. If one of the sticks were of length $n$, we could use that stick as the target stick of length $n$ and cut the remaining sticks into lengths $1$ through $n-1$, since otherwise they would form a smaller counterexample. Likewise, if one of the sticks had length greater than $2n-2$, we could cut off a stick of length $n$ and the remaining sticks would all be of length $\ge n-1$, so again we could cut them into lengths $1$ through $n-1$ because otherwise they would form a smaller counterexample. Thus,

the lengths of the sticks in a counterexample with minimal $n$ must be $\gt n$ and $\lt 2n-1$.

Problem instances that satisfy these conditions for a potential minimal counterexample are called "hard" on that page; I suggest we adopt that terminology here.

The strategies discussed on that page include various ways of forming the target sticks in order of decreasing length. It was found that there are counterexamples both for the strategy of always cutting the next-longest target stick from the shortest possible remaining stick (counterexample $\langle11,12,16,16\rangle$) and for the strategy of always cutting the next-longest target stick from the longest remaining stick unless it already exists (counterexample $\langle10,10,12,13\rangle$), whereas if the stick to cut from was randomized, it was always possible to form the desired sticks up to $n=23$.

I've checked that all hard problem instances up to $n=30$ are solvable, and I found that they remain solvable independent of which stick we cut the target stick of length $n$ from. This is equivalent to saying that a problem instance for $n-1$ can always be solved if all stick lengths except one are $\gt n$ and $\lt 2n-1$ and one is $\lt n-1$, since all of these instances can result from cutting a stick of length $n$ from a hard problem instance for $n$.

I thought that this might be generalized to the solvability of an instance being entirely determined by whether the sticks of length $\le n$ can be cut to form distinct integers, but that's not the case, since it's possible to leave only a few holes below $n$ such that the few remaining sticks above $n$ can't fill them.

-
You are saying that -- empirically, at least -- sticks with total length $n(n+1)/2$ can always be cut into sticks of length $1,2,...,n$ as long as at most one of them is shorter than $n$. Is that right? Unfortunately this doesn't seem to lend itself to a proof by induction any more than the hypothesis in the OP... – TonyK Sep 18 '11 at 21:49
...It might help to investigate the following: Given $n$, precisely which subsets $S \subset\{1,2,...,n-1\}$ have the property that if the stick lengths consist of all members of $S$ together with any other lengths $\ge n$, then they can always be cut into sticks of length $1,2,...,n$? This might suggest the right inductive hypothesis. Can you tweak your program to crank these out? – TonyK Sep 18 '11 at 21:49
OK, I've done it myself -- see my separate answer. – TonyK Sep 19 '11 at 10:59

I have implemented the suggestion I made in a comment to joriki's answer. For $3 \le n \le 18$, I have generated a list of subsets $S \subset \{1,2,...,n-1\}$ with the property that if a set of sticks with total length $n(n+1)/2$ takes all the lengths in $S$, together with any other lengths ≥n, then the sticks can always be cut into sticks of length $1,2,...,n$. It is available at this link (it's about 900K).

I stared at it for a while, but nothing jumped out at me.

Edited to add: I have changed the program to output the sets in a more human-friendly order: part 1 (n = 1 to 17) and part 2 (n = 18).

-
I've uploaded your file to pastebin in two parts (due to 500kb cap): n=1 thru 17 and n=18. – anon Sep 19 '11 at 12:25
@anon: Thank you – TonyK Sep 19 '11 at 12:53
Great! I was actually going to do the same thing but hadn't gotten around to it. (The German version of "great minds think alike" is "two idiots, one thought", which is a bit easier to use without sounding conceited. :-) However, we might be able to use bigger gaps between the remaining target sticks and the remaining long sticks, since we can start by making the longest target sticks first, and then making each target stick will generate at most one shorter stick while increasing the gap between the remaining targets and the remaining long sticks by one. I'll have a go at that some time. – joriki Sep 24 '11 at 23:58

There are variations on the problem where the division is always possible and a proof using complete induction.

The first variation is: [..original problem ...] where at least one of the sticks is >=2n.
The second variation is: [..original problem ...] where it is allowed to glue two of the sticks together and break once at an arbitrary position.

Proof for the variations:

The case n=1 is trivial - one stick of length 1. Then we suppose the assumption holds for n and consider the case n+1. I.e. given a number of sticks of integral length >= n+1 whose lengths add to (n+1)(n+2)/2 - can these be divided into sticks of lengths 1,2,3,…,n+1?

Break off from one of the sticks a length n+1. In the first variation we use the stick with lenght >= 2n+2. This part will be the required stick of length n+1 in the solution. Because we broke off a length n+1 the remaining total length is (n+1)(n+2)/2 - (n+1) = n(n+1)/2. In the first variation the inducution step is valid, in the second variation we may not yet use the induction step because the other part of the broken stick may now be smaller then n+1. In that case the second variation allows us to glue together this part with one of the other sticks. Now the induction step is valid and we break the rest of the collection of sticks in {1,..n} and have succeeded in the division {1,.. n+1}.

-
Can you please clarify the induction? Are you assuming that all the sticks are of length >= n as the question stated? – Tomer Vromen Sep 5 '10 at 11:21
n−1 divides n(n+1)/2 if and only if n=2 or n=3. However, I do not think that the first case of your inductive step is valid. Suppose that there is a stick of length n+2. After breaking this stick into two sticks of lengths 1 and n+1, the assumption that all sticks have lengths ≥ n is no longer satisfied. – Tsuyoshi Ito Sep 5 '10 at 11:24
I'm not sure we are allowed to glue two sticks together. I can see that this is necessary for the inductive step, but I'd allow it only if we are going to break it again in the same spot. – Cristina Sep 6 '10 at 7:53
Yes, this is incorrect. You might glue it, but you have not ensured that the resulting split happens at the spot where you glued. – Aryabhata Sep 6 '10 at 7:58
Actually, doesn't the first variation still suffer from induction issues? The hypothesis there is 'the problem with all lengths >=n and one length >=2n' has a solution, but after the breaking step on the n+1 problem (using the stick of length 2n+2), we're no longer guaranteed that one stick has length >=2n, just that all the sticks have length >=n - but this is only the original problem, not the 'restricted' problem. – Steven Stadnicki Sep 16 '11 at 20:08

It is possible to brute force a list of possible solutions for every possible combination of sticks. Ignoring permutations... For n=1 there is a single solution. Ditto for n=2. For n=3 there are two solutions for one combination of sticks. For n=4 there are three solutions for two combinations of sticks. For n=5 I think there are ten solutions for four combinations of sticks. For n=6 I think there are 24 solutions. A completely baseless and uniformed search of the OEIS suggests this sequence might continue with 130 solutions for n=7 and 504 solutions for n=8. This trend suggests that there are increasingly more solutions for any such n, and a non-decreasing number of solutions for the "hardest" combination of sticks for a given n, and the pattern by which such solutions can be enumerated may suggest a proof of the original question.

-
I like the idea of solving using OEIS :-) You haven't explained what you are counting as a "solution" above. For example when n=3 there are two possible starting positions: (3,3) and (6). Depending on how you are counting solutions there is either 1 solution {1,2,3} (unordered), or maybe solutions should be counted by where each end stick came from - e.g. (3,3) has a solution where you break 2 off the first stick, and another solution where you break 1 off the second stick, etc. – tttppp Sep 27 '10 at 8:30
I am also confused by your suggestion that the number of solutions for the hardest combination is increasing. The link that Chandru1 posted contains a table of the number of solutions for the "hardest" combination. Note that for any even n there is a starting position which has only one solution (up to initial stick reordering and reordering of segments within each initial stick). This is the starting position where there are n/2 sticks of length n+1. – tttppp Sep 27 '10 at 8:36
I was considering unordered solutions for the first statement, but ordered solutions for the second. This was not intentional. – Sparr Sep 28 '10 at 3:06

This is not a solution, but a potential restatement of the problem.

Consider a single stick of length n(n+1)/2 that can be broken in any single place, leaving two pieces of length >=n. The resulting two sticks can be broken into 1...n easily, possibly in multiple ways. Can you show that for any position of that break that leaves a stick of length >=2n, there exists a subdivision of the stick such that the longer stick can be broken into any possible two pieces of length >=n? If so, I think that you may have the desired proof.

-