Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Wellll I admit it was chosen for dramatic effect, but it's an apt analogy. Knowing who you want and who you don't is kind of the whole question. How about the quicksort analogy: it's simply "pick a good pivot, then sort greater and lesser on either side, and recurse." Um, yes, but how do you pick a good pivot?
Maybe this question should be closed because it inspires such aggressive ignorance. I'm not inventing mathematical modeling for fun--the point is that you are not solving the problem to specification. "Pseudorandom" doesn't mean "ignores my constraints", or "admits a trivial and wrong solution".
You didn't read the question properly. Maybe the picture of croissants distracted you? The number of croissants bought by people will diffuse away from each other with this algorithm. Also, it is not unreasonable to worry about scaling to 50 when you ask a question for which factorial complexity answers could be proposed.
@RobertHarvey - If you exclude the social engineering solutions, that is also true here. There are really only two classes of solution here (as far as I know): biased lotteries and random streams with filters. Within each of these solutions, there are very few that aren't absurdly over-complicated given the tools that programmers commonly have in hand. There are lots of solutions that don't work, but not so many that meet the three stated criteria.
@Sklivvz - And the key to a good life is "don't do things that lead to a bad life". It's extremely simple. Or maybe having a magic filter is not an actual solution. (Don't forget e.g.--"Generally speaking, everyone should buy croissants as many times as the others".)
@RobertHarvey - Does that mean that sorting questions are off-topic because there are exponentially many possible O(n log n) sorting algorithms in the length of the list? I don't think it matters if theoretically there are a large number of possible algorithms; Kolmogorov complexity is going to sink almost all of those as unworkable. A much more telling criticism is that this problem can be equally well solved by a "business method"--Stack Overflow is not for social solutions to technical problems. (Those should go on e.g. Workplace.)
Minimal understanding was definitely on the short end. Too many possible answers was not really true, since most of the answers, including the top rated ones, didn't actually meet the OP's criteria. What is the policy with regard to questions that receive highly-voted answers which don't fully/properly answer the question?
@Sklivvz - It doesn't follow in every case, but in this case there were a bunch of answers that failed to do what the OP asked for, probably because the underlying problem--of having both randomness and fairness is not actually straightforward. HevyLight's 6th top rated answer is the first that answers the question, and he admits that it has a sizable defect--that you can't control the degree of randomness--which to fix is "complicated" and best attempted by someone "well-versed in probability theory". I think the issue is that the problem is too cutesy for people to use their heads!
The "super simple" question has very few correct answers. Almost all fail to meet the requirements without obvious ways to fix them (that don't create yet more edge cases). The top five answers have essentially no randomness beyond perhaps putting names on in the list unsorted. You can't claim it's trivial if most everyone gets it wrong! (It may be a bad question, but not because it's easy or obvious.)