Escolar Documentos
Profissional Documentos
Cultura Documentos
Introduo
Modelagem
1. Modelagem
2. Algoritmos Exatos e Heursticas
Introduo
Modelagem
O PROBLEMA
Introduo
Modelagem
APLICAES
Sugihara (1984)
MODELAGEM
Introduo
Modelagem
DEFINIES
Introduo
Modelagem
SOLVER
GNU Linear Programming Kit (GLPK)
Suporte a: C, C++, Java
Linguagem de modelagem: GAMS e GMPL
(Subconjunto de AMPL).
Licena: Software Livre.
Introduo
Modelagem
MODELO DE P.L.
wi xi
i=1
sujeito a :
xi
i=1
sujeito a :
xi + xj 1, (i, j) E,
xi + xj 1, (i, j) E,
Introduo
Modelagem
EXEMPLO
Para
o grafo ao lado, teramos a seguinte instancia:
Maximizar
xi
i=1
sujeito a :
x1 + x3 1,
x1 + x4 1,
x1 + x6 1,
x3 + x5 1,
x3 + x6 1,
x5 + x6 1,
x2 + x4 1,
x2 + x6 1,
Introduo
Modelagem
GLPK (1)
Modelo para o GLPK:
1
2
3
4
5
set V ;
set NE within {V , V };
var x { i in V } binary ;
maximize z : sum { i in V } x [ i ];
subject to packing {( i , j ) in NE }: x [ i ] +
x [ j ] <= 1;
Exemplo de entrada:
1
2
3
data ;
set V := 1 ,2 ,3 ,4 ,5 ,6;
set NE := (1 ,3) (1 ,4) (1 ,6) (2 ,4) (2 ,6)
(3 ,5) (3 ,6) (5 ,6)
10
Introduo
Modelagem
BRONKERBOSCH
12
Introduo
Modelagem
BronKerbosch Naive:
1
2
3
4
5
6
7
BronKerbosch (R , P , X ) :
if P and X are both empty :
report R as a maximal clique
for each vertex v in P :
BronKerbosch ( R{ v } , PN ( v ) , XN ( v ) )
P := P \ { v }
X := X { v }
13
Introduo
Modelagem
14
Introduo
Modelagem
BronKerbosch (R ,P , X ) :
if P and X are both empty :
report R as a maximal clique
choose a pivot vertex u in P X
for each vertex v in P \ N ( u ) :
BronKerbosch ( R{ v } , PN ( v ) , XN ( v ) )
P := P \ { v }
X := X { v }
15
Introduo
Modelagem
HEURSTICAS
Para as heursticas decidimos implementar algoritmos sequenciais
gulosos. Essas heursticas geram uma clique maximal atravs de
repetidas adies de vrtices em uma clique parcial (no
maximal), ou atravs da remoo de um vrtice de um conjunto
que no uma clique.
Kopf & Ruhe (1987) nomearam essas duas classes como Best In
e Worst Out, respectivamente.
No Best In, a partir de um conjunto de vrtices vazio,
seleciona-se sempre o vrtice com maior grau de incidncia.
Para o Worst Out, a partir de um conjunto com todos os
vrtices do grafo, seleciona-se aquele que possui o menor grau de
incidncia, e a cada iterao verificado se o conjunto restante ,
ou no, uma clique.
16
Introduo
Modelagem
.
.
.
Tempo (segundos)
4,000
.
.
.
P.L - GLPK
BronKerbosch - P
BronKerbosch - N
3,000
2,000
1,000
.
0
.
0
50
100
350
400
17
Introduo
Modelagem
Tempo (segundos)
0.008
Heurstica 1 - Best In
0.006
0.004
0.002
0
.
.
0
50
100
350
400
18
Introduo
Modelagem
Tempo (segundos)
25
20
15
10
5
.
0
.
0
50
100
350
400
19
Introduo
Modelagem
100 %
.
.
Heurstica 1 - Best In
Heurstica 2 - Worst Out
80 %
60 %
40 %
20 %
0% .
.
0
50
100
350
400
20
Introduo
Modelagem
REFERNCIAS
21
Introduo
Modelagem
REFERNCIAS
6. Ben-Dor, Amir; Shamir, Ron; Yakhini, Zohar (1999),
Clustering gene expression patterns., Journal of
Computational Biology 6 (34): 281297
7. Sugihara, George (1984), "Graph theory, homology and food
webs", in Levin, Simon A., Population Biology, Proc. Symp.
Appl. Math. 30, pp. 83101
8. Day, William H. E.; Sanko, David (1986), Computational
complexity of inferring phylogenies by compatibility,
Systematic Zoology 35 (2): 224229
9. Tanay, Amos; Sharan, Roded; Shamir, Ron (2002),
Discovering statistically significant biclusters in gene
expression data, Bioinformatics 18 (Suppl. 1): S136S144
10. R. Kopf and G. Ruhe, A computational study of the
weighted independent set problem for general graphs, Found.
Control Engin., Vol. 12: 167-180, 1987
22