MAT102 Tutorial W10
- 1
- Which induction do you use?:
is an integer - Simple
- Base case:
- Induction Hypothesis:
is true for some
- Induction Step:
- Right side
- We know that
from the base case
- 2
- Define a non empty binary tree as:
- A single node is a binary tree
- If
is a binary tree then the tree formed by joining with on either left or right is also a binary tree - If
and are binary trees, then joining them with is also a binary tree
- Let:
the number of edges in a tree the number of nodes
- Prove that for any binary tree
- Base Cases:
- Tree size is
- Nodes are
- Edges are
- ??
- Nodes are
- Tree size is
- Solution
- Proof:
- Base Case: Single Node
- Has one node, no edges
- Induction Step:
- Cases, tree on either or side, or two trees.
- Assume
and are binary trees such that and . - First case:
- Construct a tree
with root and as its subtree on either left or right side. - Nodes in t prime are t1's nodes + the new node
- We take the previous tree and add another node to the equation
- Construct a tree
- Second case:
- Construct
with root and subtrees and . - Consider that the number of edges here is just the number of edges in
and then . - So
- Construct
- Base Case: Single Node
- Define a non empty binary tree as:
- 3
- Suppose that there are
airports, where - The distances between any two airpots is
- different airport. For each airport there is exactly
- one airplane departing from it and heading towards
- the closest airport.
- Prove by induction that there is an airport which none of the airplanes head towards.
- Base case
- Suppose we have
airports, airports. - Let our distances be
- Let us have
airports - The distance between
- Let our planes departing from each airport have their respective numbers:
- Suppose we have
- Induction Hypothesis:
- Suppose we have
airports. - Then at least one of the airports won't have a plane
heading towards
- Suppose we have
- Induction Step:
- Show that if I have
airports that airports also won't have a plane heading towards . airports - So we have
- Show that if I have
- solution:
- base case proven
airports - We know that plane
will go from
- Inductino step:
- Assume
airport airport is empty - Without loss of generality
- Consider
- Cases:
- 1
- So
- Then
. - Then
is empty
- So
- 2
- So
- and
- So then
is empty
- So
- 1
- Assume
- base case proven
- Suppose that there are