Number of $4$ digit numbers having their digits formed by using the digits from $\{1,2,3\} = 3^4 = 81 = T$
Let,
Number of $4$ digit numbers having their digits in non-increasing order formed by using the digits from $\{1,2,3\} =A $
Number of $4$ digit numbers having their digits in non-decreasing order formed by using the digits from $\{1,2,3\} =B $
Required solution is $T - (A \cup B).$
$AUB = A+B - A \cap B$
We can form a 4 digit number by selecting $x_1 \ 1's, x_2 \ 2's \ and \ x_3 \ 3's$ such that
$x_1+x_2+x_3=4 \Rightarrow equation 1$
Then each such solution can be arranged in non-decreasing order.
The number of solutions to equation 1 is given by $\Large\binom{4+3-1}{2}=15 =A$
Similarly, number of $4$ digit numbers having their digits in non increasing order formed by using the digits from $\{1,2,3\} = B =15$
$A \cap B = 3$ $(1111,2222,3333)$
$(A \cup B)=15+15 - 3= 27$
$T - (A \cup B)=81-27 =54$