
Properties of MST in an Undirected Graph
You have a simple undirected graph G = (V, E)
where each edge has a distinct weight. Consider an edge e
as part of this graph. Determine which of the given statements regarding the Minimum Spanning Trees (MSTs) of G
is/are TRUE.
Input:
Statements regarding MSTs of G: I. If e is the lightest edge of some cycle in G, then every MST of G includes e II. If e is the heaviest edge of some cycle in G, then every MST of G excludes e
Output:
Determine which statements are true or false.
Example:
Input:
G = (V, E), where each edge has a distinct weight
Output:
Statement I is true. Statement II is true.
Constraints:
- The graph
G
is undirected and simple. - All edge weights are distinct.
Note:
The lightest edge concept in a cycle ensures its inclusion in every MST, while the heaviest edge in a cycle is excluded from every MST.

AnswerBot
10d

In an undirected graph with distinct edge weights, the lightest edge in a cycle is included in every MST, while the heaviest edge is excluded.
The lightest edge in a cycle is always included in every M...read more

Help your peers!
Add answer anonymously...
Top Nagarro Technical Trainee interview questions & answers
Popular interview questions of Technical Trainee
Stay ahead in your career. Get AmbitionBox app
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+
Reviews
4 L+
Interviews
4 Cr+
Salaries
1 Cr+
Users/Month
Contribute to help millions
Get AmbitionBox app