Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite954451

Browse files
1 parent6252853 commite954451

File tree

7 files changed

+194
-176
lines changed

7 files changed

+194
-176
lines changed

‎1500/feed_json_updated.json‎

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

‎1500/feed_rss_created.xml‎

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

‎1500/feed_rss_updated.xml‎

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

‎1500/geometry/enclosing-circle.html‎

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6634,10 +6634,28 @@
66346634

66356635

66366636

6637+
6638+
6639+
6640+
6641+
6642+
6643+
6644+
6645+
6646+
6647+
6648+
6649+
6650+
66376651

66386652

66396653

66406654

6655+
6656+
6657+
6658+
66416659

66426660

66436661

@@ -6650,7 +6668,7 @@
66506668
<ulclass="metadata page-metadata"data-bi-name="page info"lang="en-us"dir="ltr">
66516669

66526670
Last update:
6653-
<spanclass="git-revision-date-localized-plugin git-revision-date-localized-plugin-date"title="August19, 202515:59:22 UTC">August19, 2025</span>&emsp;
6671+
<spanclass="git-revision-date-localized-plugin git-revision-date-localized-plugin-date"title="August23, 202522:03:07 UTC">August23, 2025</span>&emsp;
66546672

66556673
<!-- Tags -->
66566674

@@ -6671,14 +6689,14 @@ <h1 id="minimum-enclosing-circle">Minimum Enclosing Circle<a class="headerlink"
66716689
<p>You're given<spanclass="arithmatex">$n \leq 10^5$</span> points<spanclass="arithmatex">$p_i=(x_i, y_i)$</span>.</p>
66726690
<p>For each<spanclass="arithmatex">$p_i$</span>, find whether it lies on the circumference of the minimum enclosing circle of<spanclass="arithmatex">$\{p_1,\dots,p_n\}$</span>.</p>
66736691
</div>
6674-
<p>Here, by the minimum enclosing circle (MEC) we mean a circle with minimum possible radius that contains all the<spanclass="arithmatex">$n$</span>p, inside the circle or on its boundary. This problem has a simple randomized solution that, on first glance, looks like it would run in<spanclass="arithmatex">$O(n^3)$</span>, but actually works in<spanclass="arithmatex">$O(n)$</span> expected time.</p>
6692+
<p>Here, by the minimum enclosing circle (MEC) we mean a circle with minimum possible radius that contains all the<spanclass="arithmatex">$n$</span>points, inside the circle or on its boundary. This problem has a simple randomized solution that, on first glance, looks like it would run in<spanclass="arithmatex">$O(n^3)$</span>, but actually works in<spanclass="arithmatex">$O(n)$</span> expected time.</p>
66756693
<p>To better understand the reasoning below, we should immediately note that the solution to the problem is unique:</p>
66766694
<detailsclass="question">
66776695
<summary>Why is the MEC unique?</summary>
6678-
<p>Consider the following setup: Let<spanclass="arithmatex">$r$</span> be the radius of the MEC. We draw a circle of radius<spanclass="arithmatex">$r$</span> around each of thep<spanclass="arithmatex">$p_1,\dots,p_n$</span>. Geometrically, the centers of circles that have radius<spanclass="arithmatex">$r$</span> and cover all the points<spanclass="arithmatex">$p_1,\dots,p_n$</span> form the intersection of all<spanclass="arithmatex">$n$</span> circles.</p>
6696+
<p>Consider the following setup: Let<spanclass="arithmatex">$r$</span> be the radius of the MEC. We draw a circle of radius<spanclass="arithmatex">$r$</span> around each of thepoints<spanclass="arithmatex">$p_1,\dots,p_n$</span>. Geometrically, the centers of circles that have radius<spanclass="arithmatex">$r$</span> and cover all the points<spanclass="arithmatex">$p_1,\dots,p_n$</span> form the intersection of all<spanclass="arithmatex">$n$</span> circles.</p>
66796697
<p>Now, if the intersection is just a single point, this already proves that it is unique. Otherwise, the intersection is a shape of non-zero area, so we can reduce<spanclass="arithmatex">$r$</span> by a tiny bit, and still have non-empty intersection, which contradicts the assumption that<spanclass="arithmatex">$r$</span> was the minimum possible radius of the enclosing circle.</p>
66806698
<p>With a similar logic, we can also show the uniqueness of the MEC if we additionally demand that it passes through a given specific point<spanclass="arithmatex">$p_i$</span> or two points<spanclass="arithmatex">$p_i$</span> and<spanclass="arithmatex">$p_j$</span> (it is also unique because its radius uniquely defines it).</p>
6681-
<p>Alternatively, we can also assume that there are two MECs, and then notice that their intersection (which containsp<spanclass="arithmatex">$p_1,\dots,p_n$</span> already) must have a smaller diameter than initial circles, and thus can be covered with a smaller circle.</p>
6699+
<p>Alternatively, we can also assume that there are two MECs, and then notice that their intersection (which containsthe points<spanclass="arithmatex">$p_1,\dots,p_n$</span> already) must have a smaller diameter than initial circles, and thus can be covered with a smaller circle.</p>
66826700
</details>
66836701
<h2id="welzls-algorithm">Welzl's algorithm<aclass="headerlink"href="#welzls-algorithm"title="Permanent link">&para;</a></h2>
66846702
<p>For brevity, let's denote<spanclass="arithmatex">$\operatorname{mec}(p_1,\dots,p_n)$</span> to be the MEC of<spanclass="arithmatex">$\{p_1,\dots,p_n\}$</span>, and let<spanclass="arithmatex">$P_i = \{p_1,\dots,p_i\}$</span>.</p>
@@ -6828,7 +6846,7 @@ <h2 id="practice-problems">Practice problems<a class="headerlink" href="#practic
68286846

68296847
<ulclass="metadata page-metadata"data-bi-name="page info"lang="en-us"dir="ltr">
68306848
<spanclass="contributors-text">Contributors:</span>
6831-
<ulclass="contributors"data-bi-name="contributors"><li><ahref="https://github.com/adamant-pwn"title="adamant-pwn"data-bi-name="contributorprofile"target="_blank">adamant-pwn</a> (100.0%)</li></ul>
6849+
<ulclass="contributors"data-bi-name="contributors"><li><ahref="https://github.com/adamant-pwn"title="adamant-pwn"data-bi-name="contributorprofile"target="_blank">adamant-pwn</a> (98.09%)</li><li><ahref="https://github.com/MKLOL"title="MKLOL"data-bi-name="contributorprofile"target="_blank">MKLOL</a> (1.91%)</li></ul>
68326850
</ul>
68336851

68346852
</article>

‎1500/search/search_index.json‎

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp