Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I want to find all the different combinations of dividing 17 into 2 groups; the order does not matter; each group has to contain at least one item.

I know the formula is C(17,r)=17!/(r!*(17-r)!) and my r is one to eight so there's a lot! I hoping there is an easy way to do this. I have been trying to assign items into the two groups by using 1 and 0 - i.e. 01111111111111111, 10111111111111111, 11011111111111111, ... 00111111111111111, 01011111111111111, etc ...

share|improve this question
2  
Actually, there are $2^{16}=65536$ ways of diving a group of $17$ objects in $2$ groups, assuming that one accepts empty groups (otherwise, the answer is 65535). Is it practical to generate such a large number of groups in Excel? Does it suit some practical purpose? –  digital-Ink Sep 16 '12 at 9:48
    
Also, note that in MS Excel 2003 and earlier there are a maximum of 65,536 rows and 256 columns per worksheet, so you could arrive to some limitations when generating all the groups (assuming you put one group in the first column and the other group in another column + a header, you arrive to the maximum number of rows). –  digital-Ink Sep 16 '12 at 9:54
    
The tag is wrong. This question has nothing to do with group theory! –  Derek Holt Sep 16 '12 at 10:52
    
I don't know about Excel, but LibreOffice Calc has "=DECINBIN($x$,17)". Let $x$ run from 0 to 65535. –  Hagen von Eitzen Sep 16 '12 at 11:03
    
Excel has no direct function to present each partition. You may want to do this using another program and import the large result into Excel. –  Emmad Kareem Sep 16 '12 at 11:15

1 Answer 1

Well firstly there are 2^{17} subsets of the 17 objects (either an object is in or not in a subset). However 1 of these subsets contains no elements and another one contains all 17 of them (which would leave the other group having none). So these are discounted. So we are left with 2^{17}-2 ways of partitioning it. However we have double-counted as every subset we make has a complement that we count with this method but shouldn't count as the order of the 2 groups doesn't matter. therefore [2^{17}-2]/{2}=2^{16}-1 different combinations.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.