For any finite sets X and Y of positive integers, denote by fX(k) the kth smallest positive integer not in X, and let X∗Y=X∪{fX(y):y∈Y} Let A be a set of a>0 positive integers, and let B be a set of b>0 positive integers. Prove that if A∗B=B∗A, then A appears b timesA∗(A∗⋯∗(A∗(A∗A))…)=B appears a timesB∗(B∗⋯∗(B∗(B∗B))…).
This one wants a proof. Work it on paper, read the official solution, then mark
yourself honestly — the ladder only means something if the record is true.
Official solution
For any function g:Z>0→Z>0 and any subset X⊂Z>0, we define g(X)={g(x):x∈X}. We have that the image of fX is fX(Z>0)=Z>0\X. We now show a general lemma about the operation *, with the goal of showing that * is associative. Lemma 1. Let X and Y be finite sets of positive integers. The functions fX∗Y and fX∘fY are equal. Proof. We have fX∗Y(Z>0)=Z>0\(X∗Y)=(Z>0\X)\fX(Y)=fX(Z>0)\fX(Y)=fX(Z>0\Y)=fX(fY(Z>0)). Thus, the functions fX∗Y and fX∘fY are strictly increasing functions with the same range. Because a strictly increasing function is uniquely defined by its range, we have fX∗Y=fX∘fY. Lemma 1 implies that * is associative, in the sense that (A∗B)∗C=A∗(B∗C) for any finite sets A,B, and C of positive integers. We prove the associativity by noting Z>0\((A∗B)∗C)=f(A∗B)∗C(Z>0)=fA∗B(fC(Z>0))=fA(fB(fC(Z>0)))=fA(fB∗C(Z>0))=fA∗(B∗C)(Z>0)=Z>0\(A∗(B∗C)) In light of the associativity of *, we may drop the parentheses when we write expressions like A∗(B∗C). We also introduce the notation X∗k=X appears k timesX∗(X∗⋯∗(X∗(X∗X))…) Our goal is then to show that A∗B=B∗A implies A∗b=B∗a. We will do so via the following general lemma. Lemma 2. Suppose that X and Y are finite sets of positive integers satisfying X∗Y=Y∗X and ∣X∣=∣Y∣. Then, we must have X=Y. Proof. Assume that X and Y are not equal. Let s be the largest number in exactly one of X and Y. Without loss of generality, say that s∈X\Y. The number fX(s) counts the sth number not in X, which implies that fX(s)=s+∣X∩{1,2,…,fX(s)}∣ Since fX(s)≥s, we have that {fX(s)+1,fX(s)+2,…}∩X={fX(s)+1,fX(s)+2,…}∩Y which, together with the assumption that ∣X∣=∣Y∣, gives ∣X∩{1,2,…,fX(s)}∣=∣Y∩{1,2,…,fX(s)}∣ Now consider the equation t−∣Y∩{1,2,…,t}∣=s This equation is satisfied only when t∈[fY(s),fY(s+1)), because the left hand side counts the number of elements up to t that are not in Y. We have that the value t=fX(s) satisfies the above equation because of (1) and (2). Furthermore, since fX(s)∈/X and fX(s)≥s, we have that fX(s)∈/Y due to the maximality of s. Thus, by the above discussion, we must have fX(s)=fY(s).
Finally, we arrive at a contradiction. The value fX(s) is neither in X nor in fX(Y), because s is not in Y by assumption. Thus, fX(s)∈/X∗Y. However, since s∈X, we have fY(s)∈Y∗X, a contradiction.
We are now ready to finish the proof. Note first of all that ∣A∗b∣=ab=∣B∗a∣. Moreover, since A∗B=B∗A, and * is associative, it follows that A∗b∗B∗a=B∗a∗A∗b. Thus, by Lemma 2, we have A∗b=B∗a, as desired.
Comment 1. Taking A=X∗k and B=X∗l generates many non-trivial examples where A∗B=B∗A. There are also other examples not of this form. For example, if A={1,2,4} and B={1,3}, then A∗B={1,2,3,4,6}=B∗A.
Source: NuminaMath-1.5,
licensed Apache-2.0.
Statement and solution reproduced as published; topic, difficulty and ordering added
by this site.