View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Tushar Mehta Tushar Mehta is offline
external usenet poster
 
Posts: 126
Default Calculate the Number of Subsets

Take a look at the code for generating the power set. You will have to
adapt it to either not generate sets containing only 1 element or
generate all sets and then throw away those sets.

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Multi-disciplinary business expertise
+ Technology skills
= Optimal solution to your business problem
Recipient Microsoft MVP award 2000-2005

In article ,
says...
Thanks for the reply Tushar Mehta,

I will try to Explain it a bit Clearer.
Lets take our First 6 Number Combination in the Wheel of 1,3,7,12,15,16.
Now if we take the First 5 Numbers 1,3,7,12,15.
There is 1 Combination of 5 Numbers from 5, it is as Follows :-
Combination 1 = 1,3,7,12,15

There are 5 Combinations of 4 Numbers from 5, they are as Follows :-
Combination 1 = 1,3,7,12
Combination 2 = 1,3,7,15
Combination 3 = 1,3,12,15
Combination 4 = 1,7,12,15
Combination 5 = 3,7,12,15

There are 10 Combinations of 3 Numbers from 5, they are as Follows :-
Combination 1 = 1,3,7
Combination 2 = 1,3,12
Combination 3 = 1,3,15
Combination 4 = 1,7,12
Combination 5 = 1,7,15
Combination 6 = 1,12,15
Combination 7 = 3,7,12
Combination 8 = 3,7,15
Combination 9 = 3,12,15
Combination 10 = 7,12,15

There are 10 Combinations of 2 Numbers from 5, they are as Follows :-
Combination 1 = 1,3
Combination 2 = 1,7
Combination 3 = 1,12
Combination 4 = 1,15
Combination 5 = 3,7
Combination 6 = 3,12
Combination 7 = 3,15
Combination 8 = 7,12
Combination 9 = 7,15
Combination 10 = 12,15

Now this Needs to be Repeated with the Remaining 5 Combinations of 5
Numbers from 6 in Our First Combination in the Wheel :-
Combination 1 = 1,3,7,12,15 ( Already Produced Above )
Combination 2 = 1,3,7,12,16
Combination 3 = 1,3,7,15,16
Combination 4 = 1,3,12,15,16
Combination 5 = 1,7,12,15,16
Combination 6 = 3,7,12,15,16

Then the Whole of the Above Needs to be Repeated for the Remaining 14
Combinations in this Particular Wheel ( Other Wheels Might be Smaller or