0

Hi everyone! My problem basically boils down to this:

I have 71 items, and each item can be either on or off. I need to consider all the combinations (permutations?) and go through a 100 for loop for each of the 2^71 scenarios...on the scale of 10^23. Two questions:

```
1) My naive implementation is:
for(zero=0;one<2;one++){
item[0]=zero;
for(one=0;two<2;two++){
item[1]=one;
for(two=0;three<2;three++){
item[2]=two;
... all the way to
for(seventy=0;seventy<2;seventy++){
item[70]=seventy;
for(market=0;market<100;market++){
Computations here;
```

Is there a better way (faster way) to do this?

2) given the computation part is not too complicated and relatively fast (access several arrays, add stuff together, multiply by some constants) is this feasible to accomplish in a manageable amount of time? (a few hours on my laptop)?

Thanks for your help!