3

Example of valid number are:

(1) 431
(2) 543
(3) 210
(4) 321

Example of not valid number are:

(1) 221
(2) 500
(3) 654

The answer is 120 but I don't know why.

My attempt:

I have to construct a string of length $n=3$ with some constraints. I split the problem into 5 small problems.

$D_1 = \{\text{all valid number staring with 1}\}$
$|D_1| = 0$

$D_2 = \{\text{all valid number staring with 2}\}$
$|D_2| = 1 \times {2\choose 2}$, because I can choose only from $\{0,1\}$

$D_3 = \{\text{all valid number staring with 3}\}$
$|D_3| = 1 \times {3\choose 2}$, because I can choose only from $\{0,1,2\}$

$D_4 = \{\text{all valid number staring with 4}\}$
$|D_4| = 1 \times {4\choose 2}$, because I can choose only from $\{0,1,2,3\}$

$D_5 = \{\text{all valid number staring with 5}\}$
$|D_5| = 1 \times {5\choose 2}$, because I can choose only from $\{0,1,2,3,4\}$

My solution: $$\sum_{i \in \{1,2,3,4,5\}}|D_i| = 35$$ I can sum directly because there is no double counting but it's wrong...

Editing from the future:

I made a mistake on the summation, the solution is 20. And from the textbook 120 were not the correct answer...

$$\sum_{i \in \{1,2,3,4,5\}}|D_i| = 20$$ I can sum directly because each set is disjoint (there is no double counting). In conclusion my long not-necessary aproach was right but (if you are reading this post) I recommend you to read all the comments below and the answers because they helped me a lot.

  • 3
    what is a decreasing number? – miracle173 Jan 03 '21 at 15:10
  • 1
    @miracle173 I think they mean the digits are in descending order. exampe:432 – basilisk Jan 03 '21 at 15:12
  • 2
    I do not understand what it is you are trying to count either... but it is worth noting that $120 = \binom{10}{3}$... perhaps you were meaning to look at the number of three-digit numbers whose digits appear in strictly decreasing order where we don't care about bounds so $987$ and $820$ etc are valid numbers to count... not just limiting ourselves to looking for such numbers between $100$ and $600$ – JMoravitz Jan 03 '21 at 15:13
  • @miracle173 I edit the post. Example is 432 or 543 – Jonathan Jan 03 '21 at 15:15
  • 3
    As for splitting it into cases... that is completely unnecessary for this problem. Recognize that every subset of size $3$ from the set ${0,1,2,3,4,\dots,9}$ (or set of size three from ${0,1,2,3,4,5}$ if you do insist on the bounds being intended) directly corresponds to one such number... If you do split into cases, you will just inadvertently invoke the hockey stick identity, either using more complex machinery or just using more unnecessary arithmetic. – JMoravitz Jan 03 '21 at 15:16
  • 1
    Where did $35$ come from? When I add up the sets you give I get $20$, which as JMoravitz pointed out, is equal to $\binom{6}{3}$. – Stephen Donovan Jan 03 '21 at 15:18
  • So, to reiterate... as written with the bounds set as between $100$ and $600$ and our understanding of "decreasing number" as a number whose digits appear in strictly decreasing order, the answer of $\binom{10}{3}=120$ is incorrect and would have been correct if there were no bounds. The answer for with the bounds can follow from your work but you have arithmetic errors and should have been $\binom{6}{3}=20$. Other interesting adjustments to the problem could be made, for example letting the digits appear in nonstrictly decreasing order, e.g. 552 or 333, etc... giving further answers – JMoravitz Jan 03 '21 at 15:24
  • As for where you got an answer of $35$ from... I can only imagine you accidentally added one more term in your sum beyond where you should have stopped... note that $\binom{7}{3}=35 = \binom{2}{2}+\binom{3}{2}+\binom{4}{2}+\binom{5}{2}\color{red}{+\binom{6}{2}}$ – JMoravitz Jan 03 '21 at 15:27
  • $$\sum_{i \in {1,2,3,4,5}}|D_i| = 20$$ – miracle173 Jan 03 '21 at 15:29
  • @miracle173 Thanks! I double check and now i correct! – Jonathan Jan 03 '21 at 15:32
  • @JMoravitz You're right!!! Thanks. I counted 6 choose 2. I don't know how that happened... – Jonathan Jan 03 '21 at 15:33
  • These different ways of counting (@JMoravitz ' and yours) can be used to prove that $$\binom {n+1}{ k +1}=\sum_{i=k}^n \binom i k$$ – miracle173 Jan 03 '21 at 15:43

2 Answers2

1

Summarizing information from the comments, a decreasing number of three digits requires three different digits from the set $\{0,1,2,3,4,5,6,7,8,9\}.$ Once you have chosen the three digits they must appear in the number in decreasing order, so from any one subset of three digits there is only one way to form a decreasing number. So we get a one-to-one correspondence between the three-element subsets of a set of ten elements and the three-digit decreasing numbers. There are $$ \binom{10}{3} = 120 $$ three-digit decreasing numbers.

If you put the restriction that the number must be between $100$ and $600,$ the digits must be selected from the six-element set $\{0,1,2,3,4,5\},$ so there are only $$ \binom{6}{3} = 20 $$ three-digit decreasing numbers less than $600.$

Note that in the calculation for numbers less than $600,$ we have $$ \binom 63 = \frac{6!}{3!3!} = \frac{6\cdot 5\cdot 4}{3!} = \frac{120}{6},$$ so if you work out the numerator but forget to divide by $6$ you could mistakenly say the answer is $120$ (which is the correct answer for the number of permutations of three digits out of six).

David K
  • 108,155
1

Another pattern I have recognised is, if we take the first digit as $n$, we have $\frac{(n)(n-1)}{2}$ possibilities for that particular value of $n$. Example: if n=$4$, the possible numbers are {$432,431,430,421,420,410$} which is six in number. Which is also equal to $\frac{4\times3}{2}$.

The reason this works is, suppose if n=$4$, we have three numbers having the second digit as $3$, two numbers having the second digit as $2$ and one number having the second digit as $1$. Similarly, this works for other values of $n$ too.

so we can say that the total possibilities are: $$\frac{1}{2}\sum_{n=1}^{5}(n)(n-1)$$

Which turns out to be $20$

basilisk
  • 636