List of permutations and combinations of a list

hjbortol shared this idea 4 years ago
Under Consideration

Hi!


It would be nice to have a fast factory command to compute all k-combinations of a set S with size n. The BinomialCoefficient[n, k] computes the number of such k-combinations but, indeed, I would like to list all of them. For instance,


CombinationList[{1, 2, 3, 4, 5}, 4] would return { {2, 3, 4, 5}, {1, 3, 4, 5}, {1, 2, 4, 5}, {1, 2, 3, 5}, {1, 2, 3, 4}}.


Thanks, Humberto.

Comments (4)

photo
1

hello

in the meantime this can help you. I hope

http://forum.geogebra.org/v...


saludos

photo
1

This link is not working now, probably the address is changed.

photo
1

this link was in the old GeoGebra forum

I think is in https://help.geogebra.org/t...

photo
photo
1

Thanks, Mathmagic. I hope developers implement such commands soon. Using your algorithm, it is not possible to list combinations with n = 10 e p = 4 ...

© 2020 International GeoGebra Institute