Question: weight matrix of graph

suppose W1 is weight matrix of graph G1 and W2 is weight matrix of graph G2 (G1 and G2 has same vertices and same edges but with different edge weights)

we want to create graph G3 that has a weight matrix W3. suppose w3[i][j] is an element of W3. we must have :

w3[i][j]=max(w1[i][j],w2[i][j])

w1[i][j] and w2[i][j] are elements of W1 and W2,respectively.

how can we create such graph G3 ?

Please Wait...