Usually, the laundry machine comprises a rotatory basket and a water level sensor at its top. Such design is a result of optimal laundry process.

The process of laundry is put the dirty cloths into the basket, then water is poured in to let the cloths soaked with the water. Then press out the water from the cloths, and pour in water again for rinse. The rinse-press process repeats for $$n$$ times then you get some wet but clean cloths.

Obviously, the laundry assumes the dirt on the cloths is water-soluable (or not, so we need some soap to emulsify), and we should not expect laundry to remove all dirt perfectly.

This is the model of a laundry:

At first soak-press cycle, water of amount $$V_0=r+V_1$$ is poured in to dissolve the dirt of mass $$m_0$$, and water of amount $$V_1$$ is pressed out. Assuming perfect dissolve and even density of the solution, the concentration of dirt conserves before and after the press:

$\frac{m_0}{V_0} = \frac{m_0}{r+V_1} = \frac{m_1}{r}$

where $$m_1$$ is the mass of dirt remain (in the water of the wet cloths, which holds water of volume $$r$$) after the press.

At subsequent soak-press cycles, similar conservation law applies:

\begin{align} \frac{m_{k-1}}{r+V_k} &= \frac{m_k}{r} \\ \therefore\qquad m_k &= \frac{r}{r+V_k}m_{k-1} \\ &= \prod_{i=1}^k \frac{r}{r+V_i} m_0 \\ m_n &= \prod_{i=1}^n \frac{r}{r+V_i} m_0 =\prod_{i=1}^n \frac{1}{1+V_i/r} m_0 =\left[\prod_{i=1}^n (1+V_i/r)\right]^{-1} m_0 \\ &\ge \left[\frac{1}{n}\sum_{i=1}^n (1+V_i/r)\right]^{-n}m_0 \\ &=\left(1+\frac{V}{rn}\right)^{-n}m_0 \end{align}

where we define $$V=V_1+V_2+\cdots+V_n$$ to be the total amount of water pressed out (total amount of water used is therefore $$V+r$$); and $$m_n$$ is the amount of dirt remained in the water of the wet cloths after $$n$$ wash cycles; and the inequality above is due to $$\textrm{AM}\ge\textrm{GM}$$.

Assume we fixed the amount of waste water $$V$$, and fixed the number of wash cycle $$n$$, then to minimize the remaining dirt $$m_n$$, we have to make each $$V_i$$ identical so that the AM=GM and make the equality above holds. That is, the best way to wash is to use water

$V_i = \frac{V}{n}$

Since the laundry basket has fixed volume, this means to keep the water level fixed in every wash cycle.

If we do not care about the electricity used and the time spent on laundry, we may use as much wash cycle as possible to make the cloths clean. However, the law of diminishing return applies and the amount of dirt remains approaches to

\begin{align} \lim_{n\to\infty} m_n &= \lim_{n\to\infty}\left(1+\frac{V}{rn}\right)^{-n}m_0 \\ &= e^{-V/r}m_0 \end{align}

To make $$\lim_{n\to\infty} m_n = 0$$, we need also $$V=\infty$$.