CIS Spring 2018 (instructor Val Tannen)

Similar documents
CIS Spring 2018 (instructor Val Tannen)

1 Sequences and Summation

Logic and Discrete Mathematics. Section 6.7 Recurrence Relations and Their Solution

Algorithms and Data Structures 2016 Week 5 solutions (Tues 9th - Fri 12th February)

Structural Induction

INDUCTION AND RECURSION. Lecture 7 - Ch. 4

4 a b 1 1 c 1 d 3 e 2 f g 6 h i j k 7 l m n o 3 p q 5 r 2 s 4 t 3 3 u v 2

1 Closest Pair of Points on the Plane

REVIEW PROBLEMS FOR SECOND 3200 MIDTERM

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?

Show Your Work! Point values are in square brackets. There are 35 points possible. Some facts about sets are on the last page.

CN#4 Biconditional Statements and Definitions

Divide & Conquer. CS 320, Fall Dr. Geri Georg, Instructor CS320 Div&Conq 1

1 Implication and induction

Basic Logic and Proof Techniques

Pigeonhole Principle and Ramsey Theory

Basic counting techniques. Periklis A. Papakonstantinou Rutgers Business School

CSC 344 Algorithms and Complexity. Proof by Mathematical Induction

Binomial Coefficient Identities/Complements

We are going to discuss what it means for a sequence to converge in three stages: First, we define what it means for a sequence to converge to zero

Mathematical Induction. Defining Functions. Overview. Notation for recursive functions. Base case Sn(0) = 0 S(n) = S(n 1) + n for n > 0

CS1800 Discrete Structures Spring 2018 February CS1800 Discrete Structures Midterm Version A

Proof Techniques (Review of Math 271)

n(n + 1). 2 . If n = 3, then 1+2+3=6= 3(3+1) . If n = 2, then = 3 = 2(2+1)

CSE 20 DISCRETE MATH SPRING

b + O(n d ) where a 1, b > 1, then O(n d log n) if a = b d d ) if a < b d O(n log b a ) if a > b d

MEETING 9 - INDUCTION AND RECURSION

HW Graph Theory SOLUTIONS (hbovik) - Q

Review Sheet for the Final Exam of MATH Fall 2009

1 Basic Combinatorics

Contents. Counting Methods and Induction

2005 Euclid Contest. Solutions

Department of Computer Science University at Albany, State University of New York Solutions to Sample Discrete Mathematics Examination I (Spring 2008)

Mathematical Induction

Partition Numbers. Kevin Y.X. Wang. September 5, School of Mathematics and Statistics The University of Sydney

Lecture 2: Divide and conquer and Dynamic programming

Extension of continuous functions in digital spaces with the Khalimsky topology

CSE 20. Final Review. CSE 20: Final Review

1 The Local-to-Global Lemma

Sums of Squares. Bianca Homberg and Minna Liu

CS173 Running Time and Big-O. Tandy Warnow

Fall 2017 Test II review problems

Sum of Squares. Defining Functions. Closed-Form Expression for SQ(n)

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

Lectures 2 3 : Wigner s semicircle law

Lecture 6: Recurrent Algorithms:

Hyperbolicity of mapping-torus groups and spaces

CS 173: Induction. Madhusudan Parthasarathy University of Illinois at Urbana-Champaign. February 7, 2016

p, p or its negation is true, and the other false

CSE 20 DISCRETE MATH WINTER

Final Exam Review. 2. Let A = {, { }}. What is the cardinality of A? Is

Sydney University Mathematical Society Problems Competition Solutions.

2-4. Holt McDougal Geometry

THE INVERSE FUNCTION THEOREM

Cartesian Products and Relations

Quiz 3 Reminder and Midterm Results

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

Spring 2014 Advanced Probability Overview. Lecture Notes Set 1: Course Overview, σ-fields, and Measures

CIS 2033 Lecture 5, Fall

MOEMS What Every Young Mathlete Should Know

VC-DENSITY FOR TREES

Integrals. D. DeTurck. January 1, University of Pennsylvania. D. DeTurck Math A: Integrals 1 / 61

Lecture Overview. 2 Weak Induction

Hermite normal form: Computation and applications

The natural numbers. Definition. Let X be any inductive set. We define the set of natural numbers as N = C(X).

MATH 2200 Final Review

Solutions Math is Cool HS Championships Mental Math

COM S 330 Lecture Notes Week of Feb 9 13

CIS Spring 2018 (instructor Val Tannen) Midterm 1 Review WITH SOLUTIONS

2013 University of New South Wales School Mathematics Competition

10-704: Information Processing and Learning Fall Lecture 10: Oct 3

MODEL ANSWERS TO THE THIRD HOMEWORK. 1. We prove this result by mathematical induction. Let P (n) be the statement that

Handout: Proof of the completeness theorem

1 Matchings in Non-Bipartite Graphs

1 st Preparatory. Part (1)

Discrete Mathematics and Probability Theory Spring 2016 Rao and Walrand Note 8

Fermat's Little Theorem

CS1800: Strong Induction. Professor Kevin Gold

Review problems solutions

CDM Combinatorial Principles

cse547, math547 DISCRETE MATHEMATICS Professor Anita Wasilewska

Introduction to Induction (LAMC, 10/14/07)

Ma/CS 6a Class 24: More Generating Functions

Exercises. Template for Proofs by Mathematical Induction

MATH 115, SUMMER 2012 LECTURE 12

Asymptotic Analysis and Recurrences

CHAPTER 5 Induction and Recursion

Posted Thursday February 14. STUDY IN-DEPTH...the posted solutions to homeworks 1-3. Compare with your own solutions.

THE CAPORASO-HARRIS FORMULA AND PLANE RELATIVE GROMOV-WITTEN INVARIANTS IN TROPICAL GEOMETRY

Discrete Mathematics and Probability Theory Fall 2014 Anant Sahai Note 7

Proofs Not Based On POMI

Proof. Theorems. Theorems. Example. Example. Example. Part 4. The Big Bang Theory

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

Divide and Conquer Algorithms

Lecture 3 - Tuesday July 5th

CISC-102 Fall 2017 Week 3. Principle of Mathematical Induction

Appendix C: Event Topics per Meet

Geometry - Chapter 2 Corrective 1

Definitions. Notations. Injective, Surjective and Bijective. Divides. Cartesian Product. Relations. Equivalence Relations

International Mathematics TOURNAMENT OF THE TOWNS

Transcription:

CIS 160 - Spring 018 (instructor Val Tannen) Lecture 11 Tuesday, February 0 PROOFS: STRONG INDUCTION Example 1.1 Any integer n can be written as the product of one or more (not necessarily distinct) prime numbers. Solution: Let s try to prove this by induction. (BASE CASE) n. Check. (INDUCTION STEP) Let k be an arbitrary natural number. Assume (IH) that k can be written as the product of one or more (not necessarily distinct) prime numbers. Now consider k + 1. If k + 1 is prime we are done (without even using the IH!). If k + 1 is composite then by Proposition 1.3 (Lecture 1) we have k + 1 r s where r, s are both integers > 1. This implies that r, s are both (k + 1)/. So now we would like to use the IH on r and s. Unfortunately, none of them equals k! On the other hand since r, s k the induction process must have gone through them already! This is the idea of the Strong Induction Principle which we explain next, Proof Pattern STRONG INDUCTION (BASE CASE) Prove P (n 0 ). (INDUCTION STEP) Let k N s.t. k n 0. Prove P (n 0 ) P (k) P (k + 1). 1 Then you can conclude that for all natural numbers n n 0 we have P (n) In spite of its name Strong Induction is logically equivalent to Ordinary Induction (and hence, further equivalent to the Well-Ordering Principle). This is not hard to prove, you should try it. This equivalence is the main reason why I am against calling Ordinary Induction weak. 1 The IH for strong induction is indeed stronger that the IH for ordinary induction: P (n 0 ) P (k) implies P (k), hence the name. Just because the IH is stronger does not mean that strong induction allows us to prove statements that cannot be shown using ordinary induction. In fact, it is not hard to show that any proof by strong induction has be transformed into a proof by ordinary induction (the idea is to use a different predicate P (n)). Using strong induction when appropriate makes some proofs easier and clearer. 1

Now let s go back to the proof earlier and do it with strong induction. The base case is the same. The IH is now: every integer between and k (inclusive) can be written as the product of one or more (not necessarily distinct) prime numbers. If k + 1 is prime we are done, like before, If k + 1 is composite then k + 1 r s where r, s are both integers > 1 and therefore k. So the IH applies to r and s: r p 1 p m and s q 1 q n where p 1,..., p m, q 1,..., q n are primes. Then k+1 r s p 1 p m q 1 q n. and we are done. Example 1. If a polygon with four or more sides is triangulated then at least two of the triangles formed are exterior. d B A Solution: By strong induction on the number n of vertices of the polygon. (BASE CASE) n 4. To triangulate a quadrilateral we draw one diagonal. Both resulting triangles are exterior. (INDUCTION STEP) Let k 4. Assume (IH) that for any triangulated polygon with a number of sides between 4 and k at least two of the formed triangles are exterior. Now consider a triangulated polygon P with k + 1 sides. Let d be one of the diagonals used in the triangulation. It will divide P into two other triangulated polygons, A and B. See picture below. d B A Now a crucial observation is that both A and B have at most k sides. Indeed, d is a diagonal so A, B have at least three sides, two of which are not d itself. If one of them had k + 1 or more sides then P would have k + or more sides, contradiction.

Lemma 1.3 The triangulation of A has at least one triangle that is exterior for the triangulation of P. Proof: If A is itself a triangle we are done. Otherwise, A has between 4 and k sides and the IH applies so the triangulation of A has at least two triangles wich are exterior for A. At most one of these two triangles includes d. Therefore, the other one must be exterior for P as well. The lemma applies to B as well so, in total, we have at least two exterior triangles for P. Example 1.4 What is the largest number of pieces (not slices!) of pizza that can be made with n distinct straight cuts? Solution: A bit of thinking makes you realize that the pizza is a red herring one (not as good as anchovies!) because it does not matter where exactly is the crust of the pizza. In fact this problem is known as Steiner s Plane Cutting Problem. Some experimentation leads us to the following: The number of pizza pieces is NOT maximized unless (1) every cut crosses every other cut, and () no three cuts cross at the same point. Indeed it is easy to see that if the cuts do not satisfy (1) or () then you can move lines a little and increase the number of pieces. What is not clear a priori is that any two sets of cuts satisfying (1) and () actually produce the same number of pieces (which then must be the largest number of pieces). This will follow from the following observations. There is exactly one set of 0 cuts, it satisfies (1) and () vacuously, and it produces 1 piece. Let S be any set of n 1 cuts satisfying (1) and (). Delete one of the cuts, call it c in S and obtain a set S of n 1 cuts. Note that S also satisfies (1) and (). And note that if p(s) and p(s ) are the number of pieces yielded by S, respectively S, then p(s) p(s ) + n. That s because the n 1 lines in S together with the pizza crust determine n segments on c and each of these segements is a side for a new piece that the addition of c produces. 3

Using p(s) p(s ) + n we can prove by induction the following: Lemma 1.5 For any n N, for any two sets of n cuts S 1 and S both satisfying (1) and (), the number of pieces that S 1 and S produce is the same. We skip the easy proof. Let C(n) be the number of pieces produced by a set of n cuts satisfying (1) and (). By the lemma, it does not matter which such set of cuts we consider because they all produce the same (maximum) number of pieces. From the considerations above we conclude that C(0) 1 C(n) C(n 1) + n This is a recurrence relation. Recurrences are extremely useful in the analysis of algorithm (e.g., the divide-and-conquer kind). How do you solve them, i.e., for above obtain an expression for C(n)? One way is to guess the answer and the prove it by induction. Another way is to analyze the recursion tree constructed from the recurrence. For example, here is the recursion tree for pizza recurrence above (for n 6): C(6) C(5) 6 C(4) 5 C(3) 4 C() 3 C(1) C(0) 1 1 Sometimes we can use a telescopic trick to solve such recurrences. We write them one under the 4

other for n, n 1, n,...,, 1: C(n) C(n 1) + n C(n 1) C(n ) + n 1 C(n ) C(n 3) + n C() C(1) + C(1) C(0) + 1 Then we add all the LHS and all the RHS. After we (telescopically) cancel the terms that appear on both sides we obtain C(n) C(0) + 1 + + + n 1 + n(n + 1) n + n + Another way of counting In the picture below note two kinds of crosspoints: boundary crosspoints (where a cut intersects the crust) and interior crosspoints (where two cuts intersect). Now we can define a mapping between pieces and the unique crosspoint at the top of the piece (by rotating the pizza to make sure no cut is horizontal ). Note that every interior crosspoint is mapped to from exactly one piece. The same is true for every upper boundary crosspoint (i.e., half of the boundary crosspoints) except the one of the top of the figure which is mapped to from two pieces. Therefore, the number of pieces is n n + n + C(n) 1 + n + 5