I have a rope and I cut it into two different integer lengths and gave one of them to Alice, the other one to Bob. Then I asked Alice and Bob to cut their ropes into pieces in such a way that when they multiply the length of their own rope pieces, the result shall be the maximum. Both did it right and got their pieces of ropes!

It is known that Bob's original rope length was six times than Alice's and the number of rope pieces that Bob obtained is five times the number that Alice had.

What is the original length of the rope?

  • They cut their own robe at least once.
  • The length of the pieces is not neccessarily integer values.
  • 1
    $\begingroup$ The title reminded me of Row, row, row your boat. Was this intended? ;) $\endgroup$
    – Mr Pie
    Commented Aug 12, 2018 at 11:54
  • 2
    $\begingroup$ @user477343 actually no but maybe subconciously :) $\endgroup$
    – Oray
    Commented Aug 12, 2018 at 11:56
  • $\begingroup$ I'm getting multiple solutions, is this a possibility? $\endgroup$
    – wolfram42
    Commented Aug 12, 2018 at 17:06
  • $\begingroup$ @wolfram42 nope $\endgroup$
    – Oray
    Commented Aug 12, 2018 at 17:23

2 Answers 2


To maximize the product of lengths, note first that

all the pieces should be of equal length. (If you have pieces of lengths $a\pm h$ where $h\neq0$ then replacing them with two pieces of length $a$ increases the product of those two lengths from $a^2-h^2$ to $a^2$ without changing anything else.)


if you cut a rope of length $L$ into $n$ equal pieces then the resulting product is $(L/n)^n$. It'll be convenient to take its logarithm, $n\log L-n\log n$. If we imagine varying $n$ continuously (which of course we can't actually do) then the derivative is $\log L-\log n-1$, which is increasing for $L/n<e$ and decreasing for $L/n>e$. So the best $n$ is either $\lfloor L/e\rfloor$ or $\lceil L/e\rceil$.

Let the lengths of rope be $a$ (for Alice) and $6a$ (for Bob). Then the optimal numbers

are nearest approximations to $a/e$ and $6a/e$. I don't think it's possible for the ratio to be 5 (which is quite far from 6) unless we take $\lceil a/e\rceil$ and $\lfloor 6a/e\rfloor$. We also must have $a$ not too large (because as $a$ gets larger the ratio clearly $\rightarrow6$).

It turns out that

the only values of $a$ for which that ratio is correct are 7 and 14; and the only one of these for which the floor/ceiling choices work out the right way is $a=7$.

So the original length is

7+42=49 units.

  • $\begingroup$ number of rope pieces, not length is five times $\endgroup$
    – Oray
    Commented Aug 12, 2018 at 12:42
  • $\begingroup$ Oh, wrong way around. That's what happens when you try to rush things. Will fix. $\endgroup$
    – Gareth McCaughan
    Commented Aug 12, 2018 at 16:22
  • $\begingroup$ Fixed now. Sorry about that. $\endgroup$
    – Gareth McCaughan
    Commented Aug 12, 2018 at 16:26

So I ran a program simulating all values of Alice's rope from 1 to 100 and got the answer:


Meaning the original length is



It can be easily verified (either manually taking values or using a program) that $(\frac{7}{3})^3$ is the optimal way to cut a rope of length 7 and $(\frac{42}{15})^{15}$ is the optimal way to cut a rope of length 42.

As for the mathematical solution, it's outlined below:

Starting out,

Suppose Alice's rope has length $x$ and is cut into $y$ pieces $(x, y \in \mathbb{N})$. Then Bob's rope must have length $6x$ and cut into $5y$ pieces. We want to find out $x$ and $y$.

Then using some calculus:

If we want to cut $x$ into $y$ pieces, each piece needs to have length $\frac{x}{y}$.
To find the optimal $y$ for a given $x$, we maximize $f(y) = (\frac{x}{y})^y$ for fixed $x$. By taking the partial derivative with respect to $y$ and equating it to $0$, we get that $x = ey$.

Since $y$ is an integer, we have $y = \left \lfloor{\frac{x}{e}}\right \rfloor$ or $y = \left \lfloor{\frac{x}{e}}\right \rfloor + 1$ and similarly, $5y = \left \lfloor{\frac{6x}{e}}\right \rfloor$ or $5y = \left \lfloor{\frac{6x}{e}}\right \rfloor + 1$. (At this point, I used WolframAlpha). Solving for $x$, we get $x = 7$.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.