Quote:
List S = {1,2,4,5,7,8}What is the number of non-empty subsets of list S possible such that a subset does not contain two or more consecutive numbers?A. 77B. 48C. 32D. 27E. 26 How I tackled it:
Since subsets cannot contain 2 or more consecutive numbers so basically (1,2), (4,5), and (7,8) cannot be chosen together.
This further implies that subset cannot have more than 3 numbers as the moment we choose a 4th number, it becomes consecutive to one of the 3 numbers that was chosen previously.
For instance, we have already chosen 3 numbers, say (1, 4, 7). Now to add a 4th number to the set, we can either add 2, or 5, or 8. If we choose 2, it becomes consecutive with 1, if we choose 5, it becomes consecutive with 4, and if we choose 8, it becomes consecutive with 7. So, a subset with 4 numbers isn't possible. Using the same logic, subsets with 5 and 6 numbers also aren't possible.
So, only subsets with either 1, or 2, or 3 numbers are possible (null set isn't allowed as stated in the question).
Case 1:
Subset with 1 number = 6 numbers x 1 = 6 subsets.
Case 2:
Subset with 2 numbers without consecutive integers = 1st number can be chosen in 6 ways and 2nd number can be chosen in 4 ways (as choosing the 1st number eliminates that number as well as its consecutive partner number for further selection); but this contains ordering of elements, so we need to divide by 2! = 6 x 4 / 2! = 12 subsets.
[6 x 4 = 24 ways counts (1,4) and (4,1) as 2 separate cases, but both are the same subset, so we need to eliminate double counting]
OR
Subset with 2 numbers without consecutive integers = All possible choices of 2 number subsets - Subsets with only 2 consecutive integers = 6C2 - 3 x 2C2 = 15 - 3 = 12 subsets.
Case 3:
Subset with 3 numbers without consecutive integers = 1st number can be chosen in 6 ways, 2nd number in 4 ways (1st number's selection eliminates that number and its consecutive partner number for further selection), and 3rd number in 2 ways (2 numbers' selection eliminates those numbers and their consecutive partner numbers for further selection); but this contains ordering of elements, so we need to divide by 3! = 6 x 4 x 2 / 3! = 8 subsets.
[6 x 4 x 2 = 48 ways counts (1, 4, 7), (1, 7, 4), (4, 1, 7), (4, 7, 1), (7, 1, 4), and (7, 4, 1) as 6 separate cases, but all 6 are the same subset, so we need to eliminate repetitive counting]
OR
Subset with 3 numbers without consecutive integers = All possible choices of 3 number subsets - 3 number subsets with consecutive integers = 6C3 - Choosing 1 pair out of the 3 pairs of consecutive integers, and the 3rd number can be any number from the remaining 4 = 6C3 - 3C1 x 4 = 20 - 12 = 8 subsets.
Total subsets = Case 1 + Case 2 + Case 3 = 6 + 12 + 8 = 26 subsets.
Answer E.
For clarification, if the question didn't explicitly exclude the null set, we would have a Case 4 = no numbers chosen = 6C0 = 1 subset, and the total will become 27 subsets, making the answer D.