# Chaitanya's Random Pages

## November 7, 2010

### The Ladder around a Corner Problem

Filed under: mathematics — ckrao @ 9:21 am

This post is inspired by Question 19 of this year’s University Maths Olympics (at the University of Melbourne):

Dana is moving into a mansion, and she needs a huge whiteboard. This whiteboard is to be
so heavy that it cannot be lifted; only wheeled. A certain corridor is 2.7 metres wide, and
is perpendicular to a 6.4 metre wide corridor. What is the length (in metres) of the longest
whiteboard that she can manoeuvre around the corner?

I had never seen this type of problem and was intrigued by it. If you like have a go at it yourself before reading further. I will first show my initial approach and then a nice solution that I looked up.

The first observation is that the longest ladder would touch the two walls and the corner of the inside of the corridor as illustrated above. I will define x and y as in the diagram below:

By similar triangles,

$\displaystyle \frac{y-2.7}{6.4} = \frac{2.7}{x-6.4}, \quad ...(*)$

from which

$\displaystyle y = \frac{2.7 \times 6.4}{x-6.4} + 2.7$

This can be viewed as one branch of a hyperbola, illustrated in green here (using Graph v4.3):

I have also plotted in red a circular arc of radius 12, corresponding to the possible (x,y) locations of a whiteboard of length 12. The longest such whiteboard should be tangential to the hyperbola, so we have the following maximisation problem:

$\displaystyle \max x^2 + y^2 \quad \text{subject to} \quad y \leq \frac{2.7 \times 6.4}{x-6.4} + 2.7, \quad x > 6.4.$

Then we write

$\begin{array}{lcl} x^2 + y^2 &\leq& x^2 + \left(\frac{2.7 \times 6.4}{x-6.4} + 2.7\right)^2\\&=& x^2 + 2.7^2\left(\frac{6.4}{x-6.4} + 1\right)^2.\end{array}$

We wish to minimise the right side viewed as a function of x. Denoting this quantity by z and setting $dz/dx = 0$ gives

$\displaystyle \begin{array}{lcl}0 &=& 2x + 2.7^2\times 2\left(\frac{6.4}{x-6.4}+1\right)\left(\frac{-6.4}{(x-6.4)^2}\right)\\&=&2x-2.7^2\times 2 \times 6.4 \frac{x}{(x-6.4)^3}.\end{array}$

Dividing both sides by $2x$ and rearranging, we obtain

$\displaystyle (x-6.4)^3 = 2.7^2 \times 6.4 = \left(\frac{3^3}{10}\right)^2 \times \frac{4^3}{10} = \left(\frac{3^2 \times 4}{10}\right)^3 .$

Hence $x -6.4 = \frac{36}{10} = 3.6$, from which $y = \frac{2.7 \times 6.4}{x-6.4} + 2.7 = \frac{2.7 \times 6.4}{3.6} + 2.7 = 4.8 + 2.7 = 7.5$ and the maximum whiteboard length is

$\displaystyle \sqrt{x^2 + y^2} = \sqrt{10^2 + 7.5^2} = 2.5\sqrt{4^2 + 3^2} = 2.5 \times 5 = 12.5 \text{ metres}$.

[This value of x indeed corresponds to the minimum as against a maximum, since dz/dx is increasing for x > 6.4: it increases from $-\infty$ and behaves like 2x for large x.]

So what is the relationship between the answer 12.5 and the corridor widths 6.4 and 2.7? Redoing the above calculation with 6.4 and 2.7 replaced by a and b gives us $\displaystyle x = a + a^{1/3}b^{2/3}, y = b + a^{2/3}b^{1/3}$ and the following remarkable formula for the maximum whiteboard length:

$\displaystyle (a^{2/3} + b^{2/3})^{3/2}$

Looking it up, this is seen as a “ladder around a corner” problem often used in calculus text books (e.g. see [1], [2]). The above form suggests a proof using non-calculus means. The similar triangle relationship $\displaystyle (x-a)/b = a/(y-b)$ in (*) can be rewritten as

$\displaystyle \frac{a}{x} + \frac{b}{y} = 1.$

We wish to find the shortest distance between the origin and the hyperbola $\displaystyle a/x + b/y = 1$. This reminds me of the better known problem of finding the distance between a point and the straight line $x/a + y/b = 1$.  This is found to be $\displaystyle ab/\sqrt{a^2 + b^2}$ via the Cauchy-Schwarz inequality as follows. This inequality can be remembered as the dot product of two vectors being less than or equal to the product of their lengths:

$\displaystyle 1 = \frac{x}{a} + \frac{y}{b} \leq (x^2 + y^2)^{1/2}\left(\frac{1}{a^2} + \frac{1}{b^2}\right)^{1/2} = (x^2 + y^2)^{1/2} \frac{\sqrt{a^2 + b^2}}{ab}$

Rearranging gives $\displaystyle (x^2 + y^2)^{1/2} \geq \frac{ab}{a^2 + b^2}.$ Another easy way to see this is by calculating the area of a right triangle with legs having length a and b in two ways ($ab = h \sqrt{a^2 + b^2}$), giving us the formula for h, the distance from the origin to the hypotenuse).

The generalisation of the Cauchy-Schwarz inequality is Hölder’s inequality, which replaces the 2-norm with p- and q-norms where $p + q = pq$ (or $q = p/(p-1)$):

$\displaystyle \left(\sum_i |u_i|^p\right)^{1/p}\left(\sum_i |v_i|^q\right)^{1/q} \geq \sum_i |u_i v_i|$

(This in turn can be proved via the AM-GM inequality, which I may elaborate on in a future post. Equality holds if and only if for all i, $|u_i|^p = k|v_i|^q$ for some constant $k$. The inequality reduces to the Cauchy-Schwarz inequality in the case  p = q = 2.)

We use this inequality in our case with $p = 3, q = 3/2$ as follows:

$\begin{array}{lcl} x^2 + y^2 &=& (x^2 + y^2)(\frac{a}{x} + \frac{b}{y})^2\\&=&\left\{\left(\left(x^{2/3}\right)^3 + \left(y^{2/3}\right)^3\right)^{1/3}\left(\left(\frac{a^{2/3}}{x^{2/3}}\right)^{3/2} + \left(\frac{b^{2/3}}{y^{2/3}}\right)^{3/2}\right)^{2/3}\right\}^3\\&\geq& \left(a^{2/3} + b^{2/3}\right)^3\end{array}$

The idea used above is to manipulate the right side so that the $x$ and $y$ terms are able to cancel upon application of the inequality. Equality holds if and only if $x^2 = ka/x$ and $y^2 = kb/y$, or in other words, $\frac{x}{a^{1/3}} = \frac{y}{b^{1/3}}$, which when combined with the condition $\displaystyle 1 = \frac{x}{a} + \frac{y}{b}$ implies $\displaystyle x = a + a^{1/3}b^{2/3}, y = b + a^{2/3}b^{1/3}$ as found earlier.

### Generalisation

The above method can be readily generalised. Suppose we wish to minimise $x^{\alpha} + y^{\alpha}$ given $ax^{\beta} + by^{\beta} = 1$ (where $\alpha > 0 > \beta$ and $a,b >0$). If we redo the calculation above, for the cancellation in x and y to occur we need to choose p and q such that

$\displaystyle x^{\alpha/p + \beta/q} = x^0$.

Since $q = p/(p-1)$ this means $\alpha/p + \beta(p-1)/p = 0$, or $p = \frac{\beta - \alpha}{\beta}, q = \frac{\alpha - \beta}{\alpha}$. We then are able to write

$\begin{array}{lcl} x^{\alpha} + y^{\alpha} &=& (x^{\alpha} + y^{\alpha})(ax^{\beta} + by^{\beta})^{-\frac{\alpha}{\beta}}\\&=&\left(\left(x^{\alpha/p}\right)^p + \left(y^{\alpha/p}\right)^p\right)\left(\left(\left[ax^{\beta}\right]^{\frac{1}{q}}\right)^q + \left(\left[ax^{\beta}\right]^{\frac{1}{q}}\right)^q\right)^{-\frac{\alpha}{\beta}}\\&=&\left\{\left(\left(x^{\frac{\alpha \beta}{\beta - \alpha}}\right)^{\frac{\beta-\alpha}{\beta}} + \left(y^{\frac{\alpha \beta}{\beta - \alpha}}\right)^{\frac{\beta-\alpha}{\beta}}\right)^{\frac{\beta}{\beta-\alpha}}\left(\left(\left[ax^{\beta}\right]^{\frac{\alpha}{\alpha-\beta}}\right)^{\frac{\alpha-\beta}{\alpha}} + \left(\left[by^{\beta}\right]^{\frac{\alpha}{\alpha-\beta}}\right)^{\frac{\alpha-\beta}{\alpha}}\right)^{\frac{\alpha}{\alpha-\beta}}\right\}^{\frac{\beta-\alpha}{\beta}}\\&\geq& \left(a^{1/q} + b^{1/q}\right)^p\\&=&\left(a^{\alpha/(\alpha-\beta)} + b^{\alpha/(\alpha-\beta)}\right)^{\frac{\beta-\alpha}{\beta}}.\end{array}$

The minimum value is attained when $x^{\alpha} = kax^{\beta}$ and $y^{\alpha} = kby^{\beta}$, or $\displaystyle \frac{x}{a^{1/(\alpha- \beta)}} = \frac{y}{b^{1/(\alpha- \beta)}}$. This implies

$\displaystyle x = \left[a + \left(\frac{b}{a}\right)^{\frac{\beta}{\alpha - \beta}}\right]^{-\frac{1}{\beta}}, \quad y = \left[b + \left(\frac{a}{b}\right)^{\frac{\beta}{\alpha - \beta}}\right]^{-\frac{1}{\beta}}.$

### Lagrange multipliers

A useful technique in calculus to attack such problems is via Lagrange multipliers. The principle there is that at the optimum, the gradients of the objective and constraint function are parallel. In the above graph, imagine where tangents of the green and red curve match. This gives us the condition

$\displaystyle \left(\alpha x^{\alpha-1}, \alpha y^{\alpha-1}\right) = \lambda \left(a\beta x^{\beta-1}, b\beta y^{\beta-1} \right),$

leading to $\displaystyle \frac{x}{a^{1/(\alpha- \beta)}} = \frac{y}{b^{1/(\alpha- \beta)}}$ as before.

### Final Notes

1. There is also a useful physical interpretation of the original problem mentioned in [3]. Consider the forces applied to the ladder by the corner and two walls. In equilibrium the sum of these forces and torques applied to the ladder is zero. This gives a set of equations that leads to the above solution.

2. If instead of a one-dimensional segment (whiteboard/ladder) we considered a two dimensional rectangle (e.g. a couch) the problem apparently becomes far more involved, requiring the solution of a sixth degree polynomial. See [4] for more details.

### References

[1] Atsina, C. & Nelson, R., When Less is More: Visualising Basic Inequalities, 2009, p132.

[2] Wrede, R. and Siegel, M., Advanced Calculus, 2002, p85.

[3] Levi, M., The Mathematical Mechanic, 2009, p65.

1. It’s interesting that you haven’t seen this before — one of those rare occasions when I have seen something and you haven’t. I am pretty sure it was something I came across in (highschool?) calculus. Somehow the ladder around a corner formulation makes it the kind of problem that one does not forget easily.

Comment by Radhika — November 23, 2010 @ 11:31 pm

2. [...] line segment through the point (8,1) lying in the first quadrant? This is equivalent to the “ladder around a corner” problem that I discussed in an earlier post. The shortest line segment through (8,1) is also [...]

Pingback by Philo’s line: the shortest line segment through a given point in a given angle « Chaitanya's Random Pages — September 13, 2011 @ 10:02 pm

3. [...] line segment through the point (8,1) lying in the first quadrant? This is equivalent to the “ladder around a corner” problem that I discussed in an earlier post. The shortest line segment through (8,1) is also [...]

Pingback by Philo’s line: the shortest line segment through a given point in a given angle « Chaitanya's Random Pages — September 13, 2011 @ 10:02 pm

The Rubric Theme. Create a free website or blog at WordPress.com.