> Again, I don't understand. You have 924 things, eliminate some of them,
> and end up with 1060 things? Eliminating elements should decrease
> the number, not increase it.
yes, u are right I had to types of lists:
one one them has 924 permutations and other has 792 making them 1722.
out of which
> Again, I don't understand. You have 924 things, eliminate some of them,
> and end up with 1060 things? Eliminating elements should decrease
> the number, not increase it.
yes, u are right I had to types of lists:
one one them has 924 permutations and other has 792 making them 1722.
out of which
Mir Nazim wrote:
> condition are there cannot be more than 3 consecutive 2's or 1's
>
>> If the task is to produce all distinct permutations of 6 occurrences
>> of 1 and 6 occurrences of 2, I suggest the program below. It needs
>> produces much fewer than 12! results (namely, 924).
>>
>
> Yes tha
Mir Nazim wrote:
> Paul Rubin wrote:
> > > 1060! / (1060 - 96)!
> >
>
> > More than you want to think about:
> >
> > import math
> >
> > def logf(n):
> > """return base-10 logarithm of (n factorial)"""
> > f = 0.0
> > for x in xrange(1,n+1):
> > f += mat
Paul Rubin wrote:
> > 1060! / (1060 - 96)!
>
> More than you want to think about:
>
> import math
>
> def logf(n):
> """return base-10 logarithm of (n factorial)"""
> f = 0.0
> for x in xrange(1,n+1):
> f += math.log(x, 10)
> return f
>
> pr
"Mir Nazim" <[EMAIL PROTECTED]> writes:
> Now I ahave a lits with 1060 lists in it. Now comes the hard part.
> How many possible distinct ways are there to arrange 1060 elements
> taken 96 at a time
>
> 1060! / (1060 - 96)!
More than you want to think about:
import math
def logf(n):
Martin v. Löwis wrote:
> Mir Nazim wrote:
> > Example Problem:
> >
> > Generate all possible permutations for
> > [1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2]
> >
> > [1, 2, 1, 2, 1, 2, 2, 2, 1, 2, 1, 2] (notice an extra 2 )
> >
> > eliminate some combinations based on some conditions and combine the
> >
Mir Nazim wrote:
> Example Problem:
>
> Generate all possible permutations for
> [1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2]
>
> [1, 2, 1, 2, 1, 2, 2, 2, 1, 2, 1, 2] (notice an extra 2 )
>
> eliminate some combinations based on some conditions and combine the
> rest of combinations. And now generate al
Hello,
I need to write scripts in which I need to generate all posible unique
combinations of an integer list. Lists are a minimum 12 elements in
size with very large number of possible combination(12!)
I hacked a few lines of code and tried a few things from Python
CookBook (http://aspn.activest