## Boots is deliberately overcharging for the morning-after pill!

Posted in Kids, pictures with tags , , , , on July 21, 2017 by xi'an

“Boots charges £28.25 for Levonelle emergency contraceptive (the leading brand) and £26.75 for its own generic version. Tesco now charges £13.50 for Levonelle and Superdrug £13.49 for a generic version. In France, the tablet costs £5.50.” The Guardian, July 20, 2017

## vendanges tardives

Posted in Kids, pictures, Wines with tags , , , , on July 20, 2017 by xi'an

## Midsummer dinner at Emmanuel College

Posted in Kids, pictures, Travel, University life, Wines with tags , , , , , , , , , on July 20, 2017 by xi'an

It just so happened that I was in Cambridge for the Midsummer dinner last Saturday at Emmanuel College and that a good friend, who happens to be a Fellow of that College, invited me to the dinner. Making the second dinner in a Cambridge college in a week, after the workshop dinner at Trinity. Except the one at Emmanuel was a much more formal affair, with dress requirement (!) and elaborate dishes. The wines were also exceptional, with a remarkable 2002 Chassagne-Montrachet.While the dinning room (or whatever it is called) is beautiful, it is also rather noisy and I could not engage in conversation with anyone but my immediate neighbours, but still managed to have a fairly interesting exchange with a biologist studying skuas on the Faroe Islands. The end of the meal was announced by a loud clap and Graces in Latin, followed by cheese and port (and a fabulous Sauternes!, not in the wine list) in an equally beautiful room, where it was easier to talk with my neighbours. All in all, a unique evening and opportunity for a glimpse into College traditions! [And a first wine post for the 20th of the month!!]

## Le Monde puzzle [#1016]

Posted in Books, Kids with tags , , , on July 16, 2017 by xi'an

An even more straightforward Le Monde mathematical puzzle that took a few minutes to code in the train to Cambridge:

1. Breaking {1,…,8} into two sets of four integrals, what is (or are) the division into two groups of equal size such that the sums of the squared terms from each are equal? Same question for the set {21,…,28}.
2.  Considering the integers from 1 to 12, how many divisions into two groups of size six satisfy the above property? Same question when the two groups are of different sizes.

The first code is

nop=TRUE
while (nop){
s=sample(1:8)
nop=(sum(s[1:4]^2)!=sum(s[5:8]^2))}


with result

1 6 4 7

while the second set leads to the unique [drifted] solution (up to symmetries)

21 24 26 27


and the divisions for the larger set {1,…,12} is unique in the equal case, and are four in the unequal case.

## and it only gets worse…

Posted in Kids, pictures with tags , , , , , , , , , , , , , on July 14, 2017 by xi'an

“Medicaid pays for most of the 1.4 million people in nursing homes (…) With more than 70 million people enrolled in Medicaid, the program certainly faces long-term financial challenges. Certainly, nursing homes would be part of those cuts, not only in reimbursement rates but in reductions in eligibility for nursing home care.” NYT, June 14, 2017

“…the architects of the Trump contraceptive reversal, Ms. Talento, a White House domestic policy aide, and Mr. Bowman, a top lawyer at the Department of Health and Human Services, have the experience and know-how that others in the administration lack. As a lawyer at the Alliance Defending Freedom, Mr. Bowman assailed the contraceptive coverage mandate on behalf of colleges, universities and nonprofit groups that had religious objections to the rule. Ms. Talento, a former aide to Senator Thom Tillis, Republican of North Carolina, spent years warning about the health risks of birth control pills.” NYT, July 11, 2017

“Mr. Trump’s revised executive order, issued in March, limited travel from six mostly Muslim countries for 90 days and suspended the nation’s refugee program for 120 days. The time was needed, the order said, to address gaps in the government’s screening and vetting procedures. Two federal appeals courts have blocked critical parts of the order. The administration had asked that the the lower-court ruling be stayed while the case moves forward. The court granted part of that request in its unsigned opinion. NYT, June 24, 2017

The proposed legislation, which Planned Parenthood labels “the worst bill for women’s health in a generation,” would strip the organization of federal funding for one year and bar any federal tax credits from being used to help buy private health plans that cover abortions.” NYT, June 23, 2017

## easy riddle

Posted in Books, Kids, R with tags , , , , , on July 12, 2017 by xi'an

From the current Riddler, a problem that only requires a few lines of code and a few seconds of reasoning. Or not.

N households each stole the earnings from one of the (N-1) other households, one at a time. What is the probability that a given household is not burglarised? And what are the expected final earnings of each household in the list, assuming they all start with \$1?

The first question is close to Feller’s enveloppe problem in that

$\left(1-\frac{1}{N-1}\right)^{N-1}$

is close to exp(-1) for N large. The second question can easily be solved by an R code like

N=1e3;M=1e6
fina=rep(1,N)
for (v in 1:M){
ordre=sample(1:N)
vole=sample(1:N,N,rep=TRUE)
while (min(abs(vole-(1:N)))==0)
vole[abs(vole-(1:N))==0]=sample(1:N,
sum(vole-(1:N)==0))
cash=rep(1,N)
for (t in 1:N){
cash[ordre[t]]=cash[ordre[t]]+cash[vole[t]];cash[vole[t]]=0}
fina=fina+cash[ordre]}


which returns a pretty regular exponential-like curve, although I cannot figure the exact curve beyond the third burglary. The published solution gives the curve

${\frac{N-2}{N-1}}^{999}\times 2+{\frac{1}{N-1}}^{t-1}\times{\frac{N-1}{N}}^{N-t}\times\frac{N}{N-1}$

corresponding to the probability of never being robbed (and getting on average an extra unit from the robbery) and of being robbed only before robbing someone else (with average wealth N/(N-1)).

## Le Monde puzzle [#1015]

Posted in Books, Kids with tags , , , on July 10, 2017 by xi'an

A combinatoric Le Monde mathematical puzzle:

A game with N questions and N players is such that each question is solved by all players but three, while any pair of players fails to jointly solve the N questions. What is the maximal number N of players?

N=6;play=1;besz=1
while ((besz>0)||(play<N)){
gamz=matrix(1,N,N)
for (qez in 1:N) gamz[qez,sample(1:N,3)]=0
besz=0;play=1
while ((play<N)&(besz==0)){
besz=max(apply(as.matrix(gamz[,play]+
gamz[,(play+1):N],ncol=N-play),2,prod))
play=play+1}
}


The output of that code is N=7 in that N=8 does not escape the while loop. (Since there are 3N zeros to distribute in the NxN matrix, either all columns contain 3 zeros or one contains only two, in which case it can only share zeros with 2×2=4 other columns, which makes it impossible. When a column holds three zeros, it can share zeros with 3×2=6 other columns, which brings us back to N=7 as the highest possible case.)

A second game with M>N players and questions sees each question solved by all but four players. There is at least a pair of players jointly solving all questions. What is the minimal number M of players?

Given the simple update to the above R code

for (qez in 1:N) gamz[qez,sample(1:N,5)]=0


running the R code leads to suggest N=11, as the first instance when the loop does not exit. (The above logical argument does not run so well since having four zeros per column should allow for at most 4×3=12 other columns sharing zeros with that column, which leads to 14 as an upper bound for the answer, not 11!) However, the published solution is 14, which shows the limitation of this R code…