【发布时间】:2013-02-04 07:01:25
【问题描述】:
我正在尝试使用贪心算法实现集合覆盖问题的解决方案。
它的经典贪心逼近算法是
input: collection C of sets over universe U , costs: C→R ≥0
output: set cover S
1. Let S←∅.
2. Repeat until S covers all elements:
3. Add a set s to S, where s∈C maximizes the number of elements in s not yet covered by set s in S, divided by the cost c(s).
4. Return S.
我的问题分为两部分:
一个。反向执行算法是否是有效算法,即
input: collection C of sets over universe U , costs: C→R ≥0
output: set cover S
1. Let S←C .
2. Repeat until there are no s∈S such that S-s=S (i.e. all elements in s are redundant):
3. Remove a set s from S, where s∈S minimises the number of elements in s, divided by the cost c(s).
4. Return S.
b.问题的本质是很容易得到 C 并且冗余集的数量有限(removal 算法会表现更好吗?
【问题讨论】:
标签: algorithm greedy set-cover