Subfield: Combinatorics


Question: Given a positive integer $k$ and other two integers $b>w>1$. There are two strings of pearls, a string of $b$ black pearls and a string of $w$ white pearls. The length of a string is the number of pearls on it.

One cuts these strings in some steps by the following rules. In each step:

(i) The strings are ordered by their lengths in a non-increasing order. If there are some strings of equal lengths, then the white ones precede the black ones. Then $k$ first ones (if they consist of more than one pearl) are chosen; if there are less than $k$ strings longer than 1 , then one chooses all of them.

(ii) Next, one cuts each chosen string into two parts differing in length by at most one.

(For instance, if there are strings of 5, 4, 4, 2 black pearls, strings of $8,4,3$ white pearls and $k=4$, then the strings of 8 white, 5 black, 4 white and 4 black pearls are cut into the parts $(4,4),(3,2),(2,2)$ and $(2,2)$, respectively.)

The process stops immediately after the step when a first isolated white pearl appears. Prove that at this stage, there will still exist a string of at least two black pearls.

Solution:
Denote the situation after the $i$ th step by $A_{i}$; hence $A_{0}$ is the initial situation, and $A_{i-1} \rightarrow A_{i}$ is the $i$ th step. We call a string containing $m$ pearls an $m$-string; it is an $m$-w-string or a $m$-b-string if it is white or black, respectively.

We continue the process until every string consists of a single pearl. We will focus on three moments of the process: (a) the first stage $A_{s}$ when the first 1-string (no matter black or white) appears; (b) the first stage $A_{t}$ where the total number of strings is greater than $k$ (if such moment does not appear then we put $t=\infty$ ); and (c) the first stage $A_{f}$ when all black pearls are isolated. It is sufficient to prove that in $A_{f-1}$ (or earlier), a 1-w-string appears.

We start with some easy properties of the situations under consideration. Obviously, we have $s \leq f$. Moreover, all b-strings from $A_{f-1}$ become single pearls in the $f$ th step, hence all of them are 1 - or 2 -b-strings.

Next, observe that in each step $A_{i} \rightarrow A_{i+1}$ with $i \leq t-1$, all $(>1)$-strings were cut since there are not more than $k$ strings at all; if, in addition, $i<s$, then there were no 1 -string, so all the strings were cut in this step.

Now, let $B_{i}$ and $b_{i}$ be the lengths of the longest and the shortest b-strings in $A_{i}$, and let $W_{i}$ and $w_{i}$ be the same for w-strings. We show by induction on $i \leq \min \{s, t\}$ that (i) the situation $A_{i}$ contains exactly $2^{i}$ black and $2^{i}$ white strings, (ii) $B_{i} \geq W_{i}$, and (iii) $b_{i} \geq w_{i}$. The base case $i=0$ is obvious. For the induction step, if $i \leq \min \{s, t\}$ then in the $i$ th step, each string is cut, thus the claim (i) follows from the induction hypothesis; next, we have $B_{i}=\left\lceil B_{i-1} / 2\right\rceil \geq\left\lceil W_{i-1} / 2\right\rceil=W_{i}$ and $b_{i}=\left\lfloor b_{i-1} / 2\right\rfloor \geq\left\lfloor w_{i-1} / 2\right\rfloor=w_{i}$, thus establishing (ii) and (iii).

For the numbers $s, t, f$, two cases are possible.

Case 1. Suppose that $s \leq t$ or $f \leq t+1$ (and hence $s \leq t+1$ ); in particular, this is true when $t=\infty$. Then in $A_{s-1}$ we have $B_{s-1} \geq W_{s-1}, b_{s-1} \geq w_{s-1}>1$ as $s-1 \leq \min \{s, t\}$. Now, if $s=f$, then in $A_{s-1}$, there is no $1-\mathrm{w}$-string as well as no $(>2)$-b-string. That is, $2=B_{s-1} \geq W_{s-1} \geq b_{s-1} \geq w_{s-1}>1$, hence all these numbers equal 2 . This means that in $A_{s-1}$, all strings contain 2 pearls, and there are $2^{s-1}$ black and $2^{s-1}$ white strings, which means $b=2 \cdot 2^{s-1}=w$. This contradicts the problem conditions.

Hence we have $s \leq f-1$ and thus $s \leq t$. Therefore, in the $s$ th step each string is cut into two parts. Now, if a 1-b-string appears in this step, then from $w_{s-1} \leq b_{s-1}$ we see that a 1-w-string appears as well; so, in each case in the sth step a 1-w-string appears, while not all black pearls become single, as desired.

Case 2. Now assume that $t+1 \leq s$ and $t+2 \leq f$. Then in $A_{t}$ we have exactly $2^{t}$ white and $2^{t}$ black strings, all being larger than 1 , and $2^{t+1}>k \geq 2^{t}$ (the latter holds since $2^{t}$ is the total number of strings in $\left.A_{t-1}\right)$. Now, in the $(t+1)$ st step, exactly $k$ strings are cut, not more than $2^{t}$ of them being black; so the number of w-strings in $A_{t+1}$ is at least $2^{t}+\left(k-2^{t}\right)=k$. Since the number of w-strings does not decrease in our process, in $A_{f-1}$ we have at least $k$ white strings as well.

Finally, in $A_{f-1}$, all b-strings are not larger than 2, and at least one 2-b-string is cut in the $f$ th step. Therefore, at most $k-1$ white strings are cut in this step, hence there exists a w-string $\mathcal{W}$ which is not cut in the $f$ th step. On the other hand, since a 2 -b-string is cut, all $(\geq 2)$-w-strings should also be cut in the $f$ th step; hence $\mathcal{W}$ should be a single pearl. This is exactly what we needed.
We use the same notations as introduced in the first paragraph of the previous solution. We claim that at every stage, there exist a $u$-b-string and a $v$-w-string such that either

(i) $u>v \geq 1$, or

(ii) $2 \leq u \leq v<2 u$, and there also exist $k-1$ of $(>v / 2)$-strings other than considered above.

First, we notice that this statement implies the problem statement. Actually, in both cases (i) and (ii) we have $u>1$, so at each stage there exists a $(\geq 2)$-b-string, and for the last stage it is exactly what we need.

Now, we prove the claim by induction on the number of the stage. Obviously, for $A_{0}$ the condition (i) holds since $b>w$. Further, we suppose that the statement holds for $A_{i}$, and prove it for $A_{i+1}$. Two cases are possible.

Case 1. Assume that in $A_{i}$, there are a $u$-b-string and a $v$-w-string with $u>v$. We can assume that $v$ is the length of the shortest w-string in $A_{i}$; since we are not at the final stage, we have $v \geq 2$. Now, in the $(i+1)$ st step, two subcases may occur.

Subcase 1a. Suppose that either no $u$-b-string is cut, or both some $u$-b-string and some $v$-w-string are cut. Then in $A_{i+1}$, we have either a $u$-b-string and a $(\leq v)$-w-string (and (i) is valid), or we have a $\lceil u / 2\rceil$-b-string and a $\lfloor v / 2\rfloor$-w-string. In the latter case, from $u>v$ we get $\lceil u / 2\rceil>\lfloor v / 2\rfloor$, and (i) is valid again.

Subcase 1b. Now, some $u$-b-string is cut, and no $v$-w-string is cut (and hence all the strings which are cut are longer than $v$ ). If $u^{\prime}=\lceil u / 2\rceil>v$, then the condition (i) is satisfied since we have a $u^{\prime}$-b-string and a $v$-w-string in $A_{i+1}$. Otherwise, notice that the inequality $u>v \geq 2$ implies $u^{\prime} \geq 2$. Furthermore, besides a fixed $u$-b-string, other $k-1$ of $(\geq v+1)$-strings should be cut in the $(i+1)$ st step, hence providing at least $k-1$ of $(\geq\lceil(v+1) / 2\rceil)$-strings, and $\lceil(v+1) / 2\rceil>v / 2$. So, we can put $v^{\prime}=v$, and we have $u^{\prime} \leq v<u \leq 2 u^{\prime}$, so the condition (ii) holds for $A_{i+1}$.

Case 2. Conversely, assume that in $A_{i}$ there exist a $u$-b-string, a $v$-w-string $(2 \leq u \leq v<2 u)$ and a set $S$ of $k-1$ other strings larger than $v / 2$ (and hence larger than 1 ). In the $(i+1)$ st step, three subcases may occur.

Subcase 2a. Suppose that some $u$-b-string is not cut, and some $v$-w-string is cut. The latter one results in a $\lfloor v / 2\rfloor$-w-string, we have $v^{\prime}=\lfloor v / 2\rfloor<u$, and the condition (i) is valid.



Subcase 2b. Next, suppose that no $v$-w-string is cut (and therefore no $u$-b-string is cut as $u \leq v)$. Then all $k$ strings which are cut have the length $>v$, so each one results in a $(>v / 2)$ string. Hence in $A_{i+1}$, there exist $k \geq k-1$ of $(>v / 2)$-strings other than the considered $u$ - and $v$-strings, and the condition (ii) is satisfied.

Subcase 2c. In the remaining case, all $u$-b-strings are cut. This means that all $(\geq u)$-strings are cut as well, hence our $v$-w-string is cut. Therefore in $A_{i+1}$ there exists a $[u / 2]$-b-string together with a $\lfloor v / 2\rfloor$-w-string. Now, if $u^{\prime}=\lceil u / 2\rceil>\lfloor v / 2\rfloor=v^{\prime}$ then the condition (i) is fulfilled. Otherwise, we have $u^{\prime} \leq v^{\prime}<u \leq 2 u^{\prime}$. In this case, we show that $u^{\prime} \geq 2$. If, to the contrary, $u^{\prime}=1$ (and hence $u=2$ ), then all black and white $(\geq 2)$-strings should be cut in the $(i+1)$ st step, and among these strings there are at least a $u$-b-string, a $v$-w-string, and $k-1$ strings in $S$ ( $k+1$ strings altogether). This is impossible.

Hence, we get $2 \leq u^{\prime} \leq v^{\prime}<2 u^{\prime}$. To reach (ii), it remains to check that in $A_{i+1}$, there exists a set $S^{\prime}$ of $k-1$ other strings larger than $v^{\prime} / 2$. These will be exactly the strings obtained from the elements of $S$. Namely, each $s \in S$ was either cut in the $(i+1)$ st step, or not. In the former case, let us include into $S^{\prime}$ the largest of the strings obtained from $s$; otherwise we include $s$ itself into $S^{\prime}$. All $k-1$ strings in $S^{\prime}$ are greater than $v / 2 \geq v^{\prime}$, as desired.