CMSC250 Homework 9 Due: Wednesday, December 3, Question: Total Points: Score:

Similar documents
Fall 2014 CMSC250/250H Midterm II

Outline. We will cover (over the next few weeks) Induction Strong Induction Constructive Induction Structural Induction

1 Examples of Weak Induction

SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION

CS1800: Mathematical Induction. Professor Kevin Gold

Note that r = 0 gives the simple principle of induction. Also it can be shown that the principle of strong induction follows from simple induction.

Mathematical Fundamentals

McGill University Faculty of Science. Solutions to Practice Final Examination Math 240 Discrete Structures 1. Time: 3 hours Marked out of 60

General Comments Proofs by Mathematical Induction

Sequences. 1. Number sequences. 2. Arithmetic sequences. Consider the illustrated pattern of circles:

Mathematical Induction Assignments

Algorithm Analysis Recurrence Relation. Chung-Ang University, Jaesung Lee

Recurrence Relations

Fall 2017 Test II review problems

Lesson 12.7: Sequences and Series

Methods for solving recurrences

General Comments on Proofs by Mathematical Induction

CS 220: Discrete Structures and their Applications. Mathematical Induction in zybooks

Math 324 Summer 2012 Elementary Number Theory Notes on Mathematical Induction

Exam 2 Solutions. x 1 x. x 4 The generating function for the problem is the fourth power of this, (1 x). 4

Math 283 Spring 2013 Presentation Problems 4 Solutions

n n P} is a bounded subset Proof. Let A be a nonempty subset of Z, bounded above. Define the set

. As the binomial coefficients are integers we have that. 2 n(n 1).

Carmen s Core Concepts (Math 135)

MATH 324 Summer 2011 Elementary Number Theory. Notes on Mathematical Induction. Recall the following axiom for the set of integers.

CSC236H Lecture 2. Ilir Dema. September 19, 2018

Binomial Coefficient Identities/Complements

Problem Set 5 Solutions

Quiz 3 Reminder and Midterm Results

Name CMSC203 Fall2008 Exam 2 Solution Key Show All Work!!! Page (16 points) Circle T if the corresponding statement is True or F if it is False.

Fall 2017 November 10, Written Homework 5

Math 3000 Section 003 Intro to Abstract Math Homework 6

Definition: A sequence is a function from a subset of the integers (usually either the set

Mathematical Induction

Research Methods in Mathematics Homework 4 solutions

Situation: Summing the Natural Numbers

C241 Homework Assignment 7

Solutions to Practice Final

CS 577 Introduction to Algorithms: Strassen s Algorithm and the Master Theorem

Discrete Mathematics. Spring 2017

Analysis of Algorithms I: Asymptotic Notation, Induction, and MergeSort

1 Sequences and Summation

Recursion and Induction

Consider an infinite row of dominoes, labeled by 1, 2, 3,, where each domino is standing up. What should one do to knock over all dominoes?

Contradiction MATH Contradiction. Benjamin V.C. Collins, James A. Swenson MATH 2730

Some Review Problems for Exam 3: Solutions

Recursion and Induction

MATH 301 INTRO TO ANALYSIS FALL 2016

Solution Set 2. Problem 1. [a] + [b] = [a + b] = [b + a] = [b] + [a] ([a] + [b]) + [c] = [a + b] + [c] = [a + b + c] = [a] + [b + c] = [a] + ([b + c])

Lecture 17: Trees and Merge Sort 10:00 AM, Oct 15, 2018

21 Induction. Tom Lewis. Fall Term Tom Lewis () 21 Induction Fall Term / 14

Sequences of Real Numbers

Divide and Conquer Algorithms

3.3 Accumulation Sequences

Data Structures and Algorithms CMPSC 465

CSC 344 Algorithms and Complexity. Proof by Mathematical Induction

Recursion and Induction

Midterm Preparation Problems

Recitation 7: Existence Proofs and Mathematical Induction

Data Structure Lecture#4: Mathematical Preliminaries U Kang Seoul National University

We want to show P (n) is true for all integers

CSC B36 Additional Notes sample induction and well-ordering proofs. c Nick Cheng

Solving Recurrence Relations 1. Guess and Math Induction Example: Find the solution for a n = 2a n 1 + 1, a 0 = 0 We can try finding each a n : a 0 =

MATH10040: Numbers and Functions Homework 1: Solutions

CSCE 222 Discrete Structures for Computing. Review for Exam 2. Dr. Hyunyoung Lee !!!

CSE 321 Solutions to Practice Problems

HOMEWORK #2 - MATH 3260

Data Structure Lecture#4: Mathematical Preliminaries U Kang Seoul National University

Math Circle Beginners Group February 28, 2016 Euclid and Prime Numbers Solutions

Infinite Continued Fractions

Solutions to Assignment 1

Quiz 1 Solutions. Problem 2. Asymptotics & Recurrences [20 points] (3 parts)

What we have learned What is algorithm Why study algorithm The time and space efficiency of algorithm The analysis framework of time efficiency Asympt

1 Direct Proofs Technique Outlines Example Implication Proofs Technique Outlines Examples...

Divide and Conquer Algorithms

Chapter 5.1: Induction

Induction 1 = 1(1+1) = 2(2+1) = 3(3+1) 2

CSE 20. Final Review. CSE 20: Final Review

Properties of the Integers

a + b = b + a and a b = b a. (a + b) + c = a + (b + c) and (a b) c = a (b c). a (b + c) = a b + a c and (a + b) c = a c + b c.

201-1A5-MT - Mathematics Summer 2015 HOMEWORK 2 Deadline : Sunday, August 30, 2015 at 12 :30.

DO NOT USE WITHOUT PERMISSION

Sequences. Chapter 3. n + 1 3n + 2 sin n n. 3. lim (ln(n + 1) ln n) 1. lim. 2. lim. 4. lim (1 + n)1/n. Answers: 1. 1/3; 2. 0; 3. 0; 4. 1.

CHAPTER 4 SOME METHODS OF PROOF

Module 9: Mathematical Induction

Discrete Math, Spring Solutions to Problems V

Mathematical Structures Combinations and Permutations

Prime Factorization and GCF. In my own words

Math 242: Principles of Analysis Fall 2016 Homework 1 Part B solutions

CSCE 750 Final Exam Answer Key Wednesday December 7, 2005

Legendre s Equation. PHYS Southern Illinois University. October 18, 2016

Discrete Structures - CM0246 Mathematical Induction

Strong Induction (Second Principle) Example: There are two piles of cards, players take turn: each turn: one player removes any number of cards from

Revision Topic 8: Solving Inequalities Inequalities that describe a set of integers or range of values

CSE 311: Foundations of Computing. Lecture 14: Induction

arxiv: v1 [math.gm] 1 Oct 2015

In-Class Soln 1. CS 361, Lecture 4. Today s Outline. In-Class Soln 2

A-2. Polynomials and Factoring. Section A-2 1

Algorithm efficiency analysis

Advanced Analysis of Algorithms - Midterm (Solutions)

Transcription:

Name & UID: Circle Your Section! 0101 (10am: 3120, Ladan) 0102 (11am: 3120, Ladan) 0103 (Noon: 3120, Peter) 0201 (2pm: 3120, Yi) 0202 (10am: 1121, Vikas) 0203 (11am: 1121, Vikas) 0204 (9am: 2117, Karthik) 0301 (9am: 3120, Huijing) 0302 (8am: 3120, Huijing) 0303 (1pm: 3120, Yi) 250H (10am: 2117, Peter) Question: 1 2 3 4 5 6 Total Points: 15 15 15 15 15 25 100 Score:

1. (15 points) Consider the following sequence: a 0 = 1 a 1 = 1 + 2a 0 = 3 a 2 = 1 + 2a 0 + 2a 1 = 9 a 3 = 1 + 2a 0 + 2a 1 + 2a 2 = 27. n 1 a n = 1 + 2a i We will use Strong Induction to prove that a n = 3 n for all n 0. (a) What is the Base Case: n = 0 Left side = 1 Right side = 3 0 = 1 (b) What is the Inductive Hypothesis? i=0 Assume that for all 0 k < n, a k = 3 k. (c) What is the Inductive Step? a n = 1 + n 1 i=0 2a i by definition = 1 + 2 n 1 i=0 a i by algebra = 1 + 2 n 1 i=0 3i by IH = 1 + 2 3n 1 3 1 sum of geometric series = 3 n by algebra Page 2 of 8

2. (15 points) We will use Strong Induction to show that every positive integer n can be written as the sum of distinct powers of 2 (i.e., the integers 2 0 = 1, 2 1 = 2, 2 2 = 4, 2 3 = 8, etc.). (a) What is the Base Case. For n = 1: 1 = 2 0. (b) What is the Inductive Hypothesis. Assume that for all 1 m < n, m can be written as the sum of distinct powers of 2. (c) What is the Inductive Step. [Hint: Consider the cases of when n is even and odd separately.] If n is even then by the IH n/2 can be written as the sum of distinct powers of 2. Multiplying each of these powers by 2 gives n as the sum of distinct powers of 2. If n is odd then by the IH (n 1)/2 can be written as the sum of distinct powers of 2. Multiplying each of these powers by 2 and adding 1 = n 0 gives n as the sum of distinct powers of 2. Page 3 of 8

3. (15 points) Show that every positive integer n can be written as the sum of distinct powers of 2 in a unique way. [Hint: Do not use Mathematical Induction.] Proof by Contradiction. Assume n can be written as the sum of distinct powers of 2 in two different ways. Find the smallest powers of 2 where the two ways disagree, say 2 a and 2 b. Assume, WLOG than a < b. Subtract all of powers of 2 that are smaller than 2 a from both ways, producing a (possibly smaller) number that is the sum of distinct powers of 2 in two different ways. Divide both numbers by 2 a producing a (possibly smaller) number that is the sum of distinct powers of 2 in two different ways. The way that had 2 a as a power now has 2 0 = 1 as a power and is therefore odd, but the other way is even. Thus they cannot be equal, which is a contradiction. Page 4 of 8

4. (15 points) Assume that you guess that a formula for n k2 k has the form an2 n + b2 n + c, where n 1. We will use Constructive Mathematical Induction to derive a formula for the sum. (a) What do you learn from the Base Case. For n = 1 n k2 k = 1 k2 k = 1 2 1 = 2. an2 n + b2 n + c = a 1 2 1 + b 2 1 + c = 2a + 2b + c. So 2a + 2b + c = 2. (b) What is the Inductive Hypothesis? Assume for n 1 n 1 k2 k = a(n 1)2 n 1 + b2 n 1 + c. (c) Show the Inductive Step. n k2k = n 1 k2k + n2 n = a(n 1)2 n 1 + b2 n 1 + c + n2 n by the IH = a 2 (n 1)2n + b 2 2n + c + n2 n = ( a 2 + 1)n2n + ( b a 2 )2n + c = an2 n + b2 n + c to make the Induction work (d) Derive the constants. The first two terms above show that a = a/2 + 1 and b = (b a)/2. The first equation above implies a = 2, then the second equation above implies b = 2. Using these two values with the base case implies c = 2. The final result is then n k2 k = 2n2 n 2 2 n + 2 = 2(n2 n 2 n + 1). Page 5 of 8

5. (15 points) Consider the recurrence r n = 4r n 1 + r n 2 where r 1 = 1 and r 2 = 3. We will use Constructive Mathematical Induction to derive an upper bound for r n. Assume that r n ab n. We would primarily like to upper bound b as tightly as possible, and secondarily upper bound a as tightly as possible. (a) What do we learn from the base cases? 1 = r 1 ab 1 = ab 3 = r 2 ab 2 (b) What is the Inductive Hypothesis? Assume that for k < n, r k ab k. (c) Show the Inductive Step. r n = 4r n 1 + r n 2 4ab n 1 + ab n 2 by IH Dividing by ab n 2 and rearranging gives (d) Derive the constants. ab n to make the Induction work b 2 4b 1 0 Solving for b gives b 2 + 5. Substituting into the first base case (which dominates the second base case) gives a 1 2 + 5 = 1 b. Thus, r n (2 + 5) n 1. Page 6 of 8

6. (25 points) A full ternary tree is a tree in which every node has exactly one or three children. (a) Guess a equation relating the number of internal nodes and leaves in a full ternary tree. L = 2I + 1 (b) Give a Non-Structural Mathematical Induction proof of the equation. i. What is the Base Case: One node: L = 1 and I = 0. Then 2I + 1 = 2 0 + 1 = 1 = L. ii. What is the Inductive Hypothesis? Assume that for all trees with fewer than L leaves: L = 2I + 1 iii. What is the Inductive Step? Let T be a tree with L leaves. Find an internal node for which all of its children are leaves. Remove the three children. The new tree has L 2 leaves (having lost three but gained one) and I 1 internal nodes (having lost one). By the IH, L 2 = 2(I 1) + 1, which implies L = 2I + 1. Page 7 of 8

(c) Give a recursive definition of a full trinary tree. A full trinary tree is either a single node, called the root; or a single node, called the root, with three children, each of which is the root of a full trinary tree. (d) Give a Structural Induction proof of the equation, using the definition from Part (c). i. What is the Base Case: One node: L = 1 and I = 0. Then 2I + 1 = 2 0 + 1 = 1 = L. ii. What is the Inductive Hypothesis? Assume that for all trees with fewer than L leaves: L = 2I + 1 iii. What is the Inductive Step? Consider a full trinary tree with more than one node. By the recursive definition it consists of a root with three children each of which is a full trinary tree. Call them T A, T B, and T C. Then L = L A +L B +L C, and I = I A +I B +I C +1. By the IH, L A = 2I A + 1, L B = 2I B + 1, and L C = 2I C + 1. Summing these last three equations gives: L A + L B + L C = (2I A + 1) + (2I B + 1) + (2I C + 1) = 2(I A + I B 2I C ) + 3 By substitution L = 2(I 1) + 3 = 2I + 1. Page 8 of 8