Discrete Mathematics Lecture 3

Slides:



Advertisements
Similar presentations
Lecture 3 – February 17, 2003.
Advertisements

With examples from Number Theory
Discrete Math Methods of proof 1.
Introduction to Proofs
Chapter 3 Elementary Number Theory and Methods of Proof.
1 In this lecture  Number Theory ● Rational numbers ● Divisibility  Proofs ● Direct proofs (cont.) ● Common mistakes in proofs ● Disproof by counterexample.
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.
Thinking Mathematically
Thinking Mathematically
Elementary Number Theory and Methods of Proof
Quotient-Remainder Theory, Div and Mod
Discrete Mathematics Lecture 2 Logic of Quantified Statements,
Discrete Mathematics Lecture 4 Harper Langston New York University.
Elementary Number Theory and Methods of Proof. Basic Definitions An integer n is an even number if there exists an integer k such that n = 2k. An integer.
CMSC 250 Discrete Structures Number Theory. 20 June 2007Number Theory2 Exactly one car in the plant has color H( a ) := “ a has color”  x  Cars –H(
Discrete Structures Chapter 2 Part B Mathematical Induction
Proof Must Have Statement of what is to be proven.
1 Indirect Argument: Contradiction and Contraposition.
The essential quality of a proof is to compel belief.
Chapter 4: Elementary Number Theory and Methods of Proof
Lecture 4 Discrete Mathematics Harper Langston. Algorithms Algorithm is step-by-step method for performing some action Cost of statements execution –Simple.
1 Number Theory and Methods of Proof Content: Properties of integer, rational and real numbers. Underlying theme: Methods of mathematical proofs.
Fall 2002CMSC Discrete Structures1 Let us get into… Number Theory.
Harper Langston New York University Summer 2015
Homework Review notes Complete Worksheet #2. Homework State whether the conditional sentence is true or false 1.If 1 = 0, then 1 = – 1 True F F T.
Week 3 - Wednesday.  What did we talk about last time?  Basic number theory definitions  Even and odd  Prime and composite  Proving existential statements.
DISCRETE MATHEMATICS I LECTURES CHAPTER 4 Dr. Adam Anthony Spring 2011 Some material adapted from lecture notes provided by Dr. Chungsim Han and Dr. Sam.
Chapter 4: Elementary Number Theory and Methods of Proof 4.2 Direct Proof and Counter Example II: Rational Numbers 1 Such, then, is the whole art of convincing.
(CSC 102) Discrete Structures Lecture 10.
Number Theory.  A prime number is a natural number greater than 1 that has exactly two factors (or divisors), itself and 1.  Prime numbers less than.
1 Introduction to Abstract Mathematics Chapter 3: Elementary Number Theory and Methods of Proofs Instructor: Hayk Melikya Direct.
1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy.
The Integers. The Division Algorithms A high-school question: Compute 58/17. We can write 58 as 58 = 3 (17) + 7 This forms illustrates the answer: “3.
Copyright © Zeph Grunschlag, Basic Number Theory Zeph Grunschlag.
1 Methods of Proof Proof techniques in this handout –Direct proof –Division into cases –Proof by contradiction In this handout, the proof techniques will.
Copyright © 2009 Pearson Education, Inc. Chapter 5 Section 1 - Slide 1 Chapter 1 Number Theory and the Real Number System.
CONJECTURES. A conjecture is a statement that must be proved or disproved.
Foundations of Discrete Mathematics Chapter 4 By Dr. Dalia M. Gil, Ph.D.
Slide Copyright © 2009 Pearson Education, Inc. Unit 1 Number Theory MM-150 SURVEY OF MATHEMATICS – Jody Harris.
Application: Algorithms Lecture 20 Section 3.8 Wed, Feb 21, 2007.
Method of proofs.  Consider the statements: “Humans have two eyes”  It implies the “universal quantification”  If a is a Human then a has two eyes.
Week 3 - Friday.  What did we talk about last time?  Proving existential statements  Disproving universal statements  Proving universal statements.
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.
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:"
Section 1.7. Definitions A theorem is a statement that can be shown to be true using: definitions other theorems axioms (statements which are given as.
Part I: Numbers and Operations Lesson 1: Numbers.
Number Theory Lecture 1 Text book: Discrete Mathematics and its Applications, 7 th Edition.
Slide Copyright © 2009 Pearson Education, Inc. Slide Copyright © 2009 Pearson Education, Inc. Chapter 1 Number Theory and the Real Number System.
Discrete Mathematics Lecture 2 Continuing Logic, Quantified Logic, Beginning Proofs Harper Langston New York University Summer 2016.
Dr Nazir A. Zafar Advanced Algorithms Analysis and Design Advanced Algorithms Analysis and Design By Dr. Nazir Ahmad Zafar.
Harper Langston New York University Summer 2017
Methods of Proof Proof techniques in this handout
CS 2210:0001 Discrete Structures Logic and Proof
Discrete Mathematics Lecture 3 (and 4)
CSE15 Discrete Mathematics 02/08/17
Direct Proof by Contraposition Direct Proof by Contradiction
Number Theory and Techniques of Proof
Discrete Math for CS CMPSC 360 LECTURE 4 Last time and recitations:
Indirect Proof by Contradiction Direct Proof by Cases
CS 220: Discrete Structures and their Applications
Copyright © Cengage Learning. All rights reserved.
Elementary Number Theory & Proofs
Topic Past Papers –Proofs
Copyright © Zeph Grunschlag,
Lecture 5 Number Theory & Proof Methods
Introduction to Proofs
Agenda Proofs (Konsep Pembuktian) Direct Proofs & Counterexamples
PROGRAMME: F.Y.B.Sc.I.T. (SEM-I) COURSE: DISCRETE MATHEMATICS
Presentation transcript:

Discrete Mathematics Lecture 3 Elementary Number Theory and Methods of Proof Alexander Bukharovich New York University

Proof and Counterexample Discovery and proof Even and odd numbers number n from Z is called even if k  Z, n = 2k number n from Z is called odd if k  Z, n = 2k + 1 Prime and composite numbers number n from Z is called prime if r, s  Z, n = r * s  r = 1  s = 1 number n from Z is called composite if r, s  Z, n = r * s  r > 1  s > 1

Proving Statements Constructive and non-constructive proofs for existential statements: advantages and disadvantages Show that there is a prime number that can be written as a sum of two perfect squares Universal statements: method of exhaustion and generalized proof Direct Proof: Express the statement in the form: x  D, P(x)  Q(x) Take an arbitrary x from D so that P(x) is true Show that Q(x) is true based on previous axioms, theorems, P(x) and rules of valid reasoning

Proof Show that if the sum of any two integers is even, then so is their difference Common mistakes in a proof Arguing from example Using the same symbol for different variables Jumping to a conclusion Begging the question

Counterexample To show that the statement in the form “x  D, P(x)  Q(x)” is not true one needs to show that the negation, which has a form “x  D, P(x)  ~Q(x)” is true. x is called a counterexample. Famous conjectures: Fermat big theorem: there are no non-zero integers x, y, z such that xn + yn = zn, for n > 2 Goldbach conjecture: any even integer can be represented as a sum of two prime numbers Euler’s conjecture: no three perfect fourth powers add up to another perfect fourth power

Exercises Any product of four consecutive integers is one less than a perfect square To check that an integer is a prime it is sufficient to check that n is not divisible by any prime less than or equal to n If p is a prime, is 2p – 1 a prime too? Does 15x3 + 7x2 – 8x – 27 have an integer zero?

Rational Numbers Real number r is called rational if p,q  Z, r = p / q All real numbers which are not rational are called irrational Is 0.121212… a rational number Every integer is a rational number Sum of any two rational numbers is a rational number Theorem, proposition, corollary, lemma

Divisibility Integer n is a divisible by an integer d, when k  Z, n = d * k Notation: d | n Synonymous statements: n is a multiple of d d is a factor of n d is a divisor of n d divides n

Divisibility Divisibility is transitive: for all integers a, b, c, if a divides b and b divides c, then a divides c Any integer greater than 1 is divisible by a prime number If a | b and b | a, does it mean a = b? Any integer can be uniquely represented in the standard factored form: n = p1e1 * p2e2 * … * pkek, p1 < p2 < … < pk, pi is a prime number

Exercises Prove or provide counterexample: For integers a, b, c: (a | b)  (a | bc) For integers a, b, c: (a | (b + c))  (a | b  a | c) If 2 * 3 * 4 * 5 * 6 * 7 * 8 * 9 * m = 151 * 150 * 149 * 148 * 147 * 146 * 145 * 144 * 143, does 151 | m? Show that an integer is divisible by 9 iff the sum of its digits is divisible by 9. Prove the same for divisibility by 3. Show that an integer is divisible by 11 iff the alternate sum of its digits is divisible by 11

Quotient and Remainder Given any integer n and positive integer d, there exist unique integers q and r, such that n = d * q + r and 0  r < d Operations: div – quotient, mod – remainder Parity of an integer refers to the property of an integer to be even or odd Any two consecutive integers have opposite parity The square of an odd integer has reminder 1 when divided by 8

Exercises Show that a product of any four consecutive integers is divisible by 8 How that the sum of any four consecutive integers is never divisible by 4 Show that any prime number greater than 3 has remainder 1 or 5 when divided by 6

Floor and Ceiling For any real number x, the floor of x, written x, is the unique integer n such that n  x < n + 1. It is the max of all ints  x. For any real number x, the ceiling of x, written x, is the unique integer n such that n – 1 < x  n. What is n? If k is an integer, what are x and x + 1/2? Is x + y = x + y? For all real numbers x and all integers m, x + m = x + m For any integer n, n/2 is n/2 for even n and (n–1)/2 for odd n For positive integers n and d, n = d * q + r, where d = n / d and r = n – d * n / d with 0  r < d

Exercises Is it true that for all real numbers x and y: x – y = x - y x – 1 = x - 1 x + y = x + y x + 1 = x + 1 Show that for all real x,  x/2 /2 = x/4

Contradiction Proof by contradiction Suppose the statement to be proved is false Show that this supposition leads logically to a contradiction Conclude that the statement to be proved is true The sum of any rational number and any irrational number is irrational

Contraposition Proof by contraposition Prepare the statement in the form: x  D, P(x)  Q(x) Rewrite this statement in the form: x  D, ~Q(x)  ~P(x) Prove the contrapositive by a direct proof For any integer, if n2 is even then n is even Close relationship between proofs by contradiction and contraposition

Exercise Show that for integers n, if n2 is odd then n is odd Show that for all integers n and all prime numbers p, if n2 is divisible by p, then n is divisible by p For all integers m and n, if m+n is even then m and n are both even or m and n are both odd The product of any non-zero rational number and any irrational number is irrational If a, b, and c are integers and a2+b2=c2, must at least one of a and b be even Can you find two irrational numbers so that one raised to the power of another would produce a rational number?

Classic Number Theory Results Square root of 2 is irrational For any integer a and any integer k > 1, if k | a, then k does not divide (a + 1) The set of prime numbers is infinite

Exercises Show that a square of 3 is irrational for any integer a, 4 does not divide (a2 – 2) if n is not a perfect square then its square is irrational 2 + 3 is irrational log2(3) is irrational every integer greater than 11 is a sum of two composite numbers if p1, p2, …, pn are distinct prime numbers with p1 = 2, then p1p2…pn + 1 has remainder 3 when divided by 4 for all integers n, if n > 2, then there exists prime number p, such that n < p < n!

Algorithms Algorithm is step-by-step method for performing some action Cost of statements execution Simple statements Conditional statements Iterative statements

Division Algorithm Input: integers a and d Output: quotient q and remainder r Body: r = a; q = 0; while (r >= d) r = r – d; q = q + 1; end while

Greatest Common Divisor The greatest common divisor of two integers a and b is another integer d with the following two properties: d | a and d | b if c | a and c | b, then c  d Lemma 1: gcd(r, 0) = r Lemma 2: if a = b * q + r, then gcd(a, b) = gcd(b, r)

Euclidean Algorithm Input: integers a and b Output: greatest common divisor gcd Body: r = b; while (b > 0) r = a mod b; a = b; b = r; end while gcd = a;

Exercise Least common multiple: lcm Prove that for all positive integers a and b, gcd(a, b) = lcm(a, b) iff a = b