Le Monde puzzle [#1002]

April 3, 2017

(This article was first published on R – Xi'an's Og, and kindly contributed to R-bloggers)

For once and only because it is part of this competition, a geometric Le Monde mathematical puzzle:

Given both diagonals of lengths p=105 and q=116, what is the parallelogram with the largest area? and when the perimeter is furthermore constrained to be L=290?

This made me jump right away to the quadrilateral page on Wikipedia, which reminds us that the largest area occurs when the diagonals are orthogonal, in which case it is A=½pq. Only the angle between the diagonals matters. Imposing the perimeter in addition is not solved there, so I wrote an R code looking at all the integer solutions, based on one of the numerous formulae for the area, like


where s is the half-perimeter and a,b,c,d are the lengths of the four sides:

for (alpha in (1:500)/1000){
 for (beta in (1:999)/1000){
  for (teta in (1:9999)*pi/10000){
   if (abs(a+b+c+d-2*s)2*maxur){

This code returned an area of 4350, to compare with the optimal 6090 (which is recovered by the above R code when the diagonal lengths are identical and the perimeter is the one of the associated square). (As Jean-Louis Foulley pointed out to me, this area can be found directly by assuming the quadrilateral is a parallelogram.)

Filed under: Kids, R Tagged: geometry, Le Monde, mathematical puzzle, optimisation, R, Rmpfr

To 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 on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...

If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.


Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)