Для заданного взвешенного неориентированного графа G(V,E) и множества S, подмножества V, найдите дерево минимальной стоимости, которое охватывает узлы в S. Эта проблема известна в литературе как проблема дерева Штейнера. Задача является NP-полной, что означает, что не существует известного полиномиального алгоритма, который найдет точное решение задачи. Однако существуют алгоритмы, решающие задачу Штейнера за экспоненциальное время (O(2^N) или O(2^M)).
Алгоритм наивного или кратчайшего пути.
Find the Shortest path tree from one participant node to the rest of the graph.
Prune the parts of the tree that do not lead to a participant.
Сложность O(N^2), CR = O(M).
Алгоритм «Жадный или ближайший участник — первый». (Такахаши, Мацуяма, 1980) Начните с участника.
Find the participant that is closest to the current tree.
Join the closest participant to the closest part of the tree.
Repeat until you have connected all nodes.
Сложность O(M N^2), CR = O(1), на самом деле CR ‹= 2.
Алгоритм Коу, Марковского и Бермана (KMB 1981).
1. Find the complete distance graph G'
(G' has V' = S , and for each pair of nodes (u,v) in VxV there is an edge with weight equal to the weight of the min-cost path between these nodes p_(u,v) in G)
2. Find a minimum spanning tree T' in G'
3. Translate tree T' to the graph G: substitute every edge of T', which is an edge of G' with the corresponding path of G. Let us call T the result of the translation.
4. Remove any possible cycles from T.
Сложность O(M N^2), CR = O(1), на самом деле CR ‹= 2.
person
Aditya
schedule
18.05.2013