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(A∪B)=n(A)+n(B)-n(A∩B)

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(A∩B) (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(A∩B)=60+90=150

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

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

Transparent Access on Mindyard

Built for Learners & Educators Alike

Completely free for students. Educators & coaching institutes get 2 months free Pro trial to create tests.

FREE FOR STUDENTS

Practice & Learn Free for Students

Access unlimited practice questions, detailed step-by-step solutions, and exam study materials — completely free for students.

  • Unlimited mock tests & question bank practice
  • Full access to curated study library & formula notes
  • 100% free for students • No credit card required
2 MONTHS FREE TRIAL

Educators & Coaching Institutes

Create and conduct professional online assessments with AI question generation, tab proctoring, and comprehensive batch management.

  • AI question uploader & rapid test generator
  • Anti-cheating tab proctoring & performance reports
  • Full Pro access free for 60 days • No upfront commitment
Discover more resources

You may also like

Mock Tests

View All
  • JEE
  • intermediate
  • 3 hours
  • chemistry, mathematics, physics

A comprehensive JEE Advanced 2022 Paper 1 designed to help aspirants understand the examination pattern, difficulty level, and question trends of JEE Advanced. This paper covers important concepts from Physics, Chemistry, and Mathematics, featuring a balanced mix of conceptual, numerical, and advanced application-based questions. It helps students strengthen conceptual understanding, enhance analytical and problem-solving skills, and improve speed and accuracy. Ideal for practice, revision, self-assessment, previous year trend analysis, concept reinforcement, and time management, this paper is a valuable resource for effective JEE Advanced preparation.

  • JEE
  • intermediate
  • 3 hours
  • chemistry, mathematics, physics
  • Proctored

A comprehensive JEE Advanced 2022 Paper 2 designed to help aspirants understand the examination pattern, difficulty level, and question trends of JEE Advanced. This paper covers important concepts from Physics, Chemistry, and Mathematics, featuring a balanced mix of conceptual, numerical, and advanced application-based questions. It helps students strengthen conceptual understanding, enhance analytical and problem-solving skills, and improve speed and accuracy. Ideal for practice, revision, self-assessment, previous year trend analysis, concept reinforcement, and time management, this paper is a valuable resource for effective JEE Advanced preparation.

Ask AI Tutor
5 left
Q1 View Question & Options
AI Tutor is solving this question...
Reading question context & options...
Ask your own doubt or choose a quick prompt: