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
- ??
- Solution
-
- Proof:
- Base Case: Single Node
- 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
- 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
-
- 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:
- Induction Hypothesis:
- Suppose we have airports.
- Then at least one of the airports won't have a plane heading towards
- Induction Step:
- Show that if I have airports that airports also won't have a plane heading towards .
- airports
- So we 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
- 2
- So
- and
- So then is empty