Four-digit numbers with mandatory digits

CAT 2021 Slot 3 · QA · Hard · Combinatorics

A four-digit number is formed by using only the digits 1, 2 and 3 such that both 2 and 3 appear at least once. The number of all such four-digit numbers is

Answer

50

Explanation

Total 4-digit numbers using digits {1, 2, 3} = 34=813^4 = 81.

Let AA be the set of 4-digit numbers formed without the digit 2 (using only {1, 3}). A=24=16|A| = 2^4 = 16

Let BB be the set of 4-digit numbers formed without the digit 3 (using only {1, 2}). B=24=16|B| = 2^4 = 16

AB|A \cap B| is the set of numbers formed using neither 2 nor 3 (using only {1}). AB=14=1|A \cap B| = 1^4 = 1

By Principle of Inclusion-Exclusion, the number of 4-digit numbers lacking 2 or 3 (or both) is: AB=16+161=31|A \cup B| = 16 + 16 - 1 = 31

The number of four-digit numbers where both 2 and 3 appear at least once is: 8131=5081 - 31 = 50.

Practise this under exam conditions

Sign in to solve it with a live timer, the on-screen CAT calculator, and streak and accuracy tracking across every question you attempt.

Solve in the workspace