Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

20
  • 6
    The lack of understanding of the question from people such as you is a very good proof that the question is not trivial. Commented Jul 24, 2013 at 20:58
  • 5
    @Gilles Please, enlighten me. The actual choosing of a person could be accomplished in one line of ruby code: (people - people_on_vacation - [last_person_choosen]).sample. How is this "non trivial"? Everything else (actually generating the lists of people and people on vacation and storing them, and storing the person chosen last week) is external to the algorithm, and all impossible to comment on because he hasn't told us anything useful about how that data is made available.
    – user229044
    Commented Jul 24, 2013 at 21:03
  • 1
    +1 about it being unspecific. Indeed behind its crispy and tasty exterior, the constraints/conditions are not very well defined. Commented Jul 24, 2013 at 21:07
  • 2
    That algorithm meets the hard requirements, but has the defect that depending on chance a person may go a long time between bringing croissants, or conversely may have to bring croissants many times in quick succession. Also, there's at least one issue that wasn't mentioned in the question and that a good answer should have pointed out or accommodated: how do you tell someone who's absent one day that they have to bring croissants the next day? If you prepare the roster in advance, how do you accommodate unexpected absences? Commented Jul 24, 2013 at 21:08
  • @OldCheckmark Defining the constraints is part of the modeling work. The question has put forward some of them. Answers should further analyze the scenario and come up with a suitable model. Commented Jul 24, 2013 at 21:09
  • 7
    @Gilles You are reading a massive amount into this question that OP never asked. How do we tell the person who might be absent? How is that in any conceivable way related? You must be joking at this point. We should also adjust for salaries, right? Clearly the CEO should buy croissants 5 times more often as every body else. What about people with gluten intolerance? Have to model for them too, right? What about the guy who bikes to the office, I think he deserves 1.5x the croissants that the rest of the people get.
    – user229044
    Commented Jul 24, 2013 at 21:09
  • 1
    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.
    – Rex Kerr
    Commented Jul 24, 2013 at 21:09
  • 8
    @RexKerr No, I read the question, repeatedly. Just because you think there's a wonderful universe of mathematical modelling to apply to this staggeringly trivial problem doesn't mean the question has merit. He asked for a pseudo random selection. Full stop.
    – user229044
    Commented Jul 24, 2013 at 21:12
  • “Generally speaking, everyone should buy croissants as many times as the others”. It's right there in the question. Maybe you should read it? Social fairness is a completely different issue. Now you might choose to propose an algorithm that takes into account that some people should bring croissants more often than others. It's part of the design work that the question is calling for. Commented Jul 24, 2013 at 21:14
  • 4
    @Gilles "Pseudo-random". Right there, in the question. If you could stop playing the cheap "did you read the question" card for a minute, and accept that I really did, maybe you could say something worth while to defend your case.
    – user229044
    Commented Jul 24, 2013 at 21:19
  • 2
    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".
    – Rex Kerr
    Commented Jul 24, 2013 at 21:21
  • 4
    @Gilles not specifying the distribution does not mean "use a more complicated one than equal distribution". Like any other question, it can be made over-complicated by choosing. Unlike other questions, it has a trivial valid solution which is appropriate.
    – Sklivvz
    Commented Jul 25, 2013 at 7:47
  • 3
    @LanceRoberts I don't hate pictures, I hate off-topic irrelevancies in what is supposed to be reference-quality writing. Can you actually defend your position? Why in the world would that image belong in the post? Why do you think Stack Overflow "loses" because users have to go to Google to find a picture of croissants instead of a programming Q&A site?
    – user229044
    Commented Jul 25, 2013 at 23:33
  • 4
    @LanceRobers Do you not understand how utterly stupid that line of logic is? Should we also put pictures of servers in there, because it mentions servers? Should we slap some Harry Potter fan art in here? Guess a pic of marbles would be on-topic over here, right? Please don't mention reductio ad absurdum, as we've already hit it with croissants being "on topic" on a program Q&A site.
    – user229044
    Commented Jul 25, 2013 at 23:36
  • 3
    I agree with @Gilles, meager you haven't fully addressed the requirements of the OP's question and at worst, there should have been comments to request the OP edit the question to rephrase better not outright closing. The number of useful and relevant questions that I come across daily that had been closed after an answer was provided that saved me hours of needless searching elsewhere shows that the SO community are way too quick on the draw to close questions. The hot debate around this question is yet another example
    – Maks
    Commented Jul 26, 2013 at 0:24