1

This is question number 1-17 in the "Algorithm Design Manual 2nd Ed." by Steven S. Skiena.

I found a solution to this question here, http://compalg.inf.elte.hu/~tony/Oktatas/TDK/FINAL/Chap%204.PDF.

However, I wanted to know if this constitutes an acceptable proof by induction?

Base case: when n = 1, there is a single node with no edges. It is self-evident that there are n - 1 = 1 - 1 = 0 edges.

Inductive step:

  1. Suppose every tree with n vertices has n - 1 edges.

  2. Given a tree T with n + 1 vertices, this tree must be equivalent to a tree of n vertices, T', plus 1 leaf node.

  3. By the hypothesis, edges(T') = n - 1.

  4. Since a leaf node is connected to one, and only one other node, then adding it to T' will add only one edge.

  5. Therefore, edges(T) = edges(T') + 1 = n - 1 + 1 = n. QED.

ramziabbyad
  • 56
  • 2
  • 8
  • Okay thanks, I'll change it. – ramziabbyad Oct 20 '18 at 17:54
  • My initial suggestion (to strengthen the induction assumption in the particular way I suggested) does not seem to be helpful after some thought. Still, your statement "this tree must be equivalent to a tree of n vertices, T', plus 1 leaf node" is neither obvious, neither clearly stated (what is this "equivalence"? What is this "plus"?). – John Donn Oct 20 '18 at 19:36
  • I think you need to add step between 1 and 2 which prove that your tree T **has** leaf. Also you need to say (as obvious as it is) that after removing the leaf, the rest of the graph is actually **tree** (=no circles created during edge removal - which is true but need to be statement) – dWinder Oct 21 '18 at 02:08

0 Answers0