Research Article
On the 2-MRS Problem in a Tree with Unreliable Edges
Algorithm 1
Algorithm SUM-MAX.
Input: an undirected tree with each edge having | a probability weight ; | Output: a Sum-Max 2-MRS of . | Step 0 ; | Step 1 Use DFS to traverse with as the origin, store the | resultant rooted tree , record and compute | for all , and store ; | if then ; goto Step ; | else ; goto Step ; endif | Step 2 for do | for all nodes on the -level of do | ; | if then | Compute by (30); | else break; endif | endfor | endfor | Step 3 for do | for all nodes on the -level of do | ; | if then | ; ; | while do | ; ; ; ; | Compute by (19) or (20); | | ; | endwhile | else goto Step ; endif | endfor | endfor | Step 4 for do | if then | Compute by (28); | else break; endif | endfor | if then | ; goto Step ; | else | Find the maximum of all the values of and | then determine and by (34); | endif |
|