Scaricare la presentazione
La presentazione è in caricamento. Aspetta per favore
1
Prof. Cerulli – Dott.ssa Gentili
Lezioni di Ricerca Operativa Corso di Laurea in Informatica ed Informatica Applicata Università di Salerno Lezione n° 19: Maggio 2008 Problema dell’albero dei cammini minimi Anno accademico 2007/2008 Prof. Cerulli – Dott.ssa Gentili
2
Il problema dei cammini minini
G=(N,A) destinazione sorgente p 7 40 1 2 9 cij = costo dell’arco (i,j) 15 35 9 10 1 44 21 xij = variabili decisionali 5 4 3 69 28 11 1 21 Our work concerns the Shortest path tree problem problem (in brief SPT). Let me give a brief description of this problem. Given a weighted and directed graph G=(V,E,s) and a source node s, we want to find the shortest path from s to each other vertex in G. 6 8 1 se xijp 5 7 xij = 7 0 se xijp
3
Modello matematico 1 5 6 4 7 2 3 8 9 69 44 35 21 15 11 28 40 10 The SPT problem is a fundamental network optimization problem. It arises in several problems as the network and trasportation analyses problem, routing problems on network, urban traffic management problem, and some other network optimization problem. Today the existing SPT algorithms are very efficient, indeed some algorithms can compute the SPT on a graph with 1 million nodes in less than a second. Despite this, the research of more efficient techniques is not stopped. This happens because we need of more and more efficient SPT algorithms in order to avoiding to slow down the resolution of others network problems where the SPT problem arises.
4
Modello matematico 1 5 6 4 7 2 3 8 9 69 44 35 21 15 11 28 40 10 The SPT problem is a fundamental network optimization problem. It arises in several problems as the network and trasportation analyses problem, routing problems on network, urban traffic management problem, and some other network optimization problem. Today the existing SPT algorithms are very efficient, indeed some algorithms can compute the SPT on a graph with 1 million nodes in less than a second. Despite this, the research of more efficient techniques is not stopped. This happens because we need of more and more efficient SPT algorithms in order to avoiding to slow down the resolution of others network problems where the SPT problem arises.
5
Modello matematico 1 5 6 4 7 2 3 8 9 69 44 35 21 15 11 28 40 10 The SPT problem is a fundamental network optimization problem. It arises in several problems as the network and trasportation analyses problem, routing problems on network, urban traffic management problem, and some other network optimization problem. Today the existing SPT algorithms are very efficient, indeed some algorithms can compute the SPT on a graph with 1 million nodes in less than a second. Despite this, the research of more efficient techniques is not stopped. This happens because we need of more and more efficient SPT algorithms in order to avoiding to slow down the resolution of others network problems where the SPT problem arises.
6
Il problema dei cammini minini (varianti)
Uno ad uno Uno a tutti Tutti a tutti Our work concerns the Shortest path tree problem problem (in brief SPT). Let me give a brief description of this problem. Given a weighted and directed graph G=(V,E,s) and a source node s, we want to find the shortest path from s to each other vertex in G.
7
Il problema dei cammini minini
G=(N,A) sorgente T 7 40 1 2 9 15 35 9 10 1 44 21 5 4 3 28 11 69 1 21 Our work concerns the Shortest path tree problem problem (in brief SPT). Let me give a brief description of this problem. Given a weighted and directed graph G=(V,E,s) and a source node s, we want to find the shortest path from s to each other vertex in G. 6 8 5 7 7
8
Etichette dei nodi G=(N,A) d1 d2 d9 1 2 9 15 35 9 10 d4 1 44 21 d5 5 4
7 40 1 2 9 15 35 9 10 d4 1 44 21 d5 5 4 3 28 11 d3 69 1 21 The SPT problem is a fundamental network optimization problem. It arises in several problems as the network and trasportation analyses problem, routing problems on network, urban traffic management problem, and some other network optimization problem. Today the existing SPT algorithms are very efficient, indeed some algorithms can compute the SPT on a graph with 1 million nodes in less than a second. Despite this, the research of more efficient techniques is not stopped. This happens because we need of more and more efficient SPT algorithms in order to avoiding to slow down the resolution of others network problems where the SPT problem arises. 6 8 d6 d8 5 7 7 d7
9
Algoritmo prototipo Passo 1: Inizializzazione.
ds=0, Ps=NULL, dk=, Pk=s kN\{s}, Q={s}; Passo 2: Estrai un vertice x da Q (Q= Q \{x}) ed aggiorna quando possibile le etichette dei vertici in FS(x): yFS(x) se dx + cxy < dy allora dy = dx + cxy , Py= x e se y Q inseriscilo in Q (Q= Q {y}) (test di ottimalità) The SPT problem is a fundamental network optimization problem. It arises in several problems as the network and trasportation analyses problem, routing problems on network, urban traffic management problem, and some other network optimization problem. Today the existing SPT algorithms are very efficient, indeed some algorithms can compute the SPT on a graph with 1 million nodes in less than a second. Despite this, the research of more efficient techniques is not stopped. This happens because we need of more and more efficient SPT algorithms in order to avoiding to slow down the resolution of others network problems where the SPT problem arises.
10
Aggioramento delle etichette
yFS(x) se dx + cxy < dy allora dy = dx + cxy e Py= x x=4, y=5 d4 + c45 < d5 ? d5 = d4 + c45 e P5= 4 x=4, y=2 d4 + c42 < d2 ? ………………… x=4, y=9 d4 + c49 < d9 ? d9 = d4 + c49 e P9= 4 36 42 5 15 21 7 18 2 4 The SPT problem is a fundamental network optimization problem. It arises in several problems as the network and trasportation analyses problem, routing problems on network, urban traffic management problem, and some other network optimization problem. Today the existing SPT algorithms are very efficient, indeed some algorithms can compute the SPT on a graph with 1 million nodes in less than a second. Despite this, the research of more efficient techniques is not stopped. This happens because we need of more and more efficient SPT algorithms in order to avoiding to slow down the resolution of others network problems where the SPT problem arises. 34 9 67 55
11
Algoritmo prototipo Passo 1: Inizializzazione.
ds=0, Ps=NULL, dk=, Pk=s kN\{s}, Q={s}; Passo 2: Estrai un vertice x da Q (Q= Q \{x}) ed aggiorna quando possibile le etichette dei vertici in FS(x): yFS(x) se dx + cxy < dy allora dy = dx + cxy , Py= x e se y Q inseriscilo in Q (Q= Q {y}) (test di ottimalità) Passo 3: Fino a quando Q ripeti il passo 2 ; The SPT problem is a fundamental network optimization problem. It arises in several problems as the network and trasportation analyses problem, routing problems on network, urban traffic management problem, and some other network optimization problem. Today the existing SPT algorithms are very efficient, indeed some algorithms can compute the SPT on a graph with 1 million nodes in less than a second. Despite this, the research of more efficient techniques is not stopped. This happens because we need of more and more efficient SPT algorithms in order to avoiding to slow down the resolution of others network problems where the SPT problem arises.
12
Differenti implementazioni
Gli algoritmi per l’SPT si distinguono per: La politica di estrazione del nodo da Q (label setting e label correcting) La struttura dati utilizzata per implementare Q
13
Algoritmo di Dijkstra (label setting)
Dijkstra (G,s) Inizializzazione; ( ds=0, Ps=NULL, dk=, Pk=s kN\{s} , Q={s}) while ( Q ){ x = Extract_min(Q); Test_ottimalità(x,y); con yFS(x); }
14
L’algoritmo di Dijkstra (label setting)
G=(N,A) 7 Q 7 40 1 2 9 15 35 9 10 1 9 44 21 5 4 3 28 11 69 1 21 Our work concerns the Shortest path tree problem problem (in brief SPT). Let me give a brief description of this problem. Given a weighted and directed graph G=(V,E,s) and a source node s, we want to find the shortest path from s to each other vertex in G. 6 8 5 7 7 2 7 5 1 2 7 9
15
L’algoritmo di Dijkstra (label setting)
G=(N,A) 7 47 Q 7 40 1 2 9 15 35 9 10 22 1 44 21 9 5 4 3 42 11 69 28 1 21 Our work concerns the Shortest path tree problem problem (in brief SPT). Let me give a brief description of this problem. Given a weighted and directed graph G=(V,E,s) and a source node s, we want to find the shortest path from s to each other vertex in G. 6 8 5 4 22 9 3 4 22 42 5 7 7 3 9 2 42 47 7 5 9 47 9
16
L’algoritmo di Dijkstra (label setting)
G=(N,A) 7 47 Q 7 40 1 2 9 15 35 9 10 22 1 44 21 9 5 4 3 42 11 69 28 1 21 Our work concerns the Shortest path tree problem problem (in brief SPT). Let me give a brief description of this problem. Given a weighted and directed graph G=(V,E,s) and a source node s, we want to find the shortest path from s to each other vertex in G. 78 6 8 5 6 4 22 78 9 3 4 42 22 5 7 7 3 9 47 42 6 9 47 78
17
L’algoritmo di Dijkstra (label setting)
G=(N,A) 7 47 Q 7 40 1 2 9 15 35 9 10 22 1 44 21 9 5 4 3 42 69 28 11 8 7 1 43 33 21 Our work concerns the Shortest path tree problem problem (in brief SPT). Let me give a brief description of this problem. Given a weighted and directed graph G=(V,E,s) and a source node s, we want to find the shortest path from s to each other vertex in G. 78 50 6 8 3 4 8 33 42 22 33 7 3 43 42 5 7 7 9 47 43 6 78 50
18
L’algoritmo di Dijkstra (label setting)
G=(N,A) 7 47 Q 7 40 1 2 9 15 35 9 10 22 1 44 21 9 5 4 3 42 34 69 28 11 8 1 33 21 Our work concerns the Shortest path tree problem problem (in brief SPT). Let me give a brief description of this problem. Given a weighted and directed graph G=(V,E,s) and a source node s, we want to find the shortest path from s to each other vertex in G. 50 6 8 3 42 34 33 7 43 5 7 7 9 47 43 6 50
19
L’algoritmo di Dijkstra (label setting)
G=(N,A) 7 47 44 Q 7 40 1 2 9 15 35 9 10 22 1 44 21 9 5 4 3 34 11 69 28 1 21 Our work concerns the Shortest path tree problem problem (in brief SPT). Let me give a brief description of this problem. Given a weighted and directed graph G=(V,E,s) and a source node s, we want to find the shortest path from s to each other vertex in G. 50 6 8 3 34 33 7 43 5 7 7 9 47 44 43 6 50
20
L’algoritmo di Dijkstra (label setting)
G=(N,A) 7 44 Q 7 40 1 2 9 15 35 9 10 22 1 44 21 9 5 4 3 34 28 11 69 1 21 Our work concerns the Shortest path tree problem problem (in brief SPT). Let me give a brief description of this problem. Given a weighted and directed graph G=(V,E,s) and a source node s, we want to find the shortest path from s to each other vertex in G. 50 48 6 8 33 7 43 5 7 7 9 44 43 6 48 50
21
Il problema dei cammini minini
1 5 6 4 7 2 3 8 9 69 44 35 21 15 11 28 40 10 T Our work concerns the Shortest path tree problem problem (in brief SPT). Let me give a brief description of this problem. Given a weighted and directed graph G=(V,E,s) and a source node s, we want to find the shortest path from s to each other vertex in G.
22
Albero dei Cammini minimi albero di copertura minimo
SPT=22 5 2 5 10 15 4 6 1 11 7 3 7
23
Albero dei Cammini minimi albero di copertura minimo
SPT=22 MST=21 1 2 3 5 7 6 4 10 11 15 2 5 10 4 6 1 11 7 3
Presentazioni simili
© 2024 SlidePlayer.it Inc.
All rights reserved.