[Math] increasing, decreasing, non-decreasing, non-increasing permutation/combination

combinationscombinatoricsdiscrete mathematics

I have this question and I'm stuck:

Q: In the set of three-digit integers {100,101,…,999}, how many integers are there

(a) with three distinct digits that are either increasing (as in 257, 139) or decreasing (as in 752, 430)?

(b) with three digits that are either non-decreasing (as in 477, 555, 123) or non-increasing (666,321,943)?

(Note that digits may repeat.)

For part a) I got to 7 * _ * _ as you know for the three digit number as 8, 9 cannot be the first digit, it would not make a three digit number however I don't know how to proceed because wouldn't the second digit vary from the first digit picked?

I would like to understand this as much as I can. Thanks!

Best Answer

We solve the first problem. There is some complication because $0$ is not allowed as an initial digit.

So let us first count how many possibilities there are if we allow initial $0$. We can choose the $3$ digits in $\binom{10}{3}$ ways, and for each such choice we can arrange the digits in two orders, increasing or decreasing, for a total of $2\binom{10}{3}$.

Now we must take away the "bad" choices, the ones with initial digit $0$. There are $\binom{9}{2}$ ways to choose $2$ non-zero digits, and we can only use increasing order. So the number of bad choices is $\binom{9}{2}$. Thus the total number of good choices is $2\binom{10}{3}-\binom{9}{2}$.

For the second problem, one can count the additional possibilities that are produced by allowing equality.

Related Question