Discrete mathematics - number of 4-digit numbers such that one of its digit is the sum of remaining 3 digits?

133 Views Asked by At

How many distinct $4-digit$ numbers are in the set $\{1000,1001,1002,1003,\dots,9998,9999\}$ such that one of its digit is the sum of $3$ other digits?

1

There are 1 best solutions below

0
On BEST ANSWER

Continuing the setup from my comment above, break into three cases: Those with two zeroes, those with one zero, and those with no zeroes in their digits.


Case 1: Two zeroes. Since the first digit cannot be a zero, pick which of the remaining three digits is the other nonzero number. Follow this up by picking the value of the nonzero digits. By multiplication principle there are then $3\cdot 9=27$ such numbers.

E.g. $8800, 7007, 6060,\dots$

Note: we needed to break into cases here to avoid overcounting since had we said to pick the location of the largest digit and then spread the remaining values across the rest of the digits, we would have mistakenly counted each of these twice.


Case 2: One zero. Since the first digit cannot be zero, pick which of the remaining three digits is zero. Follow this up by picking the location of the largest digit.

Next, choose the actual value of the largest digit and break into cases based on the value chosen. Call the value of the largest digit $k$. There will be two unknown non-zero digits left to choose a value for, call them $x_1$ and $x_2$. We now want to count the number of integral solutions to the system

$$\begin{cases}x_1+x_2=k\\1\leq x_1\\ 1\leq x_2\end{cases}$$

(technically, they could include upper bounds of $9$ on each term as well, but since $k$ is bounded above by $9$ as well the upper bound conditions are unnecessary to include)

By stars-and-bars we know the number of solutions to that system is $\binom{k-1}{1}=k-1$

Combining all of this information, we have then a total of $3\cdot 3\cdot \left(\sum\limits_{k=2}^9(k-1)\right)=324$ numbers in this case.


Case 3: No zeroes. Again, begin by picking the location of the largest digit. Then break into cases based on the value of the largest digit. Call it $k$. From left to right, call the smaller digits $x_1,x_2,x_3$. We continue by counting the number of integral solutions to the system

$$\begin{cases}x_1+x_2+x_3=k\\1\leq x_1\\1\leq x_2\\1\leq x_3\end{cases}$$

Again, by stars and bars we see this to be $\binom{k-1}{2}$

There are then $4\cdot \left(\sum\limits_{k=3}^9\binom{k-1}{2}\right)=336$ outcomes in this case.


Adding all of these together we get a final result of $27+324+336=687$