TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

The Simplest Interesting Algorithm (2019)

2 pointsby randomizedalgsover 3 years ago

2 comments

randomizedalgsover 3 years ago
The randomized version of this algorithm is also fun: repeatedly find an edge that is not yet covered, select one of the two end points at <i>random</i>, and add it to S.<p>It&#x27;s a nice exercise to show that the randomized algorithm is also a 2-approximate algorithm, i.e., the size of S is at most twice the size of S_{OPT}, in expectation.
anikan_vaderover 3 years ago
I refer you to Bogosort. [1] One of the simplest interesting randomized algorithms.<p><a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Bogosort" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Bogosort</a>