southgiri.log
로그인
southgiri.log
로그인
Approximation Algorithms (2)
Southgiri
·
2025년 6월 21일
팔로우
0
algorithm
approximation
SNUON Algorithm
목록 보기
6/7
Set-Covering Problem
Set-Covering Problem
Set-Covering Problem Formulation
A finite set
X
X
X
A family
F
F
F
of subsets of
X
X
X
X
=
∪
S
∈
F
S
X=\cup_{S\in F}S
X
=
∪
S
∈
F
S
Find a minimum size subset
C
⊂
F
C \sub F
C
⊂
F
whose members cover all of
X
X
X
(
C
C
C
: set cover)
NP-Completeness
Reduction in polynomial time
Given a graph
G
=
(
V
,
E
)
G=(V,E)
G
=
(
V
,
E
)
and integer
k
k
k
, define
X
=
E
X=E
X
=
E
and
F
=
V
F=V
F
=
V
Approximation
A simple greedy heuristic with a logarithmic approximation ratio
남은 vertex 중 가장 많은 vertex 를 커버하는 Set 선택
Time complexity
S
S
S
의 원소 개수는 최대
X
X
X
개,
S
S
S
의 개수는
F
F
F
개
Proof
Let
S
i
S_i
S
i
be the
i
i
i
-th subset selected by Greedy-Set-Cover
S
i
S_i
S
i
가 선택될 때마다 cost 1 을 assign, 처음으로 선택되는 element 들에 cost 분산해줌
Element
x
x
x
가
S
i
S_i
S
i
에 의해 처음 선택된 경우 cost
c
x
c_x
c
x
S
i
S_i
S
i
에서 처음으로 선택된 element 개수의 역수
알고리즘의 매 step 마다 cost 1을 할당하기 때문에
∣
C
∣
=
∑
x
∈
X
c
x
|C|=\displaystyle\sum_{x \in X}c_x
∣
C
∣
=
x
∈
X
∑
c
x
Cost assigned to the optimal cover
C
∗
C^*
C
∗
is
∑
S
∈
C
∗
∑
x
∈
S
c
x
\displaystyle\sum_{S \in C^*}\sum_{x \in S}c_x
S
∈
C
∗
∑
x
∈
S
∑
c
x
Each
x
∈
X
x \in X
x
∈
X
is in at least one set
s
∈
C
∗
s \in C^*
s
∈
C
∗
,
∑
S
∈
C
∗
∑
x
∈
S
c
x
≥
∑
x
∈
X
c
x
\displaystyle\sum_{S \in C^*}\sum_{x \in S}c_x \geq \sum_{x \in X}c_x
S
∈
C
∗
∑
x
∈
S
∑
c
x
≥
x
∈
X
∑
c
x
C
∗
C^*
C
∗
의 set
S
i
S_i
S
i
에
x
x
x
가 여러번 포함될 수 있기 때문에
∴
∣
C
∣
≤
∑
S
∈
C
∗
∑
x
∈
S
c
x
\therefore |C| \leq \displaystyle\sum_{S \in C^*}\sum_{x \in S}c_x
∴
∣
C
∣
≤
S
∈
C
∗
∑
x
∈
S
∑
c
x
Southgiri
팔로우
이전 포스트
Approximation Algorithms (1)
다음 포스트
Approximation Algorithms (3)
0개의 댓글
댓글 작성