Finding the rest of the wood is the least weight. Algorith Kruskala



  • The Google found this algorithm, but I can't figure out how to do it! Help me, please. The programme needs to introduce initial parameters to find the rest of the smallest weight.



  • Algorithm Cruscal is not the most trivial for implementation.

    If you follow the classic algorithm described in CormenYou need to programme the following things. (if everything is self-reliant):

    • Data structure for the storage of the count (I would use the list of connections), reading of the file from the file, std::cin or otherwise.
    • Data structure emulating system multiplicityused in algorithm
    • Own. Algorithm. (whose pseudocod, again, should see Cormen)



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2