News for hackers. Stuff that matters.
Re:Breaking Pills by joncrane on Friday September 20, 2019 @08:25AM (#21025865)
In real life, smaller particles tend to sink to the bottom of a container. So you're more likely to grab a whole pill as time goes by.
Re:Breaking Pills by epicwhaleburger on Friday September 20, 2019 @11:29AM (#21027776)
I wanted to get quarters out of a change jar and remembered exactly this. Just shook it around (lightly) until there were quarters at the top.
Re:Breaking Pills by Syzygies on Friday September 20, 2019 @02:51PM (#21029990)
Bingo. I read the code to be sure there wasn't a factor to model this. The answer should depend on the relative probability of choosing a whole pill or a half pill. The code assumes equal odds, with no state dependence on the remaining ratio.

I was startled by the formula, though. It's the same as the Gilbert-Shannon-Reeds model for card shuffling, where the probability of a card falling from each packet scales to the number of cards left in each packet. (I wrote the "seven shuffles" paper with Persi Diaconis.)

Re:Breaking Pills by tantalor on Friday September 20, 2019 @02:58PM (#21030053)
> The code assumes equal odds

This is stated explicitly in the problem: Each day you select a pill at random

Re:Breaking Pills by Syzygies on Friday September 20, 2019 @05:41PM (#21031601)
Clearly stating that the model is unrealistic doesn't make the model realistic.
Re:Breaking Pills by Smithalicious on Friday September 20, 2019 @04:01PM (#21030632)
On the other hand, you always put the half pills you create on top of the pills already in there, not in a random spot in the bottle.