# How many natural numbers not exceeding 4321 can be formed with the digits

Question:

How many natural numbers not exceeding 4321 can be formed with the digits 1, 2, 3 and 4, if the digits can repeat?

Solution:

Case I: Four-digit number

Total number of ways in which the 4 digit number can be formed $=4 \times 4 \times 4 \times 4=256$

Now, the number of ways in which the 4-digit numbers greater than 4321 can be formed is as follows:

Suppose, the thousand's digit is 4 and hundred's digit is either 3 or 4.

$\therefore$ Number of ways $=2 \times 4 \times 4=32$

But $4311,4312,4313,4314,4321$ (i.e. 5 numbers) are less than or equal to $4321 .$

$\therefore$ Remaining number of ways $=256-(32-5)=229$

Case II: Three-digit number

The hundred's digit can be filled in 4 ways.

Similarly, the ten's digit and the unit's digit can also be filled in 4 ways each. This is because the repetition of digits is allowed.

$\therefore$ Total number of three-digit number $=4 \times 4 \times 4=64$

Case III: Two-digit number

The ten's digit and the unit's digit can be filled in 4 ways each. This is because the repetition of  digits is allowed.

$\therefore$ Total number of two digit numbers $=4 \times 4=16$

Case IV: One-digit number

Single digit number can only be four.

∴ Required numbers = 229 + 64 + 16 +4 = 313