Riddler Express – 11/30/2018

This week’s Riddler Express features Alice and Bob in a race. Alice, the faster runner, wants to watch Bob’s humiliation for as long as possible. The race will be run on a down-and-back course. Alice wants to set her pace so that she will maximize the amount of time between her making the turn and her passing Bob on the way to victory. If Alice runs too slow, Bob will be too close behind her. If Alice runs too fast, she will speed past Bob.

The Solution

Alice will have to run 141% faster than Bob. That is, Alice’s running speed will have to be 2.41 (or $1+\sqrt{2}$) times Bob’s running speed. To find the solution, we need to use some Calculus.

The first step will be to write an expression for the time Alice is facing Bob, $T$. Let $r$ be Bob’s running speed, $kr$ be Alice’s running speed, and $d$ be the distance between the starting line and the turn around point. Since Alice wants to win the race, assume that $k >1$. Set $t_0$ to be the time that Alice reaches the half-way points and $t_1$ be the time that Alice and Bob pass each other. That gives us the following expressions. $t_0 = \frac{d}{kr}$ and $t_1 = \frac{2d}{r(1+k)}$

Now, we can write $T$ as a function of $k$ as shown below. $T(k) = t_1 - t_0 = \frac{2d}{r(k+1)} - \frac{d}{rk}$

Finding the absolute maximum value of a function is a common Calculus problem. The first step is to find the critical points. The derivative of $T$ is given below. $T^\prime(k) = -\frac{2d}{r(1+k)^2} + \frac{d}{rk^2}$

Since the derivative exists for all $k \geq 1$, the only critical points are where $T^\prime (k) = 0$. This last equation simplifies to the quadratic equation $k^2 - 2k - 1 = 0$ which has two solutions $k = 1 \pm \sqrt{2}$. Only the solution, $k = 1 + \sqrt{2}$, fits within the domain $k \geq 1$.

To check that $T$ does have an absolute maximum at $k = 1 + \sqrt{2}$, we need to check the values of $T$ at the “endpoints” of the domain and the critical point. That is, for $k = 1$, $k = 1 + \sqrt{2}$, and $k \rightarrow \infty$. This check gives $T(1) = 0$, $T(1 + \sqrt{2}) = \frac{\sqrt{2}d}{(4 + 3\sqrt{2})r} > 0$, and $\lim_{k \rightarrow \infty} T(k) = 0$. Since, $T(1 + \sqrt{2})$ is the largest value in the list, we can be certain that the absolute maximum value of $T$ occurs at $k = 1 + \sqrt{2}$.

Using this pace, Alice will be able to face Bob for about 8.6% of the total race duration. That is not counting the time that Alice waits on Bob at the finish line. I’m almost getting the hang of plotting in R.

Filling in Some Details

There are a few steps above that I skipped. I will fill in the details now.

First, to find a formula for $t_1$, I used the fact that at $t_1$, the distance that Bob ran will be equal the distance remaining for Alice. This sets up the equation below, which I solved for $t_1$. $r t_1 = 2d-kr t_1$

To get the quadratic equation $k^2 - 2k - 1 = 0$ from $T^\prime (k) = 0$, I used the following steps. $-\frac{2d}{r(1+k)^2} + \frac{d}{rk^2} = 0$ $\frac{d}{rk^2} = \frac{2d}{r(1+k)^2}$ $dr(1+k)^2 = 2drk^2$ $1+2k+k^2 = 2k^2$ $k^2 - 2k - 1 = 0$

Thanks to Graydon Snider for the excellent problem.