$11 \cdot 38$ A four-digit number $(x y z t)_{B}$ is called a stable number in base $B$ if $(x y z t)_{B}=$ $(d c b a)_{B}-(a b c d)_{B}$, where $a \leqslant b \leqslant c \leqslant d$ are obtained by arranging $x, y, z, t$ in non-decreasing order. Determine all stable numbers in base $B$.
(26th International Mathematical Olympiad Shortlist, 1985)
[Solution] If $c>b$.
Then from $(\overline{d c b a})_{B}-(\overline{a b c d})_{B}$ and $a \leqslant b$.
(1) If $a=b, c=d$,
From (3), (4) we get $x=y+1$.
So we have $\quad x=c, y=a$.
Then from (4) $\quad d-a=x$ becomes $c-a=c$. Thus
$$
a=0 \text {. }
$$

From (3) we get
$$
c=1 \text {, }
$$

Then from (1),(2) we get $B=2$.
Thus we obtain one solution:
$$
(1100)_{2}-(0011)_{2}=(1001)_{2} \text {. }
$$
(2) If
$$
a<b$,
So
$$
y=a=0 .
$$

From (3)
$$
c-b=1 \text {. }
$$

From (2)
$$
z=B-2 \text {. }
$$

Thus
$$
\begin{array}{l}
c=z=B-2, \\
t=b=B-3 .
\end{array}
$$

Then from (1),
$$
d=3 \text {. }
$$

So
$$
\begin{array}{l}
B-2=c \leqslant 3, \\
B \leqslant 5 .
\end{array}
$$

From $B=4$ we get $d=3, c=2, b=1, a=0$. That is
$$
\begin{aligned}
& (3210)_{4}-(0123)_{4} \\
= & (3021)_{4} .
\end{aligned}
$$

From $B=5$ we get $d=3, c=3, b=2, a=0$, that is
$$
\begin{aligned}
& (3320)_{5}-(0233)_{5} \\
= & (3032)_{5} .
\end{aligned}
$$

If $x=c$, since $z \geqslant t$, so $z=d$.
From (1), $t>a$, so
$$
y=a, \quad t=b .
$$

From (1),(2),(3),(4) we can solve
$$
c=\frac{3 B}{5}, \quad d=\frac{4 B}{5}-1, \quad b=\frac{2 B}{5}, \quad a=\frac{B}{5}-1 .
$$

Therefore, when $5 \mid B$, we can get the required solution.
If $x=b$, then
$$
y=a, \quad z=d, \quad t=c .
$$

From (3), (4) we get
$$
c=a+b+1, d=a+b \text {. }
$$

At this time $d<c$ contradicts $d \geqslant c$.
Thus the stable numbers in $B$-ary are
$$
\begin{array}{r}
(1001)_{2},(3021)_{4},(3032)_{5}, \\
\left(\frac{3 B}{5} \quad \frac{B}{5}-1 \quad \frac{4 B}{5}-1 \quad \frac{2 B}{5}\right)_{B}, 5 \mid B .
\end{array}
$$