GATE Exam  >  GATE Questions  >  Consider two weighted complete graph G1 and G... Start Learning for Free
Consider two weighted complete graph G1 and G2 on the vertex set V1, V2, V3,…, V5 such that weight of the edge (Vi, Vj) is min(i,j) for the first graph and max(i,j) for the second graph respectively. The difference between the weight of a minimum spanning tree of G1 and G2 is ______.
    Correct answer is '10'. Can you explain this answer?
    Most Upvoted Answer
    Consider two weighted complete graph G1 and G2 on the vertex set V1, V...
    ..., Vn, where the weight of an edge between Vi and Vj in G1 is wi,j, and the weight of an edge between Vi and Vj in G2 is xi,j. We want to find the maximum weight matching between the vertices of V1 and V2 using the Hungarian algorithm.

    1. Construct the weight matrix W as follows:
    - If i and j belong to V1, then W[i,j] = -wi,j (negative weight).
    - If i and j belong to V2, then W[i,j] = -xi,j (negative weight).
    - If i belongs to V1 and j belongs to V2, then W[i,j] = 0 (no edge between i and j).

    2. Run the Hungarian algorithm on the weight matrix W to find the maximum weight matching between the vertices of V1 and V2.
    - Initialize a matching M to be an empty set.
    - While M is not a perfect matching:
    - Find a set of vertices S in V1 that are not covered by M.
    - Find a set of vertices T in V2 that are reachable from S in the bipartite graph (S, V2 - M(S)).
    - If there exists a vertex u in S that is not matched in M, then add the edge (u, v) to M, where v is any vertex in T that is not matched in M. Otherwise, let P be an augmenting path in the graph (S, T, M), and augment M along P.
    - The final matching M is the maximum weight matching between V1 and V2.

    3. Return the matching M.

    Note: The Hungarian algorithm can also be used to find the minimum weight matching by taking the negative of the weights in step 1 and maximizing the resulting weights in step 2.
    Explore Courses for GATE exam
    Consider two weighted complete graph G1 and G2 on the vertex set V1, V2, V3,…, V5 such that weight of the edge (Vi, Vj) is min(i,j) for the first graph and max(i,j) for the second graph respectively. The difference between the weight of a minimum spanning tree of G1 and G2 is ______.Correct answer is '10'. Can you explain this answer?
    Question Description
    Consider two weighted complete graph G1 and G2 on the vertex set V1, V2, V3,…, V5 such that weight of the edge (Vi, Vj) is min(i,j) for the first graph and max(i,j) for the second graph respectively. The difference between the weight of a minimum spanning tree of G1 and G2 is ______.Correct answer is '10'. Can you explain this answer? for GATE 2024 is part of GATE preparation. The Question and answers have been prepared according to the GATE exam syllabus. Information about Consider two weighted complete graph G1 and G2 on the vertex set V1, V2, V3,…, V5 such that weight of the edge (Vi, Vj) is min(i,j) for the first graph and max(i,j) for the second graph respectively. The difference between the weight of a minimum spanning tree of G1 and G2 is ______.Correct answer is '10'. Can you explain this answer? covers all topics & solutions for GATE 2024 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for Consider two weighted complete graph G1 and G2 on the vertex set V1, V2, V3,…, V5 such that weight of the edge (Vi, Vj) is min(i,j) for the first graph and max(i,j) for the second graph respectively. The difference between the weight of a minimum spanning tree of G1 and G2 is ______.Correct answer is '10'. Can you explain this answer?.
    Solutions for Consider two weighted complete graph G1 and G2 on the vertex set V1, V2, V3,…, V5 such that weight of the edge (Vi, Vj) is min(i,j) for the first graph and max(i,j) for the second graph respectively. The difference between the weight of a minimum spanning tree of G1 and G2 is ______.Correct answer is '10'. Can you explain this answer? in English & in Hindi are available as part of our courses for GATE. Download more important topics, notes, lectures and mock test series for GATE Exam by signing up for free.
    Here you can find the meaning of Consider two weighted complete graph G1 and G2 on the vertex set V1, V2, V3,…, V5 such that weight of the edge (Vi, Vj) is min(i,j) for the first graph and max(i,j) for the second graph respectively. The difference between the weight of a minimum spanning tree of G1 and G2 is ______.Correct answer is '10'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of Consider two weighted complete graph G1 and G2 on the vertex set V1, V2, V3,…, V5 such that weight of the edge (Vi, Vj) is min(i,j) for the first graph and max(i,j) for the second graph respectively. The difference between the weight of a minimum spanning tree of G1 and G2 is ______.Correct answer is '10'. Can you explain this answer?, a detailed solution for Consider two weighted complete graph G1 and G2 on the vertex set V1, V2, V3,…, V5 such that weight of the edge (Vi, Vj) is min(i,j) for the first graph and max(i,j) for the second graph respectively. The difference between the weight of a minimum spanning tree of G1 and G2 is ______.Correct answer is '10'. Can you explain this answer? has been provided alongside types of Consider two weighted complete graph G1 and G2 on the vertex set V1, V2, V3,…, V5 such that weight of the edge (Vi, Vj) is min(i,j) for the first graph and max(i,j) for the second graph respectively. The difference between the weight of a minimum spanning tree of G1 and G2 is ______.Correct answer is '10'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice Consider two weighted complete graph G1 and G2 on the vertex set V1, V2, V3,…, V5 such that weight of the edge (Vi, Vj) is min(i,j) for the first graph and max(i,j) for the second graph respectively. The difference between the weight of a minimum spanning tree of G1 and G2 is ______.Correct answer is '10'. Can you explain this answer? tests, examples and also practice GATE tests.
    Explore Courses for GATE exam
    Signup for Free!
    Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
    10M+ students study on EduRev