# Feature request: all combinations of a list

hjbortol shared this idea 6 years ago
Under Consideration

Hi!

Would it be possible to implement a GeoGebra command to compute all combinations of size k of a list of size n? Something like:

Combinations[{a, b, c}, 2] -> {{a, b}, {a, c}, {b, c}}

Combinations[{a, b, c}, 1] -> {{a}, {b}, {c}}

This would be very useful! For instance, I'm trying to implement a simulation showing how sample size affects a statistics: https://www.geogebra.org/m/.... In this construction, I need to enumerate all combinations of a given size for a list of size 10. Since there is no such command in GeoGebra (yet), I've had to input the combinations by hand.

By the way, a command do enumerate all permutations of a list would be welcome too!

Thanks, Humberto.

Thanks, Humberto.

1

in fact this request is not new and I think is possible

meantime you can see this posts and this applett

saludos

1

hello again

you must think that list with 5000 elements freeze GG usually

1

Do you really need a dynamic command for this? I think what you have done with static lists is better (with some help from Python, or use CopyFreeObject[ ] from mathmagic's worksheet)

1

hello again

I thought that I could to handle combinations in the same way that fractals.

open the attached, select A2 and drag down the little right-down blue rectangle of cell

saludos