I have two undirected weighted gaphs G1 and G2, with 2 common vertices C and D between them.
Is it possible that the edge CD in G1 has weight 4 and in G2 same edge has weight 7?
If yes, what will be the union of these graphs?

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Okay let me try my best to remember my graph theory here…
The answer would be yes, and the resultant graph would be something like
Where the vertices D and C have two edges between them
c(DC) = 4 and c(DC') = 7where c is the path cost function.
You seem to be asking whether a union on these two graphs is possible. The answer is yes, you can always perform the union operation on graphs, just as you can intersection (its just like set theory, think back to you first principle definitions of graphs, all they are are tuples containing sets of vertices and edges).
Its not that the ‘edge’ DC some how simultaneously has the weight of 4 and of 7, its that their are two distinct edges running between DC, one with a weight of 4 and another with the weight of 7. If you were to visualize these graphs as representing city maps, the weighted path of 4 would be the ‘quicker’ divided highway, while the higher cost path of 7 would be a city avenue.
Hope that sheds some light on the issue.