Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e3e281f

Browse files
algmyrjakobkogler
authored andcommitted
Replace unicode minus (#410)
1 parent 3057c8f commit e3e281f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/graph/second_best_mst.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ We try to add every edge that is not already in the MST.
3636
2. For each edge $e$ not already in the MST, temporarily add it to the MST, creating a cycle.
3737
3. Find the edge $k$ with maximal weight in the cycle that is not equal to $e$.
3838
4. Remove $k$ temporarily, creating a new spanning tree.
39-
5. Compute the weight difference $\delta = weight(e) weight(k)$, and remember it together with the changed edge.
39+
5. Compute the weight difference $\delta = weight(e) - weight(k)$, and remember it together with the changed edge.
4040
6. Repeat step 2 for all other edges, and return the spanning tree with the smallest weight difference to the MST.
4141

4242
The time complexity of the algorithm depends on how we compute the $k$s, which are the maximum weight edges in step 2 of this algorithm.

0 commit comments

Comments
 (0)