hbs0 - CS 473: Algorithms, Fall 2010 HBS 0 1. The following...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CS 473: Algorithms, Fall 2010 HBS 0 1. The following is an inductive proof of the statement that in every tree T = ( V ( T ) ,E ( T )), | E ( T ) | = | V ( T ) | - 1, i.e a tree with n vertices has n - 1 edges. Proof: The proof is by induction on | V ( T ) | . Base case: Base case is when | V ( T ) | = 1. A tree with a single vertex has no edge, so | E ( T ) | = 0. Therefore in this case the formula is true since 0 = 1 - 1. Inductive step: Assume that the formula is true for all trees T where | V ( T ) | = k . We will prove that the formula is true for trees with k + 1 nodes. A tree T with k + 1 nodes can be obtained from a tree T 0 with k nodes by attaching a new vertex to a leaf of T 0 . This way we add exactly one vertex and one edge to T 0 , so | V ( T ) | = | V ( T 0 ) | +1 and | E ( T ) | = | E ( T 0 ) | +1. Since | V ( T 0 ) | = k by induction hypothesis we have | E ( T 0 ) | = | V ( T 0 ) | - 1. Combining the last three relations we have | E ( T ) | = | E ( T 0 ) | +1 = | V ( T 0 ) |- 1+1 = | V ( T ) |-
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 2

hbs0 - CS 473: Algorithms, Fall 2010 HBS 0 1. The following...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online