Question:
You have a prescription to take one half of a pill per day for 12 days, but the pharmacist?
xanzibar
2010-06-29 13:26:18 UTC
You have a prescription to take one half of a pill per day for 12 days, but the pharmacist (who is too busy to divide pills for you) gives you 6 whole pills in a bottle. On day 1, you remove a pill from the bottle, break it into two half-pills, take one, and return the other half-pill to the bottle. On all subsequent days you shake the bottle thoroughly and pour something out - whatever comes out first - either a half pill or a whole pill; if it's a half pill you take it and you're done for that day; if it's a whole pill, you split it into two half-pills, take one, and put the other back in the bottle, exactly like you did on day 1.

On day 12 there can be only one half pill left in the bottle, but on day 11 there are two possibilities: either there is one whole pill or there are two half-pills left in the bottle. What is the probability that there are two half-pills in the bottle on day 11?
Five answers:
Roberto
2010-06-30 09:08:32 UTC
I don't like/trust simulations, so I go with the maths...



Realise at the begining of the first day I have 6 pills, thats for sure, so:



day 1: P1( OOOOOO ) = 1



Note: Let PX(OODDD) be the probability of having two complete pills and three half pills ( O = one complete pill, D = one half pill ) the X day, where X = 1..12, so the above meant that the probability of having 6 complete pills the first day is 1.



The beginning of the second day for sure there is 5 complete pills and a half, so



day 2: P2( OOOOOD ) = 1



In day three the problem begins, there is two ways the bottle can be, depending on which pill I took the second day, so:



day 3: P3( OOOODD) = 5/6, because I should have to take any of the 5 complete pills, from the 6 that were in the bottle.

P3( OOOOO ) = 1/6, because I should have to take the only one half pill left the other day



day 4: P4( OOODDD ) = P3( OOOODD )*4/6 = 5/6*4/6 = 0.555..., because I had to get one of the four complete pills left the past day

P4( OOOOD ) = P3( OOOOO ) + P3(OOOODD)*2/6 = 1/6 + 5/6*2/6 = 0.444... , because if I left 5 complete pills in the third day for sure I will leave a half pill now, but if I left two half pills the third day I have to pick one of the two half pills I left.



day 5: P5( OODDDD ) = P4( OOODDD ) * 3/6 = 0.2777...

P5( OOODD ) = P4( OOODDD)*3/6 + P4 ( OOOOD )*4/5 = 0.63333....

P5( OOOO ) = P4( OOOOD )*1/5 = 0.0888888



day 6: P6( ODDDDD ) = P5( OODDDD ) * 2/6 = 0.0925925...

P6( OOOD ) = P5(OOODD)*2/5 + P5(OOOO) = 0.3422222...

P6( OODDD) = P5(OODDDD)*4/6 + P5( OOODD )*3/5 = 0.565185185....



day 7: P7( DDDDDD ) = P6(ODDDDD)*1/6 = 0.01543208

P7( OOO ) = P6(OOOD)*1/4 = 0.0855555...

P7( ODDDD ) = P6( ODDDDD)*5/6+P6(OODDD)*2/5 = 0.303234490666...

P7( OODD ) = P6(OOOD)*3/4+P(OODDD)*3/5 = 0.595777777....



day 8: P8( DDDDD ) = P7(DDDDDD)+P7(ODDDD)*1/5 = 0.076078978

P8( OOD ) = P7( OOO ) + P7( OODD )*1/2 = 0.38344444....

P8 ( ODDD ) = P7(ODDDD)*4/5 + P7(OODD)*1/2 = 0.5404764



day 9: P9( DDDD ) = P8(DDDDD) + P8(ODDD)*1/4 = 0.211198078

P9( ODD ) = P8(OOD)*2/3+ P8(ODDD)*3/4 = 0.660986929

P9(OO) = P8(OOD)*1/3 = 0.127814



day 10: P10( DDD ) = P9(DDDD ) + P9(ODD)*1/3 = 0.43144878

P10( OD ) = P9(OO)+P9(ODD)*2/3 = 0.56847195



day 11: P11( DD ) = P10(DDD) + P(OD)*1/2 = 0.7156885

P11(O) = P10(OD)*1/2 = 0.2842359



THEN the probability of having, in the eleventh day:

two half pills is 0.715688

one complete pill is 0.284235



(You may want to add the probabilities of each day to see that each one is 1, I did it, and it is ok)
MathMan TG
2010-06-29 18:08:48 UTC
Write a small "A" on one end of each pill, and a small "B" on the other end.



If you shake a whole pill out of the bottle, always use the "A" end first.



Then you can describe the sequence of half-pills with

a sequence of 6 A's and 6 B's, with a B last, and an A first.



The 10 other letters can occur in any order, as long as B's don't get ahead of A's.



Any formula will be a sum of sums of sums of ....



To get an idea of the "sum of sums" idea:



You can start on day 2 with any number of A's from 0 to 5.



5 A's: 1 way (all B's after that)

4 A's and a B: 5 places for the remaining A = 5 ways

then it gets more complicated because the A's have to stay ahead of the B's.

3 A's and a B: 14 of these

2 A's and a B: 28 of these

and so on ...



In general there are 10C5 = 252 sequences of 5 A's and 5 B's.

But about half of them are eliminated because the B's outnumber the A's

going from left to right at some point.



I generated all the 10-letter sequences by computer.



-- This is not a "simulation", but rather an enumeration of every possibility. ---



{

There are 132 of them, 90 ending in a B.

That makes the probability for having two half pills on day 11 = 90/132 = 15/22

and the probability of having one whole pill on day 11 = 42/132 = 7/22 --- this conclusion was erroneous, see below}



--- Original answer is above ---- Edit follows ----



I made the (implicit) assumption that all the sequences are equally likely, but they are not.



For example, on day 2, you have 5 whole pills and 1 half pill.

So while 90 of the 132 sequences have an "A" in the first of the ten positions,

that does not mean

that there is 15/22 chance that the overall sequence will be one of those.

It's 5/6 chance that you'll get a whole pill on day 2.



I redid my enumeration, this time including the probability of each of the 132 sequences.



The results equal the theoretical result of the quintic's answer (since deleted).



I include a few examples of the fractional expansions of the probabilities.



Probability on day 11:

of an "A": 0.284236 (whole pill)

of a "B": 0.715763 (two half pills)



Here are a few of the sequences and their associated probabilities:

1 AAAAABBBBB 0.0154320987654321

= 5/6 * 4/6 * 3/6 * 2/6 * 1/6 = 120/7776

2 AAAABABBBB 0.0154320987654321

3 AAAABBABBB 0.0154320987654321

4 AAAABBBABB 0.0154320987654321

5 AAAABBBBAB 0.0154320987654321

6 AAAABBBBBA 0.0154320987654321

7 AAABAABBBB 0.0148148148148148

= 5/6 * 4/6 * 3/6 * 4/6 * 2/5 * 1/5

8 AAABABABBB 0.0148148148148148

9 AAABABBABB 0.0148148148148148

10 AAABABBBAB 0.0148148148148148

11 AAABABBBBA 0.0148148148148148

12 AAABBAABBB 0.0138888888888889

13 AAABBABABB 0.0138888888888889

14 AAABBABBAB 0.0138888888888889

15 AAABBABBBA 0.0138888888888889

16 AAABBBAABB 0.0123456790123457

17 AAABBBABAB 0.0123456790123457

18 AAABBBABBA 0.0123456790123457

.....

119 BABAAAABBB 0.003125

120 BABAAABABB 0.003125

121 BABAAABBAB 0.003125

122 BABAAABBBA 0.003125

123 BABAABAABB 0.002777

124 BABAABABAB 0.002777

125 BABAABABBA 0.002777

126 BABAABBAAB 0.002083

127 BABAABBABA 0.002083

128 BABABAAABB 0.00185185

129 BABABAABAB 0.00185185

130 BABABAABBA 0.00185185

131 BABABABAAB 0.00138888

132 BABABABABA 0.00138888

= 1/6 * 5/5 * 1/5 * 4/4 * 1/4 * 3/3 * 1/3 * 2/2 * 1/2 * 1/1
Mugen is Strong
2010-06-30 07:26:34 UTC
P(2 half pills left)

= 81 / 122

= 0.6639344262



actually the limit of P(half-pills left) = 2/3, if we actually have unlimited supplies of pills.

consider the day when we are to take the 3rd last hp. there must be 2 possible arrangement in my bottle :

1) 3 hps, or

2) 1 complete pill + 1 hp.



but, in the 2nd case, we might take 1 hp OR we'd have to break the last cp, leaving a new hp for later. it is easily seen that 2 out of 3 (taking 1/3 of ready-made hps + breaking the last cp) will result in me getting a hp tomorrow.



number of ways to get the last 2 hps from n cps

= 3^(n-2)



total arrangement of n complete pill taking sequence, a_n

= 3 * a_(n-1) - 1 ; with a_1 = 1
marven
2016-12-14 11:20:14 UTC
One Half Tablet
2016-04-11 06:15:44 UTC
For the best answers, search on this site https://shorturl.im/awvQs



All of the foods from Wal Mart and most well known dog foods have either fillers, by-products, or artificial flavors, colors, and preservatives. Fillers such as corn, wheat, and soy have no nutritional value to them. It is all junk. By-products are the junk in meats. That aren't nutritious plus dead, dying, and cancerous animals are allowed. Artifiacial colors, flavors, and preservatives are cancer causing along with other health problems. Cancer is the number one killer of cats and dogs. You don't want any food that is from Wal Mart or the like. All of the foods there have one or all of these things. All the capitol words are the really bad things, there are also other bad things but I didn’t point them all out. Here is Purina adult complete nutrition- WHOLE GRAIN CORN, POULTY BY-PRODUCT MEAL, ANIMAL FAT preserved with mixed-tocopherols (form of Vitamin E), CORN GLUTEN MEAL, MEAT AND BONE MEAL, brewers rice, soybean meal, barley, whole grain wheat, animal digest, calcium carbonate, salt, calcium phosphate, potassium chloride, L-Lysine monohydrochloride, choline chloride, zinc sulfate, Vitamin E supplement, zinc proteinate, ferrous sulfate, ADDED COLOR (RED 40, YELLOW 5, BLUE 2, YELLOW 6), DL-Methionine, manganese sulfate, manganese proteinate, niacin, Vitamin A supplement, copper sulfate, calcium pantothenate, copper proteinate, garlic oil, pyridoxine hydrochloride, Vitamin B-12 supplement, thiamine mononitrate, Vitamin D-3 supplement, riboflavin supplement, calcium iodate, menadione sodium bisulfite complex (source of Vitamin K activity), folic acid, biotin, sodium selenite. Here is Eukanuba- Chicken, CHICKEN BY-PRODUCTS MEAL, CORN MEAL, GROUND WHOLE GRAIN SORGUM, Ground Whole Grain Barley, Fish Meal (source of fish oil), Chicken Fat (preserved with Mixed Tocopherols, a source of Vitamin E), Brewers Rice, Natural Chicken Flavor, Dried Beet Pulp (sugar removed), Dried Egg Product, Brewers Dried Yeast, Potassium Chloride, Salt, Vitamins [Vitamin E Supplement, Ascorbic Acid, Beta-Carotene, Vitamin A Acetate, Calcium Pantothenate, Biotin, Vitamin B12 Supplement, Thiamine Mononitrate (source of Vitamin B1), Niacin, Riboflavin Supplement (source of Vitamin B2), Inositol, Pyridoxine Hydrochloride (source of Vitamin B6), Vitamin D3 Supplement, Folic Acid], Flax Meal, Sodium Hexametaphosphate, Calcium Carbonate, Choline Chloride, Minerals [Ferrous Sulfate, Zinc Oxide, Manganese Sulfate, Copper Sulfate, Manganous Oxide, Potassium Iodide, Cobalt Carbonate], DL-Methionine, Rosemary Extract. Science Diet- GROUND WHOLE GRAIN CORN, CHICKEN BY-PRODUCT MEAL, Soybean Meal, ANIMAL FAT (preserved with mixed tocopherols and citric acid), Soybean Oil, Chicken Liver Flavor, Flaxseed, Iodized Salt, vitamins (L-Ascorbyl-2-Polyphosphate (source of vitamin C), Vitamin E Supplement, Niacin, Thiamine Mononitrate, Vitamin A Supplement, Calcium Pantothenate, Biotin, Vitamin B12 Supplement, Pyridoxine Hydrochloride, Riboflavin, Folic Acid, Vitamin D3 Supplement), Dried Chicken Cartilage, Choline Chloride, Vitamin E Supplement, Taurine, Potassium Chloride, minerals (Ferrous Sulfate, Zinc Oxide, Copper Sulfate, Manganous Oxide, Calcium Iodate, Sodium Selenite), L-Carnitine, preserved with Mixed Tocopherols and Citric Acid, Beta-Carotene, Rosemary Extract. Also foods to stay away from is- Fancy Feast, Alpo, Friskies, Mighty Dog, Dog Chow, Cat Chow, Puppy Chow, Kitten Chow, Beneful, Purina One, Purina ProPlan, DeliCat, HiPro, Kit’n’Kaboodle, Tender Vittles, Purina Veterinary Diets MeowMix, Gravy Train, Kibbles ’n Bits, Wagwells, 9Lives, Cycle, Skippy, Nature’s Recipe, and pet treats Milk Bone, Pup-Peroni, Snausages, Pounce Pedigree, Waltham’s, Cesar, Sheba, Temptations, Goodlife Recipe, Sensible Choice, Excel, Hills Prescription Diets, Nature’s Best, Diamond, Ol’Roy I recommend Innova California Natural Evo Blue Buffalo Taste of the wild Wellness Merrick Before grains Chicken soup for the dog lovers soul Health Wise Karma Orijen Here is Taste of the Wild-See if you can spot the difference. Bison, venison, lamb meal, chicken meal, egg product, sweet potatoes, peas, potatoes, canola oil, roasted bison, roasted venison, natural flavor, tomato pomace, ocean fish meal, choline chloride, dried chicory root, tomatoes, blueberries, raspberries, yucca schidigera extract, Enterococcus faecium, Lactobacillus casei, Lactobacillus acidophilus, Saccharomyces cerevesiae fermentation solubles, dried Aspergillus oryzae fermentation extract, vitamin E supplement, iron proteinate, zinc proteinate, copper proteinate, ferrous sulfate, zinc sulfate, copper sulfate, potassium iodide, thiamine mononitrate (vitamin B1), manganese proteinate, manganous oxide, ascorbic acid, vitamin A supplement, biotin, calcium pantothenate, manganese sulfate, sodium selenite, pyridoxine hydrochloride (vitamin B6), vitamin B12 supplement, riboflavin (vitamin B2), vitamin D supplement, folic acid.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...