How many three digit number can be formed from the digits 1, 2, 3 and 4 if (a) repetition is allowed

( b ) repetition is not allowed.

(a) 4^3

(b) 4P3