**Xi'an's Og » R**, and kindly contributed to R-bloggers)

**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 his blog:

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

R-bloggers.com offers

**daily e-mail updates**about R news and tutorials on topics such as: visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...