combinatorics - Algorithm to get all list from sorted set of combinations? -
lets have set of number s = {a,b,c,...,n} < b < c .... < n how many ways can sort combinations?
take small example:
if set {1,2,8} (so n = 3) can sort combination in ascending order this: 1,2,1+2,8,1+8,2+8,1+2+8 equal to: a,b,c,a+b,a+c,b+c,a+b+c if set of numbers 1,3,4 array equal to: a,b,a+b,c,a+c,b+c,a+b+c can see a+b greater or smaller sometimes.
so n = 3 theres follow possible combinations: {a,b,c,a+b,a+c,b+c,a+b+c} , {a,b,a+b,c,a+c,b+c,a+b+c} theres 2
is there algorithm can take out me combinations(dont brute force)? how many combinations in n, want know how many "combinations" can get, n = 3 2 n = 3 ???.
thanks.
Comments
Post a Comment