# Combinations without repetition

Hi people,

i´m trying to make a list of 4096 integers from 1 to 16 sorted in groups of 8, every group must to be different to the other and in every group the values must to be differents.

For example,
1,3,5,7,9,11,13,15 = 15,13,11,9,7,5,3,1
the order is irrelevant.

1,2,4,7,11,12,13,14,16.

any idea would be great, my maths over permutations and combinations are limited.

thanks

ari.

pd: it would be great to add a integer/float pin in the randomspread node, like in the random node.
i know in max/msp there is a couple of ways to do it.

like this?

edit: i guess this is what tonfilm meant anyway.

RandomCombine.v4p (12.4 kB)

I guess this one does what tonfilm suggested. It uses fewer nodes than @velcrome s approach, but I think there is a possibility of equal sets.
Would be nice to have a spectral version of EQ (Spreads Sets) with binsize :)

RandomCombine_2.v4p (4.4 kB)

Thanks Velcrome!
this is what i was looking for, i couldn´t do it with the Tonfilm hint,
anyway, thanks tonfilm ;)

only a question,
using this technique, every 8 elements groups are differents?
i mean the order and combinations.

Ari.

Thanks Bjoern,
your solution seems to be easier than the velcrome ones ;) and more understandable for me,

the velcrome´s solution makes all the groups differents if i understand…

How flag i 2 reply as a solution? ;)

@lasal: flag the first, then press the “Show full discussion” button that appeared between the posting and the first reply, then flag another solution.

my solution might produce collisions as well. flag björn ;)

Thanks people,

i´ll take care with the collisions ;)

This one has no repetitions and all possible combinations. You iterate through all possibilities counting in binaries …

Iterations.v4p (11.3 kB)

Thanks Eno,
Other elegant approach