How many different 3-digit numbers can be formed using the digits 1, 2 and 3 when
(a) no repetitions are allowed,
(b) any repetitions are allowed,
(c) each digit may be included at most twice?
How many different 4-digit numbers can be formed using the digits 1, 2 and 3 when each digit may be included at most twice?