13.04.2013 Views

Algoritmos e complexidade Notas de aula - Arquivo Escolar

Algoritmos e complexidade Notas de aula - Arquivo Escolar

Algoritmos e complexidade Notas de aula - Arquivo Escolar

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

8. <strong>Algoritmos</strong> <strong>de</strong> aproximação<br />

Exemplo: Cobertura por vértices gulosa<br />

Algoritmo 8.1 (Cobertura por vértices)<br />

Entrada Grafo não-direcionado G = (V, E).<br />

Saída Cobertura por vértices C ⊆ V .<br />

1 VC GV(G) :=<br />

2 (C, G) := Reduz (G)<br />

3 i f V = ∅ then<br />

4 return C<br />

5 else<br />

6 e s c o l h e v ∈ V : <strong>de</strong>g(v) = ∆(G) { grau máximo }<br />

7 return C ∪ {v} ∪ VC-GV(G − v)<br />

8 end i f<br />

Proposição 8.1<br />

O algoritmo VC-GV é uma O(log |V |)-aproximação.<br />

Prova. Seja Gi o grafo <strong>de</strong>pois da iteração i e C ∗ uma cobertura ótima, i.e.,<br />

|C ∗ | = OPT(G).<br />

A cobertura ótima C ∗ é uma cobertura para Gi também. Logo, a soma dos<br />

graus dos vértices em C ∗ (contando somente arestas em Gi!) ultrapassa o<br />

número <strong>de</strong> arestas em Gi<br />

<br />

v∈C ∗<br />

δGi (v) ≥ Gi<br />

e o grau médio dos vértices em Gi satisfaz<br />

<br />

¯δGi(Gi)<br />

v∈C∗ δGi(v)<br />

=<br />

|C∗ ≥<br />

|<br />

Gi<br />

|C∗ Gi<br />

=<br />

| OPT(G) .<br />

Como o grau máximo é maior que o grau médio temos também<br />

Com isso po<strong>de</strong>mos estimar<br />

<br />

∆(Gi) ≥ <br />

180<br />

0≤i

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!