Research Article

Approaches to Addressing Service Selection Ties in Ad Hoc Mobile Cloud Computing

Algorithm 3

Shortest route DP algorithm.
v = vertex and n = node
Input (v, n)
Shortestroot ← 0
Array Shortpernode ← 0
Shortestroot ← 0
Shortrootest ← 0
Repeat
 For i = v − 1 to v
  For j = 1 to n
   For k = 1 to edgeno
  Shortpernode[k] = search min cost {u, v}
   Next k
   Sort Shortpernode[1 − k] in descending
    if
      shortrootest > Shortpernode [1]
    then
    shortrootest = Shortpernode [1]
   endif
  Next j
  Shortestroot ← Shortestroot + shortrootest
  v = v − 1
 Next i
Until v = 1