The greatest four digit number that can be formed by the digits 4, 5, 7, 9 (repetition of digits is allowed).
How many 3-digit numbers can be formed from the digits 5, 6, 7, 8 and 9 assuming that
(i) Repetition of the digits is allowed?
(ii) Repetition of the digits is not allowed?