Number Theory and Proof Methods

Similar documents
ELEMENTARY NUMBER THEORY AND METHODS OF PROOF

CSE 215: Foundations of Computer Science Recitation Exercises Set #4 Stony Brook University. Name: ID#: Section #: Score: / 4

UNIT-II NUMBER THEORY

Chapter 1: Number and Operations

Exercise 1.1. Page 1 of 22. Website: Mobile:

Rational Numbers: Multiply and Divide

Integers are whole numbers; they include negative whole numbers and zero. For example -7, 0, 18 are integers, 1.5 is not.

CHAPTER 8. Copyright Cengage Learning. All rights reserved.

CS321. Introduction to Numerical Methods

9.5 Equivalence Relations

Section 2.3 Rational Numbers. A rational number is a number that may be written in the form a b. for any integer a and any nonzero integer b.

Network flows and Menger s theorem

Problem. Prove that the square of any whole number n is a multiple of 4 or one more than a multiple of 4.

Rational and Irrational Numbers

Unit 2: Accentuate the Negative Name:

CGF Lecture 2 Numbers

Math 96--Radicals #1-- Simplify; Combine--page 1

ELEMENTARY NUMBER THEORY AND METHODS OF PROOF

Name: Rational Functions 2.1H. Set Topic: Simplifying rational expressions & operations on rational expressions

Math Circle Beginners Group October 18, 2015 Solutions

A. Incorrect! To simplify this expression you need to find the product of 7 and 4, not the sum.

Review of Operations on the Set of Real Numbers

Summary of Course Coverage

REGULAR GRAPHS OF GIVEN GIRTH. Contents

CPSC 121 Midterm 2 Friday November 13th, 2015

ELEMENTARY NUMBER THEORY AND METHODS OF PROOF

ELEMENTARY NUMBER THEORY AND METHODS OF PROOF

COMPETENCY 1.0 UNDERSTAND THE STRUCTURE OF THE BASE TEN NUMERATION SYSTEM AND NUMBER THEORY

1-3 Square Roots. Warm Up Lesson Presentation Lesson Quiz. Holt Algebra 2 2

Unit 7 Number System and Bases. 7.1 Number System. 7.2 Binary Numbers. 7.3 Adding and Subtracting Binary Numbers. 7.4 Multiplying Binary Numbers

14 Foundation of Programming Languages and Software Engineering: Summer Term 2010

EXERCISE Which of the following is irrational? (C) 7 (D) 81 (A) (B)

Math 302 Introduction to Proofs via Number Theory. Robert Jewett (with small modifications by B. Ćurgus)

Ch 3.4 The Integers and Division

Math Glossary Numbers and Arithmetic

Rules of Exponents Part 1[Algebra 1](In Class Version).notebook. August 22, 2017 WARM UP. Simplify using order of operations. SOLUTION.

[Ch 6] Set Theory. 1. Basic Concepts and Definitions. 400 lecture note #4. 1) Basics

These are reserved words of the C language. For example int, float, if, else, for, while etc.

Priority Queues. 1 Introduction. 2 Naïve Implementations. CSci 335 Software Design and Analysis III Chapter 6 Priority Queues. Prof.

Non-context-Free Languages. CS215, Lecture 5 c

SHARDA UNIVERSITY SCHOOL OF ENGINEERING & TECHNOLOGY Mid Term Examination, (Odd Term, ) SOLUTION

Section 1.2 Fractions

SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION

A.1 Numbers, Sets and Arithmetic

Multiplying and Dividing Rational Expressions

Rational Functions Video Lecture. Sections 4.4 and 4.5

1. How many white tiles will be in Design 5 of the pattern? Explain your reasoning.

Let denote the number of partitions of with at most parts each less than or equal to. By comparing the definitions of and it is clear that ( ) ( )

I SEMESTER EXAM : : XI :COMPUTER SCIENCE : MAX MARK a) What is the difference between Hardware and Software? Give one example for each.

Lemma (x, y, z) is a Pythagorean triple iff (y, x, z) is a Pythagorean triple.

Unit 2. Looking for Pythagoras. Investigation 4: Using the Pythagorean Theorem: Understanding Real Numbers

Exponents and Real Numbers

MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.

Introduction to Programming

Lectures 4 and 5 (Julian) Computer Programming: Skills & Concepts (INF-1-CP1) double; float; quadratic equations. Practical 1.

Radical Expressions and Functions What is a square root of 25? How many square roots does 25 have? Do the following square roots exist?

Algebra 1 Review. Properties of Real Numbers. Algebraic Expressions

Vocabulary: Looking For Pythagoras

MATH 139 W12 Review 1 Checklist 1. Exam Checklist. 1. Introduction to Predicates and Quantified Statements (chapters ).

MC 302 GRAPH THEORY 10/1/13 Solutions to HW #2 50 points + 6 XC points

1. The keyword main in C language is used for

Operators and Expressions:

Lesson 4.02: Operations with Radicals

16 Rational Functions Worksheet

Limits at Infinity. as x, f (x)?

Object Oriented Programming Using C++ Mathematics & Computing IET, Katunayake

Chapter 3: Theory of Modular Arithmetic 1. Chapter 3: Theory of Modular Arithmetic

MATHia X: Grade 8 Table of Contents

introduction to Programming in C Department of Computer Science and Engineering Lecture No. #40 Recursion Linear Recursion

Sections 1.3 Computation of Limits

Name: Date: Review Packet: Unit 1 The Number System

Lecture 6: Faces, Facets

(a) (4 pts) Prove that if a and b are rational, then ab is rational. Since a and b are rational they can be written as the ratio of integers a 1

Schema Equivalence and Optimization

Mathematics Background

Algebraic Expressions

Rational numbers as decimals and as integer fractions

Chapter 4. Number Theory. 4.1 Factors and multiples

UNIT 8 STUDY SHEET POLYNOMIAL FUNCTIONS

Radical Expressions LESSON. 36 Unit 1: Relationships between Quantities and Expressions

1 Elementary number theory

Computer System and programming in C

EXAMPLE 1. Change each of the following fractions into decimals.

Operators & Expressions

Odd-Numbered Answers to Exercise Set 1.1: Numbers

CHAPTER 1B: : Foundations for Algebra

SPERNER S LEMMA MOOR XU

Trig Functions, Equations & Identities May a. [2 marks] Let. For what values of x does Markscheme (M1)

SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION

Introduction to Programming

Pythagorean Triples. Chapter 2. Exercises

sends the formatted data to the standard output stream (stdout) int printf ( format_string, argument_1, argument_2,... ) ;

Algebra Homework: Chapter 1 (Homework is listed by date assigned; homework is due the following class period) Day Date In-Class Homework

Is the statement sufficient? If both x and y are odd, is xy odd? 1) xy 2 < 0. Odds & Evens. Positives & Negatives. Answer: Yes, xy is odd

Introduction to Modular Arithmetic

Control Statements. If Statement if statement tests a particular condition

1 Transforming Geometric Objects

Multiplying and Dividing Rational Expressions

Outline. Introduction. 2 Proof of Correctness. 3 Final Notes. Precondition P 1 : Inputs include

A Theorem of Ramsey- Ramsey s Number

Transcription:

9/6/17 Lecture Notes on Discrete Mathematics. Birzeit University Palestine 2016 and Proof Methods Mustafa Jarrar 4.1 Introduction 4.3 Divisibility 4.4 Quotient-Remainder Theorem mjarrar 2015 1 Watch this lecture and download the slides Course Page: http://www.jarrar.info/courses/dmath/ More Online Courses at: http://www.jarrar.info Acknowledgement: This lecture is based on (but not limited to) to chapter 5 in Discrete Mathematics with Applications by Susanna S. Epp (3rd Edition). 2 1

Mustafa Jarrar: Lecture Notes in Discrete Mathematics. Birzeit University Palestine 2016 In this lecture: qpart 1: Rational and irrational Numbers q Part 2: Proving Properties of Rational Numbers q Part 3: Using rational numbers in Programing 3 Relational and Irrational Numbers Definition Arealnumberr is rational if and only if it can be expressed as a quotient of two integers with a nonzero denominator. A real number that is not rational is irrational. More formally if r is a real number then Example r is rational integers a and b such that r = a and b = 0. b Is 10/3 a rational number? Is -(5/39) a rational number? Is 0.281 a rational number? Is 7 a rational number? Is 0 a rational number? Is 2/0 a rational number? Is 2/0 an irrational number? Not number Is 0. 1212... a rational number (where 12 are assumed to repeat forever)? 12/99 If m n are integers and neither m nor n is zero is (m + n)/mn a rational number? Is ( Sqr root of 2) an rational number? 4 2

Integers are rational numbers Theorem 4.2.1 Every integer is a rational number. n n = which is a quotient of integers and hence rational. 7 7 = which is a quotient of integers and hence rational. -12-12 which is a quotient of integers and hence rational. 0 0 = which is a quotient of integers and hence rational. 5 Mustafa Jarrar: Lecture Notes in Discrete Mathematics. Birzeit University Palestine 2016 In this lecture: qpart 1: Rational and irrational Numbers q Part 2: Proving Properties of Rational Numbers q Part 3: Using rational numbers in Programing 6 3

Proving Properties of Rational Numbers Theorem 4.2.2 The sum of any two rational numbers is rational. Proof: Suppose r and s are rational numbers. + Then 7 8 4

Example Derive the following as a corollary of Theorem 4.2.2. Corollary 4.2.3 The double of a rational number is rational. Solution: Suppose r is any rational number. Then 2r = r + r is a sum of two rational numbers. So by Theorem 4.2.2 2r is rational. 9 Deriving Additional Results about Even and Odd Integers Suppose you already proved the following properties of even and odd integers: 1. The sum product and difference of any two even integers are even. 2. The sum and difference of any two odd integers are even. 3. The product of any two odd integers is odd. 4. The product of any even integer and any odd integer is even. 5. The sum of any odd integer and any even integer is odd. 6. The difference of any odd integer minus any even integer is odd. 7. The difference of any even integer minus any odd integer is odd. Use the properties listed above to prove that if a is any even integer and b is any odd integer then è Try it at home a 2 +b 2 +1 2 is an integer. 10 5

Mustafa Jarrar: Lecture Notes in Discrete Mathematics. Birzeit University Palestine 2016 In this lecture: qpart 1: Rational and irrational Numbers q Part 2: Proving Properties of Rational Numbers q Part 3: Using rational numbers in Programing 11 Real Numbers In Programing: Example 1 What would be the datatype of the following #Define P = 3.14 void main() { int a; float b; double c; x = a+ b+ P printf( The sum is: %?\n a+c) } 12 6

Real Numbers In Programing: Example 2 When this program produces an error? Revise example intmain (void) { int j a b; Double x; scanf ( %d a); scanf ( %d b); x = (a*a + b*b + 1)/2; Y = (int) x X = floor(x)+1; If (x % 2== 0) (x % 1 == 0) For (j = 1; j<y; ++j) Prinf( * ); retrun (0); } add this statement to prevent errors! è Number theory helps you write more robust programs 13 Real Numbers in Real Life Read at home Two mechanics were working on a car. One can complete a given job in 6 hours. But the new guy takes 8 hours. They work together for first two hours. But then the first guy left to help another mechanic on a different job. How long will it take for the new guy to finish the car work? The first guy can do 1/6 part of job per hour and the second guy can do 1/8 part of job per hour and together they can do 1/6 + 1/8part of job per hour. Now let t hours is the time to complete the car job. So 1/t job will be completed per hour Equating the two expressions we get: 1/6 + 1/8 = 1/t 7/24 = 1/t As they work for 2 hours 2. 7/24 = 14/24 part of job will be done. The work remaining is 1-1/t = (1-14/24) = 10/24 10/24 job is left which has to be completed by the second guy who will take 10/24 1/8 = 40/12 = 10/3 = 3.33 hours to complete the car job. 14 7