A place to cache linked articles (think custom and personal wayback machine)
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

index.html 33KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
  1. <!doctype html><!-- This is a valid HTML5 document. -->
  2. <!-- Screen readers, SEO, extensions and so on. -->
  3. <html lang="fr">
  4. <!-- Has to be within the first 1024 bytes, hence before the `title` element
  5. See: https://www.w3.org/TR/2012/CR-html5-20121217/document-metadata.html#charset -->
  6. <meta charset="utf-8">
  7. <!-- Why no `X-UA-Compatible` meta: https://stackoverflow.com/a/6771584 -->
  8. <!-- The viewport meta is quite crowded and we are responsible for that.
  9. See: https://codepen.io/tigt/post/meta-viewport-for-2015 -->
  10. <meta name="viewport" content="width=device-width,initial-scale=1">
  11. <!-- Required to make a valid HTML5 document. -->
  12. <title>Quanta Magazine (archive) — David Larlet</title>
  13. <meta name="description" content="Publication mise en cache pour en conserver une trace.">
  14. <!-- That good ol' feed, subscribe :). -->
  15. <link rel="alternate" type="application/atom+xml" title="Feed" href="/david/log/">
  16. <!-- Generated from https://realfavicongenerator.net/ such a mess. -->
  17. <link rel="apple-touch-icon" sizes="180x180" href="/static/david/icons2/apple-touch-icon.png">
  18. <link rel="icon" type="image/png" sizes="32x32" href="/static/david/icons2/favicon-32x32.png">
  19. <link rel="icon" type="image/png" sizes="16x16" href="/static/david/icons2/favicon-16x16.png">
  20. <link rel="manifest" href="/static/david/icons2/site.webmanifest">
  21. <link rel="mask-icon" href="/static/david/icons2/safari-pinned-tab.svg" color="#07486c">
  22. <link rel="shortcut icon" href="/static/david/icons2/favicon.ico">
  23. <meta name="msapplication-TileColor" content="#f7f7f7">
  24. <meta name="msapplication-config" content="/static/david/icons2/browserconfig.xml">
  25. <meta name="theme-color" content="#f7f7f7" media="(prefers-color-scheme: light)">
  26. <meta name="theme-color" content="#272727" media="(prefers-color-scheme: dark)">
  27. <!-- Documented, feel free to shoot an email. -->
  28. <link rel="stylesheet" href="/static/david/css/style_2021-01-20.css">
  29. <!-- See https://www.zachleat.com/web/comprehensive-webfonts/ for the trade-off. -->
  30. <link rel="preload" href="/static/david/css/fonts/triplicate_t4_poly_regular.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: light), (prefers-color-scheme: no-preference)" crossorigin>
  31. <link rel="preload" href="/static/david/css/fonts/triplicate_t4_poly_bold.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: light), (prefers-color-scheme: no-preference)" crossorigin>
  32. <link rel="preload" href="/static/david/css/fonts/triplicate_t4_poly_italic.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: light), (prefers-color-scheme: no-preference)" crossorigin>
  33. <link rel="preload" href="/static/david/css/fonts/triplicate_t3_regular.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: dark)" crossorigin>
  34. <link rel="preload" href="/static/david/css/fonts/triplicate_t3_bold.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: dark)" crossorigin>
  35. <link rel="preload" href="/static/david/css/fonts/triplicate_t3_italic.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: dark)" crossorigin>
  36. <script>
  37. function toggleTheme(themeName) {
  38. document.documentElement.classList.toggle(
  39. 'forced-dark',
  40. themeName === 'dark'
  41. )
  42. document.documentElement.classList.toggle(
  43. 'forced-light',
  44. themeName === 'light'
  45. )
  46. }
  47. const selectedTheme = localStorage.getItem('theme')
  48. if (selectedTheme !== 'undefined') {
  49. toggleTheme(selectedTheme)
  50. }
  51. </script>
  52. <meta name="robots" content="noindex, nofollow">
  53. <meta content="origin-when-cross-origin" name="referrer">
  54. <!-- Canonical URL for SEO purposes -->
  55. <link rel="canonical" href="https://www.quantamagazine.org/math-can-in-theory-help-you-escape-a-hungry-bear-20210825/">
  56. <body class="remarkdown h1-underline h2-underline h3-underline em-underscore hr-center ul-star pre-tick" data-instant-intensity="viewport-all">
  57. <article>
  58. <header>
  59. <h1>Quanta Magazine</h1>
  60. </header>
  61. <nav>
  62. <p class="center">
  63. <a href="/david/" title="Aller à l’accueil"><svg class="icon icon-home">
  64. <use xlink:href="/static/david/icons2/symbol-defs.svg#icon-home"></use>
  65. </svg> Accueil</a> •
  66. <a href="https://www.quantamagazine.org/math-can-in-theory-help-you-escape-a-hungry-bear-20210825/" title="Lien vers le contenu original">Source originale</a>
  67. </p>
  68. </nav>
  69. <hr>
  70. <p>Our June Insights puzzle added a few twists to a classic puzzle made famous by Martin Gardner in his 1965 <em>Scientific American</em> column and later published in the book <em>The Colossal Book of Short Puzzles and Problems</em>. In our version, a swimmer at the center of a circular lake of radius 3.5 is attempting to escape a bear hunting him from the shore. The bear doesn’t swim but can run along the circumference at 3.5 times the swimmer’s speed, which is 1 unit of length per unit of time. To survive, the athlete must swim to shore before the bear reaches the same point.</p>
  71. <p>Our first puzzle posed some basic questions about the swimmer’s strategy. For example, what could he learn from the way squirrels spiral up a tree to escape pursuing dogs? The other puzzles explored newer questions, which led to some unexpected mathematical sleuthing.</p>
  72. <p>Before we discuss the solutions, you may have noticed that we did not mention any specific units for distance, time and velocity. The numbers were carefully chosen to avoid the need for conversion factors: First, the swimmer’s velocity is 1, so the swimmer’s time is numerically equal to his swimming distance. Second, the ratio of the bear’s speed to the swimmer’s speed is the same as the lake’s radius, so the bear’s angular velocity is also 1. In other words, the distance traveled by the swimmer over a given time interval has the same numeric value as the angular distance (in radians) traveled by the bear. Clearly, swimming straight for the shore opposite the bear is not an option, since the bear only needs to run π (~3.14) radians while the athlete needs to swim 3.5 distance units. To simplify matters, we’ll mostly dispense with the word “units” and just mention the numeric values. (If this lack of explicit units makes you uncomfortable, you’re welcome to substitute any units you like, so long as your velocity is expressed in terms of the same units you’ve used for distance and time.)</p>
  73. <p id="component-61284eba99eba" class=""></p>
  74. <p>For further convenience, let’s assume that the center of the lake is at the origin (0, 0) of an <em>x</em>–<em>y</em> coordinate system and the bear starts out at the easternmost edge along the <em>x</em>-axis (3.5, 0). We will express angle measurement in radians, giving the degree equivalents only in the final answers. (I loved how <a href="https://www.quantamagazine.org/can-math-help-you-escape-a-hungry-bear-20210629/#comment-5445837237">Paolo Abiuso parodied</a> the classic riddle that asks, “What color is the bear?” Paolo’s answer: “I don’t know, but it seems to understand polar coordinates.”)</p>
  75. <p>To start the chase, the swimmer forces the bear to run by making a small movement away from the bear in the opposite direction. If the bear does nothing, the swimmer continues moving away, getting closer to the shore with no gain for the bear. Therefore, the bear’s best strategy is to commit itself and start running in either direction. Let’s assume the bear runs counterclockwise.</p>
  76. <h2>Puzzle 1</h2>
  77. <ol class="capital-abc">
  78. <li>How can the swimmer apply the squirrel strategy (keeping in a direction diametrically opposite to the bear) to get into the best position to escape?</li>
  79. <li>What kind of path does the swimmer trace in doing so?</li>
  80. <li>How many full turns will the swimmer make before the squirrel strategy stops being of any further help?</li>
  81. <li>How long does it take to reach that point?</li>
  82. <li>Can the swimmer finally evade the bear?</li>
  83. </ol>
  84. <p>We’ll assume the bear continues running counterclockwise. For these particular questions, changing direction either makes no difference or makes things worse for the bear.</p>
  85. <p>A. Starting at the center of the lake initially allows the swimmer to keep pace with the bear’s angular velocity. At every point, the athlete can imagine a small “safe circle” around the origin, within which he can always stay opposite the bear. He wants to allocate just enough of his swimming velocity to going around such a circle (in the tangential as opposed to the radial direction) in order to remain opposite the bear while simultaneously moving outward as quickly as he can toward the shore. At a certain distance he reaches the largest possible safe circle, such that he has to swim at full speed along its perimeter just to keep opposite the bear, and he is no longer getting closer to the shore. This occurs when the swimmer reaches a distance of 1 from the center of the lake. The beauty of the squirrel strategy is that the swimmer gains distance from the bear without allowing the bear to reduce any of the angular separation.</p>
  86. <p id="component-61284ebaa5d04" class=""></p>
  87. <p>If the bear changes directions frequently, the swimmer just needs to shuffle in the opposite direction to the bear, following what <a href="https://www.quantamagazine.org/can-math-help-you-escape-a-hungry-bear-20210629/#comment-5481198793">Jonathan Barmak</a> described as a path that is “piecewise semicircular (concatenation of arcs of circles of same radius).” This will also take the swimmer the same distance away from the bear in the same time.</p>
  88. <p>B. As several readers pointed out, this strategy results in the swimmer moving along a semicircle (OP in red) with radius 0.5 and center at (0, −0.5), and ending up at point (0, −1) south of the center. <a href="https://www.quantamagazine.org/can-math-help-you-escape-a-hungry-bear-20210629/#comment-5439765885">Jonathan Barmak gave a technical reason</a> for why this path is a semicircle.</p>
  89. <p>C. The swimmer thus makes a full half-turn (π radians) along the semicircle, in the same time that the bear has made a quarter turn ($latex \frac{π}{2}$ radians) along the circumference of the lake. By the magic of our automatic interconversions, this will take the bear a time of $latex \frac{π}{2}$ or 1.57, which happens to be the distance the athlete swims along the circumference of the semicircle (π times its radius of 0.5).</p>
  90. <p>D. As we established above, it takes 1.57 time units to reach the safe circle along the red semicircle OP in the figure.</p>
  91. <p>E. It is now obvious that the swimmer can evade the bear. The swimmer only has to swim 2.5 (time or distance units) in the radial direction (PQ) to reach the shore at the south pole of the lake. The bear still needs a time of π to reach the same point. The swimmer’s total time will be 1.57 + 2.5 = 4.07, and he will reach the shore π − 2.5 = 0.64 time units before the bear (with a separation of 0.64 × 3.5 = 2.26 distance units along the circumference from C to Q).</p>
  92. <p>These basic questions were well answered by several readers, including <a href="https://www.quantamagazine.org/can-math-help-you-escape-a-hungry-bear-20210629/#comment-5438212458">Arthur Champernowne</a>, <a href="https://www.quantamagazine.org/can-math-help-you-escape-a-hungry-bear-20210629/#comment-5438859199">Andrew</a>, <a href="https://www.quantamagazine.org/can-math-help-you-escape-a-hungry-bear-20210629/#comment-5439765885">Jonathan Barmak</a>, <a href="https://www.quantamagazine.org/can-math-help-you-escape-a-hungry-bear-20210629/#comment-5442087087">Lazar Ilic</a>, <a href="https://www.quantamagazine.org/can-math-help-you-escape-a-hungry-bear-20210629/#comment-5443974257">Ivan Rygaev</a> and <a href="https://www.quantamagazine.org/can-math-help-you-escape-a-hungry-bear-20210629/#comment-5445837237">Paolo Abiuso</a>.</p>
  93. <p>For this puzzle and all the others except puzzle 2, it does not make any difference if the bear reverses direction. The swimmer can simply reverse his angular direction to stay opposite the bear while moving outward as before. The relative positions of the bear and swimmer remain the same, with the swimmer opposite the bear at the exact distance he would have been if the bear had not reversed.</p>
  94. <p>Puzzle 2 is more complicated and interesting. Let’s look at the other puzzles first.</p>
  95. <h2>Puzzle 3</h2>
  96. <p>Suppose, on the other hand, that the athlete’s goal is to get out of the lake as far ahead of the bear as possible. Which of these strategies is now most efficient, and what is the greatest distance he can put between himself and the bear along the lake circumference?</p>
  97. <ol class="capital-abc">
  98. <li>Follow the squirrel strategy until it doesn’t help any longer, and then make a dash for it in the radial direction.</li>
  99. <li>Follow the squirrel strategy until it doesn’t help any longer, and then make a dash for it in some other direction.</li>
  100. <li>Follow the squirrel strategy for some time, and then make a dash for it in some direction.</li>
  101. <li>Follow some other strategy instead of the squirrel strategy.</li>
  102. </ol>
  103. <p>The answer is <strong>B</strong>, which gives the swimmer a maximum circumferential lead of 3.74.</p>
  104. <p>The swimmer must follow the squirrel strategy as far as it can go, which takes him to a radial distance of 1, and then make a dash for it in the direction that takes him furthest away from the bear. This lies along the tangent away from the bear in the same direction that the swimmer was headed at the instant he joined the safe circle — directly heading east in our scenario.</p>
  105. <p>The reason for this is clear: Since the swimmer is seeking to maximize distance, he must milk the squirrel strategy to the hilt, as it gives him separation from the bear for free. Once he reaches the limit of that strategy, he needs to make a dash in the direction as far away from the bear as possible, which happens to be the tangent to the safe circle. Making the angle any larger would result in the swimmer reentering the safe circle, taking him back to square one.</p>
  106. <p id="component-61284ebaaeef7" class=""></p>
  107. <p>It is not hard to calculate how far ahead of the bear the swimmer will emerge from the lake. In Figure 2, the length of line segment OP is 1, and OQ, the hypotenuse of the triangle, is 3.5. The length of his final dash, by Pythagoras’ theorem, is $latex \sqrt{\left(OQ^{2}-O P^{2}\right)}$ or $latex \sqrt{\left(3.5^{2}-1^{2}\right)}$ = 3.354, during which he covers cos<sup>-1</sup>($latex \frac{1}{3.5}$) = 1.281 radians in addition to his initial lead of π which makes ~4.423 radians. Our numerical magic also tells us how much the bear has covered from B to C during the swimmer’s dash: It’s the same number as PQ in radians, 3.354, which is 1.069 radians short of the swimmer (or a distance of 3.74 along the arc CQ). This is about 67% greater than the lead achieved by the simple strategy described in the solution of puzzle 1.</p>
  108. <h2>Bonus 1</h2>
  109. <p>Does the best strategy for puzzles 2 and 3 change if the radius of the lake is 4.5 units and the bear’s running speed is 4.5 times that of the swimmer? (The swimmer’s speed remains the same as before.)</p>
  110. <p>Answer: No, it does not change for puzzle 3. Puzzle 2 is an open question that we will discuss later.</p>
  111. <p>The strategy for puzzle 3 would not change at all for this case. In fact, the simple strategy described in the puzzle 1 solution fails for the case where the lake’s radius and the speed ratio between the bear and the swimmer exceed π + 1 (~4.14). Nevertheless, by following the puzzle 3 strategy, the swimmer can escape quite easily.</p>
  112. <p>Here are the same calculations we made above for this case.</p>
  113. <p>The radius of the safe circle remains 1 unit. In the diagram, line segment OP is 1, and the hypotenuse OQ is now 4.5. The length of the swimmer’s straight dash is $latex \sqrt{\left(4.5^{2}-1^{2}\right)}$ = 4.387 units, covering an additional cos<sup>-1</sup>($latex \frac{1}{4.5}$) = 1.347 radians. The bear would need to run around an arc of π + 1.347 = 4.888 radians to catch up with the swimmer when he reaches the shore. Since the bear only covers 4.387 (same as the length swum by the swimmer), it will fall 4.488 − 4.387 = 0.101 radians short.</p>
  114. <p><a href="https://www.quantamagazine.org/can-math-help-you-escape-a-hungry-bear-20210629/#comment-5438212458">Arthur Champernowne</a><u>,</u> <a href="https://www.quantamagazine.org/can-math-help-you-escape-a-hungry-bear-20210629/#comment-5442087087">Lazar Ilic</a> and <a href="https://www.quantamagazine.org/can-math-help-you-escape-a-hungry-bear-20210629/#comment-5445837237">Paolo Abiuso</a> recognized that there is life after π + 1 and used this strategy to answer the second bonus question below.</p>
  115. <h2>Bonus 2</h2>
  116. <p>What is the highest ratio between the bear’s running speed and the swimmer’s speed that will still allow the swimmer to escape? (Assume that the radius of the lake in units is equal to this ratio, and the swimmer’s speed is unchanged.)</p>
  117. <p>Answer: 4.6033.</p>
  118. <p>We need to do the same calculations as above in reverse. By setting the final distance between the swimmer and the bear to zero and solving numerically for the lake radius and bear speed that would produce this result, we get a value of 4.6033. You can check that this is the limit: $latex \sqrt{\left(4.6033^{2}-1^{2}\right)}$ = 4.4934, cos<sup>-1</sup>($latex \frac{1}{4.6033}$) = 1.3518, and π + 1.3518 (the angle the bear travels) also equals 4.4934 from B to C.</p>
  119. <h2>Puzzle 2</h2>
  120. <p>Suppose our goal is not just to evade the bear but to escape as fast as possible (our swimmer’s arms and legs are tired, after all). Which of these strategies is most efficient, and what is the fastest escape time in each case?</p>
  121. <p>This turned out to be an extremely interesting question, whose final answer is still in doubt. The two contending strategies are:</p>
  122. <p>C. Follow the squirrel strategy for some time, and then make a dash for it in some direction.<br>
  123. D. Follow some other strategy instead of the squirrel strategy.</p>
  124. <p>Amazingly, they are equally efficient to the third decimal place!</p>
  125. <p>Strategy C gives an optimized solution of <strong>3.5041</strong> that cannot be improved further, while strategy D gives a solution of <strong>3.5038</strong> that can possibly be improved.</p>
  126. <p>We are considering this problem last because of a fundamental complication: The bear can reverse direction! If the bear chose to do so in any of the previous situations, it wouldn’t affect the final result. But if the swimmer is trying to minimize his swimming time, the situation changes. A reversal of direction can literally bend the swimmer’s path out of shape, adding a significant amount of time to the originally intended path. As <a href="https://www.quantamagazine.org/can-math-help-you-escape-a-hungry-bear-20210629/#comment-5463587970">Jonathan Barmak</a> rightly pointed out, this must be factored in when we’re determining the quickest path. When I originally prepared this puzzle, I thought the answer was obviously C, but Barmak’s construction forced me to revisit D.</p>
  127. <p>As an example, consider an obvious strategy that would be fastest if the bear did not change direction. Once the bear has committed to running in a particular direction, the swimmer can just aim radially at a point slightly ahead of where the bear would get to in a time of 3.5, which in our coordinate system also has an angular distance of 3.5 radians. Since a straight line is the shortest distance between two points, this is without a doubt the shortest possible path for the swimmer, taking 3.5 time units.</p>
  128. <p id="component-61284ebab8218" class=""></p>
  129. <p>That sounds great in principle, but the bear can allow the swimmer to commit himself to this path and then change directions after running an angular distance of about 0.12 (from A to B in Figure 3, which is about a third of 3.5 − π). This forces the swimmer to alter his intended target C (which is at an angle of 3.5 from A), aiming just ahead of the point C’, which is where the bear will reach running clockwise from B. C’ is at an angular coordinate of π − 0.13 (~3.01) from A resulting in a new path time of 3.515.</p>
  130. <p>In evaluating the time of a path, we have to use the worst-case scenario. Let’s look at each of the possible strategies mentioned.</p>
  131. <p>A. Follow the squirrel strategy until it doesn’t help any longer, and then make a dash for it in the radial direction.</p>
  132. <p>The squirrel strategy, as we saw above, is impervious to a reversal of direction. Hence the fastest path time for this strategy remains 4.07 as we determined in puzzle 1.</p>
  133. <p>B. Follow the squirrel strategy until it doesn’t help any longer, and then make a dash for it in some other direction.</p>
  134. <p>The fastest time is at least 4.07, since the shortest distance to shore from the edge of the safe circle is radial. Heading in another direction simply adds more distance and time.</p>
  135. <p>C. Follow the squirrel strategy for some time, and then make a dash for it in some direction. </p>
  136. <p>The swimmer can follow the squirrel strategy until he is exactly π units away from shore radially, and then make a straight dash radially. This strategy was suggested by some readers, and it is impervious to disruption, because the bear will require a time of π to catch the swimmer regardless of which direction it runs. The time required for this is π + arcsin(3.5 − π) = 3.50815.</p>
  137. <p><a href="https://www.quantamagazine.org/can-math-help-you-escape-a-hungry-bear-20210629/#comment-5442087087">Lazar Ilic</a> and <a href="https://www.quantamagazine.org/can-math-help-you-escape-a-hungry-bear-20210629/#comment-5445837237">Paolo Abiuso</a> suggested the swimmer should start following the squirrel strategy and at the optimal moment take off on the tangent to his semicircular path that reaches the shore just ahead of the bear. We can call this the arc-tangent strategy. In principle this seems to be an optimal strategy because it involves no change in direction and as Abiuso mentioned, this kind of smooth transition will save time compared to a sharp change in angle. The shortest arc-tangent combination that just eludes the bear requires spending 0.1861 following the squirrel strategy, followed by a tangential straight-line dash of 3.318, giving a total path time of 3.5041. Unlike in the straight-line case discussed above, the bear cannot increase the swimmer’s time by reversing course, even though the straight-line segment is greater than π.</p>
  138. <p id="component-61284ebac1403" class=""></p>
  139. <p>As <a href="https://www.quantamagazine.org/can-math-help-you-escape-a-hungry-bear-20210629/#comment-5487553416">Paolo Abiuso</a> pointed out in rebutting the claims of strategy D, a reversal by the bear does force the swimmer to alter his path, but this decreases the swimmer’s time because the swimmer can take a path that’s closer to the shore than his original destination. In Figure 4, the swimmer remains on his initial squirrel path as the bear moves from A to B. When the bear reaches B, the swimmer, at T, takes off on a tangent. The destination is C if the bear keeps moving counterclockwise or C’ if it changes direction. The two paths are of equal length as OC’ is the mirror image of OC across the radial line from B. Let’s assume the bear continues counterclockwise. At R, the bear switches direction. Notice that there exists a path DF (shown in red) that mirrors the swimmer’s original target across the radial line DR’ to F, which is again of equal length. The swimmer has a wedge-shape area of the circle CDF within which every point on shore is closer to him than his original target. The swimmer can therefore escape in a shorter time as explained below.</p>
  140. <p>Recall that the swimmer was diametrically opposite the bear at point T before starting on his straight-line dash. Thereafter, the bear steadily gains in angular distance on the swimmer counterclockwise. So, the length of arc RR’ counterclockwise (let’s call this RR’<em>cc</em>) is less than π, but its clockwise length is more than π (let’s call this RR’<em>c</em>, making RR’<em>c</em> &gt; RR’<em>cc)</em>. The counterclockwise reach of the bear is the length of arc RC in the original time, which is equal to the clockwise arc RC’’ where C’’ is the point the bear would expect to end up clockwise. Let’s call this distance <em>x</em>. Therefore, arc R’C, which is <em>x</em> − RR’<em>cc,</em> is longer than arc R’C’’ which is <em>x </em>− RR’<em>c</em> — the bear has a longer “reach” past R’ in its original direction compared to the reverse direction. But arc R’C is equal to arc R’F (as DF is a radial mirror of DC). Therefore, the bear cannot quite reach F clockwise in the same time as it would reach C counterclockwise. Thus, the swimmer could swim to any point within arc C’’F, all of which are closer to the shore than his original target.</p>
  141. <p>D. Follow some other strategy instead of the squirrel strategy.</p>
  142. <p><a href="https://www.quantamagazine.org/can-math-help-you-escape-a-hungry-bear-20210629/#comment-5463587970">Jonathan Barmak</a> suggested and diagrammed a fast disruption-free path that he called the “squirrel + two segments” strategy:</p>
  143. <ol>
  144. <li>Follow the squirrel strategy for 0.3 units of time. …</li>
  145. <li>Then move radially for 0.07 units.</li>
  146. <li>Check where the bear is and move straight to its antipodal point.</li>
  147. </ol>
  148. <p>This results in a straight-line dash of 3.1355 units. Since this is smaller than π, it cannot be disrupted because the reverse distance the bear will need to cover to reach the same point will be longer. Barmak also showed that reversal by the bear during the second segment does not increase the path duration. The time required by this path is 3.5055.</p>
  149. <p>Barmak’s innovative construction is explicitly designed to ensure that path reversals do not increase the stated maximum time. Nevertheless, it involves not just one, but two sharp changes in direction, which seems to indicate that the time can probably be improved by smoothing out the transitions between the three parts.</p>
  150. <p>There is one other path we can explore. We saw that any change in the bear’s direction shortened the backward time in the arc-tangent path. What if we chose a path such that the swimmer pulls as far away as needed from the backward path to keep its length at the allowable maximum at all points? In other words, the swimmer swims at the edge of what he can get away with, equalizing his forward and backward path lengths at all points (except in the beginning and the end).</p>
  151. <p>My calculations indicate that such a path indeed exists. It consists of a straight dash at the beginning, and another at the end, joined by a smooth curve that keeps the length of the projected backward path the same as what the forward path finally ends up being. Specifically, the swimmer aims at an angle of 3.2453 radians for a distance of 0.079 initially and makes a straight dash of length 3.3168 to the shore at an angle of 3.5038 radians at the end. These two straight line segments are joined by a smooth curve until about time 0.187, during which the distance from the moving reverse target is kept such that the projected backward path time remains constant. As the destination reveals, the path time is 3.5038, slightly better than that of the arc-tangent strategy.  (Disclaimer: This is a new solution that has not been time-tested. It could have some unapparent flaw or need some modifications.)</p>
  152. <p>To address the bonus 1 question, there is no reason to think that the arc-tangent strategy and this new solution will not apply if the radius of the lake were 4.5 units with the bear’s running speed 4.5 times that of the swimmer.</p>
  153. <p>After the safety-first, squirrel-assisted time of over 4, these improved strategies get the swimmer unbelievably close to the minimum possible time of 3.5!</p>
  154. <p>It is possible that this straight line-curve-straight line path can be optimized a little further. These kinds of path-length calculations are tricky to do, and it is even trickier to prove that the path can withstand all kinds of disruptions by the bear reversing its direction.</p>
  155. <p id="component-61284ebac1e80" class="related-list"></p>
  156. <p>What if the bear reverses a second time? This is not as disruptive as it might seem for two reasons. First, notice that a reversal is costly for the bear: In every reversal, it gives up any gain on the swimmer that it has already achieved, so the reversal has a penalty of reducing the reach of the reverse path by twice the length of the reversed segment. Second, the bear is running out of time: The closer the swimmer gets to shore, the less effective the reversal is in increasing path length, until it completely ceases to be effective when the swimmer’s distance from the bear’s antipode reaches π.</p>
  157. <p>Thank you to all who dived into this puzzle. If you come up with a better time for puzzle 2, please post it here. I will also post further details of the solution presented here. Please let me know if I’ve made a mistake in any of these calculations, or if you can think of a way that allows the bear to lengthen the swimmer’s path that I may have missed. The prize for this puzzle goes to Paolo Abiuso and Jonathan Barmak, who argued eloquently for their two competing strategies. Congratulations to the winners and see you next time for new Insights!</p>
  158. </article>
  159. <hr>
  160. <footer>
  161. <p>
  162. <a href="/david/" title="Aller à l’accueil"><svg class="icon icon-home">
  163. <use xlink:href="/static/david/icons2/symbol-defs.svg#icon-home"></use>
  164. </svg> Accueil</a> •
  165. <a href="/david/log/" title="Accès au flux RSS"><svg class="icon icon-rss2">
  166. <use xlink:href="/static/david/icons2/symbol-defs.svg#icon-rss2"></use>
  167. </svg> Suivre</a> •
  168. <a href="http://larlet.com" title="Go to my English profile" data-instant><svg class="icon icon-user-tie">
  169. <use xlink:href="/static/david/icons2/symbol-defs.svg#icon-user-tie"></use>
  170. </svg> Pro</a> •
  171. <a href="mailto:david%40larlet.fr" title="Envoyer un courriel"><svg class="icon icon-mail">
  172. <use xlink:href="/static/david/icons2/symbol-defs.svg#icon-mail"></use>
  173. </svg> Email</a> •
  174. <abbr class="nowrap" title="Hébergeur : Alwaysdata, 62 rue Tiquetonne 75002 Paris, +33184162340"><svg class="icon icon-hammer2">
  175. <use xlink:href="/static/david/icons2/symbol-defs.svg#icon-hammer2"></use>
  176. </svg> Légal</abbr>
  177. </p>
  178. <template id="theme-selector">
  179. <form>
  180. <fieldset>
  181. <legend><svg class="icon icon-brightness-contrast">
  182. <use xlink:href="/static/david/icons2/symbol-defs.svg#icon-brightness-contrast"></use>
  183. </svg> Thème</legend>
  184. <label>
  185. <input type="radio" value="auto" name="chosen-color-scheme" checked> Auto
  186. </label>
  187. <label>
  188. <input type="radio" value="dark" name="chosen-color-scheme"> Foncé
  189. </label>
  190. <label>
  191. <input type="radio" value="light" name="chosen-color-scheme"> Clair
  192. </label>
  193. </fieldset>
  194. </form>
  195. </template>
  196. </footer>
  197. <script src="/static/david/js/instantpage-5.1.0.min.js" type="module"></script>
  198. <script>
  199. function loadThemeForm(templateName) {
  200. const themeSelectorTemplate = document.querySelector(templateName)
  201. const form = themeSelectorTemplate.content.firstElementChild
  202. themeSelectorTemplate.replaceWith(form)
  203. form.addEventListener('change', (e) => {
  204. const chosenColorScheme = e.target.value
  205. localStorage.setItem('theme', chosenColorScheme)
  206. toggleTheme(chosenColorScheme)
  207. })
  208. const selectedTheme = localStorage.getItem('theme')
  209. if (selectedTheme && selectedTheme !== 'undefined') {
  210. form.querySelector(`[value="${selectedTheme}"]`).checked = true
  211. }
  212. }
  213. const prefersColorSchemeDark = '(prefers-color-scheme: dark)'
  214. window.addEventListener('load', () => {
  215. let hasDarkRules = false
  216. for (const styleSheet of Array.from(document.styleSheets)) {
  217. let mediaRules = []
  218. for (const cssRule of styleSheet.cssRules) {
  219. if (cssRule.type !== CSSRule.MEDIA_RULE) {
  220. continue
  221. }
  222. // WARNING: Safari does not have/supports `conditionText`.
  223. if (cssRule.conditionText) {
  224. if (cssRule.conditionText !== prefersColorSchemeDark) {
  225. continue
  226. }
  227. } else {
  228. if (cssRule.cssText.startsWith(prefersColorSchemeDark)) {
  229. continue
  230. }
  231. }
  232. mediaRules = mediaRules.concat(Array.from(cssRule.cssRules))
  233. }
  234. // WARNING: do not try to insert a Rule to a styleSheet you are
  235. // currently iterating on, otherwise the browser will be stuck
  236. // in a infinite loop…
  237. for (const mediaRule of mediaRules) {
  238. styleSheet.insertRule(mediaRule.cssText)
  239. hasDarkRules = true
  240. }
  241. }
  242. if (hasDarkRules) {
  243. loadThemeForm('#theme-selector')
  244. }
  245. })
  246. </script>
  247. </body>
  248. </html>