1. (16 points) Circle T if the corresponding statement is True or F if it is False.

Size: px
Start display at page:

Download "1. (16 points) Circle T if the corresponding statement is True or F if it is False."

Transcription

1 Name Solution Key Show All Work!!! Page 1 1. (16 points) Circle T if the corresponding statement is True or F if it is False. T F The sequence {1, 1, 1, 1, 1, 1...} is an example of an Alternating sequence. T F The Weak and Strong Principles of Mathematical Induction are logically equivalent. T F In general, iterative algorithms use memory more efficiently than their equivalent recursive representations. T F n = 10 (n + 1) 1. T F ,000 = 1,001,000. T F Algorithms whose order is O(n ) are less efficient than those of order O( n ). T F If a, b, and p are positive Integers and (a MOD p) = (b MOD p), then a = b. T F If p and q are positive Integers, then LCM( p,q)gcd( p,q) = pq.. (8 points) Let {a n } and {b n } be the sequences defined, for n > 0, by: a n = (n 1), and b n = (n + 1). Find c 1, c, c 3, and c 4 when c n = (a n )(b n ). c n = (a n )(b n ) = (n 1)(n + 1) = n 1, hence c 1 = 1 1 = 1 1 = 0; c = 1 = 4 1 = 3; c 3 = 3 1 = 9 1 = 8; c 4 = 4 1 = 16 1 = (8 points) Write out the Euclidean Algorithm and trace its steps to calculate GCD(19,4). INPUT (A,B) (where A > B) STEP 1 3 SET X = A MOD B X IF TEST (X > 0) THEN TEST T T F SET A = B A SET B = X B ELSE OUTPUT(B) OUTPUT hence GCD(19,4) = 1.

2 Name Solution Key Show All Work!!! Page 4. (15 points) (a) Give a Recursive Definition for the odd integers. (Basis) Assume 1 is in the set. (Inductive) If p is in the set, then (p + ) and (p ) are in the set. (b) Find the Big-Oh of the algorithm with complexity: (n + 1)(4n 3 + 5) + [n 4 + n(log n)](3n ). (n + 1)(4n 3 + 5) + [n 4 + n(log n)](3n ) < (n + n )(4n 3 + 5n 3 ) + [n 4 + n(n)](3n ) < (n )(9n 3 ) + (n 4 + n 4 )(3n ) = 18n 5 + 9n 6 < 7n 6 hence (n + 1)(4n 3 + 5) + [n 4 + n(log n)](3n ) is O(n 6 ). 5. (8 points) (a) Given a = and b = , then GCD(a,b) = and LCM(a,b) = (b) List out the search intervals in applying the Binary Search algorithm to find 8 in the list: Midpoint (0+0)div (10+0)div (10+5)div (10+7)div = 10 = 5 = 7 = 8 Test Interval [0,10] [5,10] [7,10] Done!

3 Name Solution Key Show All Work!!! Page 3 6. (15 points) Prove one of the two Theorems below using Mathematical Induction. Theorem 1: For all integers n > 0, 3 i = n 3 n Theorem : If a 0 = 0, a 1 = 10, and a = 0, then a n = a n 1 + a n + a n 3 is divisible by 10, for all n >. Theorem 1 Proof: (Weak Induction) Basis Step: Show true for n = 0. Now, when n = 0, we have LHS = 3 i = 3 0 = 1 and RHS = = (3 1)/ = / = 1. Thus, 1 = LHS = RHS, so the formula holds for n = 0. k Inductive Step: Assume 3 i = , for some integer k > 0. Show 3 i. = k Now (k + 1) = ( k ) + 3 (k + 1) = [3 (k + 1) 1]/ + 3 = [3 (k + 1) 1 + ()3 (k + 1) ] / = [(3)3 (k + 1) 1] / = [3 (k + 1)+1 1] /. k ( k + 1) 1 (k + 1) + 1 Therefore, for all integers n > 0, n 3 i = 3 n QED Theorem Proof: (Strong Induction) Basis Step: Show true for n = 3. Now, a 3 = a 0 + a 1 + a = = 30 = 3(10). Since 3 is an Integer, we see that a 3 is divisible by 10. Inductive Step: Assume a i is divisible by 10 for all < i < k. Show a k is divisible by 10. Now, a k = a k 1 + a k + a k 3, but the Induction Hypothesis allows us to assume a k 1, a k, a k 3 are each divisible by 10. Thus, there are Integers p, q, and r with a k 1 = 10p, a k = 10q, and a k 3 = 10r. Applying this, we see that a k = a k 1 + a k + a k 3 = 10p + 10q + 10r = 10(p + q + r). Moreover, since p, q, and r are Integers, we see that (p + q + r) is an Integer. Thus a k is divisible by 10. Therefore, a n = a n 1 + a n + a n 3 is divisible by 10, for all n >. QED

4 Name Solution Key Show All Work!!! Page 4 7. (15 points) Prove one of the two Theorems below: Theorem 1: If a, b, p, and r are Integers with a = bq + r, then GCD(a,b) = GCD(b,r). Theorem : The product of odd integers is odd. Theorem 1 Proof: Let a, b, p, and r are Integers with a = bq + r. We will show GDC(a,b) = GCD(b,r) by showing (Case 1) GDC(a,b) < GCD(b,r), and (Case ) GDC(a,b) > GCD(b,r). (Case 1) Let X = GDC(a,b). Thus X is a common divisor of a and b, so there are Integers w and x such that a = wx and b = xx. Now, a = bq + r implies r = a bq = wx xxq = (w xq)x. Since w, x, q are Integers, we have that (w xq) is an Integer, so X divides r. Since X also divides b, we see that X is a common divisor of b and r. Thus, X = GCD(a,b) < GCD(b,r). (Case ) Let Y = GDC(b,r). Thus Y is a common divisor of b and r, so there are Integers y and z such that b = yy and r = zy. Now, a = bq + r implies a = yyq + zy = (yq + z)y. Since y, z, q are Integers, we have that (yq + z) is an Integer, so Y divides a. Since Y also divides b, we see that Y is a common divisor of a and b. Thus, GCD(a,b) > GCD(b,r) = Y. Putting Case 1 and Case together, we conclude, therefore, that GCD(a,b) = GCD(b,r). QED Theorem Proof: Assume A and B are odd Integers; that is, there exist integers p and q, such that A = p + 1 and B = q + 1. Show AB is and odd integer. Now, AB = (p + 1)(q + 1) = 4pq + 4p + 4q + 1 = (pq + p + q) + 1. Since p and q are Integers, it follows that (pq + p + q) is an Integer. Thus AB = (integer) + 1. Therefore AB is odd. QED

5 Name Solution Key Show All Work!!! Page 5 8. (15 points) Prove one of the two Theorems below by Contradiction or Contraposition. Theorem 1: is irrational. Theorem : The Prime numbers form an infinite set. Theorem 1 Proof: (Contradiction) Assume is Rational. That is, = p/q where p and q are Integers, q is non-zero, and GCD(p,q) = 1. Now, = p/q implies = p / q, so p = q, implying divides p. Hence, we can assert that divides p, so there is an Integer m with p = m, so p = (m) = 4m = q. However, 4m = q yields m = q, so q is divisible by, implying q is divisible by. But, this is a contradiction, since p divisible by and q divisible by implies the assumption that GCD(p,q) = 1 is false. Therefore is irrational. QED Theorem Proof: (Contradiction) Assume the set of Primes is finite; that is, there is a largest Prime number, say P. Now, given the set of Primes, {, 3, 5, 7,..., P}, we construct the Integer M = (3)(5)(7)...(P). Clearly M is divisible by every Prime, by construction. Since M is an Integer, it follows that (M + 1) is an Integer. By the Fundamental Theorem of Arithmetic, we assert that (M + 1) is divisible by a Prime, but since M is divisible by every Prime, it follows that the Prime that divides (M + 1) must also divide M, hence it must also divide 1. This is a contradiction, since no Prime divides 1. Therefore the set of Primes is infinite. QED

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

Name CMSC203 Fall2008 Exam 2 Solution Key Show All Work!!! Page (16 points) Circle T if the corresponding statement is True or F if it is False. Name CMSC203 Fall2008 Exam 2 Solution Key Show All Work!!! Page ( points) Circle T if the corresponding statement is True or F if it is False T F GCD(,0) = 0 T F For every recursive algorithm, there is

More information

Ch 4.2 Divisibility Properties

Ch 4.2 Divisibility Properties Ch 4.2 Divisibility Properties - Prime numbers and composite numbers - Procedure for determining whether or not a positive integer is a prime - GCF: procedure for finding gcf (Euclidean Algorithm) - Definition:

More information

Proofs. Methods of Proof Divisibility Floor and Ceiling Contradiction & Contrapositive Euclidean Algorithm. Reading (Epp s textbook)

Proofs. Methods of Proof Divisibility Floor and Ceiling Contradiction & Contrapositive Euclidean Algorithm. Reading (Epp s textbook) Proofs Methods of Proof Divisibility Floor and Ceiling Contradiction & Contrapositive Euclidean Algorithm Reading (Epp s textbook) 4.3 4.8 1 Divisibility The notation d n is read d divides n. Symbolically,

More information

Course: CS1050c (Fall '03) Homework2 Solutions Instructor: Prasad Tetali TAs: Kim, Woo Young: Deeparnab Chakrabarty:

Course: CS1050c (Fall '03) Homework2 Solutions Instructor: Prasad Tetali TAs: Kim, Woo Young: Deeparnab Chakrabarty: Course: CS1050c (Fall '03) Homework2 Solutions Instructor: Prasad Tetali TAs: Kim, Woo Young: wooyoung@cc.gatech.edu, Deeparn Chakrarty: deepc@cc.gatech.edu Section 3.7 Problem 10: Prove that 3p 2 is irrational

More information

Number Theory Basics Z = {..., 2, 1, 0, 1, 2,...} For, b Z, we say that divides b if z = b for some. Notation: b Fact: for all, b, c Z:

Number Theory Basics Z = {..., 2, 1, 0, 1, 2,...} For, b Z, we say that divides b if z = b for some. Notation: b Fact: for all, b, c Z: Number Theory Basics Z = {..., 2, 1, 0, 1, 2,...} For, b Z, we say that divides b if z = b for some z Z Notation: b Fact: for all, b, c Z:, 1, and 0 0 = 0 b and b c = c b and c = (b + c) b and b = ±b 1

More information

Mat Week 8. Week 8. gcd() Mat Bases. Integers & Computers. Linear Combos. Week 8. Induction Proofs. Fall 2013

Mat Week 8. Week 8. gcd() Mat Bases. Integers & Computers. Linear Combos. Week 8. Induction Proofs. Fall 2013 Fall 2013 Student Responsibilities Reading: Textbook, Section 3.7, 4.1, & 5.2 Assignments: Sections 3.6, 3.7, 4.1 Proof Worksheets Attendance: Strongly Encouraged Overview 3.6 Integers and Algorithms 3.7

More information

Student Responsibilities Week 8. Mat Section 3.6 Integers and Algorithms. Algorithm to Find gcd()

Student Responsibilities Week 8. Mat Section 3.6 Integers and Algorithms. Algorithm to Find gcd() Student Responsibilities Week 8 Mat 2345 Week 8 Reading: Textbook, Section 3.7, 4.1, & 5.2 Assignments: Sections 3.6, 3.7, 4.1 Induction Proof Worksheets Attendance: Strongly Encouraged Fall 2013 Week

More information

The set of integers will be denoted by Z = {, -3, -2, -1, 0, 1, 2, 3, 4, }

The set of integers will be denoted by Z = {, -3, -2, -1, 0, 1, 2, 3, 4, } Integers and Division 1 The Integers and Division This area of discrete mathematics belongs to the area of Number Theory. Some applications of the concepts in this section include generating pseudorandom

More information

Discrete Structures Lecture Primes and Greatest Common Divisor

Discrete Structures Lecture Primes and Greatest Common Divisor DEFINITION 1 EXAMPLE 1.1 EXAMPLE 1.2 An integer p greater than 1 is called prime if the only positive factors of p are 1 and p. A positive integer that is greater than 1 and is not prime is called composite.

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

Lecture Notes on DISCRETE MATHEMATICS. Eusebius Doedel

Lecture Notes on DISCRETE MATHEMATICS. Eusebius Doedel Lecture Notes on DISCRETE MATHEMATICS Eusebius Doedel c Eusebius J. Doedel, 009 Contents Logic. Introduction............................................................................... Basic logical

More information

not to be republished NCERT REAL NUMBERS CHAPTER 1 (A) Main Concepts and Results

not to be republished NCERT REAL NUMBERS CHAPTER 1 (A) Main Concepts and Results REAL NUMBERS CHAPTER 1 (A) Main Concepts and Results Euclid s Division Lemma : Given two positive integers a and b, there exist unique integers q and r satisfying a = bq + r, 0 r < b. Euclid s Division

More information

M381 Number Theory 2004 Page 1

M381 Number Theory 2004 Page 1 M81 Number Theory 2004 Page 1 [[ Comments are written like this. Please send me (dave@wildd.freeserve.co.uk) details of any errors you find or suggestions for improvements. ]] Question 1 20 = 2 * 10 +

More information

2 Elementary number theory

2 Elementary number theory 2 Elementary number theory 2.1 Introduction Elementary number theory is concerned with properties of the integers. Hence we shall be interested in the following sets: The set if integers {... 2, 1,0,1,2,3,...},

More information

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

Final Exam Review. 2. Let A = {, { }}. What is the cardinality of A? Is 1. Describe the elements of the set (Z Q) R N. Is this set countable or uncountable? Solution: The set is equal to {(x, y) x Z, y N} = Z N. Since the Cartesian product of two denumerable sets is denumerable,

More information

MATH 215 Final. M4. For all a, b in Z, a b = b a.

MATH 215 Final. M4. For all a, b in Z, a b = b a. MATH 215 Final We will assume the existence of a set Z, whose elements are called integers, along with a well-defined binary operation + on Z (called addition), a second well-defined binary operation on

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

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

MATH10040: Numbers and Functions Homework 1: Solutions

MATH10040: Numbers and Functions Homework 1: Solutions MATH10040: Numbers and Functions Homework 1: Solutions 1. Prove that a Z and if 3 divides into a then 3 divides a. Solution: The statement to be proved is equivalent to the statement: For any a N, if 3

More information

Homework #2 solutions Due: June 15, 2012

Homework #2 solutions Due: June 15, 2012 All of the following exercises are based on the material in the handout on integers found on the class website. 1. Find d = gcd(475, 385) and express it as a linear combination of 475 and 385. That is

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

CSCE 222 Discrete Structures for Computing. Proofs. Dr. Hyunyoung Lee. !!!!! Based on slides by Andreas Klappenecker

CSCE 222 Discrete Structures for Computing. Proofs. Dr. Hyunyoung Lee. !!!!! Based on slides by Andreas Klappenecker CSCE 222 Discrete Structures for Computing Proofs Dr. Hyunyoung Lee Based on slides by Andreas Klappenecker 1 What is a Proof? A proof is a sequence of statements, each of which is either assumed, or follows

More information

INTEGERS. In this section we aim to show the following: Goal. Every natural number can be written uniquely as a product of primes.

INTEGERS. In this section we aim to show the following: Goal. Every natural number can be written uniquely as a product of primes. INTEGERS PETER MAYR (MATH 2001, CU BOULDER) In this section we aim to show the following: Goal. Every natural number can be written uniquely as a product of primes. 1. Divisibility Definition. Let a, b

More information

Numbers. 2.1 Integers. P(n) = n(n 4 5n 2 + 4) = n(n 2 1)(n 2 4) = (n 2)(n 1)n(n + 1)(n + 2); 120 =

Numbers. 2.1 Integers. P(n) = n(n 4 5n 2 + 4) = n(n 2 1)(n 2 4) = (n 2)(n 1)n(n + 1)(n + 2); 120 = 2 Numbers 2.1 Integers You remember the definition of a prime number. On p. 7, we defined a prime number and formulated the Fundamental Theorem of Arithmetic. Numerous beautiful results can be presented

More information

EECS 1028 M: Discrete Mathematics for Engineers

EECS 1028 M: Discrete Mathematics for Engineers EECS 1028 M: Discrete Mathematics for Engineers Suprakash Datta Office: LAS 3043 Course page: http://www.eecs.yorku.ca/course/1028 Also on Moodle S. Datta (York Univ.) EECS 1028 W 18 1 / 32 Proofs Proofs

More information

The following techniques for methods of proofs are discussed in our text: - Vacuous proof - Trivial proof

The following techniques for methods of proofs are discussed in our text: - Vacuous proof - Trivial proof Ch. 1.6 Introduction to Proofs The following techniques for methods of proofs are discussed in our text - Vacuous proof - Trivial proof - Direct proof - Indirect proof (our book calls this by contraposition)

More information

CISC-102 Fall 2017 Week 6

CISC-102 Fall 2017 Week 6 Week 6 page 1! of! 15 CISC-102 Fall 2017 Week 6 We will see two different, yet similar, proofs that there are infinitely many prime numbers. One proof would surely suffice. However, seeing two different

More information

cse547, math547 DISCRETE MATHEMATICS Professor Anita Wasilewska

cse547, math547 DISCRETE MATHEMATICS Professor Anita Wasilewska cse547, math547 DISCRETE MATHEMATICS Professor Anita Wasilewska LECTURE 12 CHAPTER 4 NUMBER THEORY PART1: Divisibility PART 2: Primes PART 1: DIVISIBILITY Basic Definitions Definition Given m,n Z, we say

More information

Solutions to Practice Final

Solutions to Practice Final s to Practice Final 1. (a) What is φ(0 100 ) where φ is Euler s φ-function? (b) Find an integer x such that 140x 1 (mod 01). Hint: gcd(140, 01) = 7. (a) φ(0 100 ) = φ(4 100 5 100 ) = φ( 00 5 100 ) = (

More information

a the relation arb is defined if and only if = 2 k, k

a the relation arb is defined if and only if = 2 k, k DISCRETE MATHEMATICS Past Paper Questions in Number Theory 1. Prove that 3k + 2 and 5k + 3, k are relatively prime. (Total 6 marks) 2. (a) Given that the integers m and n are such that 3 (m 2 + n 2 ),

More information

Number Theory and Divisibility

Number Theory and Divisibility Number Theory and Divisibility Recall the Natural Numbers: N = {1, 2, 3, 4, 5, 6, } Any Natural Number can be expressed as the product of two or more Natural Numbers: 2 x 12 = 24 3 x 8 = 24 6 x 4 = 24

More information

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

Math Circle Beginners Group February 28, 2016 Euclid and Prime Numbers Solutions Math Circle Beginners Group February 28, 2016 Euclid and Prime Numbers Solutions Warm-up Problems 1. What is a prime number? Give an example of an even prime number and an odd prime number. A prime number

More information

PUTNAM TRAINING NUMBER THEORY. Exercises 1. Show that the sum of two consecutive primes is never twice a prime.

PUTNAM TRAINING NUMBER THEORY. Exercises 1. Show that the sum of two consecutive primes is never twice a prime. PUTNAM TRAINING NUMBER THEORY (Last updated: December 11, 2017) Remark. This is a list of exercises on Number Theory. Miguel A. Lerma Exercises 1. Show that the sum of two consecutive primes is never twice

More information

cse 311: foundations of computing Fall 2015 Lecture 12: Primes, GCD, applications

cse 311: foundations of computing Fall 2015 Lecture 12: Primes, GCD, applications cse 311: foundations of computing Fall 2015 Lecture 12: Primes, GCD, applications n-bit unsigned integer representation Represent integer x as sum of powers of 2: If x = n 1 i=0 b i 2 i where each b i

More information

Math 230 Final Exam, Spring 2008

Math 230 Final Exam, Spring 2008 c IIT Dept. Applied Mathematics, May 15, 2008 1 PRINT Last name: Signature: First name: Student ID: Math 230 Final Exam, Spring 2008 Conditions. 2 hours. No book, notes, calculator, cell phones, etc. Part

More information

Mathematical Induction Assignments

Mathematical Induction Assignments 1 Mathematical Induction Assignments Prove the Following using Principle of Mathematical induction 1) Prove that for any positive integer number n, n 3 + 2 n is divisible by 3 2) Prove that 1 3 + 2 3 +

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

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

Chapter 5.1: Induction

Chapter 5.1: Induction Chapter.1: Induction Monday, July 1 Fermat s Little Theorem Evaluate the following: 1. 1 (mod ) 1 ( ) 1 1 (mod ). (mod 7) ( ) 8 ) 1 8 1 (mod ). 77 (mod 19). 18 (mod 1) 77 ( 18 ) 1 1 (mod 19) 18 1 (mod

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

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

Math Circle Beginners Group February 28, 2016 Euclid and Prime Numbers Math Circle Beginners Group February 28, 2016 Euclid and Prime Numbers Warm-up Problems 1. What is a prime number? Give an example of an even prime number and an odd prime number. (a) Circle the prime

More information

CSC 344 Algorithms and Complexity. Proof by Mathematical Induction

CSC 344 Algorithms and Complexity. Proof by Mathematical Induction CSC 344 Algorithms and Complexity Lecture #1 Review of Mathematical Induction Proof by Mathematical Induction Many results in mathematics are claimed true for every positive integer. Any of these results

More information

Proof Techniques 1. Math Camp n = (1 = n) + (2 + (n 1)) ( n 1. = (n + 1) + (n + 1) (n + 1) + n + 1.

Proof Techniques 1. Math Camp n = (1 = n) + (2 + (n 1)) ( n 1. = (n + 1) + (n + 1) (n + 1) + n + 1. Math Camp 1 Prove the following by direct proof. Proof Techniques 1 Math Camp 01 Take any n N, then n is either even or odd. Suppose n is even n m for some m n(n + 1) m(n + 1) n(n + 1) is even. Suppose

More information

CSE 311: Foundations of Computing. Lecture 12: Two s Complement, Primes, GCD

CSE 311: Foundations of Computing. Lecture 12: Two s Complement, Primes, GCD CSE 311: Foundations of Computing Lecture 12: Two s Complement, Primes, GCD n-bit Unsigned Integer Representation Represent integer as sum of powers of 2: If 2 where each {0,1} then representation is b

More information

Exercises Exercises. 2. Determine whether each of these integers is prime. a) 21. b) 29. c) 71. d) 97. e) 111. f) 143. a) 19. b) 27. c) 93.

Exercises Exercises. 2. Determine whether each of these integers is prime. a) 21. b) 29. c) 71. d) 97. e) 111. f) 143. a) 19. b) 27. c) 93. Exercises Exercises 1. Determine whether each of these integers is prime. a) 21 b) 29 c) 71 d) 97 e) 111 f) 143 2. Determine whether each of these integers is prime. a) 19 b) 27 c) 93 d) 101 e) 107 f)

More information

REAL NUMBERS. Any positive integer a can be divided by another positive integer b in such a way that it leaves a remainder r that is smaller than b.

REAL NUMBERS. Any positive integer a can be divided by another positive integer b in such a way that it leaves a remainder r that is smaller than b. REAL NUMBERS Introduction Euclid s Division Algorithm Any positive integer a can be divided by another positive integer b in such a way that it leaves a remainder r that is smaller than b. Fundamental

More information

1. Consider the conditional E = p q r. Use de Morgan s laws to write simplified versions of the following : The negation of E : 5 points

1. Consider the conditional E = p q r. Use de Morgan s laws to write simplified versions of the following : The negation of E : 5 points Introduction to Discrete Mathematics 3450:208 Test 1 1. Consider the conditional E = p q r. Use de Morgan s laws to write simplified versions of the following : The negation of E : The inverse of E : The

More information

LECTURE NOTES DISCRETE MATHEMATICS. Eusebius Doedel

LECTURE NOTES DISCRETE MATHEMATICS. Eusebius Doedel LECTURE NOTES on DISCRETE MATHEMATICS Eusebius Doedel 1 LOGIC Introduction. First we introduce some basic concepts needed in our discussion of logic. These will be covered in more detail later. A set is

More information

Math.3336: Discrete Mathematics. Primes and Greatest Common Divisors

Math.3336: Discrete Mathematics. Primes and Greatest Common Divisors Math.3336: Discrete Mathematics Primes and Greatest Common Divisors Instructor: Dr. Blerina Xhabli Department of Mathematics, University of Houston https://www.math.uh.edu/ blerina Email: blerina@math.uh.edu

More information

LECTURE NOTES DISCRETE MATHEMATICS. Eusebius Doedel

LECTURE NOTES DISCRETE MATHEMATICS. Eusebius Doedel LECTURE NOTES on DISCRETE MATHEMATICS Eusebius Doedel 1 LOGIC Introduction. First we introduce some basic concepts needed in our discussion of logic. These will be covered in more detail later. A set is

More information

Chapter 2 (Part 3): The Fundamentals: Algorithms, the Integers & Matrices. Integers & Algorithms (2.5)

Chapter 2 (Part 3): The Fundamentals: Algorithms, the Integers & Matrices. Integers & Algorithms (2.5) CSE 54 Discrete Mathematics & Chapter 2 (Part 3): The Fundamentals: Algorithms, the Integers & Matrices Integers & Algorithms (Section 2.5) by Kenneth H. Rosen, Discrete Mathematics & its Applications,

More information

Input Decidable Language -- Program Halts on all Input Encoding of Input -- Natural Numbers Encoded in Binary or Decimal, Not Unary

Input Decidable Language -- Program Halts on all Input Encoding of Input -- Natural Numbers Encoded in Binary or Decimal, Not Unary Complexity Analysis Complexity Theory Input Decidable Language -- Program Halts on all Input Encoding of Input -- Natural Numbers Encoded in Binary or Decimal, Not Unary Output TRUE or FALSE Time and Space

More information

Chapter 5. Number Theory. 5.1 Base b representations

Chapter 5. Number Theory. 5.1 Base b representations Chapter 5 Number Theory The material in this chapter offers a small glimpse of why a lot of facts that you ve probably nown and used for a long time are true. It also offers some exposure to generalization,

More information

NOTES ON SIMPLE NUMBER THEORY

NOTES ON SIMPLE NUMBER THEORY NOTES ON SIMPLE NUMBER THEORY DAMIEN PITMAN 1. Definitions & Theorems Definition: We say d divides m iff d is positive integer and m is an integer and there is an integer q such that m = dq. In this case,

More information

18 Divisibility. and 0 r < d. Lemma Let n,d Z with d 0. If n = qd+r = q d+r with 0 r,r < d, then q = q and r = r.

18 Divisibility. and 0 r < d. Lemma Let n,d Z with d 0. If n = qd+r = q d+r with 0 r,r < d, then q = q and r = r. 118 18. DIVISIBILITY 18 Divisibility Chapter V Theory of the Integers One of the oldest surviving mathematical texts is Euclid s Elements, a collection of 13 books. This book, dating back to several hundred

More information

Infinite Continued Fractions

Infinite Continued Fractions Infinite Continued Fractions 8-5-200 The value of an infinite continued fraction [a 0 ; a, a 2, ] is lim c k, where c k is the k-th convergent k If [a 0 ; a, a 2, ] is an infinite continued fraction with

More information

Mathematics 228(Q1), Assignment 2 Solutions

Mathematics 228(Q1), Assignment 2 Solutions Mathematics 228(Q1), Assignment 2 Solutions Exercise 1.(10 marks) A natural number n > 1 is said to be square free if d N with d 2 n implies d = 1. Show that n is square free if and only if n = p 1 p k

More information

PRACTICE PROBLEMS: SET 1

PRACTICE PROBLEMS: SET 1 PRACTICE PROBLEMS: SET MATH 437/537: PROF. DRAGOS GHIOCA. Problems Problem. Let a, b N. Show that if gcd(a, b) = lcm[a, b], then a = b. Problem. Let n, k N with n. Prove that (n ) (n k ) if and only if

More information

UNIVERSITY OF VICTORIA DECEMBER EXAMINATIONS MATH 122: Logic and Foundations

UNIVERSITY OF VICTORIA DECEMBER EXAMINATIONS MATH 122: Logic and Foundations UNIVERSITY OF VICTORIA DECEMBER EXAMINATIONS 2013 MATH 122: Logic and Foundations Instructor and section (check one): K. Mynhardt [A01] CRN 12132 G. MacGillivray [A02] CRN 12133 NAME: V00#: Duration: 3

More information

Lecture 7 Number Theory Euiseong Seo

Lecture 7 Number Theory Euiseong Seo Lecture 7 Number Theory Euiseong Seo (euiseong@skku.edu) 1 Number Theory God created the integers. All else is the work of man Leopold Kronecker Study of the property of the integers Specifically, integer

More information

Chapter 5: The Integers

Chapter 5: The Integers c Dr Oksana Shatalov, Fall 2014 1 Chapter 5: The Integers 5.1: Axioms and Basic Properties Operations on the set of integers, Z: addition and multiplication with the following properties: A1. Addition

More information

CHAPTER 1 REAL NUMBERS KEY POINTS

CHAPTER 1 REAL NUMBERS KEY POINTS CHAPTER 1 REAL NUMBERS 1. Euclid s division lemma : KEY POINTS For given positive integers a and b there exist unique whole numbers q and r satisfying the relation a = bq + r, 0 r < b. 2. Euclid s division

More information

Solutions to Assignment 1

Solutions to Assignment 1 Solutions to Assignment 1 Question 1. [Exercises 1.1, # 6] Use the division algorithm to prove that every odd integer is either of the form 4k + 1 or of the form 4k + 3 for some integer k. For each positive

More information

cse 311: foundations of computing Spring 2015 Lecture 12: Primes, GCD, applications

cse 311: foundations of computing Spring 2015 Lecture 12: Primes, GCD, applications cse 311: foundations of computing Spring 2015 Lecture 12: Primes, GCD, applications casting out 3s Theorem: A positive integer n is divisible by 3 if and only if the sum of its decimal digits is divisible

More information

A Level. A Level Mathematics. Proof by Contradiction (Answers) AQA, Edexcel, OCR. Name: Total Marks:

A Level. A Level Mathematics. Proof by Contradiction (Answers) AQA, Edexcel, OCR. Name: Total Marks: AQA, Edexcel, OCR A Level A Level Mathematics Proof by Contradiction (Answers) Name: Total Marks: A1 Proof Answers AQA, Edexcel, OCR 1) Prove that there is an infinite amount of prime numbers. Assume there

More information

CSE 20. Final Review. CSE 20: Final Review

CSE 20. Final Review. CSE 20: Final Review CSE 20 Final Review Final Review Representation of integers in base b Logic Proof systems: Direct Proof Proof by contradiction Contraposetive Sets Theory Functions Induction Final Review Representation

More information

Proofs. Chapter 2 P P Q Q

Proofs. Chapter 2 P P Q Q Chapter Proofs In this chapter we develop three methods for proving a statement. To start let s suppose the statement is of the form P Q or if P, then Q. Direct: This method typically starts with P. Then,

More information

3 The fundamentals: Algorithms, the integers, and matrices

3 The fundamentals: Algorithms, the integers, and matrices 3 The fundamentals: Algorithms, the integers, and matrices 3.4 The integers and division This section introduces the basics of number theory number theory is the part of mathematics involving integers

More information

Math 109 HW 9 Solutions

Math 109 HW 9 Solutions Math 109 HW 9 Solutions Problems IV 18. Solve the linear diophantine equation 6m + 10n + 15p = 1 Solution: Let y = 10n + 15p. Since (10, 15) is 5, we must have that y = 5x for some integer x, and (as we

More information

With Question/Answer Animations. Chapter 4

With Question/Answer Animations. Chapter 4 With Question/Answer Animations Chapter 4 Chapter Motivation Number theory is the part of mathematics devoted to the study of the integers and their properties. Key ideas in number theory include divisibility

More information

COT 2104 Homework Assignment 1 (Answers)

COT 2104 Homework Assignment 1 (Answers) 1) Classify true or false COT 2104 Homework Assignment 1 (Answers) a) 4 2 + 2 and 7 < 50. False because one of the two statements is false. b) 4 = 2 + 2 7 < 50. True because both statements are true. c)

More information

n = p 1 p 2 p r = q 1 q 2 q m, then r = m (i.e. the number of primes in any prime decomposition

n = p 1 p 2 p r = q 1 q 2 q m, then r = m (i.e. the number of primes in any prime decomposition Department of Mathematical Sciences Instructor: Daiva Pucinskaite Discrete Mathematics Factoring Recall. Fundamental Theorem of Arithmetic. Let n be a positive integer n > 1. Then n can be represented

More information

Number Theory and Graph Theory. Prime numbers and congruences.

Number Theory and Graph Theory. Prime numbers and congruences. 1 Number Theory and Graph Theory Chapter 2 Prime numbers and congruences. By A. Satyanarayana Reddy Department of Mathematics Shiv Nadar University Uttar Pradesh, India E-mail: satya8118@gmail.com 2 Module-1:Primes

More information

University of Ottawa CSI 2101 Midterm Test Instructor: Lucia Moura. February 9, :30 pm Duration: 1:50 hs. Closed book, no calculators

University of Ottawa CSI 2101 Midterm Test Instructor: Lucia Moura. February 9, :30 pm Duration: 1:50 hs. Closed book, no calculators University of Ottawa CSI 2101 Midterm Test Instructor: Lucia Moura February 9, 2010 11:30 pm Duration: 1:50 hs Closed book, no calculators Last name: First name: Student number: There are 5 questions and

More information

CISC-102 Winter 2016 Lecture 11 Greatest Common Divisor

CISC-102 Winter 2016 Lecture 11 Greatest Common Divisor CISC-102 Winter 2016 Lecture 11 Greatest Common Divisor Consider any two integers, a,b, at least one non-zero. If we list the positive divisors in numeric order from smallest to largest, we would get two

More information

(e) Commutativity: a b = b a. (f) Distributivity of times over plus: a (b + c) = a b + a c and (b + c) a = b a + c a.

(e) Commutativity: a b = b a. (f) Distributivity of times over plus: a (b + c) = a b + a c and (b + c) a = b a + c a. Math 299 Midterm 2 Review Nov 4, 2013 Midterm Exam 2: Thu Nov 7, in Recitation class 5:00 6:20pm, Wells A-201. Topics 1. Methods of proof (can be combined) (a) Direct proof (b) Proof by cases (c) Proof

More information

Fall 2014 CMSC250/250H Midterm II

Fall 2014 CMSC250/250H Midterm II Fall 2014 CMSC250/250H Midterm II 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)

More information

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

a + b = b + a and a b = b a. (a + b) + c = a + (b + c) and (a b) c = a (b c). a (b + c) = a b + a c and (a + b) c = a c + b c. Properties of the Integers The set of all integers is the set and the subset of Z given by Z = {, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, }, N = {0, 1, 2, 3, 4, }, is the set of nonnegative integers (also called

More information

Properties of the Integers

Properties of the Integers Properties of the Integers The set of all integers is the set and the subset of Z given by Z = {, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, }, N = {0, 1, 2, 3, 4, }, is the set of nonnegative integers (also called

More information

Discrete Mathematics GCD, LCM, RSA Algorithm

Discrete Mathematics GCD, LCM, RSA Algorithm Discrete Mathematics GCD, LCM, RSA Algorithm Abdul Hameed http://informationtechnology.pk/pucit abdul.hameed@pucit.edu.pk Lecture 16 Greatest Common Divisor 2 Greatest common divisor The greatest common

More information

INDUCTION AND RECURSION. Lecture 7 - Ch. 4

INDUCTION AND RECURSION. Lecture 7 - Ch. 4 INDUCTION AND RECURSION Lecture 7 - Ch. 4 4. Introduction Any mathematical statements assert that a property is true for all positive integers Examples: for every positive integer n: n!

More information

COT 3100 Applications of Discrete Structures Dr. Michael P. Frank

COT 3100 Applications of Discrete Structures Dr. Michael P. Frank University of Florida Dept. of Computer & Information Science & Engineering COT 3100 Applications of Discrete Structures Dr. Michael P. Frank Slides for a Course Based on the Text Discrete Mathematics

More information

Problem Set 5 Solutions

Problem Set 5 Solutions Problem Set 5 Solutions Section 4.. Use mathematical induction to prove each of the following: a) For each natural number n with n, n > + n. Let P n) be the statement n > + n. The base case, P ), is true

More information

Lecture 7: Number Theory Steven Skiena. skiena

Lecture 7: Number Theory Steven Skiena.   skiena Lecture 7: Number Theory Steven Skiena Department of Computer Science State University of New York Stony Brook, NY 11794 4400 http://www.cs.sunysb.edu/ skiena Number Theory and Divisibility G-d created

More information

STUDY PROBLEMS FOR EXAM I CMSC 203 DISCRETE STRUCTURES. n (n +1)(2n +1), 6. j 2 = 1(1+1)(2 1+1) 6. k (k +1)(2k +1) 6

STUDY PROBLEMS FOR EXAM I CMSC 203 DISCRETE STRUCTURES. n (n +1)(2n +1), 6. j 2 = 1(1+1)(2 1+1) 6. k (k +1)(2k +1) 6 STUDY PROBLEMS FOR EXAM I CMSC 203 DISCRETE STRUCTURES DR. LOMONACO 1. Use the principle of mathematical induction to prove that P (n) : n (n +1)(2n +1), for all integers n 1. Answer: Proof (by weak induction):

More information

MATH 2200 Final Review

MATH 2200 Final Review MATH 00 Final Review Thomas Goller December 7, 01 1 Exam Format The final exam will consist of 8-10 proofs It will take place on Tuesday, December 11, from 10:30 AM - 1:30 PM, in the usual room Topics

More information

Senior Math Circles Cryptography and Number Theory Week 2

Senior Math Circles Cryptography and Number Theory Week 2 Senior Math Circles Cryptography and Number Theory Week 2 Dale Brydon Feb. 9, 2014 1 Divisibility and Inverses At the end of last time, we saw that not all numbers have inverses mod n, but some do. We

More information

Problem Set #3 Solutions

Problem Set #3 Solutions Page 3.1 Problem Set #3 Solutions 1. Epp #3.1.: a. Yes: 4rs = (rs) and rs is an integer because r and s are integers and products of integers are integers b. Yes: 6r + 4s + 3 = (3r + s + 1) + 1 and 3r

More information

What is a proof? Proofing as a social process, a communication art.

What is a proof? Proofing as a social process, a communication art. Proof Methods What is a proof? Proofing as a social process, a communication art. Theoretically, a proof of a mathematical statement is no different than a logically valid argument starting with some premises

More information

Quantitative Aptitude

Quantitative Aptitude WWW.UPSCMANTRA.COM Quantitative Aptitude Concept 1 1. Number System 2. HCF and LCM 2011 Prelims Paper II NUMBER SYSTEM 2 NUMBER SYSTEM In Hindu Arabic System, we use ten symbols 0, 1, 2, 3, 4, 5, 6, 7,

More information

4 Number Theory and Cryptography

4 Number Theory and Cryptography 4 Number Theory and Cryptography 4.1 Divisibility and Modular Arithmetic This section introduces the basics of number theory number theory is the part of mathematics involving integers and their properties.

More information

Lecture Notes 1 Basic Concepts of Mathematics MATH 352

Lecture Notes 1 Basic Concepts of Mathematics MATH 352 Lecture Notes 1 Basic Concepts of Mathematics MATH 352 Ivan Avramidi New Mexico Institute of Mining and Technology Socorro, NM 87801 June 3, 2004 Author: Ivan Avramidi; File: absmath.tex; Date: June 11,

More information

5: The Integers (An introduction to Number Theory)

5: The Integers (An introduction to Number Theory) c Oksana Shatalov, Spring 2017 1 5: The Integers (An introduction to Number Theory) The Well Ordering Principle: Every nonempty subset on Z + has a smallest element; that is, if S is a nonempty subset

More information

Chapter V. Theory of the Integers. Mathematics is the queen of the sciences and number theory is the queen of mathematics. Carl Friedrich Gauss

Chapter V. Theory of the Integers. Mathematics is the queen of the sciences and number theory is the queen of mathematics. Carl Friedrich Gauss Chapter V Theory of the Integers Mathematics is the queen of the sciences and number theory is the queen of mathematics. Carl Friedrich Gauss One of the oldest surviving mathematical texts is Euclid s

More information

Applied Cryptography and Computer Security CSE 664 Spring 2017

Applied Cryptography and Computer Security CSE 664 Spring 2017 Applied Cryptography and Computer Security Lecture 11: Introduction to Number Theory Department of Computer Science and Engineering University at Buffalo 1 Lecture Outline What we ve covered so far: symmetric

More information

At least one of us is a knave. What are A and B?

At least one of us is a knave. What are A and B? 1. This is a puzzle about an island in which everyone is either a knight or a knave. Knights always tell the truth and knaves always lie. This problem is about two people A and B, each of whom is either

More information

CSE 1400 Applied Discrete Mathematics Proofs

CSE 1400 Applied Discrete Mathematics Proofs CSE 1400 Applied Discrete Mathematics Proofs Department of Computer Sciences College of Engineering Florida Tech Fall 2011 Axioms 1 Logical Axioms 2 Models 2 Number Theory 3 Graph Theory 4 Set Theory 4

More information

MATH 2400: PRACTICE PROBLEMS FOR EXAM 1

MATH 2400: PRACTICE PROBLEMS FOR EXAM 1 MATH 2400: PRACTICE PROBLEMS FOR EXAM 1 PETE L. CLARK 1) Find all real numbers x such that x 3 = x. Prove your answer! Solution: If x 3 = x, then 0 = x 3 x = x(x + 1)(x 1). Earlier we showed using the

More information

(3,1) Methods of Proof

(3,1) Methods of Proof King Saud University College of Sciences Department of Mathematics 151 Math Exercises (3,1) Methods of Proof 1-Direct Proof 2- Proof by Contraposition 3- Proof by Contradiction 4- Proof by Cases By: Malek

More information

Economics 204 Summer/Fall 2017 Lecture 1 Monday July 17, 2017

Economics 204 Summer/Fall 2017 Lecture 1 Monday July 17, 2017 Economics 04 Summer/Fall 07 Lecture Monday July 7, 07 Section.. Methods of Proof We begin by looking at the notion of proof. What is a proof? Proof has a formal definition in mathematical logic, and a

More information