∑i=1..n log i is dominated by the last term of the sum, which is log n, therefore the sum is O(log n), which is O(n log n) This is wrong. This would be true if the terms in the sum formed a geometric sequence. They DO NOT in this example. |
Yes, but this is not a proof by induction. Here you map vertices to edges one to one, except the root. This is a completely different strategy... |
Yes, but this is not a proof by induction. Here you map vertices to edges one to one, except the root. This is a completely different strategy... |