# Induction and Recursion

Save this PDF as:

Size: px
Start display at page:

## Transcription

1 Induction and Recursion Jan van Eijck June 3, 2003 Abstract A very important proof method that is not covered by the recipes from Chapter 3 is the method of proof by Mathematical Induction. Roughly speaking, mathematical induction is a method to prove things about objects that can be built from a finite number of ingredients in a finite number of steps. Such objects can be thought of as construed by means of recursive definitions. Thus, as we will see in this lecture, recursive definitions and inductive proofs are two sides of one coin.

2 module RCRH8 where import STAL (display)

3 Mathematical Induction Mathematical induction is a proof method that can be used to establish the truth of a statement for an infinite sequence of cases 0, 1, 2,.... Let P (n) be a property of natural numbers. To prove a goal of the form n N : P (n) one can proceed as follows: 1. Basis. Prove that 0 has the property P. 2. Induction step. Assume the induction hypothesis that n has property P. Prove on the basis of this that n + 1 has property P. The goal n N : P (n) follows from this by the principle of mathematical induction.

4 The Principle of Mathematical Induction By the principle of mathematical induction we mean the following fact: For every set X N, we have that: if 0 X and n N(n X n + 1 X), then X = N. This fact is obviously true.

5 Example: The Sum of the Angles of a Convex Polygon Suppose we want to prove that the sum of the angles of a convex polygon of n + 3 sides is (n + 1)π radians. We can show this by mathematical induction with respect to n, as follows:

6 Basis For n = 0, the statement runs: the sum of the angles of a convex polygon of 3 sides, i.e., of a triangle, is π radians. We know from elementary geometry that this is true. Induction step Assume that the sum of the angles of a convex polygon of n + 3 sides is (n + 1)π radians. Take a convex polygon P of n + 4 sides. Then, since P is convex, we can decompose P into a triangle T and a convex polygon P of n + 3 sides (just connect edges 1 and 3 of P ). The sum of the angles of P equals the sum of the angles of T, i.e. π radians, plus the sum of the angles of P, i.e., by the induction hypothesis, (n + 1)π radians. This shows that the sum of the angles of P is (n + 2)π radians. From 1. and 2. and the principle of mathematical induction the statement follows.

7 Example Induction proof that for all n N: 3 2n n is divisible by 7. Basis: = = 28 = 7 4. Induction step: Assume that 3 2n n is divisible by 7, i.e., a N : 3 2n+3 +2 n = 7a. We have to show that 3 2(n+1)+3 +2 n+1 is divisible by 7. We have: 3 2(n+1) n+1 = 3 2n n+1 = n n (3 2 2) 2 n = 3 2 (3 2n n ) 7 2 n ih = 3 2 (7a) 7 2 n = 7(3 2 a 2 n ).

8 Why does Mathematical Induction Work? If one compares the proof strategy needed to establish a principle of the form n N : P (n) with that for an ordinary universal statement x A : P (x), where A is some domain of discourse, then the difference is that in the former case we can make use of what we know about the structure of N. In case we know nothing about A, and we have to prove P for an arbitrary element from A, we have to take our cue from P. In case we have to prove something about an arbitrary element n from N we know a lot more: we know that either n = 0 or n can be reached from 0 in a finite number of steps.

9 Induction and Wellfoundedness The key property of N that makes mathematical induction work is the fact that the relation < on N is well-founded: any sequence m 0 > m 1 > m 2 > terminates. This guarantees the existence of a starting point for the induction process. For any A that is well-founded by a relation the following principle holds. Let X A. If then X = A. a A( b a(b X) a X),

10 The Naturals as a Recursive Datatype We can think of any natural number n as the the result of starting from 0 and applying the successor operation +1 a finite number of times: data Natural = Z S Natural deriving (Eq, Show) Here Z is our representation of 0, while S n is a representation of n+1. The number 4 looks in our representation like S (S (S (S Z))).

11 We can define the operation of addition on the natural numbers recursively in terms of the successor operation +1 and addition for smaller numbers: m + 0 := m m + (n + 1) := (m + n) + 1 This definition of the operation of addition is called recursive because the operation + that is being defined is used in the defining clause, but for a smaller second argument. Recursive definitions always have a base case (in the example: the first line of the definition, where the second argument of the addition operation equals 0) and a recursive case (in the example: the second line of the definition, where the second argument of the addition operation is greater than 0, and the operation that is being defined appears in the righthand side of the definition).

12 In proving things about recursively defined objects the idea is to use mathematical induction with the basic step justified by the base case of the recursive definition, the induction step justified by the recursive case of the recursive definition. Here is the Haskell version of the definition of +, in prefix notation: plus m Z = m plus m (S n) = S (plus m n) Equivalent version of the definition with infix operators: m plus Z = m m plus (S n) = S (m plus n)

13 Now we can prove the following list of fundamental laws of addition from the definition. m + 0 = m (0 is identity element for +) m + n = n + m (commutativity of +) m + (n + k) = (m + n) + k (associativity of +) The first fact follows immediately from the definition of +. In proving things about a recursively defined operator it is convenient to be able to refer to clauses in the recursive definition, as follows:.1 refers to the first clause in the definition of,.2 to the second clause, and so on.

14 Here is a proof by mathematical induction of the associativity of +: Proposition 1 m, n, k N : (m + n) + k = m + (n + k). Proof. Induction on k. Basis (m + n) = m + n +.1 = m + (n + 0). Induction step Assume (m + n) + k = m + (n + k). (m + n) + (k + 1) = m + (n + (k + 1)): We show (m + n) + (k + 1) +.2 = ((m + n) + k) + 1 i.h. = (m + (n + k)) = m + ((n + k) + 1) +.2 = m + (n + (k + 1)).

15 The inductive proof of commutativity of + uses the associativity of +. Proposition 2 m, n N : m + n = n + m. Proof. Induction on n. Basis Induction on m. Basis = Induction Step Assume m+0 = 0+m. We show (m+1)+0 = 0 + (m + 1): (m + 1) = m = (m + 0) + 1 ih = (0 + m) + 1 prop 1 = 0 + (m + 1).

16 Induction step Assume m + n = n + m. We show m + (n + 1) = (n + 1) + m: m + (n + 1) +.2 = (m + n) + 1 ih = (n + m) = n + (m + 1) ih = n + (1 + m) prop 1 = (n + 1) + m.

17 Once we have addition, we can define multiplication in terms of it, again following a recursive definition: m 0 := 0 m (n + 1) := (m n) + m We call the multiplication operator. It is common to use mn as shorthand for m n, or, in other words, one usually does not write the multiplication operator. m mult Z = Z m mult (S n) = (m mult n) plus m Main> (S (S Z)) mult (S (S (S Z))) S (S (S (S (S (S Z)))))

18 Laws for and for interaction of and + m 1 = m (1 is identity element for ) m (n + k) = m n + m k (distribution of over +) m (n k) = (m n) k (associativity of ) m n = n m (commutativity of ) These laws can be proved by mathematical induction.

19 If we now wish to implement an operation expn for exponentiation on naturals, the only thing we have to do is find a recursive definition of exponentiation, and implement that. Here is the definition: m 0 := 1 m n+1 := (m n ) m This leads immediately to the following implementation: expn m Z = (S Z) expn m (S n) = (expn m n) mult m Main> expn (S (S Z)) (S (S (S Z))) S (S (S (S (S (S (S (S Z)))))))

20 We can define < or in terms of addition. On further reflection, successor (+1) is enough to define, witness the following recursive definition: 0 m, m + 1 n + 1 if m n. This is translated into Haskell as follows: leq Z _ = True leq (S _) Z = False leq (S m) (S n) = leq m n

21 We can now define geq, gt, lt, in terms of leq and negation: geq m n = leq n m gt m n = not (leq m n) lt m n = gt n m

22 The Nature of Recursive Definitions Not any set of recursive equations over natural numbers can serve as a definition of an operation on natural numbers. Consider f(0) := 1 f(n + 1) := f(n + 2). This does not define unique values for f(1), f(2), f(3),..., for the equations only require that all these values should be the same, not what the value should be. The following format does guarantee a proper definition: f(0) := c f(n + 1) := h(f(n)). Here c is a description of a value (say of type A), and h is a function of type A A.

23 Structural Recursion A definition in this format is said to be a definition by structural recursion over the natural numbers. Definition by structural recursion of f from c and h works like this: take a natural number n, view it as 1 } + {{ + 1+ } 0, n times replace 0 by c, replace each successor step 1+ by h, and evaluate the result: h( (h(c)) ). }{{} n times

24 Foldn This general procedure is easily implemented in an operation foldn, defined as follows: foldn :: (a -> a) -> a -> Natural -> a foldn h c Z = c foldn h c (S n) = h (foldn h c n) Example application: exclaim :: Natural -> String exclaim = foldn (! :) []

25 Operations on Naturals in terms of foldn A function adding m can be defined by taking m for c, and successor for h: plus :: Natural -> Natural -> Natural plus = foldn (\ n -> S n) Similarly, we can define an alternative for mult in terms of foldn. The recipe for the definition of mult m ( multiply by m ) is to take Z for c and plus m for h: mult :: Natural -> Natural -> Natural mult m = foldn (plus m) Z

26 For exponentiation expn m ( raise m to power... ) we take (S Z) for c and mult m for h: expn :: Natural -> Natural -> Natural expn m = foldn (mult m) (S Z)

27 Induction and Recursion over Trees Here is a recursive definition of binary trees: A single leaf node is a binary tree. If t 1 and t 2 are binary trees, then the result of joining t 1 and t 2 under a single node (called the root node) is a binary tree. A notation for this is: ( t 1 t 2 ) Nothing else is a binary tree. The depth of a binary tree is given by: The depth of is 0. The depth of ( t 1 t 2 ) is 1+ the maximum of the depths of t 1 and t 2.

28 A binary tree is balanced if it either is a single leaf node, or it has the form ( t 1 t 2 ), with both t 1 and t 2 balanced, and having the same depth. We see the following: A balanced binary tree of depth 0 is just a single leaf node, so its number of nodes is 1. A balanced binary tree of depth 1 has one internal node and two leaves, so it has 3 nodes. A balanced binary tree of depth 2 has 3 internal nodes and 4 leaf nodes, so it has 7 nodes. A binary tree of depth 3 has 7 internal nodes plus 8 leaf nodes, so it has 15 nodes....

29 Recursion and induction over binary trees are based on two cases t = and t = ( t 1 t 2 ). Suppose we want to show in general that the number of nodes of a binary tree of depth n is 2 n+1 1. Then a proof by mathematical induction is in order.

30 Basis If n = 0, then 2 n+1 1 = = 1. This is indeed the number of nodes of a binary tree of depth 0. Induction step Assume the the number of nodes of a binary tree of depth n is 2 n+1 1. We have to show that the number of nodes of a binary tree of depth n + 1 equals 2 n+2 1. A binary tree of depth n + 1 can be viewed as a set of internal nodes constituting a binary tree of depth n, plus a set of leaf nodes, consisting of two new leaf nodes for every old leaf node from the tree of depth n. By induction hypothesis, we know that a tree of depth n has 2 n+1 1 nodes, so a tree of depth n + 1 has 2 n+1 1 internal nodes. It is easy to see that a tree of depth n + 1 has 2 n+1 leaf nodes. The total number of nodes of a tree of depth n + 2 is therefore 2 n n+1 = 2 2 n+1 1 = 2 n+2 1, and we have proved our induction step.

31 A Datastructure for Binary Trees We use L for a single leaf. The data declaration specifies that a BinTree either is an object L (a single leaf), or an object constructed by applying the constructor N to two BinTree objects (the result of constructing a new binary tree ( t 1 t 2 ) from two binary trees t 1 and t 2 ).

32 data BinTree = L N BinTree BinTree deriving Show makebintree :: Integer -> BinTree makebintree 0 = L makebintree (n + 1) = N (makebintree n) (makebintree n) count :: BinTree -> Integer count L = 1 count (N t1 t2) = 1 + count t1 + count t2

33 RCRH7> makebintree 0 L RCRH7> makebintree 1 N L L RCRH7> makebintree 2 N (N L L) (N L L) RCRH7> makebintree 3 N (N (N L L) (N L L)) (N (N L L) (N L L))

34 depth :: BinTree -> Integer depth L = 0 depth (N t1 t2) = (max (depth t1) (depth t2)) + 1 balanced :: BinTree -> Bool balanced L = True balanced (N t1 t2) = (balanced t1) && (balanced t2) && depth t1 == depth t2

35 The Haskell programs allow us to check the relation between count (makebintree n) and 2^(n+1) - 1 for individual values of n: Main> count (makebintree 6) == 2^7-1 True What the proof by mathematical induction provides is an insight that the relation holds in general.

36 Mathematical induction does not give as clue as to how to find a formula for the number of nodes in a tree. It only serves as a method of proof once such a formula is found. So how does one find a formula for the number of nodes in a binary tree in the first place? By noticing how such trees grow. A binary tree of depth 0 has 1 node, and this node is a leaf node. This leaf grows two new nodes, so a binary tree of depth 1 has = 3 nodes. In the next step the 2 leaf nodes grow two new nodes each, so we get 2 2 = 4 new leaf nodes, and the number of nodes of a binary tree of depth 2 equals = 7.

37 In general, a tree of depth n 1 is transformed into one of depth n by growing 2 n new leaves, and the total number of leaves of the new tree is given by n. In other words, the number of nodes of a balanced binary tree of depth n is given by : n k=0 2k. To get a value for this, here is a simple trick: n n n 2 k = 2 2 k 2 k = (2 2 n + 2 n + 2) (2 n + + 1) = k=0 k=0 k=0 = 2 2 n 1 = 2 n+1 1.

38 Other Tree Formats Datatype for trees with integers at the internal nodes: data Tree = Lf Nd Int Tree Tree deriving Show A general datatype for binary trees with information at the internal nodes is given by: data Tr a = Nil T a (Tr a) (Tr a) deriving (Eq,Show)

39 Datatype for binary leaf trees (binary trees with information at the leaf nodes): data LeafTree a = Leaf a Node (LeafTree a) (LeafTree a) deriving Show ltree :: LeafTree String ltree = Node (Leaf "I") (Node (Leaf "love") (Leaf "you"))

40 A datatype for trees with arbitrary numbers of branches (rose trees), with information of type a at the buds, is given by: data Rose a = Bud a Br [Rose a] deriving (Eq,Show) rose :: Rose Int rose = Br [Bud 1, Br [Bud 2, Bud 3, Br [Bud 4, Bud 5, Bud 6]]]

### Mathematical Induction. Lecture 10-11

Mathematical Induction Lecture 10-11 Menu Mathematical Induction Strong Induction Recursive Definitions Structural Induction Climbing an Infinite Ladder Suppose we have an infinite ladder: 1. We can reach

### 3. Mathematical Induction

3. MATHEMATICAL INDUCTION 83 3. Mathematical Induction 3.1. First Principle of Mathematical Induction. Let P (n) be a predicate with domain of discourse (over) the natural numbers N = {0, 1,,...}. If (1)

### SECTION 10-2 Mathematical Induction

73 0 Sequences and Series 6. Approximate e 0. using the first five terms of the series. Compare this approximation with your calculator evaluation of e 0.. 6. Approximate e 0.5 using the first five terms

### Notes: Chapter 2 Section 2.2: Proof by Induction

Notes: Chapter 2 Section 2.2: Proof by Induction Basic Induction. To prove: n, a W, n a, S n. (1) Prove the base case - S a. (2) Let k a and prove that S k S k+1 Example 1. n N, n i = n(n+1) 2. Example

### Worksheet on induction Calculus I Fall 2006 First, let us explain the use of for summation. The notation

Worksheet on induction MA113 Calculus I Fall 2006 First, let us explain the use of for summation. The notation f(k) means to evaluate the function f(k) at k = 1, 2,..., n and add up the results. In other

### Basic Proof Techniques

Basic Proof Techniques David Ferry dsf43@truman.edu September 13, 010 1 Four Fundamental Proof Techniques When one wishes to prove the statement P Q there are four fundamental approaches. This document

### Mathematical Induction. Mary Barnes Sue Gordon

Mathematics Learning Centre Mathematical Induction Mary Barnes Sue Gordon c 1987 University of Sydney Contents 1 Mathematical Induction 1 1.1 Why do we need proof by induction?.... 1 1. What is proof by

### Math 55: Discrete Mathematics

Math 55: Discrete Mathematics UC Berkeley, Fall 2011 Homework # 5, due Wednesday, February 22 5.1.4 Let P (n) be the statement that 1 3 + 2 3 + + n 3 = (n(n + 1)/2) 2 for the positive integer n. a) What

### Section 6-2 Mathematical Induction

6- Mathematical Induction 457 In calculus, it can be shown that e x k0 x k k! x x x3!! 3!... xn n! where the larger n is, the better the approximation. Problems 6 and 6 refer to this series. Note that

### Continued Fractions and the Euclidean Algorithm

Continued Fractions and the Euclidean Algorithm Lecture notes prepared for MATH 326, Spring 997 Department of Mathematics and Statistics University at Albany William F Hammond Table of Contents Introduction

### CHAPTER 3. Methods of Proofs. 1. Logical Arguments and Formal Proofs

CHAPTER 3 Methods of Proofs 1. Logical Arguments and Formal Proofs 1.1. Basic Terminology. An axiom is a statement that is given to be true. A rule of inference is a logical rule that is used to deduce

### COMP 250 Fall 2012 lecture 2 binary representations Sept. 11, 2012

Binary numbers The reason humans represent numbers using decimal (the ten digits from 0,1,... 9) is that we have ten fingers. There is no other reason than that. There is nothing special otherwise about

### Handout #1: Mathematical Reasoning

Math 101 Rumbos Spring 2010 1 Handout #1: Mathematical Reasoning 1 Propositional Logic A proposition is a mathematical statement that it is either true or false; that is, a statement whose certainty or

### ML for the Working Programmer

ML for the Working Programmer 2nd edition Lawrence C. Paulson University of Cambridge CAMBRIDGE UNIVERSITY PRESS CONTENTS Preface to the Second Edition Preface xiii xv 1 Standard ML 1 Functional Programming

### Sample Induction Proofs

Math 3 Worksheet: Induction Proofs III, Sample Proofs A.J. Hildebrand Sample Induction Proofs Below are model solutions to some of the practice problems on the induction worksheets. The solutions given

### x if x 0, x if x < 0.

Chapter 3 Sequences In this chapter, we discuss sequences. We say what it means for a sequence to converge, and define the limit of a convergent sequence. We begin with some preliminary results about the

### Lecture 13 - Basic Number Theory.

Lecture 13 - Basic Number Theory. Boaz Barak March 22, 2010 Divisibility and primes Unless mentioned otherwise throughout this lecture all numbers are non-negative integers. We say that A divides B, denoted

### Full and Complete Binary Trees

Full and Complete Binary Trees Binary Tree Theorems 1 Here are two important types of binary trees. Note that the definitions, while similar, are logically independent. Definition: a binary tree T is full

### 2. Methods of Proof Types of Proofs. Suppose we wish to prove an implication p q. Here are some strategies we have available to try.

2. METHODS OF PROOF 69 2. Methods of Proof 2.1. Types of Proofs. Suppose we wish to prove an implication p q. Here are some strategies we have available to try. Trivial Proof: If we know q is true then

### APPLICATIONS OF THE ORDER FUNCTION

APPLICATIONS OF THE ORDER FUNCTION LECTURE NOTES: MATH 432, CSUSM, SPRING 2009. PROF. WAYNE AITKEN In this lecture we will explore several applications of order functions including formulas for GCDs and

### MITES Physics III Summer Introduction 1. 3 Π = Product 2. 4 Proofs by Induction 3. 5 Problems 5

MITES Physics III Summer 010 Sums Products and Proofs Contents 1 Introduction 1 Sum 1 3 Π Product 4 Proofs by Induction 3 5 Problems 5 1 Introduction These notes will introduce two topics: A notation which

### Mathematical Induction

Mathematical Induction In logic, we often want to prove that every member of an infinite set has some feature. E.g., we would like to show: N 1 : is a number 1 : has the feature Φ ( x)(n 1 x! 1 x) How

### MODULAR ARITHMETIC. a smallest member. It is equivalent to the Principle of Mathematical Induction.

MODULAR ARITHMETIC 1 Working With Integers The usual arithmetic operations of addition, subtraction and multiplication can be performed on integers, and the result is always another integer Division, on

### CHAPTER 3 Numbers and Numeral Systems

CHAPTER 3 Numbers and Numeral Systems Numbers play an important role in almost all areas of mathematics, not least in calculus. Virtually all calculus books contain a thorough description of the natural,

### Notes on Determinant

ENGG2012B Advanced Engineering Mathematics Notes on Determinant Lecturer: Kenneth Shum Lecture 9-18/02/2013 The determinant of a system of linear equations determines whether the solution is unique, without

### Cartesian Products and Relations

Cartesian Products and Relations Definition (Cartesian product) If A and B are sets, the Cartesian product of A and B is the set A B = {(a, b) :(a A) and (b B)}. The following points are worth special

### CS 103X: Discrete Structures Homework Assignment 3 Solutions

CS 103X: Discrete Structures Homework Assignment 3 s Exercise 1 (20 points). On well-ordering and induction: (a) Prove the induction principle from the well-ordering principle. (b) Prove the well-ordering

### Chapter 3. Cartesian Products and Relations. 3.1 Cartesian Products

Chapter 3 Cartesian Products and Relations The material in this chapter is the first real encounter with abstraction. Relations are very general thing they are a special type of subset. After introducing

### 8 Divisibility and prime numbers

8 Divisibility and prime numbers 8.1 Divisibility In this short section we extend the concept of a multiple from the natural numbers to the integers. We also summarize several other terms that express

### This asserts two sets are equal iff they have the same elements, that is, a set is determined by its elements.

3. Axioms of Set theory Before presenting the axioms of set theory, we first make a few basic comments about the relevant first order logic. We will give a somewhat more detailed discussion later, but

### Properties of Real Numbers

16 Chapter P Prerequisites P.2 Properties of Real Numbers What you should learn: Identify and use the basic properties of real numbers Develop and use additional properties of real numbers Why you should

### Regular Expressions and Automata using Haskell

Regular Expressions and Automata using Haskell Simon Thompson Computing Laboratory University of Kent at Canterbury January 2000 Contents 1 Introduction 2 2 Regular Expressions 2 3 Matching regular expressions

### HOMEWORK 5 SOLUTIONS. n!f n (1) lim. ln x n! + xn x. 1 = G n 1 (x). (2) k + 1 n. (n 1)!

Math 7 Fall 205 HOMEWORK 5 SOLUTIONS Problem. 2008 B2 Let F 0 x = ln x. For n 0 and x > 0, let F n+ x = 0 F ntdt. Evaluate n!f n lim n ln n. By directly computing F n x for small n s, we obtain the following

### Undergraduate Notes in Mathematics. Arkansas Tech University Department of Mathematics

Undergraduate Notes in Mathematics Arkansas Tech University Department of Mathematics An Introductory Single Variable Real Analysis: A Learning Approach through Problem Solving Marcel B. Finan c All Rights

### Real Numbers and Monotone Sequences

Real Numbers and Monotone Sequences. Introduction. Real numbers. Mathematical analysis depends on the properties of the set R of real numbers, so we should begin by saying something about it. There are

### Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 2

CS 70 Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 2 Proofs Intuitively, the concept of proof should already be familiar We all like to assert things, and few of us

### 8 Primes and Modular Arithmetic

8 Primes and Modular Arithmetic 8.1 Primes and Factors Over two millennia ago already, people all over the world were considering the properties of numbers. One of the simplest concepts is prime numbers.

### Student Outcomes. Lesson Notes. Classwork. Discussion (10 minutes)

NYS COMMON CORE MATHEMATICS CURRICULUM Lesson 5 8 Student Outcomes Students know the definition of a number raised to a negative exponent. Students simplify and write equivalent expressions that contain

### Introduction. Appendix D Mathematical Induction D1

Appendix D Mathematical Induction D D Mathematical Induction Use mathematical induction to prove a formula. Find a sum of powers of integers. Find a formula for a finite sum. Use finite differences to

### Lecture 1: Course overview, circuits, and formulas

Lecture 1: Course overview, circuits, and formulas Topics in Complexity Theory and Pseudorandomness (Spring 2013) Rutgers University Swastik Kopparty Scribes: John Kim, Ben Lund 1 Course Information Swastik

### 6.3 Conditional Probability and Independence

222 CHAPTER 6. PROBABILITY 6.3 Conditional Probability and Independence Conditional Probability Two cubical dice each have a triangle painted on one side, a circle painted on two sides and a square painted

### 5.1 Radical Notation and Rational Exponents

Section 5.1 Radical Notation and Rational Exponents 1 5.1 Radical Notation and Rational Exponents We now review how exponents can be used to describe not only powers (such as 5 2 and 2 3 ), but also roots

### Appendix F: Mathematical Induction

Appendix F: Mathematical Induction Introduction In this appendix, you will study a form of mathematical proof called mathematical induction. To see the logical need for mathematical induction, take another

### Elementary Number Theory and Methods of Proof. CSE 215, Foundations of Computer Science Stony Brook University http://www.cs.stonybrook.

Elementary Number Theory and Methods of Proof CSE 215, Foundations of Computer Science Stony Brook University http://www.cs.stonybrook.edu/~cse215 1 Number theory Properties: 2 Properties of integers (whole

### Regular Languages and Finite Automata

Regular Languages and Finite Automata 1 Introduction Hing Leung Department of Computer Science New Mexico State University Sep 16, 2010 In 1943, McCulloch and Pitts [4] published a pioneering work on a

### Prentice Hall: Middle School Math, Course 1 2002 Correlated to: New York Mathematics Learning Standards (Intermediate)

New York Mathematics Learning Standards (Intermediate) Mathematical Reasoning Key Idea: Students use MATHEMATICAL REASONING to analyze mathematical situations, make conjectures, gather evidence, and construct

### 1 Review of complex numbers

1 Review of complex numbers 1.1 Complex numbers: algebra The set C of complex numbers is formed by adding a square root i of 1 to the set of real numbers: i = 1. Every complex number can be written uniquely

### a 11 x 1 + a 12 x 2 + + a 1n x n = b 1 a 21 x 1 + a 22 x 2 + + a 2n x n = b 2.

Chapter 1 LINEAR EQUATIONS 1.1 Introduction to linear equations A linear equation in n unknowns x 1, x,, x n is an equation of the form a 1 x 1 + a x + + a n x n = b, where a 1, a,..., a n, b are given

### Theory of Computation Prof. Kamala Krithivasan Department of Computer Science and Engineering Indian Institute of Technology, Madras

Theory of Computation Prof. Kamala Krithivasan Department of Computer Science and Engineering Indian Institute of Technology, Madras Lecture No. # 31 Recursive Sets, Recursively Innumerable Sets, Encoding

### MATHEMATICAL INDUCTION. Mathematical Induction. This is a powerful method to prove properties of positive integers.

MATHEMATICAL INDUCTION MIGUEL A LERMA (Last updated: February 8, 003) Mathematical Induction This is a powerful method to prove properties of positive integers Principle of Mathematical Induction Let P

### Mathematical Induction

Mathematical Induction (Handout March 8, 01) The Principle of Mathematical Induction provides a means to prove infinitely many statements all at once The principle is logical rather than strictly mathematical,

### Section IV.1: Recursive Algorithms and Recursion Trees

Section IV.1: Recursive Algorithms and Recursion Trees Definition IV.1.1: A recursive algorithm is an algorithm that solves a problem by (1) reducing it to an instance of the same problem with smaller

### Section 3 Sequences and Limits, Continued.

Section 3 Sequences and Limits, Continued. Lemma 3.6 Let {a n } n N be a convergent sequence for which a n 0 for all n N and it α 0. Then there exists N N such that for all n N. α a n 3 α In particular

### MATH 4330/5330, Fourier Analysis Section 11, The Discrete Fourier Transform

MATH 433/533, Fourier Analysis Section 11, The Discrete Fourier Transform Now, instead of considering functions defined on a continuous domain, like the interval [, 1) or the whole real line R, we wish

### Examination paper for MA0301 Elementær diskret matematikk

Department of Mathematical Sciences Examination paper for MA0301 Elementær diskret matematikk Academic contact during examination: Iris Marjan Smit a, Sverre Olaf Smalø b Phone: a 9285 0781, b 7359 1750

### Catalan Numbers. Thomas A. Dowling, Department of Mathematics, Ohio State Uni- versity.

7 Catalan Numbers Thomas A. Dowling, Department of Mathematics, Ohio State Uni- Author: versity. Prerequisites: The prerequisites for this chapter are recursive definitions, basic counting principles,

### NUMBER SYSTEMS. William Stallings

NUMBER SYSTEMS William Stallings The Decimal System... The Binary System...3 Converting between Binary and Decimal...3 Integers...4 Fractions...5 Hexadecimal Notation...6 This document available at WilliamStallings.com/StudentSupport.html

### Analysis of Algorithms I: Optimal Binary Search Trees

Analysis of Algorithms I: Optimal Binary Search Trees Xi Chen Columbia University Given a set of n keys K = {k 1,..., k n } in sorted order: k 1 < k 2 < < k n we wish to build an optimal binary search

### Indiana State Core Curriculum Standards updated 2009 Algebra I

Indiana State Core Curriculum Standards updated 2009 Algebra I Strand Description Boardworks High School Algebra presentations Operations With Real Numbers Linear Equations and A1.1 Students simplify and

### Mathematical induction. Niloufar Shafiei

Mathematical induction Niloufar Shafiei Mathematical induction Mathematical induction is an extremely important proof technique. Mathematical induction can be used to prove results about complexity of

### 1, 1 2, 1 3, 1 4,... 2 nd term. 1 st term

1 Sequences 11 Overview A (numerical) sequence is a list of real numbers in which each entry is a function of its position in the list The entries in the list are called terms For example, 1, 1, 1 3, 1

### Lecture 16 : Relations and Functions DRAFT

CS/Math 240: Introduction to Discrete Mathematics 3/29/2011 Lecture 16 : Relations and Functions Instructor: Dieter van Melkebeek Scribe: Dalibor Zelený DRAFT In Lecture 3, we described a correspondence

### The Prime Numbers. Definition. A prime number is a positive integer with exactly two positive divisors.

The Prime Numbers Before starting our study of primes, we record the following important lemma. Recall that integers a, b are said to be relatively prime if gcd(a, b) = 1. Lemma (Euclid s Lemma). If gcd(a,

### k, then n = p2α 1 1 pα k

Powers of Integers An integer n is a perfect square if n = m for some integer m. Taking into account the prime factorization, if m = p α 1 1 pα k k, then n = pα 1 1 p α k k. That is, n is a perfect square

### GROUPS SUBGROUPS. Definition 1: An operation on a set G is a function : G G G.

Definition 1: GROUPS An operation on a set G is a function : G G G. Definition 2: A group is a set G which is equipped with an operation and a special element e G, called the identity, such that (i) the

### Euclid s Algorithm for the Greatest Common Divisor Desh Ranjan Department of Computer Science New Mexico State University

Euclid s Algorithm for the Greatest Common Divisor Desh Ranjan Department of Computer Science New Mexico State University 1 Numbers, Division and Euclid People have been using numbers, and operations on

### WRITING PROOFS. Christopher Heil Georgia Institute of Technology

WRITING PROOFS Christopher Heil Georgia Institute of Technology A theorem is just a statement of fact A proof of the theorem is a logical explanation of why the theorem is true Many theorems have this

### CHAPTER 5 Round-off errors

CHAPTER 5 Round-off errors In the two previous chapters we have seen how numbers can be represented in the binary numeral system and how this is the basis for representing numbers in computers. Since any

### 15-150 Lecture 11: Tail Recursion; Continuations

15-150 Lecture 11: Tail Recursion; Continuations Lecture by Dan Licata February 21, 2011 In this lecture we will discuss space usage: analyzing the memory it takes your program to run tail calls and tail

### (0, 0) : order 1; (0, 1) : order 4; (0, 2) : order 2; (0, 3) : order 4; (1, 0) : order 2; (1, 1) : order 4; (1, 2) : order 2; (1, 3) : order 4.

11.01 List the elements of Z 2 Z 4. Find the order of each of the elements is this group cyclic? Solution: The elements of Z 2 Z 4 are: (0, 0) : order 1; (0, 1) : order 4; (0, 2) : order 2; (0, 3) : order

### So let us begin our quest to find the holy grail of real analysis.

1 Section 5.2 The Complete Ordered Field: Purpose of Section We present an axiomatic description of the real numbers as a complete ordered field. The axioms which describe the arithmetic of the real numbers

### Lemma 5.2. Let S be a set. (1) Let f and g be two permutations of S. Then the composition of f and g is a permutation of S.

Definition 51 Let S be a set bijection f : S S 5 Permutation groups A permutation of S is simply a Lemma 52 Let S be a set (1) Let f and g be two permutations of S Then the composition of f and g is a

### Page 331, 38.4 Suppose a is a positive integer and p is a prime. Prove that p a if and only if the prime factorization of a contains p.

Page 331, 38.2 Assignment #11 Solutions Factor the following positive integers into primes. a. 25 = 5 2. b. 4200 = 2 3 3 5 2 7. c. 10 10 = 2 10 5 10. d. 19 = 19. e. 1 = 1. Page 331, 38.4 Suppose a is a

### 26 Integers: Multiplication, Division, and Order

26 Integers: Multiplication, Division, and Order Integer multiplication and division are extensions of whole number multiplication and division. In multiplying and dividing integers, the one new issue

### Arkansas Tech University MATH 4033: Elementary Modern Algebra Dr. Marcel B. Finan

Arkansas Tech University MATH 4033: Elementary Modern Algebra Dr. Marcel B. Finan 3 Binary Operations We are used to addition and multiplication of real numbers. These operations combine two real numbers

### We can express this in decimal notation (in contrast to the underline notation we have been using) as follows: 9081 + 900b + 90c = 9001 + 100c + 10b

In this session, we ll learn how to solve problems related to place value. This is one of the fundamental concepts in arithmetic, something every elementary and middle school mathematics teacher should

### Sequence of Mathematics Courses

Sequence of ematics Courses Where do I begin? Associates Degree and Non-transferable Courses (For math course below pre-algebra, see the Learning Skills section of the catalog) MATH M09 PRE-ALGEBRA 3 UNITS

### Recursive Algorithms. Recursion. Motivating Example Factorial Recall the factorial function. { 1 if n = 1 n! = n (n 1)! if n > 1

Recursion Slides by Christopher M Bourke Instructor: Berthe Y Choueiry Fall 007 Computer Science & Engineering 35 Introduction to Discrete Mathematics Sections 71-7 of Rosen cse35@cseunledu Recursive Algorithms

### def: An axiom is a statement that is assumed to be true, or in the case of a mathematical system, is used to specify the system.

Section 1.5 Methods of Proof 1.5.1 1.5 METHODS OF PROOF Some forms of argument ( valid ) never lead from correct statements to an incorrect. Some other forms of argument ( fallacies ) can lead from true

### Homework until Test #2

MATH31: Number Theory Homework until Test # Philipp BRAUN Section 3.1 page 43, 1. It has been conjectured that there are infinitely many primes of the form n. Exhibit five such primes. Solution. Five such

### Notes on counting finite sets

Notes on counting finite sets Murray Eisenberg February 26, 2009 Contents 0 Introduction 2 1 What is a finite set? 2 2 Counting unions and cartesian products 4 2.1 Sum rules......................................

### MATH10212 Linear Algebra. Systems of Linear Equations. Definition. An n-dimensional vector is a row or a column of n numbers (or letters): a 1.

MATH10212 Linear Algebra Textbook: D. Poole, Linear Algebra: A Modern Introduction. Thompson, 2006. ISBN 0-534-40596-7. Systems of Linear Equations Definition. An n-dimensional vector is a row or a column

### Math Review. for the Quantitative Reasoning Measure of the GRE revised General Test

Math Review for the Quantitative Reasoning Measure of the GRE revised General Test www.ets.org Overview This Math Review will familiarize you with the mathematical skills and concepts that are important

### Induction. Margaret M. Fleck. 10 October These notes cover mathematical induction and recursive definition

Induction Margaret M. Fleck 10 October 011 These notes cover mathematical induction and recursive definition 1 Introduction to induction At the start of the term, we saw the following formula for computing

### ARITHMETICAL FUNCTIONS II: CONVOLUTION AND INVERSION

ARITHMETICAL FUNCTIONS II: CONVOLUTION AND INVERSION PETE L. CLARK 1. Sums over divisors, convolution and Möbius Inversion The proof of the multiplicativity of the functions σ k, easy though it was, actually

### Mathematics for Computer Science/Software Engineering. Notes for the course MSM1F3 Dr. R. A. Wilson

Mathematics for Computer Science/Software Engineering Notes for the course MSM1F3 Dr. R. A. Wilson October 1996 Chapter 1 Logic Lecture no. 1. We introduce the concept of a proposition, which is a statement

### 1. Give the 16 bit signed (twos complement) representation of the following decimal numbers, and convert to hexadecimal:

Exercises 1 - number representations Questions 1. Give the 16 bit signed (twos complement) representation of the following decimal numbers, and convert to hexadecimal: (a) 3012 (b) - 435 2. For each of

### The Language of Mathematics

CHPTER 2 The Language of Mathematics 2.1. Set Theory 2.1.1. Sets. set is a collection of objects, called elements of the set. set can be represented by listing its elements between braces: = {1, 2, 3,

### Applications of Methods of Proof

CHAPTER 4 Applications of Methods of Proof 1. Set Operations 1.1. Set Operations. The set-theoretic operations, intersection, union, and complementation, defined in Chapter 1.1 Introduction to Sets are

### Core Maths C1. Revision Notes

Core Maths C Revision Notes November 0 Core Maths C Algebra... Indices... Rules of indices... Surds... 4 Simplifying surds... 4 Rationalising the denominator... 4 Quadratic functions... 4 Completing the

### 1.2 Solving a System of Linear Equations

1.. SOLVING A SYSTEM OF LINEAR EQUATIONS 1. Solving a System of Linear Equations 1..1 Simple Systems - Basic De nitions As noticed above, the general form of a linear system of m equations in n variables

### Pythagorean Triples. Chapter 2. a 2 + b 2 = c 2

Chapter Pythagorean Triples The Pythagorean Theorem, that beloved formula of all high school geometry students, says that the sum of the squares of the sides of a right triangle equals the square of the

### a = bq + r where 0 r < b.

Lecture 5: Euclid s algorithm Introduction The fundamental arithmetic operations are addition, subtraction, multiplication and division. But there is a fifth operation which I would argue is just as fundamental

### CS 441 Discrete Mathematics for CS Lecture 5. Predicate logic. CS 441 Discrete mathematics for CS. Negation of quantifiers

CS 441 Discrete Mathematics for CS Lecture 5 Predicate logic Milos Hauskrecht milos@cs.pitt.edu 5329 Sennott Square Negation of quantifiers English statement: Nothing is perfect. Translation: x Perfect(x)

### Assignment 5 - Due Friday March 6

Assignment 5 - Due Friday March 6 (1) Discovering Fibonacci Relationships By experimenting with numerous examples in search of a pattern, determine a simple formula for (F n+1 ) 2 + (F n ) 2 that is, a

### Lecture 3: Finding integer solutions to systems of linear equations

Lecture 3: Finding integer solutions to systems of linear equations Algorithmic Number Theory (Fall 2014) Rutgers University Swastik Kopparty Scribe: Abhishek Bhrushundi 1 Overview The goal of this lecture

### God created the integers and the rest is the work of man. (Leopold Kronecker, in an after-dinner speech at a conference, Berlin, 1886)

Chapter 2 Numbers God created the integers and the rest is the work of man. (Leopold Kronecker, in an after-dinner speech at a conference, Berlin, 1886) God created the integers and the rest is the work

### On every sheet please give your first name, last name, and matriculation number.

RHEINISCH- WESTFÄLISCHE TECHNISCHE HOCHSCHULE AACHEN LEHR- UND FORSCHUNGSGEBIET INFORMATIK 2 RWTH Aachen D-52056 Aachen GERMANY http://verify.rwth-aachen.de/ LuFG Informatik II Functional Programming Exam,