A set S has 7 elements. How many subsets having at most 5 elements does it have?
Number of subsets of S = n (P(S))
The number of 7 element subsets of S =1 (S itself). 6 elements subsets of S are obtained by removing 1 element in S and this can be done is 7 ways.
The number of 6 element subsets of S =7.
The number of subsets of S with at most 5 elements = 128-7-1 =120