Solving the cryptarithm "THE+BEST+SYSTEM=METRIC"

Assume that all variables are distinct digits. Then, by inspecting the columns $(\_\,\_\,S\,|\,M)$ and $(\_\,\_\,Y\,|\,E)$, we clearly have $M=S+1$ and $(Y+1)\operatorname{mod}10=E$. Since there must be a carry-over from $Y+1$, we must have $E=(Y+1)-10$. Thus, $E=Y-9$. This shows that $Y=9$ and $E=0$. Now, the column $(\_\,B\,S\,|\,T)$ gives either $$(B+S)-10=T\text{ or }(B+S+1)-10=T$$ (recalling the carry-over to the column $(\_\,\_\,Y\,|\,E)$). Since $9$ is taken by $Y$ and $M=S+1$, we get $$T\leq (B+S+1)-10=(B+M)-10\leq (8+7)-10=5\,.$$

If $T=5$, then we must have $\{B,M\}=\{8,7\}$. As $S=M-1$, we get $$(Y,B,M,S,T,E)=(9,8,7,6,5,0)\,.$$ By considering the column $(E\,T\,M\,|\,C)$, we conclude $$C=(E+T+M)\operatorname{mod}10=(0+5+7)\operatorname{mod}10=2\,.$$ From the column $(H\,S\,E\,|\,I)$, we obtain (recalling the carry-over from the column $(E\,T\,M\,|\,C)$) $$I=(H+S+E+1)\operatorname{mod}10=(H+6+0+1)\operatorname{mod}10=(H+7)\operatorname{mod}10\,.$$ The only possible values of $H$ are $1$, $2$, $3$, and $4$; however, none of these values will make $I$ a distinct digit from previously known digits. Thus, $T=5$ is false.

We have proven that $T<5$. Because $E=0$, the carry-over to $(T\,E\,T\,|\,R)$ from $(H\,S\,E\,|\,I)$ is at most $1$. This means either $$R=2T\text{ or }R=2T+1\,.$$ Recall from $(\_\,B\,S\,|\,T)$ that $B+S-10=T$, or $$B+M=B+(S+1)=T+11\,.$$

We first assume that $R=2T$. We have the following cases.

  1. If $T=1$, then $R=2$ and $B+M=12$.

    • If $(B,M)=(8,4)$, then $S=M-1=3$ and $(E\,T\,M\,|\,C)$ gives $$C=(E+T+M)\text{ mod }10=5\,.$$ Thus, $$(Y,B,C,M,S,R,T,E)=(9,8,5,4,3,2,1,0)\,.$$ Thus, $(H\,S\,E\,|\,I)$ yields $$I=(H+S)\text{ mod }10=(H+3)\text{ mod }10\,.$$ This cannot be fulfilled with $\{I,H\}=\{6,7\}$.
    • If $(B,M)=(7,5)$, then $S=M-1=4$ and $(E\,T\,M\,|\,C)$ gives $$C=(E+T+M)\text{ mod }10=6\,.$$ Thus, $$(Y,B,C,M,S,R,T,E)=(9,7,6,5,4,2,1,0)\,.$$ Thus, $(H\,S\,E\,|\,I)$ yields $$I=(H+S)\text{ mod }10=(H+4)\text{ mod }10\,.$$ This cannot be fulfilled with $\{I,H\}=\{3,8\}$.
    • If $(B,M)=(5,7)$, then $S=M-1=6$ and $(E\,T\,M\,|\,C)$ gives $$C=(E+T+M)\text{ mod }10=8\,.$$ Thus, $$(Y,C,M,S,B,R,T,E)=(9,8,7,6,5,2,1,0)\,.$$ Thus, $(H\,S\,E\,|\,I)$ yields $$I=(H+S)\text{ mod }10=(H+6)\text{ mod }10\,.$$ This cannot be fulfilled with $\{I,H\}=\{3,4\}$.
    • If $(B,M)=(4,8)$, then $S=M-1=7$ and $(E\,T\,M\,|\,C)$ gives $$C=(E+T+M)\text{ mod }10=9\,,$$ which is contradiction ($Y=9$ already).
  2. If $T=2$, then $R=4$ and $B+M=13$.

    • If $(B,M)=(8,5)$, then $S=M-1=4=R$, which is a contradiction.
    • If $(B,M)=(7,6)$, then $S=M-1=5$ and $(E\,T\,M\,|\,C)$ gives $$C=E+T+M=8\,.$$ Thus, $$(Y,C,B,M,S,R,T,E)=(9,8,7,6,5,4,2,0)\,,$$ whence $(H\,S\,E\,|\,I)$ yields $$I=(H+S)\text{ mod }10=(H+5)\text{ mod }10\,.$$ This cannot be fulfilled with $\{I,H\}=\{1,3\}$.
    • If $(B,M)=(6,7)$, then $S=M-1=6=B$, which is a contradiction.
    • If $(B,M)=(5,8)$, then $S=M-1=7$ and $(E\,T\,M\,|\,C)$ gives $$C=(E+T+M)\text{ mod }10=0\,,$$ which is contradiction ($E=0$ already).
  3. If $T=3$, then $R=6$ and $B+M=14$. Since $B$ and $M$ are at most $8$ and unequal, we must have $$B=6=R\text{ or }M=6=R\,,$$ which is a contradiction.

  4. If $T=4$, then $R=8$ and $B+M=15$. As $B$ and $M$ are now at most $7$, $$B+M\leq 14<15\,,$$ which is a contradiction.

Ergo, $R=2T+1$ must be the case. Since $R<9$ and $T>0$, we see that $T=1$, $T=2$, or $T=3$.

  1. If $T=3$, then $R=7$ and $B+M=14$. Since $S=M-1$ cannot equal $R=7$, we end up with $$(Y,B,R,M,S,T,E)=(9,8,7,6,5,3,0)\,.$$ Consequently, $(E\,T\,M\,|\,C)$ gives $$C=(E+T+M)\text{ mod }10=9\,,$$ which is a contradiction ($Y=9$ already).

  2. If $T=2$, then $R=5$ and $B+M=13$. Clearly, $M=13-B\geq 13-8=5$. As $M\neq R=5$ and $S=M-1\neq R=5$, we must have $M\geq 7$.

    • If $M=7$, then $B=13-M$ and $S=M-1=6$, which is a contradiction.

    • If $M=8$, then $B=13-M=5=R$, which is again a contradiction.

  3. If $T=1$, then $R=3$ and $B+M=12$. Consequently, $(E\,T\,M\,|\,C)$ gives $$C=(E+T+M)\text{ mod }10=M+1\,.$$ As $C\leq 8$, we get $M\leq 7$.

    • If $(B,M)=(8,4)$, then $S=M-1=3=R$, which is a contradiction.

    • If $(B,M)=(7,5)$, then $S=M-1=4$ and $C=M+1=6$. This gives $$(Y,B,C,M,S,R,T,E)=(9,7,6,5,4,3,1,0)\,.$$ Thus, $(H\,S\,E\,|\,I)$ yields $$I=(H+S)\text{ mod }10=(H+4)\text{ mod }10\,.$$ This can be fulfilled only by $(I,H)=(2,8)$. Thus, we have a unique solution $$(Y,H,B,C,M,S,R,I,T,E)=(9,8,7,6,5,4,3,2,1,0)\,.$$


Epilogue. Without the requirement that the digits must be distinct, there are many other solutions. Via computer search, there are $7145$ solutions with $T$, $B$, $S$, and $M$ being positive (so that $THE$, $BEST$, $SYSTEM$, and $METRIC$ are $3$-, $4$-, $6$-, and $6$-digit positive integers). Without the positivity requirements (i.e., $T$, $B$, $S$, and $M$ may be $0$), there are $9900$ solutions.


This is a cryptarithmic puzzle. A brute-force search shows that this is the unique solution: $$\begin{array}{ccccccc} &&&&1&8&0\\ &&&7&0&4&1\\ +&4&9&4&1&0&5\\ \hline &5&0&1&3&2&6 \end{array}$$ So $THEBSYMRIC=1807495326$.