Access over 20 million homework & study documents
search

Treeinduction2 30

Content type

User Generated

Subject

Computer Science

Type

Homework

Rating

Showing Page:
1/2

Sign up to view the full document!

lock_open Sign Up
Showing Page:
2/2

Sign up to view the full document!

lock_open Sign Up

Unformatted Attachment Preview

The induction variable 𝑛 will be the depth of a tree. For 𝑛 = 1 we have a tree with only one node (its root). It is simple to check any statement about such a tree :) 1.1. Suppose that for 𝑛 = 1 the statement is true and if it is true for all 𝑘 ≤ 𝑛 then it is true for 𝑛 + 1. Then by the principle of mathematical induction we conclude that the statement is true for all 𝑛 ≥ 1. 1.2. The induction base: for a tree of depth 1 we obviously have leaves(𝑇) = 1, intNodes(𝑇) = 0 and therefore leaves(𝑇) = 2 ∗ intNodes(𝑇) + 1 is true. 1.3, 1.4. The inductive step: su ...
Purchase document to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Anonymous
Great! Studypool always delivers quality work.

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4