文章目录 P、NP、NP-hard 和 NPC 多项式时间 概念区分 NP-hard 的证明 例题 1 证明 T S P TSP TSP 问题是 N P − h a r d NP-hard NP−hard 问题 。 例题 2 证明最大加权独立集问题是 N P − h a r d NP-hard NP−hard 问题。 扩展 NP-hard 问题 3-SAT 问题 TSP 旅行商问题 Load Balancing Load Balancing Load balancing on 2 machines is NP-hard Load Balancing: List Scheduling Load balancing: list scheduling analysis Load balancing: LPT rule Center selection Center selection problem Greedy algorithm: a false start Center Selection: Greedy Algorithm Analysis of Greedy Algorithm pricing method:Weighted vertex cover Weighted vertex cover 最小权顶点覆盖 Pricing method 定价法 定价法近似算法 定价法近似算法例子 定价法近似算法分析 LP rounding: weighted vertex cover weighted vertex cover Weighted vertex cover: ILP formulation LP 可行域 Poly-time reductions Reduction Independent set Vertex cover Vertex cover and independent set reduce to one another Set-Cover 集合覆盖 Vertex cover reduces to set cover Satisfiability 3-satisfiability reduces to independent set Review Hamilton Hamilton cycle Directed Hamilton cycle reduces to Hamilton cycle 3-satisfiability reduces to directed Hamilton cycle 近似算法-徐小华 P、NP、NP-hard 和 NPC 多项式时间 多项式时间是指 一个问题的计算时间随着问题的规模增加而增加的速度,多项式时间的算法可以用多项式倍数来表示。 多项式时间的一般形式是 O ( n k ) O(n^k) O(n