← cgad.ski
2023-06-04

Today I'm spending an hour in an airport, which gives me plenty of time to review the usual topics of airport mathematics. Jet engines, balanced flight and scheduling problems are well and good, but of course I'm referring to those moving walkways that go between terminals. Should you walk faster while riding them? Slower? Stop entirely?

If you're interested in getting somewhere soon but want to avoid walking too quickly for too long, it tends to make sense to walk a little slower on moving walkways. One informal justification for this is to imagine walking the *wrong way* on a moving walkway. If you keep your walking speed constant but increase the speed of the opposing walkway, the cost of your trip will diverge to infinity! Clearly, an opposing walkway should force you to walk faster. So, assuming the relationship between optimal walking velocity and walkway velocity is monotone—a reasonable assumption to make when solving such a problem—riding a walkway going the *right direction* should make you walk more slowly.

But how much more slowly? Does it ever make sense to stop walking entirely? Making a few simple assumptions, we will see that it *can* be rational to stop walking on sufficiently fast walkways. On the other hand, if we like walking enough to never stop—but not enough to walk without any incentive—it makes sense that our walking speed will converge to $0$ at the asymptotic rate of $1/b$ when the boost $b$ received by riding the walkway is large.

Let $v(x)$ be our instantaneous velocity as a function of position. Velocity can be integrated over time, but integrating over distance is usually a mistake unless you're interested in a quantity with units $\m^2/\s.$ To get our time elapsed in transit, $T,$ we need to integrate *pace*, its reciprocal:
$T = \int v(x)^{-1} \, dx.$
Taking a variational derivative with respect to the function $v(x)$ gives
$d_v T = \langle -v(x)^{-2}, - \rangle,$
meaning that the marginal benefit of increasing our velocity over a fixed distance is proportional to the average inverse square of our instantaneous velocity.

To decide whether this marginal benefit is worth it, we need to introduce some cost for walking faster. One natural idea is to postulate a penalty time-rate $p$ depending on $v$ and on $x$ such that our total utility can be expressed as an integral $U = -\int_0^T p(v(x), x) \, dt = -\int v^{-1}(x) p(v(x), x) \, dx.$ For this model to work, the penalty function $p(v, x)$ should be bounded below by some positive constant (to avoid optimality of infinitely long trips) and should grow faster than linear with respect to $v$ (to avoid optimality of infinitely fast trips.) Our objective will be to bring the negative quantity $U$ as close to $0$ as possible.

The old adage that "every model's wrong" of course applies here. For example, our utility function above does not model *exhaustion*, when moving too quickly for too long drastically affects our preference for continuing to move quickly. However, it should be a good model for our preference so long as our state of mind and body remains roughly in equilibrium over the trip.

In the following, we'll make dependence on $x$ implicit to simplify notation. Indeed, one benefit of our utility function is that values of $v$ at different positions $x$ can be optimized independently of one another. Taking a variational derivative of $U$ with respect to $v$ gives $d_v U = \langle v^{-2} p(v) - v^{-1}p_v(v), - \rangle,$ which has a very straightforward interpretation: by increasing our speed at a specific moment, we earn a marginal reward of $v^{-2} p(v)$ by decreasing our time in transit but pay a marginal price of $v^{-1} p_v(v)$ for walking faster. Since we can assume $v$ and $p(v)$ are positive, we can multiply this derivative by $v p(v)^{-1}$ and get a nice friendly expression.

**Theorem** (Fundamental theorem of airports): *The marginal utility of increasing $v$ (at any given moment) has the same sign as*
$v^{-1} - P(v)$
*where $P(v)$ is the logarithmic derivative*
$P(v) = \frac{p_v(v)}{p(v)} = \frac{\partial}{\partial v} \ln p(v).$
Note that the dimensions check out in this expression: both $v ^{-1}$ and $P(v)$ are *paces*.

Let's return to the original question. Suppose we receive a speed boost $b$ from riding a moving walkway, so that $v = w + b$ where $w \ge 0$ is our walking speed. The boost $b$ does not affect the difficulty of walking—we're ignoring the small intervals of acceleration we experience when entering and exiting the walkway—so our penalty rate will be a function $p(w)$ of just $w.$ Applying the *fundamental theorem of airports*, the marginal utility of increasing $w$ will have the sign of
$(w + b)^{-1} - P(w).$
Let's make the reasonable assumption that the optimal walking speed will be the smallest non-negative value that makes this expression non-positive.

Is it ever rational to stop walking? This be will be the case exactly when the marginal utility above is non-positive at $w = 0,$ meaning $P(0) = \frac{p'(0)}{p(0)} \ge b ^{-1}.$ So, if $p'(0)$ is strictly positive, there will be a critical walkway velocity—specifically, $p(0)/p'(0)$—after which point it is rational to not expend any effort on walking. The same "critical velocity" effect will occur when there is a finite cost to moving at even an infinitesimal speed, as there would be for an individual resting against their suitcase.

What if $p'(0) = 0$? Then the optimal walking speed is always positive, but we expect it to converge to $0.$ Indeed, let's say that $p(w) \approx 1 + c w^2/2$ for small $w.$ Then we will have $P(w) \approx c w,$ and so the solution to $P(w) = (w + b)^{-1} \approx b^{-1}$ is $w \approx b ^{-1} / c$ for large $b$.

To get a feeling for this situation, drag the slider in the following widget to change the boost of a simulated walkway. The left graph shows the expressions $P(w)$ and $(w + b)^{-1}$ as functions of $w,$ and the right graphs shows the relationship between $b$ and the optimal walking speed $w.$ (The penalty function I'm using here is exactly of the form $p(w) = 1 + c w^2 / 2.$)

Although we see a lot of airport denizens supporting the "critical velocity" theory, I feel like $P'(0)$ may be large in comparison to $P(0)$ for some individuals, causing a decay of rational walking speed approximately proportional to $b^{-1}$ in practice.