<p><div><div><div><div data-show-faces="false" data-height="21" data-width="100" data-layout="button_count" data-send="true" data-href="https://www.r-bloggers.com/le-monde-puzzle-1072/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="https://xianblog.wordpress.com/2018/10/31/le-monde-puzzle-1072/"> R – Xi'an's Og</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p><strong><a rel="nofollow" href="https://xianblog.files.wordpress.com/2015/10/lemondapari.jpeg" target="_blank"><img src="https://xianblog.files.wordpress.com/2015/10/lemondapari.jpeg?w=450&h=299&fit=456%2C456" data-recalc-dims="1"></a>T</strong>he penultimate <a rel="nofollow" href="https://xianblog.wordpress.com/2011/09/03/le-monde-puzzle-website/" title="Le Monde puzzle [website]" target="_blank">Le Monde mathematical puzzle</a>  competition problem is once again anti-climactic and not worth its points:</p>
<blockquote>
<p><em>For the figure below [not the original one!], describing two (blue) half-circles intersecting with a square of side 20cm, and a (orange) quarter of a circle with radius 20cm, find the radii of both gold circles, respectively tangent to both half-circles and to the square and going through the three intersections.<br>
</em></p>
</blockquote>
<p><em><a rel="nofollow" href="https://xianblog.files.wordpress.com/2018/10/lemonde1071.jpg" target="_blank"><img data-orig-file="https://xianblog.files.wordpress.com/2018/10/lemonde1071.jpg?w=450&amp;h=450&amp;fit=450%2C450&amp;resize=450%2C450" data-orig-size="480,480" data-medium-file="https://xianblog.files.wordpress.com/2018/10/lemonde1071.jpg?w=450&amp;h=450&amp;fit=450%2C450&amp;resize=450%2C450?w=300" data-attachment-id="37276" data-image-meta="{" data-image-description="" src="https://xianblog.files.wordpress.com/2018/10/lemonde1071.jpg?w=450&h=450&fit=450%2C450&resize=450%2C450" data-permalink="https://xianblog.wordpress.com/2018/10/31/le-monde-puzzle-1072/lemonde1071/" data-large-file="https://xianblog.files.wordpress.com/2018/10/lemonde1071.jpg?w=450&amp;h=450&amp;fit=450%2C450&amp;resize=450%2C450?w=450" alt="" data-image-title="lemonde1071" sizes="(max-width: 450px) 100vw, 450px" width="450" data-comments-opened="1" class="wp-image-37276" data-recalc-dims="1" height="450"></a></em><strong>A</strong>lthough the problem was easily solvable by some basic geometry arguments, I decided to use them <em>a minima</em> and resort to a mostly brute-force exploration based on a discretisation of the 20×20 square, from which I first deduced the radius of the tangent circle by imposing (a) a centre O on the diagonal (b) a distance from O to one (half-)circle equal to the distance to the upper side of the square, leading to a radius of 5.36 (and a centre O at a distance 20.70 from the bottom left corner):</p>
<pre>diaz=sqrt(2)*20
for (diz in seq(5/8,7/8,le=1e4)*diaz){#position of O
  radi=sqrt(diz^2/2+(diz/sqrt(2)-10)^2)-10
  if (abs(20-(diz/sqrt(2))-radi)&lt;3e-3){
      print(c(radi,diz));break()}}
</pre>
<p>In the case of the second circle I first deduced the intersections of the different circles by sheer comparison of black (blue!) pixels, namely A(4,8), B(8,4), and C(10,10), then looked at the position of the centre O’ of the circle such that the distances to A, B, and C were all equal:</p>
<pre>for (diz in seq(20*sqrt(2)-20,10*sqrt(2),le=1e4)){
  radi=10*sqrt(2)-diz
  distA=sqrt((diz/sqrt(2)-4)^2+(diz/sqrt(2)-8)^2)
  if (abs(distA-radi)&lt;4e-4){
    print(c(radi,diz));break()}}
</pre>
<p>even though Heron’s formula was enough to produce the radius. In both approaches, this radius is 3.54, with the position of the centre O’at 10.6 from the lower left corner. When plotting these results, which showed consistency at this level of precision,  I was reminded of the importance of plotting the points with the option “asp=1” in plot() as otherwise, draw.circle() does not plot the circles at the right location!</p>
	<p>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="https://xianblog.wordpress.com/2018/10/31/le-monde-puzzle-1072/"> R – Xi'an's Og</a></strong>.</div>
<hr>
<a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="https://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a rel="nofollow" href="https://www.r-project.org/" title="The R Project for Statistical Computing">R</a> news and <a rel="nofollow" href="https://www.r-bloggers.com/search/tutorial" title="R tutorials">tutorials</a> on topics such as: <a rel="nofollow" href="https://www.r-bloggers.com/search/data%20science" title="Data science">Data science</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Big%20Data" title="Big Data">Big Data, <a rel="nofollow" href="https://www.r-users.com/" title="R jobs">R jobs</a>, visualization (<a rel="nofollow" href="https://www.r-bloggers.com/search/ggplot2" title="ggplot and ggplot2 tutorials">ggplot2</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/boxplot" title="Boxplots using lattice and ggplot2 tutorials">Boxplots</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/map" title="Maps and gis">maps</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/animation" title="Animation in R">animation</a>), programming (<a rel="nofollow" href="https://www.r-bloggers.com/search/RStudio" title="RStudio IDE for R">RStudio</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/sweave" title="Sweave and literate programming">Sweave</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/LaTeX" title="LaTeX in R">LaTeX</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/SQL" title="SQL and databases">SQL</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/eclipse" title="Eclipse IDE for R">Eclipse</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/git" title="git and github, Version Control System">git</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/hadoop" title="Large data in R using Hadoop">hadoop</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Web+Scraping" title="Web Scraping of google, facebook, yahoo, twitter and more using R">Web Scraping</a>) statistics (<a rel="nofollow" href="https://www.r-bloggers.com/search/regression" title="Regressions and ANOVA analysis tutorials">regression</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/PCA" title="principal component analysis tutorial">PCA</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/time+series" title="Time series">time series</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/trading" title="finance trading">trading</a>) and more...
<img alt="" width="1" src="http://feeds.feedburner.com/~r/RBloggers/~4/PbGM_CDBdo0" height="1"></a></div>