Chapter 3 Elementary Number Theory and Methods of Proof.

Slides:



Advertisements
Similar presentations
Discrete Mathematics Lecture 3
Advertisements

THE WELL ORDERING PROPERTY Definition: Let B be a set of integers. An integer m is called a least element of B if m is an element of B, and for every x.
Mathematical Induction
Chapter 3 Elementary Number Theory and Methods of Proof.
Review for CS1050. Review Questions Without using truth tables, prove that  (p  q)   q is a tautology. Prove that the sum of an even integer and an.
Chapter 3 Elementary Number Theory and Methods of Proof.
Chapter 3 Direct Proof and Proof by Contrapositive
Chapter 3 Elementary Number Theory and Methods of Proof.
(CSC 102) Lecture 12 Discrete Structures. Previous Lecture Summary Floor and Ceiling Functions Definition of Proof Methods of Proof Direct Proof Disproving.
Copyright © Cengage Learning. All rights reserved. CHAPTER 5 SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION.
3.3 Divisibility Definition If n and d are integers, then n is divisible by d if, and only if, n = dk for some integer k. d | n  There exists an integer.
Elementary Number Theory and Methods of Proof
– Alfred North Whitehead,
CSE115/ENGR160 Discrete Mathematics 03/13/12 Ming-Hsuan Yang UC Merced 1.
Number Theory and Cryptography
Basic properties of the integers
Copyright © Cengage Learning. All rights reserved.
Chapter 4 Number Theory.
Proof Must Have Statement of what is to be proven.
Chapter 4: Elementary Number Theory and Methods of Proof
Copyright © Cengage Learning. All rights reserved.
Fall 2002CMSC Discrete Structures1 Let us get into… Number Theory.
Week 3 - Wednesday.  What did we talk about last time?  Basic number theory definitions  Even and odd  Prime and composite  Proving existential statements.
Methods of Proof & Proof Strategies
(CSC 102) Discrete Structures Lecture 10.
Chapter 2 Working with Real Numbers. 2-1 Basic Assumptions.
Mathematics Review Exponents Logarithms Series Modular arithmetic Proofs.
Copyright © Cengage Learning. All rights reserved. CHAPTER 4 ELEMENTARY NUMBER THEORY AND METHODS OF PROOF ELEMENTARY NUMBER THEORY AND METHODS OF PROOF.
Chapter 3 Elementary Number Theory and Methods of Proof.
CompSci 102 Discrete Math for Computer Science February 16, 2012 Prof. Rodger.
Copyright © Curt Hill Divisibility and Modular Arithmetic A Topic in Number Theory.
1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy.
1 Methods of Proof Proof techniques in this handout –Direct proof –Division into cases –Proof by contradiction In this handout, the proof techniques will.
Week 3 - Friday.  What did we talk about last time?  Proving universal statements  Disproving existential statements  Rational numbers  Proof formatting.
Week 4 - Monday.  What did we talk about last time?  Divisibility  Quotient-remainder theorem  Proof by cases.
Theorem The square of any odd integer has the form 8m + 1 for some integer m.
Copyright © Cengage Learning. All rights reserved. CHAPTER 4 ELEMENTARY NUMBER THEORY AND METHODS OF PROOF ELEMENTARY NUMBER THEORY AND METHODS OF PROOF.
Week 4 - Monday.  What did we talk about last time?  Rational numbers.
Foundations of Computing I CSE 311 Fall Review: Division Theorem Let a be an integer and d a positive integer. Then there are unique integers q.
Week 3 - Friday.  What did we talk about last time?  Proving existential statements  Disproving universal statements  Proving universal statements.
Copyright © Cengage Learning. All rights reserved. CHAPTER 8 RELATIONS.
CS104:Discrete Structures Chapter 2: Proof Techniques.
Week 3 - Monday.  What did we talk about last time?  Predicate logic  Multiple quantifiers  Negating multiple quantifiers  Arguments with quantified.
Week 4 - Friday.  What did we talk about last time?  Floor and ceiling  Proof by contradiction.
1 CMSC 250 Chapter 3, Number Theory. 2 CMSC 250 Introductory number theory l A good proof should have: –a statement of what is to be proven –"Proof:"
Divisibility and Modular Arithmetic
Chapter 4 With Question/Answer Animations 1. Chapter Motivation Number theory is the part of mathematics devoted to the study of the integers and their.
Number Theory Lecture 1 Text book: Discrete Mathematics and its Applications, 7 th Edition.
Chapter 3 The Fundamentals: Algorithms, the integers, and matrices Section 3.4: The integers and division Number theory: the part of mathematics involving.
Dr Nazir A. Zafar Advanced Algorithms Analysis and Design Advanced Algorithms Analysis and Design By Dr. Nazir Ahmad Zafar.
Chapter 1 Logic and Proof.
The Relation Induced by a Partition
Methods of Proof Proof techniques in this handout
Direct Proof and Counterexample IV: Division into Cases and the Quotient-Remainder Theorem For each of the following values of n and d, find integers q.
Direct Proof and Counterexample III: Divisibility
Advanced Algorithms Analysis and Design
Number Theory and Cryptography
ELEMENTARY NUMBER THEORY AND METHODS OF PROOF
Direct Proof and Counterexample V: Floor and Ceiling
Copyright © Cengage Learning. All rights reserved.
Direct Proof and Counterexample IV
The sum of any two even integers is even.
Copyright © Cengage Learning. All rights reserved.
Copyright © Cengage Learning. All rights reserved.
Copyright © Cengage Learning. All rights reserved.
Quotient-Remainder Theorem
Lecture 5 Number Theory & Proof Methods
Agenda Proofs (Konsep Pembuktian) Direct Proofs & Counterexamples
PROGRAMME: F.Y.B.Sc.I.T. (SEM-I) COURSE: DISCRETE MATHEMATICS
Presentation transcript:

Chapter 3 Elementary Number Theory and Methods of Proof

3.4 Direct Proof and Counterexample 4 Division into Cases and the Quotient- Remainder Theorem

Quotient-Remainder Theorem Theorem The Quotient-Remainder Theorem – Given any integer n and positive integer d, there exist unique integers q and r such that n = dq + r and 0 ≤ r < d. If n is negative then, n = dq + r, where r is nonnegative, d is multiplied by a negative integer q.

Example For each of the following values of n and d, find integers q and r such that n = dq + r and 0 ≤ r < d. – n = 54, d = 4 54 = 4*13 + 2; hence q = 13 and r = 2 – n = -54, d = = (-14) * 4 + 2; hence q = -14 and r = 2

Div & Mod Definition – Given a nonnegative integer n and a positive integer d n div d = q, the integer quotient obtained when n is divided by d, and n mod d = r, the integer remainder obtained when n is divided by d. where q and r are integers and 0 ≤ r < d.

Example Computing the Day of the Week Suppose today is Tuesday, and neither this year nor next year is a leap year. What day of the week will it be 1 year from today? – 365 days per year (non-leap year) and 7 days in a week. – 365 div 7 = 52 and 365 mod 7 = 1 – 365 = 52 * (365 days will be 1 year), – Answer: Wednesday (the day after the start day) General form: – DayN = (DayT +N) mod 7, DayT day of the week today, DayN is the day of the week in N days. – where Sunday = 0, Monday = 1, …, Saturday = 6.

Integers Parity Property – The parity of an integer refers to whether the integer is even or odd. Theorem 3.4.2: Any two consecutive integers have opposite parity. – Proof: Suppose that two consecutive integers are given, m and m+1. By the parity property either m is even or m is odd. – Case 1 (m is even): In the this case m = 2k for some integer k, and so m + 1 = 2k + 1, which is odd by definition. Hence in this case one of m and m+1 is even while the other is odd. – Case 2 (m is odd): In this case, m =2k+1 for some integer k, and so m+1 = (2k+1) + 1 = 2k + 2 = 2(k+1). k+1 is an integer (sum of integers), hence k+1 = r. Therefore m+1 = 2r which is even by definition. It follows that regardless of which case actually occurs for the particular m and m+1 that are chosen, one of m and m+1 is even and the other is odd.

Integers Modulo 4 – Show that any integer can be written in one of the four forms: n = 4q or n = 4q + 1 or n = 4q + 2 or n = 4q + 3 for some integer q. Given any integer n, apply the quotient-remainder theorem to n with d = 4. This implies that there exist an integer quotient q and a remainder r such that n = 4q + r and 0 ≤ r < 4 But the only nonnegative remainders r that are less than 4 are 0, 1, 2, and 3. Hence, – n = 4q or n = 4q + 1 or n = 4q + 2 or n = 4q + 3 for some integer q.

Integers Square of an Odd Integer – Prove that the square of any odd integer has the form 8m + 1 for some integer m. – (formal) ∀ odd integers n, ∃ an integer m such that n 2 = 8m + 1 – Starting Point: Suppose n is a particular but arbitrary chosen odd integer. – To Show: ∃ an integer m such that n 2 = 8m + 1

Square of an Odd Integer By the quotient remainder theorem, n can be written in one of the forms – n = 4q or n = 4q + 1 or n = 4q + 2 or n = 4q + 3 for some integer q – since n is odd, 4q + 1 or 4q + 3 – Case 1 n 2 = (4q + 1) 2 =16q 2 + 8q +1 = 8 (2q 2 + q) + 1 (laws of algebra) Let m = 2q 2 + q, then n 2 = 8m + 1 – Case 2 n 2 = (4q + 3) 2 =16q q +9 = 8 (2q 2 + 3q + 1) + 1 (laws of algebra) Let m = 2q 2 + 3q + 1, then n 2 = 8m + 1 – Cases 1 and 2 show that given any odd integer, n 2 = 8m + 1