simont: A picture of me in 2016 (Default)
simont ([personal profile] simont) wrote2014-02-19 10:52 am

Unsolved problem

Here's a mathematical sort of question that occurred to me last year. I've been pondering it off and on ever since, but not reached any useful conclusions; and I just came across my file of notes on it, and thought perhaps I should post it somewhere for other people to ponder as well.

Let m and n be positive integers. Suppose you have m sticks of length n, and you want to turn them into n sticks of length m, by cutting them into pieces and gluing the pieces back together. And the tricky bit is that you want to do this in a way that maximises the length of the shortest fragment involved in the dissection.

One obvious approach is to glue all your sticks end-to-end into one long stick of length mn, then cut that into n equal pieces. If you do that, the shortest fragment will have a length equal to gcd(m,n). So that's a lower bound on the solution in general, and in some cases (e.g. m=3, n=2) it really will be the best you can do.

But gcd(m,n) is not always the best you can do. For example, consider m=6 and n=5. The obvious gcd solution gives a shortest fragment of 1, but actually this case has a solution with shortest fragment 2: cut each of the six 5-sticks into pieces of length 2 and 3, then reassemble as three lots of 3+3 and two lots of 2+2+2. (In fact this was the case that first brought the problem to my attention.)

I also know that the best solution will not necessarily involve fragments of integer length. For example, consider m=5 and n=7. If you constrain yourself to only use integer-length fragments, then you can't make the shortest fragment any longer than 1. (If you try to make it 2, then you have no option but to cut up each 7-stick as 2+2+3, but then you have ten 2s and five 3s, out of which you can't make the seven 5s you need without bisecting a 2.) But with fractional fragment lengths you can improve on a shortest fragment of 1, by cutting up three 7-sticks as (8/3 + 8/3 + 5/3) and the other two as (7/3 + 7/3 + 7/3), then reassembling as six lots of (8/3 + 7/3) and one (5/3 + 5/3 + 5/3). So now your shortest fragment is one and two-thirds units long.

So, does anyone have thoughts? Other than the above examples, I haven't managed very many myself. I haven't even come up with a sensible computer search algorithm to reliably determine the best answer for a given m,n pair – so, in particular, I don't even know that 5/3 is the best answer for the example above, only that it's the best answer I know of. I have a vague idea that the best answer generally seems to involve at least one stick (on either the source or the destination side) being cut into equal-length fragments, but I wouldn't be at all surprised to find that wasn't true in all cases.

[identity profile] writinghawk.livejournal.com 2014-03-12 11:56 am (UTC)(link)
I don't think so. Let's do s(4,5). If s>3/2, t<5/2 and each 5-stick must be in exactly 3 pieces (the constraint is tight on t). So there are exactly 12 pieces; but each 4-stick is in 2 pieces, so there are exactly 10 pieces, contradiction. 3/2 is achievable, so is the answer. Works like a dream.

[identity profile] writinghawk.livejournal.com 2014-03-12 12:25 pm (UTC)(link)
Actually I spoke too soon. The method works fine for s(4,5) and also for s(3,7). However, for s(7,8) it gives a bound of s=8/3. This is certainly a bound, but it's not achievable: however, it's not necessary to drop down to 7/3, since the intermediate value of 5/2 is achievable (again, with a quite easy but fiddly proof).

So I must make a more modest claim: the method gives a reliable bound b, which is usually achievable. When it isn't achievable, m/3 may be the best achievable, but there may be some other intermediate value that will work.

As you can see, I've simply relaxed one of the two claims I made without any good reason. I'm still making one claim without proof (that m/3 is always achievable, because there is so much floppiness in the dissection).

For s(4,9) my method gives a bound of s<=9/5, which is another clearly not achievable case, so my new weakened claim is that 4/3 <= s < 9/5. As I haven't found the value yet this is an interesting test case ...

[identity profile] writinghawk.livejournal.com 2014-03-12 12:29 pm (UTC)(link)
... At least this weaker claim does hold true, since 4/3 is easily achievable, whether or not there is a better intermediate value available.

[identity profile] writinghawk.livejournal.com 2014-03-12 01:10 pm (UTC)(link)
Incidentally, the cases where the proved bound is not achievable seem to be those where the candidate values of s and t are 'too close' to each other (e.g. 7/3 and 8/3 in the (5,7) case), or 9/5 and 11/5 in the (4,9) case), or 'too distant' (or perhaps 'too close to a multiple of each other') (e.g. 8/3 and 13/3 in the (7,8) case). But this is a rather woolly observation.

[identity profile] writinghawk.livejournal.com 2014-03-12 03:00 pm (UTC)(link)
You're right, the bound is 7/4 and hence gives the correct answer in that case.

Your account is more complicated than need be because the bound always operates when the m-sticks are constrained to be divided into only two pieces, making the first constraint P=2n. So the n-sticks are presumably going to be divided into about 2n/m pieces, give or take some rounding somewhere. Ignoring the trivial case where m | 2n, set p = floor(2n/m) and by considering the four possible cases we get a bound of

max [ min (n/p, m-n/p), min (n/(p+1), m-n/(p+1)) ]

In the s(4,9) case, p=4 and this gives

max [ min (9/4, 7/4), min (9/5, 11/5) ] = max (7/4,9/5) = 7/4.

(I didn't do this explicit calculation earlier as my brain was full and I hoped to get some work done today, but I have overcome both weaknesses :-)

As we've said, this bound isn't always tight but it seems it very often is. I'd be interested in whether your data has any cases refuting my conjecture that, when the bound isn't tight, s is still >= m/3. Also of course to see if one can characterise the cases where the bound is not tight.

[identity profile] writinghawk.livejournal.com 2014-03-12 03:50 pm (UTC)(link)
Grr, that's still completely wrong, though the right elements are there. Unfortunately I've gone back to trying to get some work done, but some anagram of the above is true which I will identify when I have some more time!