A subset of { 1 , 2 , … , 1 2 } is said to be selfish if it contains its size as an element. How many subsets of { 1 , 2 , … 1 2 } have the property that both the subset and its complement is selfish?
Details and assumptions
As an explicit example, the set { 3 , 6 , 9 } is selfish because it contains 3 elements, and contains the element 3.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Nice solution!
However you should be careful to check whether your writing conveys what you're trying to say. Your first paragraph doesn't make sense [at least to me] and I had to read it a couple of times to get what you were meaning to say. There aren't 1 2 combinations of possible subsets and their complements. They are 4 0 9 6 combinations.
Perhaps you meant to say, we have 1 2 types of subsets and their complements based on the number of elements in them [from the question it is clear that the subsets have to be non-empty].
Your generalization attempt has a typo as Jung Min Lee has pointed out.
Log in to reply
I shouldn't have used that term combination actually... I meant it like what English dictionaries say, not combinatorics glossary ;)... I wanted to express types by the word combination as you pointed out... :)
And I was prepared for it... I can't write a solution without at least one typo... -_-
EDIT: The first parts of the generalized expressions should be like this... i = 1 ∑ n − 1 ( i − 1 n − 2 )
The n on the ∑ should be n-1. Nice attempt!
If you put i=n in n − 2 C i − 1 , this value doesn't exist..
good job (y)
Wow, nice solution
u hv my vote, entertaining sol :D
First, note the size cannot be 0 or 12, since 0 is not in the set.
Let the size of the subset be n . Then, n must be in the subset, and 1 2 − n cannot be in the subset. Then, we must take n − 1 more numbers to put into the subset, of the 10 remaining numbers. There are ( n − 1 1 0 ) ways to do this. As n ranges from 1 to 11, there are ( 0 1 0 ) + ( 1 1 0 ) + ⋯ + ( 1 0 1 0 ) = 2 1 0 = 1 0 2 4 ways to pick a subset. However, notice that n cannot be 6, as then 6 is both in the subset and its complement. Then, the answer is 1 0 2 4 − ( 5 1 0 ) = 1 0 2 4 − 2 5 2 = 7 7 2
Motivation: I tried to casework initially, and realized how I could make subsets from the size.
Generalization:
If n is even, there are 2 n − 2 − ( 2 n − 2 n − 2 ) If n is odd, there are 2 n − 2
Notice that for the conditions of the question to be satisfied, the subset just needs to have the number of its size and not the number of the size of its complement. An example would be: The subset of size 3 must have the number 3 in it but not the number 1 2 − 3 = 9 which is the size of the complement set.
Hence, leaving the 2 numbers aside (the elements of the sizes of the subset and its complement), there will be 1 0 other numbers which can be freely manipulated and put into either of the 2 sets. Note that when subset has size 1 , it must and only have 1 in it. Thus, there is only 1 way to do so. For subset of size 2 , there must be the element 2 and another element not 1 0 . Thus, there are ( 1 1 0 ) ways to choose the other element. For subset of size 3 , there will be ( 2 1 0 ) ways. And so on.
BUT note that there cannot be a subset of size 6 as its complement will also be of a size 6 . --- There is only 1 element 6 in the set of { 1 , 2 , . . . , 1 2 }.
As such the answer is:
2 × ( ( 0 1 0 ) + ( 1 1 0 ) + ( 2 1 0 ) + ( 3 1 0 ) + ( 4 1 0 ) ) = 7 7 2
We provide a constructive method of counting the number of subsets such that it and its complement are both selfish.
First off, the empty set is not selfish, because it does not contain the element 0 in it. The complement of the subset { 1 , 2 , 3 , . . . , 1 1 , 1 2 } is not selfish because it is the empty set.
Now, for ∀ k ∈ Z + , 1 ≤ k ≤ 1 1 , we consider the subset with size k , and the complement of that subset with size 1 2 − k .
We must have k in the subset with size k , and 1 2 − k in the subset with size 1 2 − k . The problem boils down to how many ways we can choose the remaining k − 1 elements in the former subset, as the rest will be fixed in the complement. How many ways can we do this? Well, we have already eliminated k and 1 2 − k from the elements we can choose, so there are 1 2 − 2 = 1 0 elements left. Thus, there are ( k − 1 1 0 ) ways to construct a subset with size k . For 1 ≤ k ≤ 1 1 , we have the sum ( 0 1 0 ) + ( 1 1 0 ) + . . . + ( 1 0 1 0 )
We can use the identity that ( 0 n ) + ( 1 n ) + . . . + ( n n ) = 2 n to find that this sum is 1 0 2 4 . But wait, this is greater than 9 9 9 , so what went wrong?
As it turns out, we missed that if k = 6 , then the construction is impossible, as the subset and the complement can't both have a 6 in it, so to get our final answer we must do 1 0 2 4 − ( 5 1 0 ) = 7 7 2
Same method here .... well done
yay for david
Let n be the size of a subset S of { 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 1 0 , 1 1 , 1 2 } . Clearly, 1 ≤ n ≤ 1 2 . By symmetry, we are able to consider only 1 ≤ n ≤ 6 and multiply by 2 afterwards. If n = 6 , then 6 must be in S and 1 2 − 6 = 6 must also be in S ′ , the compliment of S , a contradiction. Hence, 1 ≤ n ≤ 5 . If n ∈ S and 1 2 − n ∈ S ′ , then there are 1 0 other numbers left. n − 1 will be chosen to go into S and the rest will go in S ′ , so there are ( n − 1 1 0 ) ways for each n . This leads to a total of
2 ( ( 0 1 0 ) + ( 1 1 0 ) + ( 2 1 0 ) + ( 3 1 0 ) + ( 4 1 0 ) ) = 2 1 0 − ( 5 1 0 ) = 7 7 2
combinations.
Can you explain why symmetry allows you to not consider the n = 1 2 case?
Log in to reply
I think it should initially be N is between 0 and 12, inclusive.
You cannot have 0 because if N = 0, you will get a null set and null sets are not selfish then by the symmetry you are unable to take N = 12 as well.
This is because ( n 1 0 ) = ( 1 0 − n 1 0 ) . Thus, by symmetry, ( 1 1 0 ) = ( 9 1 0 ) . And so on. Thus, we can just multiply by 2 to get our final answer.
A subset of size 0, or the empty subset, does not contain 0, and so is not selfish. If a subset of size 6 is selfish, then its complement does not contain 6 and so is not selfish. Let S denotes a subset of size k, where 1 <= k <= 11 and k <> 6. If S and its complement are selfish, then k in S and 12-k not in S, and so there are 10C(k-1) such subsets. Summing for all possible k's, the answer is 10C0+10C1+10C2+...+10C5+10C7+10C8+...+10C10 = 10C0+10C1+...+10C10-10C6 = 2^10-10 9 8 7 6/(5 4 3*2) = 772.
A selfish subset will have the number of elements as one of its elements.
So the number of selfish subsets whose complement is also selfish = ( 0 1 0 ) + ( 1 1 0 ) + ( 2 1 0 ) + ( 3 1 0 ) + ( 4 1 0 ) + ( 5 1 0 ) + ( 7 1 0 ) + ( 8 1 0 ) + ( 9 1 0 ) + ( 1 0 1 0 ) = 7 7 2 .
Let A a subset of S={1,2,...,12}. Let |A| the size of A then let B=S/A so |B| =12- |A| . Like 12 = 6+6 then |A| = |B| =6 so we don't have selfish subesets for this order. For |A| =a, we have ( a − 1 1 0 ) subset with the propriety required.
For example if |A| =4 we have |B| =8 so A ={4, a 1 , a 2 , a 3 } , a i in S/{4,8} we must remove 4 in order to have |A| =4 and 8 in order to have B a selfish subset. So we can choose a i in ( 3 1 0 ) ways. We can generalize (demonstrate) this case to any |A| =a with a=1,2,,,12 and a dinsint to 6.
So we have ∑ a = 1 1 1 ( a − 1 1 0 ) - ( 5 1 0 ) = 2 1 0 -252 = 7 7 2
For ex lets take first set containing 5, which then must contain 4 numbers, its complement will have 7 numbers, so its obvious that this set must have 7 in it. So now for the first set, it can have any 4 numbers except 5 and 7, so number of selection of 4 numbers except 5 and 7 from remaining 10 numbers, which is 10C4, do this for every case from 1,2,3,4,5,7,8,9,10 and 11. Remember we cannot consider set of 6, as its complement set wont have 6 so it can never satisfy given condition for any combination.
Problem Loading...
Note Loading...
Set Loading...
1 2 = 1 + 1 1 = 2 + 1 0 = 3 + 9 = 4 + 8 = 5 + 7 = 6 + 6 and vice-versa... Hence, we have 6 × 2 = 1 2 possible combinations of a subset and it's complement...
In order to a set be selfish, when the set has i elements, it must have the number i in it... So, we proceed by checking 1 2 cases...
We start with one element set... It must have the number 1 , hence it can't be rearranged in any other way... Next we work with two element set... It must have the number 2 in it, and the other element can be chosen from the remaining 1 1 numbers in ( 1 1 1 ) ways... Same way, the three element set must have the number 3 in it, and the other two can be chosen from the remaining 11 in ( 2 1 1 ) ways... And so on till the 1 1 element set...
But wait... The question says that the complement must be selfish too... So, when we are working with the i element set, the number ( 1 2 − i ) must not be in that set i.e. the number ( 1 2 − i ) should be in the complement of that set... Thus that leaves 1 0 possible choices for that set... So, when working with the one element set, we simply have the set ( 1 ) and the complement is ( 2 , 3 , . . . , 1 1 , 1 2 ) ... For two element set, we have the number 2 and exactly ( 1 1 0 ) ways to choose the second one... For three element set, we have the number 3 and exactly ( 2 1 0 ) ways to choose the other two... And so on...
Hence, the total becomes: n = 0 ∑ 1 0 ( n 1 0 ) = 1 0 2 4
Well, here's where the brilliant answer limitation comes in handy... As I'm too lazy to spend time after a time, if it were not on brilliant, I would have posted the answer as 1 0 2 4 :p... As 1 0 2 4 > 9 9 9 , I realized that there's something I'm missing... The mistake was to consider the subset and complement pair each with 6 elements... If the number i is in the subset, the number ( 1 2 − i ) can't be in that set, and ( 1 2 − i ) should be in the complement set, as we concluded... In this case, the subset has 6 elements, hence it must have the number 6 in it... But ( 1 2 − 6 ) = 6 and so, the complement must also have the number 6 in it, which is not possible, hence we should omit this case...
The answer becomes: ( n = 0 ∑ 1 0 ( n 1 0 ) ) − ( 5 1 0 ) = 1 0 2 4 − 2 5 2 = 7 7 2
Well, I tried to generalize the problem for ( 1 , 2 , 3 , . . . , n ) set with n elements...
If n is even, then the number of subsets such that both the subset and it's complement are selfish is: ( i = 1 ∑ n ( i − 1 n − 2 ) ) − ( 2 n − 2 n − 2 )
If n is odd, then it's simply: i = 1 ∑ n ( i − 1 n − 2 )
Please lemme know if anything is wrong with the generalization... I ain't quite sure... :-)