(d) 313
As there are 4 digits 1, 2, 3, 4 and repetition of digits is allowed.
Total number of 1-digit numbers = 4
Total number of 2-digit numbers = 4 × 4 = 16
Total number of 3-digit numbers = 4 × 4 × 4 = 64
Number of 4-digit numbers beginning with 1 = 4 × 4 × 4 = 64
(∵ The first place is occupied by 1)
Number of 4-digit numbers beginning with 2 = 4 × 4 × 4 = 64
Number of 4-digit numbers beginning with 3 = 4 × 4 × 4 = 64
Number of 4-digit numbers beginning with 41 = 4 × 4 = 16
Number of 4-digit numbers beginning with 42 = 4 × 4 = 16
Number of 4-digit numbers beginning with 431 = 4
Number of 4-digit numbers beginning with 432 = 1 (4321 only)
∴ Total number of 4-digit numbers = 64 + 64 + 64 + 16 + 16 + 4 + 1 = 229
∴ Total number of natural numbers not exceeding 4321 = 4 + 16 + 64 + 229 = 313.