Introduction
Selection-with-conditions problems में items को ऐसे चुनना होता है जहाँ limits दी होती हैं-जैसे “at least one”, “at most two”, “exactly three”, या mixed constraints। ये problems exams में बहुत आती हैं क्योंकि ये combination concepts और case-wise counting दोनों की समझ को test करती हैं।
यह pattern महत्वपूर्ण है क्योंकि verbal condition को clear cases में तोड़ना (या complementary counting का उपयोग करना) मुश्किल दिखने वाली selection problems को भी आसान बना देता है।
Pattern: Selection with Conditions (At least / At most)
Pattern
मुख्य विचार: condition को exact cases में बदलें या complement (Total - forbidden) का उपयोग करें। Unordered selections के लिए combinations (nCr) का उपयोग करें और valid cases को जोड़ दें।
Typical approaches:
- Direct case-splitting:Allowed values के लिए अलग-अलग combinations add करें। जैसे “at most 2” → 0 + 1 + 2 cases।
- Complementary counting:Total combinations निकालें और disallowed cases subtract करें-“at least one” के लिए उपयोगी।
- Mixed constraints:Required items पहले चुनें, फिर बाकी allowed pool से selections करें।
- Ordering not important:Selections के लिए nCr; अगर order matter करे तो nPr।
Step-by-Step Example
Question
8 distinct books में से at most 2 books कितने तरीकों से चुने जा सकते हैं?
Solution
-
Step 1: Condition को cases में बदलें।
“At most 2” का मतलब है: 0 books, 1 book या 2 books। हर case को अलग compute करेंगे और जोड़ेंगे। -
Step 2: हर case के लिए combination formula लगाएँ।
- Choose 0:
8C0 = 1 - Choose 1:
8C1 = 8 - Choose 2:
8C2 = 8×7 / 2 = 28
- Choose 0:
-
Step 3: Cases add करें।
Total = 1 + 8 + 28 = 37 -
Final Answer:
कुल 37 possible selections हैं। -
Quick Check:
8 items के total subsets = 28 = 256; size > 2 वाले subsets = 256 - 37 = 219 → at most-2 count का छोटा होना सहज है ✅
Quick Variations
1. At least one: Complement का उपयोग करें → Total - none. उदाहरण: n items से at least one = 2n - 1।
2. At most k: nC0 + nC1 + ... + nCk का sum।
3. Exactly r with restrictions: Required items पहले चुनें, फिर बाकी items में से combinations लें।
4. At least r: r से n तक sum करें या complement का उपयोग करें → Total - (0 से r-1 तक sum)।
Trick to Always Use
- Step 1 → Condition पढ़कर तय करें कि complement आसान है या direct cases।
- Step 2 → हर r के लिए combinations
nCr = n! / (r! (n - r)!)से निकालें और add करें। - Step 3 → Mixed constraints में पहले ज़रूरी items चुनें, फिर बाकी selections लें।
- Step 4 → Quick sanity check: result total possible selections (2n) या nCr से ≤ होना चाहिए।
Summary
Summary
Selection-with-conditions के मुख्य विचार:
- “At most k” →
nC0 + nC1 + ... + nCk। - “At least k” →
nCk + ... + nCnया complement:2^n - (nC0 + ... + nC(k-1)). - “Exactly r with requirements” → Required items पहले चुनें, फिर बाकी combinations लें।
- हमेशा total subsets (2n) या nCr के साथ result को cross-check करें।
