arthham

JEE Advanced 2025 · Permutations and Combinations

Let SS be the set of all seven-digit numbers that can be formed using the digits 00, 11 and 22. For example, 22102222210222 is in SS, but 02102220210222 is NOT in SS. Then the number of elements xx in SS such that at least one of the digits 00 and 11 appears exactly twice in xx, is equal to ______.

Answer: 762762

Watch this solved on the board The full walkthrough, written out a line at a time with narration explaining each step as it appears. Pause anywhere and ask why a line is there. Free to watch

Or read the worked solution below. Jump to the steps ↓

Written solution

Given: seven-digit numbers using only the digits 0,1,2\text{Given: seven-digit numbers using only the digits } 0, 1, 2 leading digit ≠0\text{leading digit } \neq 0 To find: the number of x∈S with at least one of 0,1 appearing exactly twice\text{To find: the number of } x \in S \text{ with at least one of } 0, 1 \text{ appearing exactly twice} i.e. count x with 0 twice, or 1 twice, or both twice\text{i.e. count } x \text{ with } 0 \text{ twice, or } 1 \text{ twice, or both twice} A={x∈S:0 appears exactly twice},B={x∈S:1 appears exactly twice}A = \{ x \in S : 0 \text{ appears exactly twice} \}, \quad B = \{ x \in S : 1 \text{ appears exactly twice} \} ∣A∪B∣=∣A∣+∣B∣−∣A∩B∣|A \cup B| = |A| + |B| - |A \cap B| Total elements of S=2⋅36=1458\text{Total elements of } S = 2 \cdot 3^{6} = 1458 0 twice: choose 2 of the 6 non-leading positions (62)\text{0 twice: choose 2 of the 6 non-leading positions } \binom{6}{2} remaining 5 positions are 1 or 2: 25\text{remaining 5 positions are } 1 \text{ or } 2: \ 2^{5} ∣A∣=(62)⋅25=15⋅32=480|A| = \binom{6}{2} \cdot 2^{5} = 15 \cdot 32 = 480 Leading =1: (61)⋅25=6⋅32=192\text{Leading } = 1: \ \binom{6}{1} \cdot 2^{5} = 6 \cdot 32 = 192 Leading =2: (62)⋅24=15⋅16=240\text{Leading } = 2: \ \binom{6}{2} \cdot 2^{4} = 15 \cdot 16 = 240 ∣B∣=192+240=432|B| = 192 + 240 = 432 Leading =1: (61)⋅(52)=6⋅10=60\text{Leading } = 1: \ \binom{6}{1} \cdot \binom{5}{2} = 6 \cdot 10 = 60 Leading =2: (62)⋅(42)=15⋅6=90\text{Leading } = 2: \ \binom{6}{2} \cdot \binom{4}{2} = 15 \cdot 6 = 90 ∣A∩B∣=60+90=150|A \cap B| = 60 + 90 = 150 ∣A∪B∣=480+432−150=762|A \cup B| = 480 + 432 - 150 = 762 762\boxed{762}

More from Permutations and Combinations

All 21 Permutations and Combinations questions →