How many four digit integer number exist that that the digits are either NOT in decreasing order or NOT in increasing order?(check my solution) Here is a part two of a question, which is homework and I want to make sure of my answer:
A) How many integer numbers with four distinct digits exist that they are either additive or reductive (check my answer)
B)How many four digit integer number exist that that the digits are either Non-decreasing (like 1347,1226,7778) or Non-increasing order (like 6421,6622,9888) ?
My solution for Non-decreasing part :
The digits can be repeated so we can construct a four digit number with 4 or 3 or 2 or even one number .
By picking 4 numbers out of 9 ( except 0 , because logically it cannot be anywhere in that four digit) there is only one arrangement that matches the property (like 1234)by picking 3 numbers out of 9 there is three arrangements(like 1233,1223,1123) by picking 2.....by picking 1....
So the answer would be like :
$$1{9\choose 4}+ 3{9\choose 3}+ 1{9\choose 2}+ 1{9\choose 1}$$
For the Non-increasing part its the same except 0 can be involved as one last or two last or three last ones.
So we have :
${9\choose 3}+ {9\choose 2}+ {9\choose 1}$
So the final answer for the increasing part would be :
$$1{9\choose 4}+ 4{9\choose 3}+ 2{9\choose 2}+ 2{9\choose 1}$$
THE FINAL ANSWER FOR PART B is sum of this two answers  and because of the OR in the question we have to reduce the common answers in our final answer because we count it twice .
The common answers are 1111,222,...,9999
So the final answer is :
$$2{9\choose 4}+ 7{9\choose 3}+ 3{9\choose 2}+ 3{9\choose 1} -9$$
Am I missing somthing or doing something wrong ?
I would really appreciate someone check my answer.
Thanks in advance.
 A: Let find a correct solution and compare with your numbers.
Obviously a quadruple of numbers can be brought in non-increasing (non-deacreasing) order in a unique way. Therefore it is required only to know how many copies of every digit are present. Essentially it is equivalent to problem of distributing 4 balls among 9 (or 10) bins and can be easily solved by stars and bars method.
If the sequence is non-decreasing it - as you have correctly noted - cannot contain $0$. This means we have choice between $9$ digits, so that the overall count is
$$
\binom{4+9-1}4=\binom{12}4=495 (\color{red}{\ne423}).\tag1
$$
If the sequence is non-increasing it can contain up to three $0$. Thus we have choice between $10$ digits, one choice ($0000$) being invalid, so that the count is:
$$
\binom{13}4-1=714(\color{red}{\ne552}).\tag2
$$
Together it gives (here you correctly defined the intersection of both sets):
$$\binom{12}4+\binom{13}4-10=1200.
$$
As seen from (1) and (2) your expressions heavily underestimate the actual numbers.
