Selecting at least one item — Aptitude Question
Selecting at least one item: In how many ways can one or more items be selected from 5 distinct items? Answer and worked solution on CodeKairo.
- Topic: Permutations & Combinations
- Section: Quantitative Aptitude
- Difficulty: Medium
- Time target: 60 seconds
Question
In how many ways can one or more items be selected from 5 distinct items?
Options
- 25
- 31
- 32
- 120
Show the answer and the worked solution
Correct answer: B. 31
Worked solution
- Each of the 5 items may be included or excluded: 2⁵ = 32 subsets.
- Exclude the empty selection: 32 − 1 = 31.
Answer: 31.
The idea
The number of non-empty subsets of n items is 2ⁿ − 1. Forgetting to subtract the empty set gives 32.
Shortcut. Write each selection as a 5-bit in/out string: they run from 00001 to 11111, which is 1 to 31 in binary, so there are 31 non-empty selections.
Common trap. "32" — counting all 2⁵ subsets and forgetting that one of them is the empty selection, which 'one or more' rules out.
All Permutations & Combinations questions · placement mock tests