I have a complete undirected graph with labeled edge. is there any toolbox to apply TSP in such graph.
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
% I have complete undirected graph G(V,E) with labeled edge.
s= [1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 3 3 3 3 3 3 4 4 4 4 4 5 5 5 5 6 6 6 7 7 8 ];
t= [2 3 4 5 6 7 8 9 3 4 5 6 7 8 9 4 5 6 7 8 9 5 6 7 8 9 6 7 8 9 7 8 9 8 9 9 ];
Weight = [60 70 55 67 69 58 60 64 65 69 55 23 24 13 12 15 16 12 12 11 8 13 12 13 12 4 8 11 10 11 12 15 16 12 12 11]';
Name = {'A' 'B' 'C' 'D' 'E' 'F' 'G' 'H' 'I' }';
G=graph(s,t,Weight,Name);
I want to convert this into a connected graph which contain only minimum weight in between the nodes.
0 Kommentare
Antworten (1)
Siehe auch
Kategorien
Mehr zu Graph and Network Algorithms finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!