**Xi'an's Og » R**, 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**n easily phrased (and solved?) Le Monde mathematical puzzle that does not [really] require an R code:

The five triplets A,B,C,D,E are such that

and

Given that

find the five triplets.

**A**dding up both sets of equations shows everything solely depends upon E_{1}… So running an R code that checks for all possible values of E_{1} is a brute-force solution. However, one must first find what to check. Given that the sums of the triplets are of the form (16s,4s,s), the possible choices for E_{1} are necessarily restricted to

> S0=193+187+185+175 > ceiling(S0/16) [1] 47 > floor((S0+175)/16) [1] 57 > (47:57)*16-S0 #E1=S1-S0 [1] 12 28 44 60 76 92 108 124 140 156 172

**T**he first two values correspond to a second sum S_{2} equal to 188 and 192, respectively, which is incompatible with A_{1} being 193. Furthermore, the corresponding values for E_{2} and E_{3} are then given by

> S2==(49:57)*4 > E1=(49:57)*16-S0 > E2=S2-E1 > S3=S2/4 > S3-E2 [1] -103 -90 -77 -64 -51 -38 -25 -12 1

which excludes all values but E_{1}=172. No brute-force in the end…

Filed under: Books, Kids, R Tagged: Le Monde, mathematical puzzle, R, system of equations

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

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

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.