So let's say I have a set of items:
['a', 'b', 'c', 'd', 'e']
and I want to generate a random set (order does not matter) from those choices:
['a', 'e', 'd', 'c']
which is child's play, but instead of it being unlikely to generate a uniform result:
['c', 'c', 'c', 'c']
compared to something less uniform like:
['a', 'b', 'e', 'd']
I want to make it equally likely that a uniform set can be generated as it is likely that a non-uniform set can be generated.
Edit:
The result I'm trying to express is not just ['c', 'c', 'c', 'c', 'c', 'c']
or ['d', 'd', 'd', 'd', 'd', 'd']
but also the areas in between those uniformities like ['c', 'c', 'c', 'c', 'c', 'a']
or ['d', 'd', 'd', 'd', 'd', 'b']
or ['c', 'c', 'c', 'c', 'b', 'a']
. Making all of those uniform sets and the areas in-between equally likely as non-uniform results is what I find challenging to create. I'm at a loss for where to even begin creating a set generator that does that.
Further clarification:
So if I generate a set of 1000 items, I want it to be equally likely that the set is 90% uniform or 100% uniform or 80% uniform or 20% uniform.
How can/should this be done?