A tree needs n minus 1
transcript
Four servers. Two cables. Cable zero to one. Cable two to three. Is this wiring a tree? Look at it closely.
A common test rejects any cycle. It merges each cable in turn. If nothing is rejected, it says true.
The weak test never counts groups. Two separate pairs pass the cycle check. So it wrongly says true.
Here no cable closes a cycle. But the servers are two separate pairs.
A tree on n nodes has n minus one links. With fewer links, a gap is left. With more, a cycle forms.
A path of four servers makes three merges. Four minus three is one group. That is a tree.
A tree on four servers needs three merges. These cables make only two.
Count the merges as you go. Compare the count with n minus one. Return that comparison.
Check for cycles. Check the connection too. A tree has n minus one merges. Full breakdown in the lecture.