Wikipedia:Reference desk/Archives/Mathematics/2019 September 12

= September 12 =

Problem from splitting pills
I was thinking about how to split my pills and have a question, though in a different form.

Both East and West Flarg are ruled by dictators and each have 10 married couples (each couple shares the last name, no couples share a last name) as political prisoners. Both dictators kill one political prisoner a day. Each dictator is overthrown on the morning of Day 11 (so 10 prisoners have been killed).
 * In East Flarg, the dictator gets a list of all of the remaining prisoners and has one killed at random.
 * In West Flarg, the dictator gets a list of all of the remaining last names and selects a last name and then a prisoner with that last name is killed.
 * What is the probability in each country that 5 married couples remain? (which is the same as the probability that 5 couples are killed).
 * What is the probability in each country that 10 widow(er)s survive. (that one member of each couple is killed.)

This came out of the question as to whether it made sense to simply pick a pill regardless of whether it had been split or not and if it hadn't split the pill and take a half and put the other back.02:20, 12 September 2019 (UTC)


 * Only addressing the pill Q, it makes most sense to take the split pills as soon as possible, since split pills lose their protective coating, and will quickly degrade from handling, moisture, etc. Also I assume you know that some pills aren't meant to be split. SinisterLefty (talk) 02:50, 12 September 2019 (UTC)
 * In this case, the script specifically says to split them, I get 15 to last 30 days. And I only do split 1 at a time.Naraht (talk) 04:21, 12 September 2019 (UTC)


 * The East Flag basically chooses 10 prisoners at random so the calculation is similar to computing the probabilities of poker hands. I get the number of ways of having i couples and j singles (widows/widowers) is Choose(10, i)⋅2j⋅Choose(10-i, j). For 5 married couples that's i=5, j=0 for a probability of 252/184756, and for 10 singles it's i=0, j=10 to get 1024/184756. West flag seems more difficult; there may not be an easy formula but it shouldn't be hard to do with a spreadsheet. Haven't tried it yet, but I'll give it a shot to see if any familiar pattern appears and let you know if one does. --RDBury (talk) 08:41, 12 September 2019 (UTC)
 * West Flarg widowers is essentially the birthday problem with as many birthdays as days in the year: when you pick the name for day n+1 it must not be one of the n previously-sampled days, so the probability of it happening is (10/10)*(9/10)*...(1/10) = 10!/10^10 ~ 0.00036. West Flarg couples looks less obvious. Tigraan Click here to contact me 09:07, 12 September 2019 (UTC)
 * That's what I got for West Flag widowers. For couples using a spreadsheet I got 1.4%, no obvious formula though. --RDBury (talk) 09:19, 12 September 2019 (UTC)
 * I get the same value with a "solution" in Python: (computing the probability density function for the problem)
 * It's fast enough to look for trends with some parameter modifications, but I would assume the problem has a real (math-y) solution. Tigraan Click here to contact me 09:36, 12 September 2019 (UTC)
 * It's fast enough to look for trends with some parameter modifications, but I would assume the problem has a real (math-y) solution. Tigraan Click here to contact me 09:36, 12 September 2019 (UTC)


 * Fun fact: The number of paths to get from (0, 0, 10) to (5, 0, 5) is 42, the 5th Catalan number, and this generalizes. I doubt that helps with computing probabilities though and the Python program is about as "mathy" as it gets. --RDBury (talk) 22:25, 12 September 2019 (UTC)
 * I'll try running it with parameters so that I can look at what happens with 10 couples, 8 couples, etc. At 2 couples, the chance of 1 couple surviving is 1/2 (50/50 whether the last name pulled the second day is the same as that for the first.Naraht (talk) 21:05, 13 September 2019 (UTC)

Continuous function sending every real number to itself or its opposite but neither even nor odd
Is there a continuous function $$f:\mathbb{R} \to \mathbb{R}$$ (from the reals to the reals) that is neither even nor odd but such that $$\forall x \in \mathbb{R} f(x) \in \{x,-x\}$$, or equivalently, $$\forall x \in \mathbb{R} |f(x)|=|x|$$? GeoffreyT2000 (talk) 15:13, 12 September 2019 (UTC)


 * No, such a function would contradict the intermediate value theorem. Ie, if it were positive at one point and negative at another, it would have to cross 0, contrary to your requirements.  –Deacon Vorbis (carbon &bull; videos) 16:45, 12 September 2019 (UTC)
 * So, then the only continuous functions sending every real number to itself or its opposite are x, -x, |x|, and -|x|, with the first two being odd and the last two being even, right? GeoffreyT2000 (talk) 17:08, 12 September 2019 (UTC)
 * Yes, that's right. –Deacon Vorbis (carbon &bull; videos) 17:17, 12 September 2019 (UTC)