# In how many ways a number $\gt 5000$ can be formed using given digits without repeating?

In how many ways one can form a number greater than $5000$ when allowed only to arrange digits taken from $2,3,4,5,8$ without repeating any digit?

I would think it would be $2\cdot4\cdot3\cdot2$.

Would this be correct?

-
It is extremely rare that using an abbreviation like «w/o» in a title is of any help to anyone except the person writing it! –  Mariano Suárez-Alvarez Aug 25 '12 at 22:35
it was edited, was not me –  fosho Aug 25 '12 at 22:36
Well: I was referring to the person writing it! :-) –  Mariano Suárez-Alvarez Aug 25 '12 at 22:40
can we ignore a number, or must they all be used in our arrangement? –  Deven Ware Aug 25 '12 at 22:46
@MarianoSuárez-Alvarez Thank you for your comment, I will be aware. –  Kuba Helsztyński Aug 25 '12 at 22:48
show 1 more comment

We need to think about all the ways to make a number bigger than $5000$,

any $5$ digit number we make will be bigger than $5000$, since none of our numbers are $0$.

so any arrangement of all $5$ does it, and there are $5!$ ways to arrange our $5$ numbers.

Then we consider $4$ digit numbers. For a $4$ digit number to be bigger than $5000$, its leading digit must be $\geq 5$ and so we have two possibilities for the first number (5 and 8).

For each choice of leading number we then have to order $3$ objects from a choice of $4$ objects. which means we have $\frac{4!}{(4-3)!} = 4!$ options for each leading digit.

So we have a total of $$5! + 4! + 4!$$

where the $5!$ is from all the $5$ digit numbers, and the two $4!$'s are from $4$ digit numbers with leading $5$ and $8$ respectively

EDIT: Throughout I've used the fact that the number of ways to order $m$ objects from a choice of $n$ objects is $$\frac{n!}{(n-m)!}$$ We can understand this easily enough: For the first object we have $n$ choices, for the second object we have $(n - 1)$ choices and this continues until for the last object we have $(n - m + 1)$ choices. So we have $$n(n-1)\cdots(n- m +1)$$ total possibilities. Which can be expressed more succinctly as
$$\frac{n!}{(n-m)!}$$

-