<p>Find the number of <i>n</i> digit numbers, which contain the digits 2 and 7, but not the digits 0, 1, 8, 9.</p>
Step-by-Step Solution
Key Concept: Use inclusion-exclusion principle: count all valid n-digit numbers using digits {2,3,4,5,6,7}, then subtract those missing digit 2, subtract those missing digit 7, and add back those missing both.
<p><strong>Step 1:</strong> Identify allowed digits: {2, 3, 4, 5, 6, 7} — 6 digits total (excluding 0, 1, 8, 9)</p><p><strong>Step 2:</strong> Let A = n-digit numbers containing digit 2, B = n-digit numbers containing digit 7. We need |A ∩ B|.</p><p><strong>Step 3:</strong> Use inclusion-exclusion: |A ∩ B| = (Total) − |A' ∪ B'| = (Total) − (|A'| + |B'| − |A' ∩ B'|)</p><p><strong>Step 4:</strong> Calculate each term:</p><ul><li>Total n-digit numbers using {2,3,4,5,6,7}: <strong>6^n</strong></li><li>Numbers without digit 2 (using {3,4,5,6,7}): <strong>5^n</strong></li><li>Numbers without digit 7 (using {2,3,4,5,6}): <strong>5^n</strong></li><li>Numbers without both 2 and 7 (using {3,4,5,6}): <strong>4^n</strong></li></ul><p><strong>Step 5:</strong> Apply formula: |A ∩ B| = 6^n − 5^n − 5^n + 4^n</p><p>∴ Answer: <strong>6^n − 2×5^n + 4^n</strong></p>
Correct Answer: 6^n - 2×5^n + 4^n