News for hackers. Stuff that matters.
Re:The World's Simplest Interesting Algorithm (2019) by downshun on Wednesday June 10, 2020 @01:26AM (#23474242)
I'm not sure this is right.

Take a star with many (>3) leaves

Replace every leaf by a star

The algorithm fails by picking up leaves

Re:The World's Simplest Interesting Algorithm (2019) by lalaland1125 on Wednesday June 10, 2020 @02:03AM (#23474410)
Your intuition was right in that explanation provided in this proof is incorrect.. https://www.cl.cam.ac.uk/teaching/1415/AdvAlgo/lec8_ann.pdf has a more complete explanation. The algorithm works (and gets a 2x bound), but only because of how it processes the edges sequentially and makes sure to only process edges that aren't already covered.
Re:The World's Simplest Interesting Algorithm (2019) by 0xfaded on Wednesday June 10, 2020 @01:45AM (#23474332)
Assuming your star is a single center vertex which is a vertex to all edges (like spokes in a wheel), then the optimal cover for all edges is 1, the central vertex. If you follow the algorithm, you will select two vertices and produce a covering, which is within a factor of two of the optimal.

I remember proving this algorithm in class (a while ago). What I found interesting from Wikipedia is that this is the best known approximation, there is a proven lower bound of 1.363.

Re:The World's Simplest Interesting Algorithm (2019) by saagarjha on Wednesday June 10, 2020 @01:42AM (#23474316)
If you pick up a leaf, you also pick up the star one level up and thus the entire subtree is now covered (so you don’t look at it again). What is the failure, specifically?
Re:The World's Simplest Interesting Algorithm (2019) by downshun on Wednesday June 10, 2020 @01:43AM (#23474321)
True. Hmm.