# Le Monde puzzle [#952]

**R – Xi'an's Og**, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)

Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

**A** quite simple Le Monde mathematical puzzle again with Alice and Bob:

In a multiple choice questionnaire with 50 questions, Alice gets a scoressuch that Bob can guess how many correct (+5 points), incorrect (-1 point) and missing (0 point) Alice got when adding that Alice could not have gottens-2ors+2. What is Alice’s score?

**A** first point is that the overall score is s=5c-i with c+i≤50. Without further information, the possible results are all integers 0≤c≤50 such that c≥s/5 and 0≤i=s-5c≤50. Possible scores range from -50 to 250, but a quick R check shows that ten values are impossible

vales=rep(0,le=50+1+250) for (c in 0:50){ for (i in 0:(50-c))vales[5*c-i+50+1]=1}

which produces

> (1:length(vales))[vales==0]-50-1 [1] 231 236 237 241 242 243 246 247 248 249

Thus looking at the differences, there is only one case for which s-2 and s+2 are impossible values, namely s=239. This means c=48, i=1 since c=49 leads to an impossible i.

Filed under: Books, Kids, pictures, R, Statistics, Travel, University life Tagged: Alice and Bob, Le Monde, mathematical puzzle, R

**leave a comment**for the author, please follow the link and comment on their blog:

**R – Xi'an's Og**.

R-bloggers.com offers

**daily e-mail updates**about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.

Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.