Algorithm: Find_Path(G, S, D)
Input:   G = (V, E)
      Edge-weighted graph
      (network topology)
      with an SNR value
      on each link:
      S: source node;
      D: destination node.
Output:  Best path array from S to D.
Step  1: For every edge (u,v) in E(G),
    compute cooperative metric of
    link (u,v), (Link PDR/
    Throughput/Energy Efficiency)
    based on the given SNR values,
    for each potential relay with
    different MAC schemes (e.g.,
    CoopMAC and C-ARQ).
Step  2: Compare all cooperative metrics,
    select the optimal value as
    cooperative weight, w(u,v).
Step  2: Compare w(u,v) with non-
    cooperative link metric w(u,v),
    select the better value as
    new weight, w′(u,v).
Step  4: Generate G′ = (V,E′) with
    new weight matrix, w.
Step  5: Use the modified Dijkstra’s
    algorithm to find the best
    path from S to D.
Algorithm 1