Sunday, June 2, 2024

If this is what the job entails, then I'm not sure I want it ....

Starting with a line segment of length $1$, randomly split it somewhere along its length into two parts. Compute the product of these two lengths. Then take each of the two resulting segments and repeat the process. That is, for each one, randomly split it somewhere along its length into two parts and compute the product. Then do this for all four resulting segments, then the eight after that, and the $16$ after that, and so on.

After doing this (forever), you add up all the products you computed throughout. On average, what value would you expect this sum to approach?

There is nothing magical about the initial value of the line segment, that is, $1$, so let's instead generalize and say that the function $f : \mathbb{R}_+ \to \mathbb{R}_+$ gives the expected value of the sum of the products of randomly splitting a line segment of initial length $\ell \in \mathbb{R}_+$ into two parts, then breaking each of those segments into two parts, etc. Then to restate the question, we want the value of $f(1).$

We can approximate $f$ by not allowing for infinite recursion, but instead just a finite number of breaking into smaller pieces. If we just have one splitting then we get the expected value of the product is $$f_1(\ell) = \int_0^\ell x (\ell-x) \, dx = \left[ \ell \frac{x^2}{2} - \frac{x^3}{3} \right]^\ell_0 = \frac{\ell^3}{6}.$$ Going one step further, we then see that after two splits, we add in the expected product of two uniformly random numbers that add up to $x$ and the expected product of two uniformly random numbers that add up to $\ell - x.$ That is, we get $$f_2(\ell) = \int_0^\ell x(\ell - x) + f_1(x) + f_1(\ell-x) \,dx = f_1(\ell) + 2 \int_0^\ell f_1(x) \,dx.$$ Similarly, if we keep going with more recursion, we get that the expected sum of the products after $n+1$ rounds of splitting is given by $$f_{n+1} (\ell) = f_1 (\ell) + 2\int_0^\ell f_n(x) \,dx,$$ for $n \geq 1.$ As $n \to \infty,$ we get that we must have $$f(\ell) = f_1(\ell) + 2\int_0^\ell f(x)\,dx = \frac{\ell^3}{6} + \int_0^\ell f(x) \,dx.$$ Differentiating both sides with respect to $\ell,$ we get the differential equation $$f^\prime (\ell) = \frac{t^2}{2} + 2f(\ell),$$ with initial conditions $f(0) = 0.$ This is solved by the generic form $f(\ell) = Ce^{2\ell} + p(\ell),$ where $p$ is a polynomial, say $p(t) = at^2 + bt+ c.$ Plugging back into the differential equation we get that $$2at + b = \frac{t^2}{2} + 2at^2 + 2bt + 2c,$$ for all $t.$ By gathering like terms and setting equal to zero, we get \begin{align*}2a + \frac{1}{2} &= 0\\ 2b - 2a &= 0 \\ 2c - b &= 0, \end{align*} that is $a = b = -\frac{1}{4}$ and $c = -\frac{1}{8}.$ Additionally, we have $f(0) = C - \frac{1}{8} = 0,$ so $C = \frac{1}{8}.$ So finally, we see that $$f(\ell) = \frac{e^{2\ell} - 2\ell^2 -2\ell -1}{8},$$ and so the expected value of the sum of the products of random splitting into two subparts is $$f(1) = \frac{e^2 - 5}{8} \approx 0.29863201236.....$$

But wait ... there's more, what if as opposed to two pieces, each time we randomly split, we split into three pieces. Let $g: \mathbb{R}_+ \to \mathbb{R}_+$ be the expected value of the sum of the random triple products of splitting a line segement of initial length $\ell \in \mathbb{R}_+.$ Here too we can demonstrate the recurrence with a few small number of splits.

We see that after one splitting we get $$g_1(\ell) = \int_0^\ell \int_0^{\ell - x} xy(\ell - x -y) \,dy \,dx = \int_0^\ell x f_1(\ell - x) \,dx = \int_0^\ell x \frac{(\ell - x)^3}{6} \,dx = \frac{\ell^5}{120}.$$ If we again split each piece into three then after two splittings we have the original value of original splitting, followed by the expected product of three uniformly random numbers that add up to $x$, the expected product of three random numbers that add up to $y$, and the expected product of three random numbers that add up to $\ell - x - y.$ That is, \begin{align*}g_2(\ell) &= \int_0^\ell \int_0^{\ell - x} xy(\ell - x - y) + g_1(x) + g_1(y) + g_1(\ell - x - y) \,dy\,dx\\ &= g_1(\ell) + 3 \int_0^\ell (\ell - x) g_1(x) \,dx.\end{align*} In fact, this relation holds for any arbitrary number of splits, $n \geq 1,$ that is $$g_{n+1}(\ell) = g_1(\ell) + 3 \int_0^\ell (\ell-x) g_n(x) \,dx$$ and in particular as $n \to \infty$ we get $$g(\ell) = \frac{\ell^5}{120} + 3\int_0^\ell (\ell - x) g(x) \, dx.$$

Let's define the integral of $g$ to be $G(\ell) = \int_0^\ell g(x)\,dx.$ Differentiating under the integral sign with respect to $\ell,$ we get $$g^\prime(\ell) = \frac{\ell^4}{24} + 3\int_0^\ell g(x) \,dx = \frac{\ell^4}{24} + 3G(\ell).$$ Differentiating once more gives the second order inhomogeneous differential equation $$g^{\prime\prime}(\ell) - 3g(\ell) = \frac{\ell^3}{6},$$ where $g(0) = g^\prime(0) = 0.$ This is solved by a function of the form $$g(\ell) = C \sinh (\sqrt{3} \ell) + p(\ell),$$ where $p$ is a polynoial, say $p(t) = at^3 + bt^2 + ct + d.$ Plugging back into the differential equation we get $$6at + 2b - 3(at^3 + bt^2 + ct+d) = \frac{t^3}{6},$$ for all $t.$ By gathering terms and setting equal to zero, we get \begin{align*} -3a &= \frac{1}{6} \\ b &= 0 \\ 6a-3c &= 0 \\ 2b -3d &= 0, \end{align*} that is $a = -\frac{1}{18}, $$b = d = 0,$ and $c = -\frac{1}{9}.$ Additionally, we have $g^\prime(0) = \sqrt{3} C - \frac{1}{9} = 0,$ so $C = \frac{\sqrt{3}}{27}.$ So finally, we see that $$g(\ell) = \frac{2\sqrt{3} \sinh (\sqrt{3} \ell) - 3\ell^3 - 6\ell}{54},$$ and so the expected value of the sum of the triple products of random splittings into three subparts is $$g(1) = \frac{2\sqrt{3} \sinh(\sqrt{3}) - 9}{54} \approx 0.00895406261852....$$

No comments:

Post a Comment