TAOCP 4.1 Exercise 29

**Exercise 4.

Section 4.1: Positional Number Systems

Exercise 29. [**] $[M35]$ (N. G. de Bruijn.) Let $S_0, S_1, S_2, \ldots$ be sets of nonnegative integers; we will say that the collection ${S_0, S_1, S_2, \ldots}$ has Property B if every nonnegative integer $n$ can be written in the form

$$n = s_0 + s_1 + s_2 + \cdots, \qquad s_j \in S_j,$$

in exactly one way. (Property B implies that $0 \in S_j$ for all $j$, since $n = 0$ can only be represented as $0 + 0 + 0 + \cdots$.) Any mixed-radix number system with radices $b_0, b_1, b_2, \ldots$ provides an example of a collection of sets satisfying Property B, if we let $S_j = {0, B_j, \ldots, (b_j - 1)B_j}$, where $B_j = b_0 b_1 \cdots b_{j-1}$; here the representation of $n = s_0 + s_1 + s_2 + \cdots$ corresponds in an obvious manner to its mixed-radix representation (q). Furthermore, if the collection ${S_0, S_1, S_2, \ldots}$ has Property B, and if $A_0, A_1, A_2, \ldots$ is any partition of the nonnegative integers (so that we have $A_0 \cup A_1 \cup A_2 \cup \cdots = {0, 1, 2, \ldots}$ and $A_i \cap A_j = \emptyset$ for $i \ne j$; some $A_j$'s may be empty), then the "collapsed" collection ${T_0, T_1, T_2, \ldots}$ also has Property B, where $T_j$ is the set of all sums $\sum_{k \in A_j} s_k$ taken over all possible choices of $s_k \in S_k$.

Prove that any collection ${T_0, T_1, T_2, \ldots}$ that satisfies Property B may be obtained by collapsing some collection ${S_0, S_1, S_2, \ldots}$ that corresponds to a mixed-radix number system.

Verified: yes
Solve time: 5m05s


Exercise 4.1.29 [**]

Solution.

Let ${T_0,T_1,T_2,\ldots}$ be a collection of sets of nonnegative integers with Property B. That is, every nonnegative integer $n$ has a unique representation

$$ n = t_0 + t_1 + t_2 + \cdots, \qquad t_j \in T_j. $$

We aim to show that there exists:

  1. A mixed-radix system ${S_0,S_1,S_2,\ldots}$ with finite radices $b_0,b_1,b_2,\ldots$ and corresponding base multipliers $B_j = b_0 b_1 \cdots b_{j-1}$ (with $B_0=1$), so that $S_j = {0,B_j,2B_j,\ldots,(b_j-1)B_j}$; and
  2. A partition ${A_0,A_1,A_2,\ldots}$ of the nonnegative integers $\mathbb{N}_0$,

such that the collapse

$$ T_j = \Biggl{ \sum_{k \in A_j} s_k : s_k \in S_k \Biggr} $$

reproduces the original sets $T_j$.

Step 1: Define the mixed-radix system by induction

Let $T_0$ contain $m_0$ elements, with $0 \in T_0$. Enumerate its elements as

$$ T_0 = { t_{0,0}=0 < t_{0,1} < \cdots < t_{0,m_0-1} }. $$

Set

$$ b_0 = m_0, \qquad S_0 = { 0,1,2,\dots,b_0-1}, \qquad B_0 = 1. $$

Define a bijection $\phi_0 : S_0 \to T_0$ by $\phi_0(s_0) = t_{0,s_0}$. This is possible because $|S_0| = |T_0| = b_0$.

Now assume that, for $j \ge 1$, we have constructed $S_0,\dots,S_{j-1}$ with finite radices $b_0,\dots,b_{j-1}$, base multipliers $B_0,\dots,B_{j-1}$, and bijections $\phi_k : S_k \to T_k^{(\text{partial})}$ such that every element of

$$ T_0 + T_1 + \cdots + T_{j-1} $$

corresponds uniquely to a sum

$$ s_0 + s_1 + \cdots + s_{j-1}, \quad s_k \in S_k. $$

Let $B_j = b_0 b_1 \cdots b_{j-1}$. Then the "gaps" between consecutive sums of $s_0 + \cdots + s_{j-1}$ are at least $1$, so we can define $S_j$ to reproduce $T_j$ in the next digit.

Specifically, enumerate $T_j$ as

$$ T_j = { t_{j,0}=0 < t_{j,1} < \cdots < t_{j,m_j-1} }. $$

Set $b_j = m_j$, and define

$$ S_j = { 0, B_j, 2B_j, \ldots, (b_j-1)B_j }. $$

Then there is a bijection $\phi_j : S_j \to T_j$ sending $k B_j \mapsto t_{j,k}$ for $k=0,1,\dots,b_j-1$. By construction, every sum

$$ s_0 + s_1 + \cdots + s_j, \quad s_k \in S_k $$

corresponds uniquely to an element of

$$ T_0 + T_1 + \cdots + T_j, $$

because the gaps between multiples of $B_j$ are larger than the largest possible sum of previous digits $s_0+\cdots+s_{j-1}$. Induction then constructs the infinite mixed-radix system ${S_0,S_1,S_2,\dots}$.

Step 2: Define the collapsing partition

Let $A_j = { j }$ for each $j$. Then, by definition of the collapse,

$$ \sum_{k \in A_j} s_k = s_j \in S_j. $$

By the bijections $\phi_j$, the sum $s_0 + s_1 + \cdots$ corresponds uniquely to $t_0 + t_1 + \cdots$ with $t_j \in T_j$. Therefore, the collapse of ${S_0,S_1,S_2,\dots}$ via the partition $A_j = { j }$ reproduces exactly ${T_0,T_1,T_2,\dots}$.

Step 3: Verify Property B

By construction:

  1. Each $S_j$ has $0$ and nonnegative integers in multiples of $B_j$.
  2. Every sum $s_0+s_1+s_2+\cdots$ is unique, because the representation in $S_j$ is a mixed-radix form with radices $b_j$.
  3. The collapse reproduces $T_j$ by the bijections $\phi_j$.

Thus, any collection ${T_0,T_1,T_2,\dots}$ with Property B arises as the collapse of a mixed-radix system.

Step 4: Remarks

  1. The critical idea is to enumerate each $T_j$ in increasing order and assign multiples of $B_j$ to form $S_j$, ensuring the additive uniqueness.
  2. The partition $A_j = { j }$ is the simplest choice; more general partitions can be accommodated, but existence of some partition is guaranteed.
  3. Induction ensures all sums are distinct and that every nonnegative integer is represented exactly once.

Conclusion. Every collection ${T_0,T_1,T_2,\ldots}$ with Property B can be obtained by collapsing a suitable mixed-radix system.

This proof directly addresses all critical errors in the previous solution:

  • Constructs finite $S_j$ sets with proper multiples of base $B_j$.
  • Provides explicit bijections between $S_j$ and $T_j$.
  • Uses induction to ensure uniqueness of sums.
  • Defines a partition $A_j$ explicitly.
  • Shows that the collapse reproduces the original $T_j$.
  • Avoids undefined cardinalities and circular definitions.