CS1800: Mathematical Induction. Professor Kevin Gold

Size: px
Start display at page:

Download "CS1800: Mathematical Induction. Professor Kevin Gold"

Transcription

1 CS1800: Mathematical Induction Professor Kevin Gold

2 Induction: Used to Prove Patterns Just Keep Going For an algorithm, we may want to prove that it just keeps working, no matter how big the input size n gets For sums, we may want to prove that a formula remains accurate, no matter how big n gets For graphs, we may want to prove that some property will hold no matter how many vertices there are In each case, we can use mathematical induction to prove that a statement holds as some n keeps increasing

3 Life Without Mathematical Induction We re going to begin to prove something that we already know slowly, in an effort to motivate mathematical induction n Imagine trying to prove Σ i = n(n+1)/2, one statement at a time. i=1 Prove: The formula is true for n=1. Proof: The sum on the left is just 1 and 1(1+1)/2 = 1. So 1 = 1 as required. Prove: The formula is true for n=2. Proof: = 3, and 2(2+1)/2 = 3, so the formula works. Prove: The formula is true for n=3. Proof: = 6, and 3(3+1)/2 = 6, so the formula works. Just an infinite number of statements to go.

4 Prove the Next Value n Always Works Trying to prove Σ i = n(n+1)/2 for all n, without Gauss s trick i=1 What if we proved something like if it works for one value of n, it works for the next? If we knew that was true, our proofs would be easy: Prove the statement is true for n=4. Proof: True because it was true for n=3, and if it works for 3, it works for 4. Prove the statement is true for n=5. Proof: True because it was true for n=4, and if it works for 4, it works for 5. Prove the statement is true for n>=6. Proof: We could clearly extend the above chain of reasoning until any value of n is reached; if 5 then 6, if 6 then 7, if 7 then 8

5 Proving the Claim that the Next Value Always Works Prove: If the formula n(n+1)/2 works for the sum of k numbers, then it will work for the sum of k+1 numbers. Proof: Suppose the formula works for the sum of integers from 1 to k.??????????????? Then the formula works for the sum of integers from 1 to k+1.

6 Proving the Claim that the Next Value Always Works Prove: If the formula n(n+1)/2 works for the sum of k numbers, then it will work for the sum of k+1 numbers. Proof: Suppose the formula works for the sum of integers from 1 to k. Then the sum k is k(k+1)/2.???????????? Then the formula works for the sum of integers from 1 to k+1.

7 Proving the Claim that the Next Value Always Works Prove: If the formula n(n+1)/2 works for the sum of k numbers, then it will work for the sum of k+1 numbers. Proof: Suppose the formula works for the sum of integers from 1 to k. Then the sum k is k(k+1)/2.????????? Then the sum k + (k+1) is (k+1)(k+2)/2. Then the formula works for the sum of integers from 1 to k+1.

8 Proving the Claim that the Next Value Always Works Prove: If the formula n(n+1)/2 works for the sum of k numbers, then it will work for the sum of k+1 numbers. Proof: Suppose the formula works for the sum of integers from 1 to k. Then the sum k is k(k+1)/2. Then the sum k + (k+1) is k(k+1)/2 + (k + 1).?????? Then the sum k + (k+1) is (k+1)(k+2)/2. Then the formula works for the sum of integers from 1 to k +1.

9 Proving the Claim that the Next Value Always Works Prove: If the formula n(n+1)/2 works for the sum of k numbers, then it will work for the sum of k+1 numbers. Proof: Suppose the formula works for the sum of integers from 1 to k. Then the sum k is k(k+1)/2. Then the sum k + (k+1) is k(k+1)/2 + (k + 1). Then the sum k + (k+1) is k(k+1)/2 + 2(k+1)/2.??? Then the sum k + (k+1) is (k+1)(k+2)/2. Then the formula works for the sum of integers from 1 to k +1.

10 Proving the Claim that the Next Value Always Works Prove: If the formula n(n+1)/2 works for the sum of k numbers, then it will work for the sum of k+1 numbers. Proof: Suppose the formula works for the sum of integers from 1 to k. Then the sum k is k(k+1)/2. Then the sum k + (k+1) is k(k+1)/2 + (k + 1). Then the sum k + (k+1) is k(k+1)/2 + 2(k+1)/2. We can factor out (k+1)/2 from both terms: (k+2)(k+1)/2. Then the sum k + (k+1) is (k+1)(k+2)/2. Then the formula works for the sum of integers from 1 to k+1.

11 An Overly Wordy Proof By n Prove: Σ i = n(n+1)/2 for all n. i=1 Induction The statement is true for n=1, because 1=1(1+1)/2. Next, we can argue that if the statement is true for n=k, it must be true for n=k+1. We can see this by noting that if the statement is true for n=k, then the sum up to k should be k(k+1)/2. Adding (k+1) to the sum and then rearranging terms produces (k+1)(k+2)/2, which is what we would have gotten if we plugged k+1 into the formula. So the formula remains true for k+1. If being true for n=k always implies that the statement is true for n=k+1, then we can argue that since it s true for n=1, it s true for n=2. And since it s true for n=2, then it s true for n=3. And so on we can clearly prove the statement for any natural number n >= 1, just by repeatedly applying the reasoning we proved in the previous step.

12 The Inductive Step k k+1 inductive argument: if true for n=k, true for n=k The main work of a proof by induction is on the inductive step. In weak induction, this is proving that if the statement is true for some value k, it is true for the next value k+1. By making the proof about a generic number k, it can be used infinitely to propagate the proof forward, as long as there is some value to start the chain.

13 The Base Case 1 base case: prove a case is true on its own The inductive step is still an if then kind of statement. If the condition were never true, it would be useless. The base case is some case that is proven true without using the inductive argument. It s usually the simplest possible case. If we combine the two, then we can use the inductive argument repeatedly, starting from the base case, to conclude the statement is true for all later values.

14 An Example of the Base Case Being Important Prove: n = n(n+1) + 2. This is almost true, but the +2 shouldn t be there We can prove that if it were true for n=k, then it would be true for n=k+1 Suppose it is true for n=k. Then the sum up to k is k(k+1)+2. Then adding 2(k+1) gives (k+1)(k+2)+2, which is what we would get if we substituted in k+1. So if it s true for k, it s true for k+1. But it s never true for k, so that statement is moot. The base case doesn t work: 2 1(2)+2 = 4.

15 Proofs by Induction Tend To Follow a Specific Format Like proof by contrapositive or proof by contradiction, there are conventions for proofs by induction about what you don t need to say Things that you won t generally see in a proof by induction: Explaining how you could keep applying your inductive step over and over to prove the next case Explaining that you need a base case because without it, the if then logic of the inductive step has no true instance to start from It s considered sufficient (in weak induction) to prove your one base case and your inductive step.

16 Final Version of the Inductive Proof of the n(n+1)/2 formula n Prove: Σ i = n(n+1)/2 for all n. i=1 Base case: n=1. 1 = 1(1+1)/2 = 1. Inductive step: Suppose the statement is true for n=k. Then Σ i = k(k+1)/2. k+1 k i=1 Then Σ i = k(k+1)/2 + (k+1) = k(k+1)/2 + 2(k+1)/2 = i=1 (k+1)(k+2)/2, so the statement is true for n=k+1.

17 Example: Binary Tree Nodes A data structure called a binary tree is a tree where each node as at most two children (nodes lower in the hierarchy). A perfect binary tree has its leaves (nodes with no children) all at the same level. The number of nodes at level i in a perfect binary tree (counting the root as level 0) is 2 i. Thus the number of total nodes in a binary tree is L where L is the bottom level s depth. We will prove by induction that this is 2 L+1-1. (1, 3, 7, )

18 Proof by Induction L = 2 L+1-1 Base case: 1= = 2-1 = 1. Inductive step: Suppose the equation is true for L=k. Then k = 2 k+1-1. Adding the next power of 2 produces (2 k+1-1) + 2 k+1. That is 2(2 k+1 ) - 1 = 2 k+2-1, which is the equation if L=k+1. Thus, the formula is true for L=k+1.

19 Visualizing the Inductive Argument 2 k+1-1 nodes = Level k Level k+1 2 k+1 nodes 2 k+2-1 nodes An inductive step is fundamentally an argument that the pattern must continue

20 Some Commonalities to Inductions About Sums It s common to teach proof by induction about sums. These proofs by induction share some commonalities. The base case shows the first term is equal to the formula. The inductive step shows that the sum up to k plus the k+1st term is equal to the formula for the sum up to k+1. Induction proofs can have a lot of variety, but proofs for sums tend to be similar to each other, and are often used to teach induction for the first time.

21 A Sequence Example Let a0 = 2, an+1 = 2an - n. The elements of this sequence are then 2, 4, 7, 12, We hypothesize a pattern of an = 2 n + n + 1.

22 A Sequence Example Let a 0 = 2, a n+1 = 2a n - n. Prove: a n = 2 n + n + 1. Proof: By induction. Base case: For n=0. a 0 = = = 2. Inductive step: Suppose the formula is true for n=k. Then a k = 2 k + k + 1. The next term will then be 2(2 k + k + 1) - k = 2 k+1 + 2k k = 2 k+1 + k + 2 = 2 k+1 + (k+1) + 1, which is the formula applied to n=k+1.

23 The Inductive Hypothesis Induction is all about things continuing to work. Every inductive step begins with a statement like, Suppose the statement is true for n=k. This is called the inductive hypothesis. If you re trying to prove If P, then Q in the inductive step, then the inductive hypothesis is Suppose P. You will almost always need to use the inductive hypothesis in your inductive step. If the truth of the previous case didn t matter, you probably would not need to use proof by induction at all

24 Our Inductive Hypotheses So Far Suppose that the formula n(n+1)/2 works for a sum up to n=k. Suppose that the number of nodes in the binary tree with L levels is 2 L+1-1. Suppose that the formula for ak is 2 k + k + 1. Remember, the inductive hypothesis is not that the statement works for all values already - just that there is some value k that it works for

25 The Difference Between n and k Students occasionally get confused about why we say Assume this is true for n=k in the inductive hypothesis at all. What does this even do? k is our name for a value that works, in the inductive step. While making that argument, we assume the statement definitely works for k. Assuming that it works for k doesn t let us assume it works for any other values, especially k+1. n is a variable which could take many values, including k (where we assume it works) or k+1 (where we ve got to show it works).

26 The Base Case Proves P 0, The Inductive Step P i =>P i+1 The inductive step often confuses students with the way it supposes the truth of something But that s just because it s really just arguing a conditional - if this is true, then the consequence is true. That s why it assumes the truth of the condition. If P, then Q proofs generally assume the truth of P in the argument, because other states of affairs are irrelevant to the proof. The base case is what ensures that there s real truth to set off the chain reaction

27 Proofs by Induction Aren t Just for Sums & Sequences Proof by induction is a very general technique. When our intuition is that something should just keep working, induction is a good fit to prove it. We re now going to explore cases where the inductive steps aren t just about doing algebra. We typically need to say explicitly what value we are performing induction on. The more general idea is: prove that if it works for one value of a variable, it will work for the next.

28 A Graph Proof By Induction Prove: A tree has V -1 edges. Proof: By induction on the number of vertices. Base case: V = 1. A lone vertex has 0 edges.

29 A Graph Proof By Induction Prove: A tree with V vertices has V -1 edges. Proof: By induction on the number of vertices. Base case: V = 1. A lone vertex has 0 edges. Inductive step: Suppose the claim is true for V = k. We will show it continues to hold for V = k+1.

30 A Graph Proof By Induction Prove: A tree with V vertices has V -1 edges. Proof: By induction on the number of vertices. Base case: V = 1. A lone vertex has 0 edges. Inductive step: Suppose the claim is true for V = k. We will show it continues to hold for V = k+1. Choose an arbitrary leaf of the tree and delete it, along with the edge attaching it. The remaining tree has k vertices, and by the inductive hypothesis, the remaining tree has k-1 edges. k-1 edges

31 A Graph Proof By Induction Prove: A tree with V vertices has V -1 edges. Proof: By induction on the number of vertices. Base case: V = 1. A lone vertex has 0 edges. Inductive step: Suppose the claim is true for V = k. We will show it continues to hold for V = k+1. Choose an arbitrary leaf of the tree and delete it, along with the edge attaching it. The remaining tree has k vertices, and by the inductive hypothesis, the remaining tree has k-1 edges. Thus, our tree with the edge and vertex added back has k+1 vertices and k edges.

32 This Should Just Keep Working Proofs on the first homework had a fair amount of handwavy clearly, this pattern should continue What if your reader disbelieves the pattern will continue? You need some argument that it definitely must Induction is the way to make this argument and leave no room for doubt

33 Recall: A Binary Conversion Algorithm Recall that one way we can convert to binary is the following: Divide by 2 and take the remainder. The remainder is the last binary bit. If the result of the division is nonzero, convert that to binary, and append the remainder bit to that. Example: 11 to binary - 11/2 = 5r1 5 to binary - 5/2 = 2r1 2 to binary - 2/2 = 1r0 1 to binary - 1/2 = 0r1 Binary for 11 is 1011

34 Proof of Algorithm Correctness Prove: The algorithm described on the previous slide always produces the correct answer. Proof: By induction on the number of bits n in the correct answer. Base case: n = 1. If there s just one bit, then the remainder after dividing by 2 will produce the correct answer: 0 if the number is even, 1 if the number is odd.

35 Inductive Step Illustration 1011 Must argue this is correct Correct binary for number/2 (by inductive hypothesis) The algorithm works recursively to produce the binary representation - it assumes it works for fewer bits, too We want to argue that if the algorithm is correct for smaller binary representations, it will be true for larger representations

36 Proof of Algorithm Correctness Prove: The algorithm described on the previous slide always produces the correct answer. Proof: By induction on the number of bits n in the correct answer. Base case: n = 1. If there s just one bit, then the remainder after dividing by 2 will produce the correct answer: 0 if the number is even, 1 if the number is odd. Inductive step: Suppose the algorithm works for binary numbers with k bits. Then consider how it will approach a number with k+1 bits. After dividing by 2, we will have a number that the algorithm functions correctly for, by the inductive hypothesis. Shifting this binary number left one place will multiply it by 2, and since the binary was correct for the k-bit number, it will also be correct for the larger number. The base case argument works for the final bit as well, and so, appending it to the binary for the rest of the number produces the correct answer.

37 Proving Recursive Programs Correct Recursive programming has a lot in common with proof by induction - you assume your program works for smaller cases We can prove programs do the right thing by induction

38 Reverse We can define a reverse program to recursively follow this strategy to reverse a string of text: If the string is empty ( ), do nothing. Otherwise, Divide the string into the first character and the remaining characters. Recursively reverse the remaining characters. Append the first character to the end of the string. abcd = dcb + a = dcba

39 Proof of Correctness of Reverse Proof of correctness: By induction on the number of characters in the string to reverse. Base case. The reverse of the empty string is in fact the empty string, so the program does the correct thing here. Inductive step. Suppose the program correctly reverses strings of length k. Then when reversing k+1 characters, when it recursively reverses the k characters at the end, they will be correctly reversed. Moving the first character to the end will put it in the correct place as well, so the whole string is correctly reversed.

40 Summary - Induction Induction is the mathematical way to argue conclusively that some pattern will continue It can be applied not just to sums but data structures and algorithms as well The base case argument shows that the very first case is true The inductive step argument could be used repeatedly to show all the other cases are true

CS1800: Strong Induction. Professor Kevin Gold

CS1800: Strong Induction. Professor Kevin Gold CS1800: Strong Induction Professor Kevin Gold Mini-Primer/Refresher on Unrelated Topic: Limits This is meant to be a problem about reasoning about quantifiers, with a little practice of other skills, too

More information

Proof Techniques (Review of Math 271)

Proof Techniques (Review of Math 271) Chapter 2 Proof Techniques (Review of Math 271) 2.1 Overview This chapter reviews proof techniques that were probably introduced in Math 271 and that may also have been used in a different way in Phil

More information

Chapter 2. Mathematical Reasoning. 2.1 Mathematical Models

Chapter 2. Mathematical Reasoning. 2.1 Mathematical Models Contents Mathematical Reasoning 3.1 Mathematical Models........................... 3. Mathematical Proof............................ 4..1 Structure of Proofs........................ 4.. Direct Method..........................

More information

What can you prove by induction?

What can you prove by induction? MEI CONFERENCE 013 What can you prove by induction? Martyn Parker M.J.Parker@keele.ac.uk Contents Contents iii 1 Splitting Coins.................................................. 1 Convex Polygons................................................

More information

CS 360, Winter Morphology of Proof: An introduction to rigorous proof techniques

CS 360, Winter Morphology of Proof: An introduction to rigorous proof techniques CS 30, Winter 2011 Morphology of Proof: An introduction to rigorous proof techniques 1 Methodology of Proof An example Deep down, all theorems are of the form If A then B, though they may be expressed

More information

Mathematical Induction

Mathematical Induction Mathematical Induction MAT30 Discrete Mathematics Fall 018 MAT30 (Discrete Math) Mathematical Induction Fall 018 1 / 19 Outline 1 Mathematical Induction Strong Mathematical Induction MAT30 (Discrete Math)

More information

MI 4 Mathematical Induction Name. Mathematical Induction

MI 4 Mathematical Induction Name. Mathematical Induction Mathematical Induction It turns out that the most efficient solution to the Towers of Hanoi problem with n disks takes n 1 moves. If this isn t the formula you determined, make sure to check your data

More information

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

Induction 1 = 1(1+1) = 2(2+1) = 3(3+1) 2 Induction 0-8-08 Induction is used to prove a sequence of statements P(), P(), P(3),... There may be finitely many statements, but often there are infinitely many. For example, consider the statement ++3+

More information

At the start of the term, we saw the following formula for computing the sum of the first n integers:

At the start of the term, we saw the following formula for computing the sum of the first n integers: Chapter 11 Induction This chapter covers mathematical induction. 11.1 Introduction to induction At the start of the term, we saw the following formula for computing the sum of the first n integers: Claim

More information

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

CS 173: Induction. Madhusudan Parthasarathy University of Illinois at Urbana-Champaign. February 7, 2016 CS 173: Induction Madhusudan Parthasarathy University of Illinois at Urbana-Champaign 1 Induction February 7, 016 This chapter covers mathematical induction, and is an alternative resource to the one in

More information

Mathematical Induction

Mathematical Induction Mathematical Induction MAT231 Transition to Higher Mathematics Fall 2014 MAT231 (Transition to Higher Math) Mathematical Induction Fall 2014 1 / 21 Outline 1 Mathematical Induction 2 Strong Mathematical

More information

CS1800: Sequences & Sums. Professor Kevin Gold

CS1800: Sequences & Sums. Professor Kevin Gold CS1800: Sequences & Sums Professor Kevin Gold Moving Toward Analysis of Algorithms Today s tools help in the analysis of algorithms. We ll cover tools for deciding what equation best fits a sequence of

More information

Notes on induction proofs and recursive definitions

Notes on induction proofs and recursive definitions Notes on induction proofs and recursive definitions James Aspnes December 13, 2010 1 Simple induction Most of the proof techniques we ve talked about so far are only really useful for proving a property

More information

means is a subset of. So we say A B for sets A and B if x A we have x B holds. BY CONTRAST, a S means that a is a member of S.

means is a subset of. So we say A B for sets A and B if x A we have x B holds. BY CONTRAST, a S means that a is a member of S. 1 Notation For those unfamiliar, we have := means equal by definition, N := {0, 1,... } or {1, 2,... } depending on context. (i.e. N is the set or collection of counting numbers.) In addition, means for

More information

Some Review Problems for Exam 1: Solutions

Some Review Problems for Exam 1: Solutions Math 3355 Fall 2018 Some Review Problems for Exam 1: Solutions Here is my quick review of proof techniques. I will focus exclusively on propositions of the form p q, or more properly, x P (x) Q(x) or x

More information

Algebra. Here are a couple of warnings to my students who may be here to get a copy of what happened on a day that you missed.

Algebra. Here are a couple of warnings to my students who may be here to get a copy of what happened on a day that you missed. This document was written and copyrighted by Paul Dawkins. Use of this document and its online version is governed by the Terms and Conditions of Use located at. The online version of this document is

More information

Math 138: Introduction to solving systems of equations with matrices. The Concept of Balance for Systems of Equations

Math 138: Introduction to solving systems of equations with matrices. The Concept of Balance for Systems of Equations Math 138: Introduction to solving systems of equations with matrices. Pedagogy focus: Concept of equation balance, integer arithmetic, quadratic equations. The Concept of Balance for Systems of Equations

More information

Homework #2 Solutions Due: September 5, for all n N n 3 = n2 (n + 1) 2 4

Homework #2 Solutions Due: September 5, for all n N n 3 = n2 (n + 1) 2 4 Do the following exercises from the text: Chapter (Section 3):, 1, 17(a)-(b), 3 Prove that 1 3 + 3 + + n 3 n (n + 1) for all n N Proof The proof is by induction on n For n N, let S(n) be the statement

More information

SMT 2013 Power Round Solutions February 2, 2013

SMT 2013 Power Round Solutions February 2, 2013 Introduction This Power Round is an exploration of numerical semigroups, mathematical structures which appear very naturally out of answers to simple questions. For example, suppose McDonald s sells Chicken

More information

3 The language of proof

3 The language of proof 3 The language of proof After working through this section, you should be able to: (a) understand what is asserted by various types of mathematical statements, in particular implications and equivalences;

More information

MAT 243 Test 2 SOLUTIONS, FORM A

MAT 243 Test 2 SOLUTIONS, FORM A MAT Test SOLUTIONS, FORM A 1. [10 points] Give a recursive definition for the set of all ordered pairs of integers (x, y) such that x < y. Solution: Let S be the set described above. Note that if (x, y)

More information

CS 2110: INDUCTION DISCUSSION TOPICS

CS 2110: INDUCTION DISCUSSION TOPICS CS 110: INDUCTION DISCUSSION TOPICS The following ideas are suggestions for how to handle your discussion classes. You can do as much or as little of this as you want. You can either present at the board,

More information

Logic, Sets, and Proofs

Logic, Sets, and Proofs Logic, Sets, and Proofs David A. Cox and Catherine C. McGeoch Amherst College 1 Logic Logical Operators. A logical statement is a mathematical statement that can be assigned a value either true or false.

More information

MATH 271 Summer 2016 Practice problem solutions Week 1

MATH 271 Summer 2016 Practice problem solutions Week 1 Part I MATH 271 Summer 2016 Practice problem solutions Week 1 For each of the following statements, determine whether the statement is true or false. Prove the true statements. For the false statement,

More information

Basics of Proofs. 1 The Basics. 2 Proof Strategies. 2.1 Understand What s Going On

Basics of Proofs. 1 The Basics. 2 Proof Strategies. 2.1 Understand What s Going On Basics of Proofs The Putnam is a proof based exam and will expect you to write proofs in your solutions Similarly, Math 96 will also require you to write proofs in your homework solutions If you ve seen

More information

1 Maintaining a Dictionary

1 Maintaining a Dictionary 15-451/651: Design & Analysis of Algorithms February 1, 2016 Lecture #7: Hashing last changed: January 29, 2016 Hashing is a great practical tool, with an interesting and subtle theory too. In addition

More information

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

. As the binomial coefficients are integers we have that. 2 n(n 1). Math 580 Homework. 1. Divisibility. Definition 1. Let a, b be integers with a 0. Then b divides b iff there is an integer k such that b = ka. In the case we write a b. In this case we also say a is a factor

More information

Quadratic Equations Part I

Quadratic Equations Part I Quadratic Equations Part I Before proceeding with this section we should note that the topic of solving quadratic equations will be covered in two sections. This is done for the benefit of those viewing

More information

CS 6820 Fall 2014 Lectures, October 3-20, 2014

CS 6820 Fall 2014 Lectures, October 3-20, 2014 Analysis of Algorithms Linear Programming Notes CS 6820 Fall 2014 Lectures, October 3-20, 2014 1 Linear programming The linear programming (LP) problem is the following optimization problem. We are given

More information

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

Lecture 17: Trees and Merge Sort 10:00 AM, Oct 15, 2018 CS17 Integrated Introduction to Computer Science Klein Contents Lecture 17: Trees and Merge Sort 10:00 AM, Oct 15, 2018 1 Tree definitions 1 2 Analysis of mergesort using a binary tree 1 3 Analysis of

More information

MATH CSE20 Homework 5 Due Monday November 4

MATH CSE20 Homework 5 Due Monday November 4 MATH CSE20 Homework 5 Due Monday November 4 Assigned reading: NT Section 1 (1) Prove the statement if true, otherwise find a counterexample. (a) For all natural numbers x and y, x + y is odd if one of

More information

Take the Anxiety Out of Word Problems

Take the Anxiety Out of Word Problems Take the Anxiety Out of Word Problems I find that students fear any problem that has words in it. This does not have to be the case. In this chapter, we will practice a strategy for approaching word problems

More information

MATHEMATICAL INDUCTION

MATHEMATICAL INDUCTION MATHEMATICAL INDUCTION MATH 3A SECTION HANDOUT BY GERARDO CON DIAZ Imagine a bunch of dominoes on a table. They are set up in a straight line, and you are about to push the first piece to set off the chain

More information

You separate binary numbers into columns in a similar fashion. 2 5 = 32

You separate binary numbers into columns in a similar fashion. 2 5 = 32 RSA Encryption 2 At the end of Part I of this article, we stated that RSA encryption works because it s impractical to factor n, which determines P 1 and P 2, which determines our private key, d, which

More information

Day 6. Tuesday May 29, We continue our look at basic proofs. We will do a few examples of different methods of proving.

Day 6. Tuesday May 29, We continue our look at basic proofs. We will do a few examples of different methods of proving. Day 6 Tuesday May 9, 01 1 Basic Proofs We continue our look at basic proofs. We will do a few examples of different methods of proving. 1.1 Proof Techniques Recall that so far in class we have made two

More information

Writing proofs for MATH 61CM, 61DM Week 1: basic logic, proof by contradiction, proof by induction

Writing proofs for MATH 61CM, 61DM Week 1: basic logic, proof by contradiction, proof by induction Writing proofs for MATH 61CM, 61DM Week 1: basic logic, proof by contradiction, proof by induction written by Sarah Peluse, revised by Evangelie Zachos and Lisa Sauermann September 27, 2016 1 Introduction

More information

Math 3361-Modern Algebra Lecture 08 9/26/ Cardinality

Math 3361-Modern Algebra Lecture 08 9/26/ Cardinality Math 336-Modern Algebra Lecture 08 9/26/4. Cardinality I started talking about cardinality last time, and you did some stuff with it in the Homework, so let s continue. I said that two sets have the same

More information

Cool Results on Primes

Cool Results on Primes Cool Results on Primes LA Math Circle (Advanced) January 24, 2016 Recall that last week we learned an algorithm that seemed to magically spit out greatest common divisors, but we weren t quite sure why

More information

Announcements. Read Section 2.1 (Sets), 2.2 (Set Operations) and 5.1 (Mathematical Induction) Existence Proofs. Non-constructive

Announcements. Read Section 2.1 (Sets), 2.2 (Set Operations) and 5.1 (Mathematical Induction) Existence Proofs. Non-constructive Announcements Homework 2 Due Homework 3 Posted Due next Monday Quiz 2 on Wednesday Read Section 2.1 (Sets), 2.2 (Set Operations) and 5.1 (Mathematical Induction) Exam 1 in two weeks Monday, February 19

More information

Summer HSSP Lecture Notes Week 1. Lane Gunderman, Victor Lopez, James Rowan

Summer HSSP Lecture Notes Week 1. Lane Gunderman, Victor Lopez, James Rowan Summer HSSP Lecture Notes Week 1 Lane Gunderman, Victor Lopez, James Rowan July 6, 014 First Class: proofs and friends 1 Contents 1 Glossary of symbols 4 Types of numbers 5.1 Breaking it down...........................

More information

Induction and recursion. Chapter 5

Induction and recursion. Chapter 5 Induction and recursion Chapter 5 Chapter Summary Mathematical Induction Strong Induction Well-Ordering Recursive Definitions Structural Induction Recursive Algorithms Mathematical Induction Section 5.1

More information

Solutions to Homework Set 1

Solutions to Homework Set 1 Solutions to Homework Set 1 1. Prove that not-q not-p implies P Q. In class we proved that A B implies not-b not-a Replacing the statement A by the statement not-q and the statement B by the statement

More information

CALCULUS I. Review. Paul Dawkins

CALCULUS I. Review. Paul Dawkins CALCULUS I Review Paul Dawkins Table of Contents Preface... ii Review... 1 Introduction... 1 Review : Functions... Review : Inverse Functions...1 Review : Trig Functions...0 Review : Solving Trig Equations...7

More information

, p 1 < p 2 < < p l primes.

, p 1 < p 2 < < p l primes. Solutions Math 347 Homework 1 9/6/17 Exercise 1. When we take a composite number n and factor it into primes, that means we write it as a product of prime numbers, usually in increasing order, using exponents

More information

Inference and Proofs (1.6 & 1.7)

Inference and Proofs (1.6 & 1.7) EECS 203 Spring 2016 Lecture 4 Page 1 of 9 Introductory problem: Inference and Proofs (1.6 & 1.7) As is commonly the case in mathematics, it is often best to start with some definitions. An argument for

More information

Chapter Summary. Mathematical Induction Strong Induction Well-Ordering Recursive Definitions Structural Induction Recursive Algorithms

Chapter Summary. Mathematical Induction Strong Induction Well-Ordering Recursive Definitions Structural Induction Recursive Algorithms 1 Chapter Summary Mathematical Induction Strong Induction Well-Ordering Recursive Definitions Structural Induction Recursive Algorithms 2 Section 5.1 3 Section Summary Mathematical Induction Examples of

More information

Preparing for the CS 173 (A) Fall 2018 Midterm 1

Preparing for the CS 173 (A) Fall 2018 Midterm 1 Preparing for the CS 173 (A) Fall 2018 Midterm 1 1 Basic information Midterm 1 is scheduled from 7:15-8:30 PM. We recommend you arrive early so that you can start exactly at 7:15. Exams will be collected

More information

Introduction to Basic Proof Techniques Mathew A. Johnson

Introduction to Basic Proof Techniques Mathew A. Johnson Introduction to Basic Proof Techniques Mathew A. Johnson Throughout this class, you will be asked to rigorously prove various mathematical statements. Since there is no prerequisite of a formal proof class,

More information

Nondeterministic finite automata

Nondeterministic finite automata Lecture 3 Nondeterministic finite automata This lecture is focused on the nondeterministic finite automata (NFA) model and its relationship to the DFA model. Nondeterminism is an important concept in the

More information

Sequences of Real Numbers

Sequences of Real Numbers Chapter 8 Sequences of Real Numbers In this chapter, we assume the existence of the ordered field of real numbers, though we do not yet discuss or use the completeness of the real numbers. In the next

More information

STEP Support Programme. Hints and Partial Solutions for Assignment 17

STEP Support Programme. Hints and Partial Solutions for Assignment 17 STEP Support Programme Hints and Partial Solutions for Assignment 7 Warm-up You need to be quite careful with these proofs to ensure that you are not assuming something that should not be assumed. For

More information

Modern Algebra Prof. Manindra Agrawal Department of Computer Science and Engineering Indian Institute of Technology, Kanpur

Modern Algebra Prof. Manindra Agrawal Department of Computer Science and Engineering Indian Institute of Technology, Kanpur Modern Algebra Prof. Manindra Agrawal Department of Computer Science and Engineering Indian Institute of Technology, Kanpur Lecture 02 Groups: Subgroups and homomorphism (Refer Slide Time: 00:13) We looked

More information

1. Introduction to commutative rings and fields

1. Introduction to commutative rings and fields 1. Introduction to commutative rings and fields Very informally speaking, a commutative ring is a set in which we can add, subtract and multiply elements so that the usual laws hold. A field is a commutative

More information

Fall 2017 Test II review problems

Fall 2017 Test II review problems Fall 2017 Test II review problems Dr. Holmes October 18, 2017 This is a quite miscellaneous grab bag of relevant problems from old tests. Some are certainly repeated. 1. Give the complete addition and

More information

CS173 Lecture B, November 3, 2015

CS173 Lecture B, November 3, 2015 CS173 Lecture B, November 3, 2015 Tandy Warnow November 3, 2015 CS 173, Lecture B November 3, 2015 Tandy Warnow Announcements Examlet 7 is a take-home exam, and is due November 10, 11:05 AM, in class.

More information

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

CMSC250 Homework 9 Due: Wednesday, December 3, Question: Total Points: Score: 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)

More information

CS 70 Discrete Mathematics and Probability Theory Fall 2016 Seshia and Walrand Midterm 1 Solutions

CS 70 Discrete Mathematics and Probability Theory Fall 2016 Seshia and Walrand Midterm 1 Solutions CS 70 Discrete Mathematics and Probability Theory Fall 2016 Seshia and Walrand Midterm 1 Solutions PRINT Your Name: Answer: Oski Bear SIGN Your Name: PRINT Your Student ID: CIRCLE your exam room: Dwinelle

More information

Tutorial on Mathematical Induction

Tutorial on Mathematical Induction Tutorial on Mathematical Induction Roy Overbeek VU University Amsterdam Department of Computer Science r.overbeek@student.vu.nl April 22, 2014 1 Dominoes: from case-by-case to induction Suppose that you

More information

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

Algorithms and Data Structures 2016 Week 5 solutions (Tues 9th - Fri 12th February) Algorithms and Data Structures 016 Week 5 solutions (Tues 9th - Fri 1th February) 1. Draw the decision tree (under the assumption of all-distinct inputs) Quicksort for n = 3. answer: (of course you should

More information

Solution to Proof Questions from September 1st

Solution to Proof Questions from September 1st Solution to Proof Questions from September 1st Olena Bormashenko September 4, 2011 What is a proof? A proof is an airtight logical argument that proves a certain statement in general. In a sense, it s

More information

Induction and Recursion

Induction and Recursion . All rights reserved. Authorized only for instructor use in the classroom. No reproduction or further distribution permitted without the prior written consent of McGraw-Hill Education. Induction and Recursion

More information

CS173 Lecture B, September 10, 2015

CS173 Lecture B, September 10, 2015 CS173 Lecture B, September 10, 2015 Tandy Warnow September 11, 2015 CS 173, Lecture B September 10, 2015 Tandy Warnow Examlet Today Four problems: One induction proof One problem on simplifying a logical

More information

Writing proofs for MATH 51H Section 2: Set theory, proofs of existential statements, proofs of uniqueness statements, proof by cases

Writing proofs for MATH 51H Section 2: Set theory, proofs of existential statements, proofs of uniqueness statements, proof by cases Writing proofs for MATH 51H Section 2: Set theory, proofs of existential statements, proofs of uniqueness statements, proof by cases September 22, 2018 Recall from last week that the purpose of a proof

More information

2 Lecture 2: Logical statements and proof by contradiction Lecture 10: More on Permutations, Group Homomorphisms 31

2 Lecture 2: Logical statements and proof by contradiction Lecture 10: More on Permutations, Group Homomorphisms 31 Contents 1 Lecture 1: Introduction 2 2 Lecture 2: Logical statements and proof by contradiction 7 3 Lecture 3: Induction and Well-Ordering Principle 11 4 Lecture 4: Definition of a Group and examples 15

More information

One-to-one functions and onto functions

One-to-one functions and onto functions MA 3362 Lecture 7 - One-to-one and Onto Wednesday, October 22, 2008. Objectives: Formalize definitions of one-to-one and onto One-to-one functions and onto functions At the level of set theory, there are

More information

a. See the textbook for examples of proving logical equivalence using truth tables. b. There is a real number x for which f (x) < 0. (x 1) 2 > 0.

a. See the textbook for examples of proving logical equivalence using truth tables. b. There is a real number x for which f (x) < 0. (x 1) 2 > 0. For some problems, several sample proofs are given here. Problem 1. a. See the textbook for examples of proving logical equivalence using truth tables. b. There is a real number x for which f (x) < 0.

More information

Commutative Rings and Fields

Commutative Rings and Fields Commutative Rings and Fields 1-22-2017 Different algebraic systems are used in linear algebra. The most important are commutative rings with identity and fields. Definition. A ring is a set R with two

More information

Lecture 7 Feb 4, 14. Sections 1.7 and 1.8 Some problems from Sec 1.8

Lecture 7 Feb 4, 14. Sections 1.7 and 1.8 Some problems from Sec 1.8 Lecture 7 Feb 4, 14 Sections 1.7 and 1.8 Some problems from Sec 1.8 Section Summary Proof by Cases Existence Proofs Constructive Nonconstructive Disproof by Counterexample Nonexistence Proofs Uniqueness

More information

A Few Examples of Limit Proofs

A Few Examples of Limit Proofs A Few Examples of Limit Proofs x (7x 4) = 10 SCRATCH WORK First, we need to find a way of relating x < δ and (7x 4) 10 < ɛ. We will use algebraic manipulation to get this relationship. Remember that the

More information

Proving languages to be nonregular

Proving languages to be nonregular Proving languages to be nonregular We already know that there exist languages A Σ that are nonregular, for any choice of an alphabet Σ. This is because there are uncountably many languages in total and

More information

ORDERS OF ELEMENTS IN A GROUP

ORDERS OF ELEMENTS IN A GROUP ORDERS OF ELEMENTS IN A GROUP KEITH CONRAD 1. Introduction Let G be a group and g G. We say g has finite order if g n = e for some positive integer n. For example, 1 and i have finite order in C, since

More information

1 Basic Definitions. 2 Proof By Contradiction. 3 Exchange Argument

1 Basic Definitions. 2 Proof By Contradiction. 3 Exchange Argument 1 Basic Definitions A Problem is a relation from input to acceptable output. For example, INPUT: A list of integers x 1,..., x n OUTPUT: One of the three smallest numbers in the list An algorithm A solves

More information

Section 20: Arrow Diagrams on the Integers

Section 20: Arrow Diagrams on the Integers Section 0: Arrow Diagrams on the Integers Most of the material we have discussed so far concerns the idea and representations of functions. A function is a relationship between a set of inputs (the leave

More information

Partial Fractions. June 27, In this section, we will learn to integrate another class of functions: the rational functions.

Partial Fractions. June 27, In this section, we will learn to integrate another class of functions: the rational functions. Partial Fractions June 7, 04 In this section, we will learn to integrate another class of functions: the rational functions. Definition. A rational function is a fraction of two polynomials. For example,

More information

COLLEGE ALGEBRA. Paul Dawkins

COLLEGE ALGEBRA. Paul Dawkins COLLEGE ALGEBRA Paul Dawkins Table of Contents Preface... iii Outline... iv Preliminaries... 7 Introduction... 7 Integer Exponents... 8 Rational Exponents...5 Radicals... Polynomials...30 Factoring Polynomials...36

More information

P (E) = P (A 1 )P (A 2 )... P (A n ).

P (E) = P (A 1 )P (A 2 )... P (A n ). Lecture 9: Conditional probability II: breaking complex events into smaller events, methods to solve probability problems, Bayes rule, law of total probability, Bayes theorem Discrete Structures II (Summer

More information

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

1 Direct Proofs Technique Outlines Example Implication Proofs Technique Outlines Examples... CSE 311: Foundations of Computing I Proof Techniques What Is This? Each of the following is as close as we can get to giving you a template (and a completely worked out example) for every proof technique

More information

Direct Proofs. the product of two consecutive integers plus the larger of the two integers

Direct Proofs. the product of two consecutive integers plus the larger of the two integers Direct Proofs A direct proof uses the facts of mathematics and the rules of inference to draw a conclusion. Since direct proofs often start with premises (given information that goes beyond the facts of

More information

1. Introduction to commutative rings and fields

1. Introduction to commutative rings and fields 1. Introduction to commutative rings and fields Very informally speaking, a commutative ring is a set in which we can add, subtract and multiply elements so that the usual laws hold. A field is a commutative

More information

The Inductive Proof Template

The Inductive Proof Template CS103 Handout 24 Winter 2016 February 5, 2016 Guide to Inductive Proofs Induction gives a new way to prove results about natural numbers and discrete structures like games, puzzles, and graphs. All of

More information

Discrete Mathematics and Probability Theory Fall 2012 Vazirani Note 1

Discrete Mathematics and Probability Theory Fall 2012 Vazirani Note 1 CS 70 Discrete Mathematics and Probability Theory Fall 2012 Vazirani Note 1 Course Outline CS70 is a course on "Discrete Mathematics and Probability for Computer Scientists." The purpose of the course

More information

3.1 Induction: An informal introduction

3.1 Induction: An informal introduction Chapter 3 Induction and Recursion 3.1 Induction: An informal introduction This section is intended as a somewhat informal introduction to The Principle of Mathematical Induction (PMI): a theorem that establishes

More information

Basic Proof Examples

Basic Proof Examples Basic Proof Examples Lisa Oberbroeckling Loyola University Maryland Fall 2015 Note. In this document, we use the symbol as the negation symbol. Thus p means not p. There are four basic proof techniques

More information

DR.RUPNATHJI( DR.RUPAK NATH )

DR.RUPNATHJI( DR.RUPAK NATH ) Contents 1 Sets 1 2 The Real Numbers 9 3 Sequences 29 4 Series 59 5 Functions 81 6 Power Series 105 7 The elementary functions 111 Chapter 1 Sets It is very convenient to introduce some notation and terminology

More information

An Introduction to Mathematical Reasoning

An Introduction to Mathematical Reasoning An Introduction to Mathematical Reasoning Matthew M. Conroy and Jennifer L. Taggart University of Washington 2 Version: December 28, 2016 Contents 1 Preliminaries 7 1.1 Axioms and elementary properties

More information

Basic Logic and Proof Techniques

Basic Logic and Proof Techniques Chapter 3 Basic Logic and Proof Techniques Now that we have introduced a number of mathematical objects to study and have a few proof techniques at our disposal, we pause to look a little more closely

More information

MATH 61-02: PRACTICE PROBLEMS FOR FINAL EXAM

MATH 61-02: PRACTICE PROBLEMS FOR FINAL EXAM MATH 61-02: PRACTICE PROBLEMS FOR FINAL EXAM (FP1) The exclusive or operation, denoted by and sometimes known as XOR, is defined so that P Q is true iff P is true or Q is true, but not both. Prove (through

More information

MATH 521, WEEK 2: Rational and Real Numbers, Ordered Sets, Countable Sets

MATH 521, WEEK 2: Rational and Real Numbers, Ordered Sets, Countable Sets MATH 521, WEEK 2: Rational and Real Numbers, Ordered Sets, Countable Sets 1 Rational and Real Numbers Recall that a number is rational if it can be written in the form a/b where a, b Z and b 0, and a number

More information

Module 9: Mathematical Induction

Module 9: Mathematical Induction Module 9: Mathematical Induction Module 9: Announcements There is a chance that this Friday s class may be cancelled. Assignment #4 is due Thursday March 16 th at 4pm. Midterm #2 Monday March 20 th, 2017

More information

CS 246 Review of Proof Techniques and Probability 01/14/19

CS 246 Review of Proof Techniques and Probability 01/14/19 Note: This document has been adapted from a similar review session for CS224W (Autumn 2018). It was originally compiled by Jessica Su, with minor edits by Jayadev Bhaskaran. 1 Proof techniques Here we

More information

CSC236H Lecture 2. Ilir Dema. September 19, 2018

CSC236H Lecture 2. Ilir Dema. September 19, 2018 CSC236H Lecture 2 Ilir Dema September 19, 2018 Simple Induction Useful to prove statements depending on natural numbers Define a predicate P(n) Prove the base case P(b) Prove that for all n b, P(n) P(n

More information

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

Contradiction MATH Contradiction. Benjamin V.C. Collins, James A. Swenson MATH 2730 MATH 2730 Contradiction Benjamin V.C. Collins James A. Swenson Contrapositive The contrapositive of the statement If A, then B is the statement If not B, then not A. A statement and its contrapositive

More information

Proof by Contradiction

Proof by Contradiction Proof by Contradiction MAT231 Transition to Higher Mathematics Fall 2014 MAT231 (Transition to Higher Math) Proof by Contradiction Fall 2014 1 / 12 Outline 1 Proving Statements with Contradiction 2 Proving

More information

Recursion and Induction

Recursion and Induction Recursion and Induction Themes Recursion Recurrence Definitions Recursive Relations Induction (prove properties of recursive programs and objects defined recursively) Examples Tower of Hanoi Gray Codes

More information

1 : Prove that if n > k > 0 and GCD(n, k) = 1, then n C k is divisible by n. ( H.W. Lenstra )

1 : Prove that if n > k > 0 and GCD(n, k) = 1, then n C k is divisible by n. ( H.W. Lenstra ) This document was created with FrameMaker 404 Math. 55 Three Problems about Combinatorial Coefficients April 26, 1999 6:57 am The combinatorial coefficient n C k := n!/(k! (n k)!) = n C n k. It can be

More information

Grades 7 & 8, Math Circles 10/11/12 October, Series & Polygonal Numbers

Grades 7 & 8, Math Circles 10/11/12 October, Series & Polygonal Numbers Faculty of Mathematics Waterloo, Ontario N2L G Centre for Education in Mathematics and Computing Introduction Grades 7 & 8, Math Circles 0//2 October, 207 Series & Polygonal Numbers Mathematicians are

More information

Theory of Computation

Theory of Computation Theory of Computation (Feodor F. Dragan) Department of Computer Science Kent State University Spring, 2018 Theory of Computation, Feodor F. Dragan, Kent State University 1 Before we go into details, what

More information

Lesson 21 Not So Dramatic Quadratics

Lesson 21 Not So Dramatic Quadratics STUDENT MANUAL ALGEBRA II / LESSON 21 Lesson 21 Not So Dramatic Quadratics Quadratic equations are probably one of the most popular types of equations that you ll see in algebra. A quadratic equation has

More information

(x 1 +x 2 )(x 1 x 2 )+(x 2 +x 3 )(x 2 x 3 )+(x 3 +x 1 )(x 3 x 1 ).

(x 1 +x 2 )(x 1 x 2 )+(x 2 +x 3 )(x 2 x 3 )+(x 3 +x 1 )(x 3 x 1 ). CMPSCI611: Verifying Polynomial Identities Lecture 13 Here is a problem that has a polynomial-time randomized solution, but so far no poly-time deterministic solution. Let F be any field and let Q(x 1,...,

More information

Math 38: Graph Theory Spring 2004 Dartmouth College. On Writing Proofs. 1 Introduction. 2 Finding A Solution

Math 38: Graph Theory Spring 2004 Dartmouth College. On Writing Proofs. 1 Introduction. 2 Finding A Solution Math 38: Graph Theory Spring 2004 Dartmouth College 1 Introduction On Writing Proofs What constitutes a well-written proof? A simple but rather vague answer is that a well-written proof is both clear and

More information