SESSION GRAPH BASED AND TREE METHODS + RELATED ...
SESSION GRAPH BASED AND TREE METHODS + RELATED ...
SESSION GRAPH BASED AND TREE METHODS + RELATED ...
- TAGS
- graph
- methods
- world-comp.org
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
30 Int'l Conf. Foundations of Computer Science | FCS'12 |<br />
is in the NP category, it has no polynomial time solution,<br />
until it will be proved that P = NP.<br />
For solving STP on the graph, there are some exact<br />
approaches that one of them is Hakimi’s algorithm with<br />
time complexity of O(� � 2 � ) [4]. This algorithm for any<br />
subset � of � − 2 terminals or less finds the Minimum<br />
Spanning Tree (MST) of � ∪ � and then it selects the<br />
minimum result as Steiner tree. The other famous exact<br />
algorithm for finding Steiner tree on the graph is Dreyfus<br />
and Wagner’s algorithm that has O(�3 � + � � 2 � + � � ) time<br />
complexity and it has used dynamic programming [1].<br />
Because of low-speed of exact approaches, they are<br />
not practically useful, therefore a lot of heuristic algorithms<br />
have been suggested for solving this problem. Those<br />
heuristic algorithms that have higher speeds and lower error<br />
percentages are better used. Some of these approaches are as<br />
follows: MST based algorithms like algorithms of<br />
Takahashi et al. [5] and Wong et al. [6] that for finding<br />
Steiner tree, they add an edge at each time until all terminals<br />
connect together; Node-based local search algorithms like<br />
Dolagh et al. [7] that find Steiner tree with using local<br />
search and identifying proper neighbors; Greedy<br />
Randomized Search algorithms [8] that have three phases: a<br />
construction phase, a local search phase and if necessary an<br />
updating phase. In each iteration of construction phase, a<br />
probable answer is created by selecting an element from a<br />
sorted list of candidate elements. This list is sorted based on<br />
greedy function, but the first element of the list is not<br />
always the best one, hence at the end of construction phase a<br />
local search is used for improving the answer and if<br />
necessary an updating phase is applied. There are also a lot<br />
of Meta heuristic algorithms for finding Steiner tree, like<br />
Ant colony approach [9, 10] and PSO [11]. Furthermore still<br />
the researches are done for finding algorithms for solving<br />
STP in better rates and shorter times.<br />
3 The Proposed Algorithm<br />
The algorithm that is suggested in this article that<br />
called MSTG, finds Steiner tree on an undirected and<br />
weighted graph � = (�, �, �) . In this graph � is the<br />
number of vertices in �, � is the number of edges in � and<br />
� is the number of terminal nodes in �. The set � that is<br />
defined as � = �\� , contains Steiner nodes.<br />
The inputs of this algorithm are the graph � and the<br />
set � and also there is an assumption that says there is no<br />
isolated terminal in � .This means that from each terminal,<br />
there are some edges to the other terminals. This algorithm<br />
consists of three phases: the preprocessing phase, the first<br />
phase and the second phase. Finally, the outputs of this<br />
algorithm are the Steiner tree and its cost.<br />
3.1 Preprocessing Phase<br />
The goal of this phase is the reduction of the counts of<br />
nodes and edges in the given graph. The Steiner nodes that<br />
have less than two edges (Deg < 2) and their connected<br />
edges are those ones that aren’t necessary in Steiner tree<br />
computation; therefore, in this phase, they are omitted. The<br />
resulted graph of this phase is called �’ and the related<br />
pseudo code is Fig. 1.<br />
Algorithm MSTG// Preprocessing Phase<br />
Input: �, � = (�, �, �)<br />
Output: �’ = (�’, �’, �)<br />
// � = �\�<br />
1 for each � � ∈ � do<br />
2 if Deg(� �) < 2 then<br />
3 Remove � � from � and its edge from �;<br />
4 end if<br />
5 end for<br />
Fig.1: Pseudo code of Preprocessing Phase<br />
3.2 First Phase<br />
In this phase of the algorithm, the shortest path<br />
between each terminal to one of the other terminals, which<br />
is the closest, is computed. The inputs of this phase are<br />
graph �’ and the set � and the outputs are the set of edges<br />
(�) and the set of nodes (�) from the obtained paths. Fig. 2<br />
is the pseudo code of this phase.<br />
Definition: “ShrtTree (�, �)” is a procedure that its<br />
output is a set of shortest paths from node � to each node in<br />
the set � . These paths are obtained by computing the<br />
shortest tree that rooted in � and its leaves are the nodes in<br />
the set �. This procedure uses Dijkstra’s algorithm.<br />
The first loop (lines 1-5) of this pseudo code is<br />
executed for each terminal (� �), and it obtains a shortest path<br />
tree from � � to other terminals by using Dijkstra’s algorithm.<br />
Afterward, among all these paths in the tree, the shortest<br />
path from � � to another terminal is selected and added to the<br />
i th cell in the array �. Then its edges are added to �, and its<br />
nodes are added to �.<br />
The second loop (lines 6-20) is repeated for � times or<br />
until no changes occur in the �. This loop is exactly like the<br />
previous loop, but it obtains a shortest path tree from � � to<br />
other nodes in �. If the weight of this shortest path is less<br />
than the weight of the previous path for � � in � and it has no<br />
repeated edge with the previous path, then its edges and<br />
nodes are exchanged with the previous ones in � and �. The<br />
number of the variable � , according to the experimental<br />
results has been determined three, and it’s sufficient. At the