Problems
Here are a few problems I like, each connected to something elsewhere on this site. The solutions are folded up, so try each one first.
1. Two random points
Pick two points uniformly at random in the unit square. What is the expected distance between them in the taxicab metric? What about in the ordinary Euclidean metric?
Solution
Write the points as and , and let and . These are independent, and each is distributed like for independent uniform on , which has density on .
Taxicab. The distance is , so by linearity of expectation its mean is , where
The answer is .
Euclidean. The distance is . The integrand is symmetric in and , so we can integrate over the half of the square where and double the result. In polar coordinates that half is , , so
The inner integral is . Using and , we get
So on a grid you walk about 28% farther on average. That’s close to , the average ratio of taxicab to Euclidean length for a step in a uniformly random direction.
2. Staying below the diagonal
You walk from to on a grid by a uniformly random shortest route, so each of the routes is equally likely. What is the probability that you never step strictly above the line ?
Solution
Call a route bad if it meets the line . Since changes by exactly 1 at each step, these are exactly the routes that go above .
Given a bad route, reflect the portion after its first visit to across that line. The reflection maps to , so the new route ends at instead of . Conversely, along any route from to , the quantity starts at 0, ends at 2, and changes by 1 at each step, so the route meets ; reflecting the portion after its first meeting gives back a bad route. These two maps are inverses, so bad routes correspond exactly to routes ending at , of which there are . Therefore
The numerator is the Catalan number .
3. Turning up the shade
Heatwave’s Balanced mode picks the route that minimizes , where is the walking time, is the time spent in the sun, and says how much you mind the sun. Fastest is , and Coolest is the limit as .
- Show that raising never makes the chosen route sunnier or quicker. This should hold even when several routes tie and any of them might be chosen.
- Call a route efficient if no other route is at least as quick and at least as shady, and strictly better in one of the two. Give an example of an efficient route that is never chosen, whatever is.
Solution
-
Let , and let and be routes chosen for and , with walking times and sun times . Since is optimal for and is optimal for ,
Adding these and cancelling gives , so . Substituting into the first inequality gives , so .
-
Suppose there are only three routes. takes 10 minutes with 8 in the sun, takes 12 with 6 in the sun, and takes 14 with 2 in the sun. Each one is quicker or shadier than each of the others, so all three are efficient. For to be chosen, we would need , so , and also , so . No satisfies both.
Geometrically, if each route is plotted as the point , a weighted sum can only choose points on the lower-left edge of their convex hull, and lies above the segment from to .
4. How long until a fall?
Model someone standing still as a random walk. The horizontal position of their center of mass starts at 0, every second it shifts one unit left or right, and they fall when it reaches , the edge of their base of support.
- If each shift is equally likely to go either way, show that the expected time until a fall is seconds.
- Now suppose they correct themselves: whenever they’re off center, each shift moves them back toward the center with probability . From the center, they still go either way with probability . Show that the expected time until a fall is seconds.
Solution
The walk is symmetric about 0, so only the distance from the center matters. Let be the expected time to first reach distance , starting from distance . The expected time until a fall is , and because the first shift always moves away from the center.
For , let be the probability of a shift toward the center and . Condition on the first shift. With probability it reaches distance in one second. With probability it moves to distance , after which it takes seconds on average to return to distance , and then more. So
-
With , the recurrence is , so , and the expected time is .
-
With and , it is . Then , so , and the expected time is
So a modest correction turns a quadratic expected time into an exponential one: with , it goes from 100 seconds to 4,062. The same argument shows that for any correction probability , the expected time grows like .
Do you have a slicker solution, or a problem you think I’d like? Send it over.