<p><div><div><div><div data-width="100" data-show-faces="false" data-send="true" data-layout="button_count" data-height="21" data-href="https://www.r-bloggers.com/continental-divide/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="https://xianblog.wordpress.com/2017/05/19/continental-divide/"> 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><a target="_blank" rel="nofollow" href="https://xianblog.files.wordpress.com/2017/05/riddivide.png"><img sizes="(max-width: 303px) 100vw, 303px" data-image-description="" data-orig-file="https://xianblog.files.wordpress.com/2017/05/riddivide.png?w=303&amp;h=267&amp;fit=303%2C267&amp;resize=303%2C267" data-orig-size="799,703" data-image-title="riddivide" class="wp-image-33511" data-comments-opened="1" data-recalc-dims="1" data-attachment-id="33511" data-permalink="https://xianblog.wordpress.com/2017/05/19/continental-divide/riddivide/" alt="" data-medium-file="https://xianblog.files.wordpress.com/2017/05/riddivide.png?w=303&amp;h=267&amp;fit=303%2C267&amp;resize=303%2C267?w=300" data-large-file="https://xianblog.files.wordpress.com/2017/05/riddivide.png?w=303&amp;h=267&amp;fit=303%2C267&amp;resize=303%2C267?w=450" data-image-meta="{" src="https://xianblog.files.wordpress.com/2017/05/riddivide.png?w=303&h=267&fit=303%2C267&resize=303%2C267"></a><strong>W</strong>hile the <a target="_blank" rel="nofollow" href="https://fivethirtyeight.com/features/can-you-do-math-without-numbers/">Riddler puzzle this week</a> was anticlimactic,  as it meant filling all digits in the above division towards a null remainder, it came as an interesting illustration of how different division is taught in the US versus France: when I saw the picture above, I had to go and check an American primary school on-line introduction to division, since the way I was taught in France is something like that</p>
<p><a target="_blank" rel="nofollow" href="https://xianblog.files.wordpress.com/2017/05/img_20170513_082257-e1494656731885.jpg"><img sizes="(max-width: 354px) 100vw, 354px" data-image-description="" data-orig-file="https://xianblog.files.wordpress.com/2017/05/img_20170513_082257-e1494656731885.jpg?w=354&amp;h=287&amp;fit=354%2C287&amp;resize=354%2C287" data-orig-size="2423,1966" data-image-title="IMG_20170513_082257" data-comments-opened="1" class="wp-image-33518" data-recalc-dims="1" data-attachment-id="33518" data-permalink="https://xianblog.wordpress.com/2017/05/19/continental-divide/img_20170513_082257/" alt="" data-medium-file="https://xianblog.files.wordpress.com/2017/05/img_20170513_082257-e1494656731885.jpg?w=354&amp;h=287&amp;fit=354%2C287&amp;resize=354%2C287?w=300" data-large-file="https://xianblog.files.wordpress.com/2017/05/img_20170513_082257-e1494656731885.jpg?w=354&amp;h=287&amp;fit=354%2C287&amp;resize=354%2C287?w=450" data-image-meta="{" src="https://xianblog.files.wordpress.com/2017/05/img_20170513_082257-e1494656731885.jpg?w=354&h=287&fit=354%2C287&resize=354%2C287"></a>with the solution being that 12128316 = 124 x 97809… Solved by a dumb R exploration of all constraints:</p>
<pre>for (y in 111:143)
for (z4 in 8:9)
for (oz in 0:999){
  z=oz+7e3+z4*1e4
  x=y*z
  digx=digits(x)
  digz=digits(z)
  if ((digz[2]==0)&amp;(x>=1e7)&amp;(x&lt;1e8)){ 
   r1=trunc(x/1e4)-digz[5]*y 
   if ((digz[5]*y>=1e3)&amp;(digz[4]*y&lt;1e4) &amp;(r1>9)&amp;(r1&lt;100)){ 
    r2=10*r1+digx[4]-7*y 
    if ((7*y>=1e2)&amp;(7*y&lt;1e3)&amp;(r2>=1e2)&amp;(r2&lt;1e3)){     
     r3=10*r2+digx[3]-digz[3]*y 
     if ((digz[3]*y>=1e2)&amp;(digz[3]*y&lt;1e3)&amp;(r3>9)&amp;(r3&lt;1e2)){
       r4=10*r3+digx[2]
       if (r4&lt;y) solz=rbind(solz,c(y,z,x))
  }}}}
</pre>
<p>Looking for a computer-free resolution, the constraints on z exhibited by the picture are that (a) the second digit is 0 and the fourth digit is 7.  Moreover, the first and fifth digits are larger than 7 since y times this digit is a four-digit number. Better, since the second subtraction from a three-digit number by 7y returns a three-digit number and the third subtraction from a four-digit number by ny returns a two-digit number, n is larger than 7 but less than the first and fifth digits. Ergo, z is necessarily 97809. Furthermore, 8y&lt;10³ and 9y≥10³, which means 111&lt;y&lt;125. Plus the constraint that 1000-8y≤99 implies y≥112. This leaves 12 values of y to study, unless there is another restriction I missed…</p>
<p>Filed under: <a target="_blank" rel="nofollow" href="https://xianblog.wordpress.com/category/books/">Books</a>, <a target="_blank" rel="nofollow" href="https://xianblog.wordpress.com/category/kids/">Kids</a>, <a target="_blank" rel="nofollow" href="https://xianblog.wordpress.com/category/pictures/">pictures</a>, <a target="_blank" rel="nofollow" href="https://xianblog.wordpress.com/category/statistics/r-statistics/">R</a> Tagged: <a target="_blank" rel="nofollow" href="https://xianblog.wordpress.com/tag/arithmetics/">arithmetics</a>, <a target="_blank" rel="nofollow" href="https://xianblog.wordpress.com/tag/division/">division</a>, <a target="_blank" rel="nofollow" href="https://xianblog.wordpress.com/tag/fivethirtyeight/">FiveThirtyEight</a>, <a target="_blank" rel="nofollow" href="https://xianblog.wordpress.com/tag/long-division/">long division</a>, <a target="_blank" rel="nofollow" href="https://xianblog.wordpress.com/tag/the-riddler/">The Riddler</a> <a target="_blank" rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/xianblog.wordpress.com/33510/"><img alt="" src="http://feeds.wordpress.com/1.0/comments/xianblog.wordpress.com/33510/" border="0"></a> <img alt="" src="https://i1.wp.com/pixel.wp.com/b.gif?resize=1%2C1&ssl=1" border="0" data-recalc-dims="1"></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/2017/05/19/continental-divide/"> 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 title="The R Project for Statistical Computing" rel="nofollow" href="https://www.r-project.org/">R</a> news and <a title="R tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/tutorial">tutorials</a> on topics such as: <a title="Data science" rel="nofollow" href="https://www.r-bloggers.com/search/data%20science">Data science</a>, <a title="Big Data" rel="nofollow" href="https://www.r-bloggers.com/search/Big%20Data">Big Data, <a title="R jobs" rel="nofollow" href="https://www.r-users.com/">R jobs</a>, visualization (<a title="ggplot and ggplot2 tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/ggplot2">ggplot2</a>, <a title="Boxplots using lattice and ggplot2 tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/boxplot">Boxplots</a>, <a title="Maps and gis" rel="nofollow" href="https://www.r-bloggers.com/search/map">maps</a>, <a title="Animation in R" rel="nofollow" href="https://www.r-bloggers.com/search/animation">animation</a>), programming (<a title="RStudio IDE for R" rel="nofollow" href="https://www.r-bloggers.com/search/RStudio">RStudio</a>, <a title="Sweave and literate programming" rel="nofollow" href="https://www.r-bloggers.com/search/sweave">Sweave</a>, <a title="LaTeX in R" rel="nofollow" href="https://www.r-bloggers.com/search/LaTeX">LaTeX</a>, <a title="SQL and databases" rel="nofollow" href="https://www.r-bloggers.com/search/SQL">SQL</a>, <a title="Eclipse IDE for R" rel="nofollow" href="https://www.r-bloggers.com/search/eclipse">Eclipse</a>, <a title="git and github, Version Control System" rel="nofollow" href="https://www.r-bloggers.com/search/git">git</a>, <a title="Large data in R using Hadoop" rel="nofollow" href="https://www.r-bloggers.com/search/hadoop">hadoop</a>, <a title="Web Scraping of google, facebook, yahoo, twitter and more using R" rel="nofollow" href="https://www.r-bloggers.com/search/Web+Scraping">Web Scraping</a>) statistics (<a title="Regressions and ANOVA analysis tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/regression">regression</a>, <a title="principal component analysis tutorial" rel="nofollow" href="https://www.r-bloggers.com/search/PCA">PCA</a>, <a title="Time series" rel="nofollow" href="https://www.r-bloggers.com/search/time+series">time series</a>, <a title="finance trading" rel="nofollow" href="https://www.r-bloggers.com/search/trading">trading</a>) and more...
<img height="1" alt="" width="1" src="http://feeds.feedburner.com/~r/RBloggers/~4/HGQ0hdsqjjg"></a></div>