<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>線上演算法 on BenzHub</title><link>https://benzhub.github.io/tags/%E7%B7%9A%E4%B8%8A%E6%BC%94%E7%AE%97%E6%B3%95/</link><description>Recent content in 線上演算法 on BenzHub</description><generator>Hugo</generator><language>zh-TW</language><lastBuildDate>Mon, 20 Jul 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://benzhub.github.io/tags/%E7%B7%9A%E4%B8%8A%E6%BC%94%E7%AE%97%E6%B3%95/index.xml" rel="self" type="application/rss+xml"/><item><title>近似與線上演算法完全指南 — 頂點覆蓋、集合覆蓋與秘書問題 | 資料結構與演算法</title><link>https://benzhub.github.io/post/javascript/data-structures--algorithms/037-approximation-online/</link><pubDate>Mon, 20 Jul 2026 00:00:00 +0000</pubDate><guid>https://benzhub.github.io/post/javascript/data-structures--algorithms/037-approximation-online/</guid><description>&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;近似演算法（Approximation Algorithms）&lt;/strong&gt; 與 &lt;strong&gt;線上演算法（Online Algorithms）&lt;/strong&gt; 是面對現實世界中 &lt;strong&gt;NP-hard&lt;/strong&gt; 問題與即時決策場景的兩大核心武器。近似演算法在多項式時間內找到「足夠好」的解，並以 &lt;strong&gt;近似比（Approximation Ratio）&lt;/strong&gt; 量化品質保證；線上演算法則在完全不知未來輸入的情況下即時決策，以 &lt;strong&gt;競爭比（Competitive Ratio）&lt;/strong&gt; 衡量與最優離線解的差距。本文將帶你從理論基礎出發，完整掌握 &lt;strong&gt;Vertex Cover 2-近似&lt;/strong&gt;、&lt;strong&gt;Set Cover 貪心法&lt;/strong&gt;、&lt;strong&gt;TSP 2-近似&lt;/strong&gt;、&lt;strong&gt;秘書問題 1/e 策略&lt;/strong&gt;、&lt;strong&gt;Paging&lt;/strong&gt; 與 &lt;strong&gt;負載均衡&lt;/strong&gt; 等經典技術，搭配 JavaScript/TypeScript 與 C++ 雙語言實作。&lt;/p&gt;
&lt;/blockquote&gt;</description></item></channel></rss>