Question Details

Let S be the set of all seven-digit numbers that can be formed using the digits 0, 1 and 2. For example, 2210222 is in S, but 0210222 is NOT in S. Then the number of elements x in S such that at least one of the digits 0 and 1 appears exactly twice in x, is equal to_________.

Show Answer

Correct Answer :

762

Solution :

The correct answer is 762.

Let us solve the problem step-by-step using the Principle of Inclusion-Exclusion.

A seven-digit number is formed using the digits 0, 1, and 2. Since it is a seven-digit number, the first digit (the most significant digit) cannot be 0. Thus, the first digit must be either 1 or 2.

Let A be the set of seven-digit numbers in S where the digit 0 appears exactly twice.
Let B be the set of seven-digit numbers in S where the digit 1 appears exactly twice.

We need to find the number of elements in S such that at least one of the digits 0 and 1 appears exactly twice. This is represented by the cardinality of the union of A and B:
n(AB)=n(A)+n(B)-n(AB)

Step 1: Finding n(A) (0 appears exactly twice)
Since 0 cannot be the first digit, the first digit must be 1 or 2. The remaining 6 positions must contain exactly two 0s. The other 4 positions can be filled with either 1 or 2.

We consider two cases based on the first digit:
Case 1: The first digit is 1.
We choose 2 positions for 0 from the remaining 6 positions in C62=15 ways.
The remaining 4 positions can be filled with 1 or 2 in 24=16 ways.
Number of ways = 15×16=240.

Case 2: The first digit is 2.
Similarly, we choose 2 positions for 0 from the remaining 6 positions in C62=15 ways.
The remaining 4 positions can be filled with 1 or 2 in 24=16 ways.
Number of ways = 15×16=240.

Therefore, the total number of ways is:
n(A)=240+240=480

Step 2: Finding n(B) (1 appears exactly twice)
The first digit can be 1 or 2. We consider two cases based on the first digit:

Case 1: The first digit is 1.
Since the first digit is 1, and 1 must appear exactly twice overall, we need to place exactly one more 1 in the remaining 6 positions.
We choose 1 position for the second 1 in C61=6 ways.
The remaining 5 positions can be filled with 0 or 2 in 25=32 ways.
Number of ways = 6×32=192.

Case 2: The first digit is 2.
Since the first digit is 2, the remaining 6 positions must contain exactly two 1s.
We choose 2 positions for the 1s in C62=15 ways.
The remaining 4 positions can be filled with 0 or 2 in 24=16 ways.
Number of ways = 15×16=240.

Therefore, the total number of ways is:
n(B)=192+240=432

Step 3: Finding n(AB) (both 0 and 1 appear exactly twice)
In this case, the number must contain exactly two 0s and exactly two 1s. The remaining three digits must be 2. The first digit can be 1 or 2.

Case 1: The first digit is 1.
We need one more 1 and two 0s in the remaining 6 positions.
First, choose 1 position out of 6 for the 1: C61=6 ways.
Then, choose 2 positions out of the remaining 5 for the 0s: C52=10 ways.
The remaining 3 positions are automatically filled with 2s.
Number of ways = 6×10=60.

Case 2: The first digit is 2.
We need two 1s and two 0s in the remaining 6 positions.
First, choose 2 positions out of 6 for the 1s: C62=15 ways.
Then, choose 2 positions out of the remaining 4 for the 0s: C42=6 ways.
The remaining 2 positions are automatically filled with 2s.
Number of ways = 15×6=90.

Therefore, the total number of ways is:
n(AB)=60+90=150

Step 4: Applying the Principle of Inclusion-Exclusion
We now compute the final count:
n(AB)=480+432-150
n(AB)=912-150=762

Thus, there are exactly 762 such seven-digit numbers.

Unlock Our Free Library

Access expert-curated educational resources and study materials—completely free.

Discover more resources

You may also like

Mock Tests

View All
  • CTET
  • intermediate
  • No time limit
  • child development and pedagogy, mathematics, social science

  • SSC
  • intermediate
  • 2 hours and 30 mins
  • child development and pedagogy, mathematics, social science

Ask AI Tutor
5 left
Q1 View Question & Options
AI Tutor is solving this question...
Reading question context & options...