emory-courses / dsa-java

Data Structures and Algorithms in Java
https://emory.gitbook.io/dsa-java/
42 stars 55 forks source link

[HW#3] Kruskal Modification Specifics #196

Closed TFloyd1989 closed 3 years ago

TFloyd1989 commented 3 years ago

By using a modified Kruskal's algorithm, I am close to returning all MSTs. However, I am unsure how I explore all of the potential MSTs that share the same edge weight because Kruskal can make an MST that features more than one edge with the same weight. How should we explore all MST paths given that multiple edges at the same weight could be selected?

lujiaying commented 3 years ago

That's a good question. I think to conduct an exhaustive search is the critical part for this hw.

From an abstract level perspective, either keeping a record of same weights edges or continuing search until all edges are visited may be helpful.