Thread: Combinations
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Sam Wilson Sam Wilson is offline
external usenet poster
 
Posts: 523
Default Combinations

There are 2^200 combinations there, which is 1.6 * 10^60...

whatever you're going to do with the result set is going to cause problems
because of its size. Even if you compare 1000 of your results against a
number a second it's going to take 1.6 * 10^50 seconds, which is millions and
millions of years.

You'd have to limit the number of possible constituents of the sum, say 5
and have 5 loops in your code to work out all combinations of 5 or less
numbers.

Sam

"Boss" wrote:

Hi,

I have about 200 numbers in a column. I need to find all the possible
additions which are possible using those numbers. My final aim is to match
the answers with some other data.

I did a lot of search in google but failed. please help.

Thanks!
Boss