Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5943411
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T16:23:29+00:00 2026-05-22T16:23:29+00:00

How we find MST (Minimum Spanning Tree) after add new node or change distance

  • 0

How we find MST (Minimum Spanning Tree) after add new node or change distance of ways?

I need help to solve this. Can anybody help me?

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T16:23:30+00:00Added an answer on May 22, 2026 at 4:23 pm

    When adding new edges:

    You will need to perform a graph traversal, the easiest is DFS for this, from one of the sides of the modified/new edge. If you can back to a node you were to before, you have a cycle.

    In that cycle, you will need to remove the largest edge. You will get a tree again, and it is the minimal spanning one.

    If you are changing edge weights, you will need to:

    • Disconnect the graph into 2 components, A and B, by temporarily removing the new edge.
    • If the new edge has a smaller weight than before, you can put it back in. Otherwise:
    • Iterate through edges that you have processed before, and check if they join A to B.
    • Pick the smallest edge from those, and connect the components using that edge.

    Again, you get a new minimal spanning tree.

    Overall, this is O(V+E), times a small factor of inverse Ackermann.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need help on how to find out how many days it has been
can any one plz help me how to Find the MST using the PRIM
Help me please with Boruvka algorithm for creating a minnimum-spanning tree. I wrote code
I find from reading perldoc perlvar, about a thousand lines in is help for
Find the time after 15 minutes of given time in javascript Example : given
How to apply Dijkstra algorithm for a graph to find the MST in such
find same node from two single linked lists. Can't use hash, Can not be
I find myself writing this class often in my python code when I need
Find doesn't descope the default_scope anymore, what should I do now? I need to
Find minimum window width in string x that contains all characters of another string

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.