june 14, 2002problemas de otimização em network design e biologia page 1/67 problemas de...
TRANSCRIPT
June 14, 2002
Problemas de otimização em network design e biologia
Page 1/67
Problemas de otimização em network design e biologia: •Ajuste de pesos em roteamento sob OSPF• Correspondência de grafos em reconhecimento de cenasCelso Carneiro Ribeiro
Seminário do Departamento de InformáticaPUC-Rio, Junho 2002
June 14, 2002
Problemas de otimização em network design e biologia
Page 2/67
Weight setting in OSPF routing
• Weight setting in OSPF routing• Genetic algorithm for OSPF
routing• Population dynamics• Parallel GA for OSPF routing• Numerical results and
conclusions
June 14, 2002
Problemas de otimização em network design e biologia
Page 3/67
Weight setting in OSPF routing
• Internet traffic has been doubling each year Coffman & Odlyzko (2001): in the 1995-96 period (introduction of web browsers), traffic doubled every three months!
• Increasingly heavy traffic (due to video, voice, etc.) is raising the requirements of the Internet of tomorrow.
June 14, 2002
Problemas de otimização em network design e biologia
Page 4/67
Weight setting in OSPF routing
• Objective of traffic engineering: make more efficient use of existing network resources
• Routing of traffic can have a major impact on the efficiency of network resource utilization
June 14, 2002
Problemas de otimização em network design e biologia
Page 5/67
Packets of information
body header
Information sent over the Internet is broken into chunks, calledpackets or datagrams.
Contains necessary routinginformation, such as IP destination address.
June 14, 2002
Problemas de otimização em network design e biologia
Page 6/67
Packet routing
router
router
router
router
router
When packet arrives at router,router must decide where tosend it next.
Packet’s final destination.
Routing consists in finding apath from source to destination.
D1
D2
D3
D4
R1
R2R3
R4Routing table
June 14, 2002
Problemas de otimização em network design e biologia
Page 7/67
Autonomous systemsTo decrease the complexity ofrouting, the Internet is divided intosmaller domains, called AutonomousSystems.
AS1
AS2
AS3
AS4Routing within an AS is done viaInterior Gateway Protocols (IGP),while between AS’s Exterior GatewayProtocols (EGP) are used.
June 14, 2002
Problemas de otimização em network design e biologia
Page 8/67
OSPF (Open Shortest Path First)
• OSPF is the most commonly used intra-domain routing protocol (IGP).
• It requires routers to exchange routing information with all other routers in the AS.– Complete network topology knowledge
is available to all routers, i.e. state of all routers and links in the AS.
June 14, 2002
Problemas de otimização em network design e biologia
Page 9/67
Weight setting in OSPF routing
• Each link in the AS is assigned an integer weight [1,65535=2161]– Smaller weights may be used: MAX
• Each router computes tree of shortest weight paths to all other routers in the AS, with itself as the root, using Dijkstra’s algorithm.Bottom: Cisco 7000 router
Top: ForeRunner ASX-200 ATM switch
June 14, 2002
Problemas de otimização em network design e biologia
Page 10/67
Weight setting in OSPF routing
321
351
2
4
D1
D2
D3
D4
R1
R1R2
R3
root
First hop routers.
Routing table
Destination routers
Routing table is filledwith first hop routersfor each possible destination.In case of multiple shortest paths, flow is evenly split.
D5D6
R1
R3 6
Cisco 12400 routers
June 14, 2002
Problemas de otimização em network design e biologia
Page 11/67
Weight setting in OSPF routing
• OSPF weights are assigned by network operator– CISCO assigns, by default, a weight proportional
to the inverse of the available link bandwidth.– If all weights are unit, the cost of a path is the
number of hops in the path.• Fortz & Thorup (2000): weight setting by
using local search on large networks with up to 100 nodes and 503 links
• Ericsson, Pardalos, & Resende (2001): genetic algorithm
June 14, 2002
Problemas de otimização em network design e biologia
Page 12/67
Minimization of congestion• Directed capacitated network G = (N,A,c),
where N are routers, A are links, and ca is the capacity of link a A.
• Same measure of Fortz & Thorup (2000) to compute congestion (also used for PVC routing):
= 1(L1) + 2(L2) + … + |A|(L|A|) La is the load on link a A, a(La) is piecewise
linear and convex, and a(0) = 0, for all a A.
June 14, 2002
Problemas de otimização em network design e biologia
Page 13/67
Piecewise linear and convex a(La) link
congestion measure
0
10
20
30
40
50
60
70
0 0.2 0.4 0.6 0.8 1 1.2
cost
per
uni
t of c
apac
ity
trunk utilization rate
slope = 1slope = 3 slope = 10
slope = 70
slope = 500
slope = 5000
(Laca )
June 14, 2002
Problemas de otimização em network design e biologia
Page 14/67
Weight setting in OSPF routing• Given a directed network G = (N, A )
with link capacities ca A and demand matrix D = (ds,t ) specifying a demand to be sent from node s to node t :– Assign weights wa [1,65535] to each link
a A, such that the objective function is minimized when demand is routed according to the OSPF protocol.
• Weights are computed off-line and do not change often
June 14, 2002
Problemas de otimização em network design e biologia
Page 15/67
Genetic algorithms
Initialize and evaluate P (0);
Set t = 1Test termination Generate P (t )
from P (t1)
Alter P (t )
Evaluate P (t )t = t + 1
done
crossover
mutationP (t ) is population ofsolutions at generation t.
June 14, 2002
Problemas de otimização em network design e biologia
Page 16/67
GA for OSPF: solution encoding
• Ericsson, Pardalos, & Resende (2001)• A population consists of nPop integer
weight arrays: w = (w1, w2 ,…, w|A| ), where wa [1,MAX] • All possible weight arrays correspond
to feasible solutions, i.e., every weight setting is feasible– nice problem feature for application of a
GA
June 14, 2002
Problemas de otimização em network design e biologia
Page 17/67
GA for OSPF: fitness evaluation
• Route each demand pair (s,t ) using OSPF
• Compute loads Las,t
on each link a A• Add up loads on each link a A, yielding
total load La on link• Compute link congestion cost a(La) for
each link a A• Add up costs:
= 1(L1) + 2(L2) + … + |A|(L|A|)
June 14, 2002
Problemas de otimização em network design e biologia
Page 18/67
Initial population• nPop 10 solutions with randomly
generated arc weights, uniformly in the interval [1,MAX]
• Weight settings of two other common heuristics:– OSPF (unit): all weights set to 1– OSPF (invCap): each arc weight is set
inversely proportional to its arc capacity– OSPF (fractions): all weights set to .MAX,
with = 1/8, 1/4, 3/8, 1/2, 5/8, 3/4, 7/8, 1 all but invCap lead to the same routing
decisions (all weights are equal)
June 14, 2002
Problemas de otimização em network design e biologia
Page 19/67
Population partitioning
Class A
Class C
Class B
20% most fit
10% least fit
Population is sorted according tofitness (solution value) and solutions are classified into three categories.
June 14, 2002
Problemas de otimização em network design e biologia
Page 20/67
Population dynamics
Class A
Class C
Class B
generation t generation t + 1
Class AClass A is promoted unchanged
Class C is replaced by randomlygenerated solutions.
Class C
Class B is replaced by crossover of: one Class A parent and
one Class B or Cparent.
Class B
June 14, 2002
Problemas de otimização em network design e biologia
Page 21/67
Parent selection• Parents are chosen at random:
– one parent from Class A (elite)– one parent from Class B or C (non-elite)
• Reselection is allowed, i.e. parents can breed more than once per generation
• Better individuals are more likely to reproduce
June 14, 2002
Problemas de otimização em network design e biologia
Page 22/67
Crossover with random keys
Bean (1994): crossover combines elite parent p1 with non-elite parent p2 to produce child c :
for all genes i = 1,2,…,|A | do if rrandom[0,1] < 0.01 then c [i ] = irandom[1,MAX] else if rrandom[0,1] < 0.7
then c [i ] = p1[i ] else c [i ] = p2[i ] end
With small probability childhas single gene mutation.
Child is more likely to inheritgene of elite parent.
June 14, 2002
Problemas de otimização em network design e biologia
Page 23/67
Parallel GA: local search• Combine GA with local search• LS with cost recomputations from scratch:
– For each arc e with current weight we do: • Temporarily replace arc weight by (1+ we)/2• Evaluate fitness• If new improved solution, update weight and go to
next arc• Otherwise, temporarily replace arc weight by (MAX+
we)/2• Evaluate fitness• If new improved solution, update weight• Go to next arc
– Until no further improvement is possible
June 14, 2002
Problemas de otimização em network design e biologia
Page 24/67
Parallel GA: local search• Variants:
– V-1: at each processor, apply LS to the best solution whenever it is improved
– V-2: at each processor, always apply LS to the best non-locally optimal solution
June 14, 2002
Problemas de otimização em network design e biologia
Page 25/67
Parallel GA: cooperation• P processors• Whenever a processor improves its
incumbent, the latter is broadcasted to:– all other processors– all closest log P processors (logical
organization)• At the beginning of each generation,
every processor replaces its worst solutions by those sent by other processors
June 14, 2002
Problemas de otimização em network design e biologia
Page 26/67
Numerical results• Work-in-progress, preliminary results: GA, LS
– Combine GA+LS? Cooperative // GA? Scatter search? • One real world network: AT&T Worldnet
backbone with 90 nodes, 274 links, and 272 pairs
• Compared with cost and maximum utilizations of the LB lower bound and several heuristics:– OSPF(invCap)– Local search of Fortz and Thorup (2000)– Original sequential GA of Ericsson et al.
(2001) – LP lower bound
June 14, 2002
Problemas de otimização em network design e biologia
Page 27/67
2.35
2.4
2.45
2.5
2.55
2.6
2.65
2.7
2.75
2.8
2.85
0 2 4 6 8 10 12 14 16
cost
processors
Collaborative vs. noncollaborative versions
collab_v1nocollab_v1
collab_v2nocollab_v2
F&TseqGA-500itr
LPLB
June 14, 2002
Problemas de otimização em network design e biologia
Page 28/67
2.35
2.4
2.45
2.5
2.55
2.6
2.65
2.7
2.75
2.8
2.85
0 2 4 6 8 10 12 14 16
cost
processors
Number of generations: 500 and 8000
collab_v1-500itrnocollab_v1-500itr
collab_v1-8000itrnocollab_v1-8000itr
F&TseqGA-500itr
LPLB
June 14, 2002
Problemas de otimização em network design e biologia
Page 29/67
0
2
4
6
8
10
12
0 5000 100001500020000250003000035000400004500050000
cost
scaled internet traffic
InvCapGA //LPLB
June 14, 2002
Problemas de otimização em network design e biologia
Page 30/67
0
0.5
1
1.5
2
0 5000 100001500020000250003000035000400004500050000
max
imum
util
izat
ion
scaled internet traffic
InvCapGA //LPLB
June 14, 2002
Problemas de otimização em network design e biologia
Page 31/67
Concluding remarks• Sequential GAOSPF produced as good
solutions as LS for most instances, even better in some cases.
• GA generally finds good solutions close to the LP lower bound.
• //GA+LS works very well on real-world AT&T Worldnet backbone network, significantly increasing traffic and Internet capacity over CISCO’s recommended weight setting strategy.
• Extensions: speedup LS, improve cooperation, evaluate effects, scatter search
June 14, 2002
Problemas de otimização em network design e biologia
Page 32/67
Graph matching for scene recognition
• Scene recognition• Graph matching• Problem formulation• GRASP heuristic
June 14, 2002
Problemas de otimização em network design e biologia
Page 33/67
Scene recognition• The recognition of complex scenes requires not
only a detailed description of the objects involved, but also of the spatial relationships between them.
• The diversity of the forms of the same object in different instantiations of a scene, and also the similarities of different objects in the same scene make relationships between objects of prime importance in order to remove ambiguities in the recognition of objects with similar appearance.
June 14, 2002
Problemas de otimização em network design e biologia
Page 34/67
Scene recognition• Graph based representations often used
for scene representation in image processing: – Vertices represent the objects in the scene– Edges represent the relationships between
the objects• Relevant information for the recognition
is extracted from the scene and represented by relational attributed graphs.
• Model-based recognition: both the model and the scene are represented by graphs– graph matching
June 14, 2002
Problemas de otimização em network design e biologia
Page 35/67
Motivation• Medical imaging: recognition of brain
structures from magnetic resonance images
• Model: each node represents one anatomical structure, while edges represent spatial relationships.
• Inaccuracies are one of the main problem characteristics: – Unexpected objects (pathologies, for
instance) – Expected objects not found– Deformations of objects – Attributes in the image and in the model
may be imprecise
June 14, 2002
Problemas de otimização em network design e biologia
Page 36/67
(a) normal brain(b) pathological brain with a tumor
(c) representation of a
brain atlas (each grey
level corresponds to a
unique connected structure)
Motivation
June 14, 2002
Problemas de otimização em network design e biologia
Page 37/67
Scene recognition• Similar problems: character recognition,
aerial or satellite image interpretation using a map, face recognition, etc.
• Search for the best correspondence formulated as a combinatorial optimization problem defined by the relational attributed graphs representing the model and the image, together with node and edge similarities between them.
June 14, 2002
Problemas de otimização em network design e biologia
Page 38/67
Graph matching• Attributed graphs widely used in pattern
recognition problems: construction depends on the imperfections of the scene or of the model, and on the attributes of the object relations
• One single vertex for each region of each image
• Once the graph has been constructed, vertex and edge attributes are computed.
• Finally, vertex-similarity and edge-similarity matrices are computed from the values of the attributed graphs, relating each pair of vertices and each pair of edges (one from the model, the other from the segmented image).
June 14, 2002
Problemas de otimização em network design e biologia
Page 39/67
Graph matching• G1 = (N1,E1): model• G2 = (N2,E2): over-segmented image• Each solution of the graph matching
problem is a correspondence between the vertex and edges of the graphs representing the model and the image
June 14, 2002
Problemas de otimização em network design e biologia
Page 40/67
Example: two solutions
June 14, 2002
Problemas de otimização em network design e biologia
Page 41/67
Graph matching• Each node of G2 is associated with one
node of G1: – xij = 1, if nodes i N1and j N2 are associated– xij = 0, otherwise.
• Each solution may be represented by a bipartite graph G' = (N1 N2,E'):– each edge (i,j) E‘ = {(i,j), i N1, j N2 | xij =
1} corresponds to the association of i N1 with j N2.
– A(i) = { j N2 | (i,j) E'} is the subset of nodes of N2 associated with i N1
June 14, 2002
Problemas de otimização em network design e biologia
Page 42/67
Objective function• Similarity matrices constructed from
similarity values calculated from graph attributes.
• sv(i,j) [0,1] represents the vertex-similarity between vertices i N1 and j N2
• se(u,v) [0,1] represents the edge-similarity between edges u E1 and v E2
June 14, 2002
Problemas de otimização em network design e biologia
Page 43/67
Objective function
Maximize G’
June 14, 2002
Problemas de otimização em network design e biologia
Page 44/67
Constraints1. exactly one node i N1 such that
(i,j) E‘ (i.e. xij = 1), j N2
2. The subgraph induced in G2 by A(i) is connected, i N1
3. at least one node j N2 such that (i,j) E', i N1
4. xij = 1 sv(i,j) > 0, i N1, j N2
June 14, 2002
Problemas de otimização em network design e biologia
Page 45/67
GRASPFor i = 1,…,MaxIterations
Build a feasible correspondence;Apply local search to improve the correspondence;Update the best solution found;
End;
June 14, 2002
Problemas de otimização em network design e biologia
Page 46/67
ConstructionFor k = 1,…,MaxTrials
Generate a random permutation of N2;For each node j N2 Randomly search all nodes in N1;Associate to j a node i N1 satisfying the constraints;Remove i from N1;End; If a feasible solution was built, then return;
End;
June 14, 2002
Problemas de otimização em network design e biologia
Page 47/67
Local search• Iterative improvement (first
improvement)• Neighborhood:
– Consider every pair of nodes j1 N2, j2 N2 – Let i1 = A-1(j1) and i2 = A-1(j2)– Exchange the associations:
A(i1) A(i1) – {j1} {j2}A(i2) A(i2) – {j2} {j1}
June 14, 2002
Problemas de otimização em network design e biologia
Page 48/67
ExampleCut of a muscle:
(a) original 2-D image (b) model (c) over-segmented image14 vertices26 edges
28 vertices62 edges
June 14, 2002
Problemas de otimização em network design e biologia
Page 49/67
June 14, 2002
Problemas de otimização em network design e biologia
Page 50/67
Summary• Data:
– Image to be recognized– Atlas of images
• Examples:– Identification of tumors– Facial recognition
• Images represented by graphs:– Nodes: image regions– Edges: relations among regions
(boundaries)– Attributes: colors, intensities,
adjacencies, etc.
June 14, 2002
Problemas de otimização em network design e biologia
Page 51/67
• Similarities between pairs of vertices and pairs of edges (model-image)
• Problem: – Determine the most similar model in the
atlas with respect to the image to be recognized
– Determine the optimal correspondence between the regions of the model and those in the image
• Other applications
Summary
June 14, 2002
Problemas de otimização em network design e biologia
Page 52/67
Problema da filogenia• Uma filogenia é uma árvore que relaciona espécies
ou genes homólogos de espécies distintas (taxons)• Dado um conjunto de taxons caracterizados por um
conjunto de caracteres, obter uma filogenia com o menor número de passos evolucionários (mudança de um caracter)
• Exemplo:a b c d e f g
O 0 0 0 0 0 0 0A 1 1 0 0 1 1 1B 1 1 1 1 1 1 1C 1 1 1 1 0 0 0
June 14, 2002
Problemas de otimização em network design e biologia
Page 53/67
Problema da filogeniaa b c d e f g
O 0 0 0 0 0 0 0A 1 1 0 0 1 1 1B 1 1 1 1 1 1 1C 1 1 1 1 0 0 0
Exemplo:
Solução com 10 passos:
Solução com 9 passos:
June 14, 2002
Problemas de otimização em network design e biologia
Page 54/67
Roteamento de circuitos virtuais privados
•Circuitos virtuais privados (PVCs) entre os pares origem e destino de cada cliente em um backbone
•Roteamento de cada cliente feito pelo projetista sem conhecimento de demandas futuras
•Ineficiência e necessidade ocasional de rotear os PVCs offline
•Problema: minimizar atrasos e congestão, satisfazendo as demandas e restrições de capacidade
•Aplicação desenvolvida para a AT&T: melhoria sensível do desempenho e do aproveitamento de redes reais
June 14, 2002
Problemas de otimização em network design e biologia
Page 55/67
Roteamento de PVCs
June 14, 2002
Problemas de otimização em network design e biologia
Page 56/67
Roteamento de PVCs
June 14, 2002
Problemas de otimização em network design e biologia
Page 57/67
Roteamento de PVCs
June 14, 2002
Problemas de otimização em network design e biologia
Page 58/67
Roteamento de PVCs
June 14, 2002
Problemas de otimização em network design e biologia
Page 59/67
Roteamento de PVCscapacidade máxima = 3
June 14, 2002
Problemas de otimização em network design e biologia
Page 60/67
Roteamento de PVCs
Caminho longo!
rerotear
capacidade máxima = 3
June 14, 2002
Problemas de otimização em network design e biologia
Page 61/67
Roteamento de PVCscapacidade máxima = 3
June 14, 2002
Problemas de otimização em network design e biologia
Page 62/67
Roteamento de PVCsViável e ótima! capacidade máxima = 3
June 14, 2002
Problemas de otimização em network design e biologia
Page 63/67
Projeto de redes locais de acesso
• Construir uma rede de fibras óticas para prover serviços de banda larga a consumidores comerciais e residenciais, levando em consideração o balanceamento entre os custos de construção (colocação das fibras) e os rendimentos potenciais dos clientes atendidos (perda de receita no caso do cliente não ser atendido).
• Problema de Steiner com prêmios: aplicação desenvolvida para a AT&T
June 14, 2002
Problemas de otimização em network design e biologia
Page 64/67
Projeto de redes locais de acesso cliente
(prêmio)rua penalidade nula
raiz
June 14, 2002
Problemas de otimização em network design e biologia
Page 65/67
Projeto de redes locais de acesso
June 14, 2002
Problemas de otimização em network design e biologia
Page 66/67
Projeto de redes a k-caminhos
• Dados:– Grafo suporte para a construção de uma rede– Conjunto de pares origem-destino– Custo de construção de cada arco
• Problema: construir uma rede de custo mínimo, na qual todos os pares origem-destino são conectados por caminhos usando no máximo k arcos
• Para que a confiabilidade da rede seja alta, todos os caminhos devem ser formados por k ≤3 arcos
June 14, 2002
Problemas de otimização em network design e biologia
Page 67/67
Slides and publications• Slides of this talk can be downloaded from:
http://www.inf.puc-rio/~celso/talks/curico.ppt• Paper about sequential GA for OSPF setting available at: http://www.research.att.com/~mgcr/doc/gaospf.pdf• Paper about parallel GA for OSPF setting in preparation
(with L. Buriol, M.G.C. Resende, and M. Thorup)• Paper about GRASP for graph matching also in
preparation (with I. Bloch and M.C. Boeres)