<p><strong><a rel="nofollow" href="https://xianblog.files.wordpress.com/2018/03/circum2.jpg" target="_blank"><img data-orig-file="https://xianblog.files.wordpress.com/2018/03/circum2.jpg" data-orig-size="480,480" data-medium-file="https://xianblog.files.wordpress.com/2018/03/circum2.jpg?w=300&amp;h=300&amp;fit=300%2C300&amp;resize=300%2C300" data-attachment-id="35544" data-image-meta="{" data-image-description="" src="https://xianblog.files.wordpress.com/2018/03/circum2.jpg?w=300&h=300&fit=300%2C300&resize=300%2C300" data-permalink="https://xianblog.wordpress.com/2018/03/06/a-one-chance-meeting-puzzle/circum2/" data-large-file="https://xianblog.files.wordpress.com/2018/03/circum2.jpg?w=450" alt="" data-image-title="circum2" sizes="(max-width: 300px) 100vw, 300px" width="300" data-comments-opened="1" class="wp-image-35544" data-recalc-dims="1" height="300"></a>T</strong>his afternoon, I took a quick look at the current <a rel="nofollow" href="https://fivethirtyeight.com/features/can-you-rescue-the-paratroopers/" target="_blank">Riddler puzzle</a>, which sums up as, <em>given three points A, B, C, arbitrarily moving on a plane with a one-shot view of their respective locations, find a moving rule to bring the three together at the same point at the same time</em>. And could not spot the difficulty.</p>
<p>The solution seems indeed obvious when expressed as above rather than in the <a rel="nofollow" href="https://fivethirtyeight.com/features/can-you-rescue-the-paratroopers/" target="_blank">tell-tale format of the puzzle</a>. Since every triangle has a circumscribed circle, and all points on that circle are obviously at the same distance of the centre O, the three points have to aim at the centre O. Assuming they all move at the same velocity, they will reach O together…</p>
<p><a rel="nofollow" href="https://xianblog.files.wordpress.com/2018/03/circum.jpg" target="_blank"><img data-orig-file="https://xianblog.files.wordpress.com/2018/03/circum.jpg" data-orig-size="480,480" data-medium-file="https://xianblog.files.wordpress.com/2018/03/circum.jpg?w=300&amp;h=300&amp;fit=300%2C300&amp;resize=300%2C300" data-attachment-id="35542" data-image-meta="{" data-image-description="" src="https://xianblog.files.wordpress.com/2018/03/circum.jpg?w=300&h=300&fit=300%2C300&resize=300%2C300" data-permalink="https://xianblog.wordpress.com/2018/03/06/a-one-chance-meeting-puzzle/circum/" data-large-file="https://xianblog.files.wordpress.com/2018/03/circum.jpg?w=450" alt="" data-image-title="circum" sizes="(max-width: 300px) 100vw, 300px" width="300" data-comments-opened="1" class="wp-image-35542" data-recalc-dims="1" height="300"></a>The <a rel="nofollow" href="https://fivethirtyeight.com/features/can-you-rescue-the-paratroopers/" target="_blank">question</a> gets a wee bit more interesting when the number of points with the same one-time one-shot view option grows beyond 3, as these points will almost surely not all lie on a single circumscribed circle. While getting them together can be done by (a) finding the largest circle going through 3  points and containing all others [in case there is no such circle, adding an artificial point solves the issue!], triplet on which one can repeat the above instructions to reach O, and (b) bringing all points inside the circle to meet with one of the three points [the closest] on its straight-line way to O, by finding a point on that line at equal distance from both, a subsidiary question is whether or not this is the fastest way. Presumably not.  (Again I may be missing one item of the puzzle.)</p>
<p>When experimenting with a short R code, I quickly figured out that the circumscribed circles associated with all triplets do not necessarily contain all points. The resolution of this difficulty is however straightforward as it suffices to add an artificial point by considering all circumcentres and their distances to the farthest point, minimising over these distances and adding the extra point at random over the circumference. As in the example below.<a rel="nofollow" href="https://xianblog.files.wordpress.com/2018/03/circum3.jpg" target="_blank"><img data-orig-file="https://xianblog.files.wordpress.com/2018/03/circum3.jpg" data-orig-size="480,480" data-medium-file="https://xianblog.files.wordpress.com/2018/03/circum3.jpg?w=300&amp;h=300&amp;fit=300%2C300&amp;resize=300%2C300" data-attachment-id="35553" data-image-meta="{" data-image-description="" src="https://xianblog.files.wordpress.com/2018/03/circum3.jpg?w=300&h=300&fit=300%2C300&resize=300%2C300" data-permalink="https://xianblog.wordpress.com/2018/03/06/a-one-chance-meeting-puzzle/circum3/" data-large-file="https://xianblog.files.wordpress.com/2018/03/circum3.jpg?w=450" alt="" data-image-title="circum3" sizes="(max-width: 300px) 100vw, 300px" width="300" data-comments-opened="1" class="wp-image-35553" data-recalc-dims="1" height="300"></a>Incidentally, it took me much longer to write this post than to solve the puzzle, as I was trying to use the R function <a rel="nofollow" href="https://www.rdocumentation.org/packages/plotrix/versions/3.7/topics/draw.circle?tap_a=5644-dce66f&tap_s=10907-287229" target="_blank">draw.circle</a>, which supposedly turns a centre and a radius into the corresponding circle, but somehow misses its target by adapting the curve to the area being displayed. I am still uncertain of what the function means. I hence ended up writing a plain R function for this purpose:</p>
<pre>dracirc=function(A,B,C){
  O=findcentr(A,B,C)
  ro=dist(rbind(A,O))
  lines(x=O[1]+ro*sin(2*pi*seq(0,1,le=180)),
  y=O[2]+ro*cos(2*pi*seq(0,1,le=180)))}
</pre>
	<img alt="" width="1" src="http://feeds.feedburner.com/~r/RBloggers/~4/Yd7BjiLEaX4" height="1">