Breaking Ties Alphabetically Using Kruskal's Algorithm

2.3k Views Asked by At

Kruskal's Algorithm picks the next edge simply by picking the lightest edge. Doesn't that make breaking ties alphabetically impossible? If I had a graph where two edges a -> b and a -> c existed. If a -> c has a lighter edge weight, wouldn't Kruskal's Algorithm add the a -> c edge over the a -> b edge?

Maybe I am just confused on what breaking ties alphabetically means.

Any clarification would be greatly appreciated!