Monday, June 23, 2025

Greedy Mowing Madness

You’re mowing a circular lawn with a radius of $1$ unit. You can mow in straight strips that are $1$ unit wide. The fewest number of passes you would need to mow the entire lawn is two, as shown below. In one pass (shown in blue) you can mow half the circle, and in the second pass (shown in red) you can mow the other half of the circle.

However, instead of minimizing the number of passes, you greedily choose how to orient each pass so it cuts as much of the unmowed grass as possible. A pass doesn’t have to go through the center of the circle and can be in any direction, but must be straight and cannot bend.With this “greedy” approach, how many passes will it take for you to mow the entire lawn?

First let's establish the first greedy mowing pass. Without loss of generality, we can set our circular lawn's center at the origin, and by rotating, we can assume that the first pass will be parallel to the $y$-axis. In this case, the center of the pass will be at the line $x = x_0$ for some $x_0 \in (-1,1)$ and the strip will cover the set $$\Omega_1(x_0) = \{ (x,y) \in B(0,1) \mid |x - x_0| \lt \frac{1}{2} \}.$$ The area of the circular lawn that this pass will mow is $$A_1(x_0) = \int_{\max \{ -1, x_0 - \frac{1}{2} \}}^{\min \{ 1, x_0 + \frac{1}{2} \}} 2 \sqrt{1-x^2} \,dx.$$ Differentiating under the integral sign, we get \begin{align*}A_1^\prime(x_0) &= 2\sqrt{ 1 - \min \{1, x+ \frac{1}{2} \}^2 } \frac{d}{dx} \min \{ 1, x + \frac{1}{2} \} - 2\sqrt{1 - \max \{ -1, x - \frac{1}{2} \}^2 } \frac{d}{dx} \max \{ -1, x - \frac{1}{2} \} \\ &= \begin{cases} 2\sqrt{1 - (x+\frac{1}{2})^2}, &\text{if $x \in (-1, -\frac{1}{2})$;} \\ 2\left( \sqrt{1 - (x+\frac{1}{2})^2} - \sqrt{1 - (x-\frac{1}{2})^2} \right), &\text{if $ x \in (-\frac{1}{2}, \frac{1}{2})$;}\\ -2 \sqrt{1 - (x-\frac{1}{2})^2}, &\text{if $x \in (\frac{1}{2}, 1).$}\end{cases}\end{align*} Solving we for $A^\prime_1(x_0) = 0$ we get the only critical point as $x^*_0 = 0,$ which yields $A_1(0) = \int_{-1/2}^{1/2} 2\sqrt{1-x^2}\,dx = \frac{\pi}{3} + \frac{\sqrt{3}}{2}.$ So let's assume that the first pass is $\Omega_1 = \{ (x, y) \in B(0,1) \mid |x| \lt \frac{1}{2} \}.$

Let's move on to the next greedy pass. Now obviously from the first pass we see that the optimal method is to have some path of the mower that goes through the origin, so without loss of generality, let's assume that the center of the second pass goes through the line $y = mx,$ for some $m \in (-\infty, \infty).$ The second pass is thus the area $$\Omega_2(m) = \{ (x,y) \in B(0,1) \mid | mx - y | \lt \frac{\sqrt{1 + m^2}}{2} \}.$$ The newly mowed area in pass two is the entirety of $A_1(0)$ minus the area of the overlap between the two passes $\Omega_1(0) \cap \Omega_2(m).$ For $m \in (-\frac{\sqrt{3}}{3}, \frac{\sqrt{3}}{3}),$ we see that the overlap is the parallelogram formed by the lines $x = \pm \frac{1}{2},$ $y = mx + \frac{\sqrt{1+m^2}}{2},$ and $y=mx-\frac{\sqrt{1+m^2}}{2},$ that is $O(m) = \sqrt{1+m^2}.$ Therefore, the new area mowed by pass two is $$A_2 (m) = A_1(0) - O(m) = \frac{\pi}{3} + \frac{\sqrt{3}}{2} - \sqrt{1+m^2}.$$ This is maximized when $m^* = 0,$ and when $$A_2^* = A_2(0) = \frac{\pi}{3} + \frac{\sqrt{3}}{2} - 1.$$ We can see that if $|m| \gt \frac{\sqrt{3}}{3},$ the overlapping area of $\Omega_1(0) \cap \Omega_2(m)$ is larger than the area given by the parallelogram when $m = \pm \frac{\sqrt{3}}{3},$ so $A_2(m) \lt A_2( \sqrt{3}/3)$ for all $|m| \gt \frac{\sqrt{3}}{3},$ so we can claim that not only is $m^*=0$ the optimizer within the neighborhood $(-\frac{\sqrt{3}}{3}, \frac{\sqrt{3}}{3})$ but in fact for all $m \in \mathbb{R}.$

So after two passes we are left with the unmowed area $$U = \{ (x,y) \in B(0,1) \mid \max \{ |x|, |y| \} \gt \frac{1}{2} \}.$$ This has four sub-regions, one in each quadrant of the plane. It is easy enough to construct a mowing path that covers at least two of the four sub-regions, but you cannot cover all four sub-regions with an acceptable mowing path, for instance, take the path $$\Omega_3 = \{ (x,y) \in B(0,1) \mid |x + y| \lt \frac{\sqrt{2}}{2} \}.$$ Though there is in fact definitely a better approach that can cover strictly greater than two complete sub-regions, once at least two of the four sub-regions are covered, all remaining unmowed area is coverable within one more pass. Therefore, the greedy approach will take four passes to cover the lawn.

No comments:

Post a Comment