Q.

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 ______.            [2025]


Ans.

(762)

Let A “0” appear exactly twice, and B “1” appear exactly twice.

 AB“0” and “1” both appear exactly twice.

=C26(placing zero)·(1)·25=6×52×25=480  

For n(B)

Case 1: 1 at first place

Number of ways =C16(placing 1)·(1)·25=192  

Case 2: 2 at first place

Number of ways =C26(placing 1)·(1)·24 =6×52×24=240  

n(B)=240+192

For n(AB)

For n(AB)

=C26placing zero·(1)×C25placing 1·(1)×(1) 2 at rest places 1

=6×52×5×42=150

 n(AB)=n(A)+n(B)-n(AB)

=480+(192+240)-150=762