06.04.2014 Views

Teoria dos Grafos Conjunto Independente de Vértices Conjunto ...

Teoria dos Grafos Conjunto Independente de Vértices Conjunto ...

Teoria dos Grafos Conjunto Independente de Vértices Conjunto ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Teoria</strong> <strong>dos</strong> <strong>Grafos</strong><br />

<strong>Conjunto</strong> <strong>In<strong>de</strong>pen<strong>de</strong>nte</strong> <strong>de</strong> Vértices<br />

• Seja um grafo G= (V, E):<br />

– Um conjunto in<strong>de</strong>pen<strong>de</strong>nte <strong>de</strong> <strong>de</strong> vértices V IND IND<br />

<strong>de</strong> <strong>de</strong> G é um<br />

subconjunto <strong>de</strong> <strong>de</strong> V em que não existe nenhuma aresta entre<br />

qualquer par <strong>de</strong> <strong>de</strong> elementos <strong>de</strong> <strong>de</strong> V IND . IND .<br />

<strong>Conjunto</strong> <strong>In<strong>de</strong>pen<strong>de</strong>nte</strong> <strong>de</strong> Vértices, Clique e<br />

Cobertura <strong>de</strong> Vértices<br />

Grafo G<br />

<strong>Conjunto</strong> <strong>In<strong>de</strong>pen<strong>de</strong>nte</strong> <strong>de</strong> G<br />

<strong>Teoria</strong> <strong>dos</strong> <strong>Grafos</strong><br />

© Jorge Figueiredo, DSC/UFCG<br />

<strong>Teoria</strong> <strong>dos</strong> <strong>Grafos</strong><br />

© Jorge Figueiredo, DSC/UFCG<br />

<strong>Conjunto</strong> <strong>In<strong>de</strong>pen<strong>de</strong>nte</strong> <strong>de</strong> Vértices<br />

<strong>Conjunto</strong> <strong>In<strong>de</strong>pen<strong>de</strong>nte</strong> <strong>de</strong> Vértice<br />

• V IND IND<br />

é máximo se se não existe um V IND IND<br />

’’ tal talque |V |V IND IND<br />

’| ’| > |V |V IND IND<br />

|. |.<br />

• V IND IND<br />

é maximal se se não existe um V IND IND<br />

’’ tal talque V IND IND<br />

’’ ⊃ V IND IND<br />

..<br />

• O conjunto in<strong>de</strong>pen<strong>de</strong>nte do do exemplo abaixo é máximo? É<br />

maximal?<br />

Exercício 1: 1:<br />

• Encontre no no grafo abaixo um <strong>Conjunto</strong> <strong>In<strong>de</strong>pen<strong>de</strong>nte</strong> Maximal<br />

que não é máximo. Qual a cardinalida<strong>de</strong> do do <strong>Conjunto</strong><br />

<strong>In<strong>de</strong>pen<strong>de</strong>nte</strong> máximo?<br />

A B C D<br />

E F G H<br />

Grafo G<br />

<strong>Conjunto</strong> <strong>In<strong>de</strong>pen<strong>de</strong>nte</strong> <strong>de</strong> G<br />

<strong>Teoria</strong> <strong>dos</strong> <strong>Grafos</strong><br />

© Jorge Figueiredo, DSC/UFCG<br />

<strong>Teoria</strong> <strong>dos</strong> <strong>Grafos</strong><br />

© Jorge Figueiredo, DSC/UFCG<br />

<strong>Conjunto</strong> <strong>In<strong>de</strong>pen<strong>de</strong>nte</strong> <strong>de</strong> Vértice<br />

<strong>Conjunto</strong> <strong>In<strong>de</strong>pen<strong>de</strong>nte</strong> <strong>de</strong> Vértice<br />

Exercício 2: 2:<br />

• Consi<strong>de</strong>re o algoritmo abaixo. Ele resolve o problema do do<br />

conjunto in<strong>de</strong>pen<strong>de</strong>nte máximo?<br />

Exercício 3: 3:<br />

• Consi<strong>de</strong>re o algoritmo abaixo. Ele resolve o problema do do<br />

conjunto in<strong>de</strong>pen<strong>de</strong>nte máximo?<br />

CINDMax1(G)<br />

C IND<br />

← ∅<br />

while ∃v ∈ V-C IND | C IND ∪ {v} é in<strong>de</strong>pen<strong>de</strong>nte do<br />

C IND<br />

← C IND<br />

∪ {v}<br />

CINDMax2(G)<br />

C IND<br />

← ∅<br />

Y ← V<br />

while Y ≠ ∅do<br />

escolher v ∈ V, com |N(v)| mínimo<br />

C IND<br />

← C IND<br />

∪ {v}<br />

Y ← Y – {v}<br />

Y ← Y – N(v)<br />

return C IND<br />

return C IND<br />

<strong>Teoria</strong> <strong>dos</strong> <strong>Grafos</strong> © Jorge Figueiredo, DSC/UFCG<br />

<strong>Teoria</strong> <strong>dos</strong> <strong>Grafos</strong><br />

© Jorge Figueiredo, DSC/UFCG<br />

1


Cobertura <strong>de</strong> Vértices<br />

Clique<br />

• Seja um grafo G= (V, E):<br />

– Uma cobertura <strong>de</strong> <strong>de</strong> vértices V COB COB<br />

<strong>de</strong> <strong>de</strong> G é um subconjunto <strong>de</strong> <strong>de</strong><br />

V em que para qualquer aresta (u, (u, v) v) ∈ E, E, u ∈V COB ou COB ouv ∈<br />

V COB . COB .<br />

• Seja um grafo G= (V, E):<br />

– Um clique V CLQ CLQ<br />

<strong>de</strong> <strong>de</strong> G é um subconjunto <strong>de</strong> <strong>de</strong> V, V, em que<br />

quaisquer dois vértices u, u, v ∈ V CLQ , CLQ , a aresta (u, (u, v) v) ∈ E. E.<br />

Duas possíveis cobertura <strong>de</strong> vértices <strong>de</strong> G<br />

<strong>Teoria</strong> <strong>dos</strong> <strong>Grafos</strong><br />

© Jorge Figueiredo, DSC/UFCG<br />

<strong>Teoria</strong> <strong>dos</strong> <strong>Grafos</strong><br />

© Jorge Figueiredo, DSC/UFCG<br />

Exercício<br />

• Não existe nenhum algoritmo <strong>de</strong> <strong>de</strong> tempo polinomial que<br />

resolva estes problemas.<br />

• É possível, entretanto, verificar em tempo polinomial se se um<br />

<strong>de</strong>terminado conjunto <strong>de</strong> <strong>de</strong> vértices é um conjunto<br />

in<strong>de</strong>pen<strong>de</strong>nte, um clique ou ou uma cobertura <strong>de</strong> <strong>de</strong> vértices.<br />

• Um conjunto in<strong>de</strong>pene<strong>de</strong>nte <strong>de</strong> <strong>de</strong> G é um clique do do<br />

complemento <strong>de</strong> <strong>de</strong> G. G.<br />

• A Vila <strong>de</strong> <strong>de</strong> <strong>Grafos</strong> é uma área que consiste <strong>de</strong> <strong>de</strong> um gran<strong>de</strong><br />

número <strong>de</strong> <strong>de</strong> ruas retilíneas que ligam pequenas praças. Um<br />

guarda postado em uma praça é capaz <strong>de</strong> <strong>de</strong> vigiar todas as as<br />

ruas que saem da da praça. Qual o número mínimo guardas<br />

necessário para vigiar toda a Vila? Resolva usando grafos.<br />

<strong>Teoria</strong> <strong>dos</strong> <strong>Grafos</strong><br />

© Jorge Figueiredo, DSC/UFCG<br />

<strong>Teoria</strong> <strong>dos</strong> <strong>Grafos</strong><br />

© Jorge Figueiredo, DSC/UFCG<br />

2

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

Saved successfully!

Ooh no, something went wrong!