1 Elementary number theory

Size: px
Start display at page:

Download "1 Elementary number theory"

Transcription

1 1 Elementary number theory We assume the existence of the natural numbers and the integers N = {1, 2, 3,...} Z = {..., 3, 2, 1, 0, 1, 2, 3,...}, along with their most basic arithmetical and ordering properties. By this, we mean addition, subtraction and multiplication. For example, we assume the truth of statements such as For all integers a and b, both a + b and ab are integers. 0 < 1 For all integers a and b we have a + b = b + a. For any pair of integers a and b, exactly one of the following is true: a = b, a<bor a>b. WARNING: Until further notice, FRACTIONS ARE NOT ALLOWED. Definition 1. Let a and b be integers. We say a divides b if there exists an integer k such that ka = b. Notation 2. The notation a b means a divides b. Proposition 3. For any integers a, b and c, ifa b and a c then a (b + c). Proposition 4. For any integers a, b and c, if a b and a c then a (b c). Conjecture 5. For any integers a, b and c, ifa (b + c), then a b or a c. Proposition 6. For any integers a, b and c, ifa b then a bc. Proposition 7. For any integers a, b, d, x and y, ifd a and d b, then d (ax+by). Proposition 8. For any integers a, b and c, ifa b and b c then a c. Proposition The content of Proposition 9 should be interpreted as 2 does not divide 1.

2 1 Elementary number theory, II The setup is the same as in Worksheet I. You may assume all the Propositions from Worksheet I. Proposition 10. For any integer n we have n 0. Proposition 11. For any integers n and a we have n (a a). Proposition 12. For any integers n, a and b, if n (a b) then n (b a). Proposition 13. For any integers n, a, b and c, ifn (a b) and n (b c) then n (a c). Definition 14. Let a and b be integers and let n be a natural number. We say a is congruent to b modulo n if n (a b). Notation 15. We denote a is congruent to b modulo n by a b mod n. Proposition 16. For any integer a and natural number n, we have a a mod n. Proposition 17. For any integers a and b and any natural number n, ifa b mod n then b a mod n. Proposition 18. For any integers a, b and c and any natural number n, if a b mod n and b c mod n then a c mod n. Conjecture 19. For any integers a and b and any natural number n, ifa b mod n then ( a) ( b) modn. Conjecture 20. For any integer a and any natural number n, we have a a 2 mod n. Question 21. What is the usual word for a number a so that a 0mod2? What about those b so that b 1mod2?

3 1 Elementary number theory, III The setup is the same as in Worksheets I and II. You may assume all the Propositions from Worksheet I and from Worksheet II. Proposition 22. For any integers a, b, c and d and any natural number n, if a b mod n and c d mod n then a + c b + d mod n. Proposition 23. For any integers a, b, c and d and any natural number n, if a b mod n and c d mod n then ac bd mod n. Proposition 24. For any integers a, b, c and d and any natural number n, if a b mod n and c d mod n then a c b d mod n. Proposition 25. For any integers a and b and any natural number n, ifa b mod n then a 2 b 2 mod n. Conjecture 26. For any integers a and b and any natural number n, ifa b mod n then for all positive integers k, we have a k b k mod n. For the proof of Theorem 31 below, you may find the following lemma useful. Lemma 27. Let a and b be integers and let c be a natural number. If 0 apple a<c and 0 apple b<cthen c<a b<c, or equivalently a b <c. Definition 28. Let S be a set of integers. We say an element l in S is a least element (or a smallest element) ofs if for every s in S we have l apple s. Remark 29. We will assume that the following statement about the natural numbers is true: If S is any non-empty set of natural numbers then S has a least element. We ll refer to this statement as the Well-ordering Principle. Theorem 30. Let a be an integer and let b be a natural number. Then there exist integers q and r such that a = bq + r and 0 apple r<b. Theorem 31. Let a be an integer and let b be a natural number. If there exists integers q, q 0,r and r 0 such that a = bq+r, 0 apple r<band a = bq 0 +r 0, 0 apple r 0 <b then q = q 0 and r = r 0.

4 1 Elementary number theory, IV The setup is the same as in Worksheets I, II and III. You may assume all the Propositions from Worksheets I, II and III. [But, be warned that you are expected to know the proofs of these, and we will be revisiting them.] Definition 32. Let a and b be integers and suppose that not both of a and b are zero. An integer d is a greatest common divisor of a and b if the following two statements are true: 1. d a and d b; 2. for any integer c such that c a and c b we have c apple d. Proposition 33. Let a and b be integers which are not both zero. If d and d 0 are greatest common divisors of a and b, then d = d 0. Remark 34. Proposition 34 says that a greatest common divisor of a and b is unique (if it exists). The next result proves that the greatest common divisor of a and b exists. Theorem 35. Let a and b be integers such that not both are zero. Define a set The following statements hold: D = {am + bn m, n 2 Z,am+ bn > 0}. 1. D is a non-empty set of positive integers; 2. D has a smallest element d>0; 3. There are integers x and y so that d = ax + by; 4. d a ; 5. d b; 6. If c is any integer so that c a and c b then c d; 7. If c is any integer so that c a and c b then c apple d; 8. d is a greatest common divisor of a and b. Notation 36. The unique greatest common divisor of a and b is denoted gcd(a, b). Theorem 37. Let a and b be integers, not both zero. Then gcd(a, b) is equal to the smallest element of the set D = {am + bn > 0 m, n 2 Z}. Corollary 38. Suppose that a and b are integers, not both zero. integers x and y so that gcd(a, b) =ax + by. There are

5 1 Elementary number theory, V The setup is the same as in Worksheets I, II, III and IV. You may assume all the Propositions from Worksheets I, II, III and IV. [But, be warned that you are expected to know the proofs of these, and we will be revisiting them.] Definition 39. We say that integers a and b are relatively prime (or coprime) ifgcd(a, b) =1. Corollary 40. Let a and b be integers, not both zero. Then gcd(a, b) =1if and only if there exist integers x and y so that ax + by =1. Proposition 41. If n is an integer, then gcd(n, n + 1) = 1. Theorem 42. Let a, b and c be integers. If a bc and gcd(a, b) =1then a c. Proposition 43. Let a and b be integers such that at least one of a and b is not zero. If a = bq + r then gcd(a, b) = gcd(b, r). Example 44. Find gcd(835, 45), gcd(216, 57) and gcd(85, 31). Exercise 45. Describe a method suggested by Proposition 43 for finding the greatest common divisor of two integers. This method finds gcd(a, b) from a and b. Explainhowitalsofindsx and y so that ax + by = gcd(a, b). Theorem 46. Let a be an integer and n a natural number. If gcd(a, n) =1 then there exists an integer x such that ax 1modn. Example 47. Let a = 12 and n = 85. Use what we now know to find an integer x so that 12x 1 mod 85. Exercise 48. Find four examples of problems like Example 47. You should find a and n that are relatively prime, then find an integer x so that ax 1modn, for your choice(s) of a and n. Make sure that your examples are not too easy, but also not too hard. Question 49. Suppose that a and b are relatively prime integers. How many solutions (x, y) are there of the equation ax + by =1, for x and y integers? Is the solution unique? Are there at most five solutions? Are there finitely many? Are there infinitely many? Conjecture 50. Let a, b and c be integers with c 6= 0, and let n be a natural number. If ac bc mod n then a b mod n.

1 Elementary number theory

1 Elementary number theory Math 215 - Introduction to Advanced Mathematics Spring 2019 1 Elementary number theory We assume the existence of the natural numbers and the integers N = {1, 2, 3,...} Z = {..., 3, 2, 1, 0, 1, 2, 3,...},

More information

Math Introduction to Advanced Mathematics

Math Introduction to Advanced Mathematics Math 215 - Introduction to Advanced Mathematics Number Theory Fall 2017 The following introductory guide to number theory is borrowed from Drew Shulman and is used in a couple of other Math 215 classes.

More information

Algorithmic number theory Cryptographic hardness assumptions. Table of contents

Algorithmic number theory Cryptographic hardness assumptions. Table of contents Algorithmic number theory Cryptographic hardness assumptions Foundations of Cryptography Computer Science Department Wellesley College Fall 2016 Table of contents Introduction Primes and Divisibility Modular

More information

Know the Well-ordering principle: Any set of positive integers which has at least one element contains a smallest element.

Know the Well-ordering principle: Any set of positive integers which has at least one element contains a smallest element. The first exam will be on Wednesday, September 22, 2010. The syllabus will be sections 1.1 and 1.2 in Lax, and the number theory handout found on the class web site, plus the handout on the method of successive

More information

Integers and Mathematical Induction

Integers and Mathematical Induction IT Program, NTUT, Fall 07 Integers and Mathematical Induction Chuan-Ming Liu Computer Science and Information Engineering National Taipei University of Technology TAIWAN 1 Learning Objectives Learn about

More information

Introduction to Programming in C Department of Computer Science and Engineering\ Lecture No. #02 Introduction: GCD

Introduction to Programming in C Department of Computer Science and Engineering\ Lecture No. #02 Introduction: GCD Introduction to Programming in C Department of Computer Science and Engineering\ Lecture No. #02 Introduction: GCD In this session, we will write another algorithm to solve a mathematical problem. If you

More information

9.5 Equivalence Relations

9.5 Equivalence Relations 9.5 Equivalence Relations You know from your early study of fractions that each fraction has many equivalent forms. For example, 2, 2 4, 3 6, 2, 3 6, 5 30,... are all different ways to represent the same

More information

Euclid's Algorithm. MA/CSSE 473 Day 06. Student Questions Odd Pie Fight Euclid's algorithm (if there is time) extended Euclid's algorithm

Euclid's Algorithm. MA/CSSE 473 Day 06. Student Questions Odd Pie Fight Euclid's algorithm (if there is time) extended Euclid's algorithm MA/CSSE 473 Day 06 Euclid's Algorithm MA/CSSE 473 Day 06 Student Questions Odd Pie Fight Euclid's algorithm (if there is time) extended Euclid's algorithm 1 Quick look at review topics in textbook REVIEW

More information

CHAPTER 8. Copyright Cengage Learning. All rights reserved.

CHAPTER 8. Copyright Cengage Learning. All rights reserved. CHAPTER 8 RELATIONS Copyright Cengage Learning. All rights reserved. SECTION 8.3 Equivalence Relations Copyright Cengage Learning. All rights reserved. The Relation Induced by a Partition 3 The Relation

More information

Chapter 4. Number Theory. 4.1 Factors and multiples

Chapter 4. Number Theory. 4.1 Factors and multiples Chapter 4 Number Theory We ve now covered most of the basic techniques for writing proofs. So we re going to start applying them to specific topics in mathematics, starting with number theory. Number theory

More information

Discrete Mathematics Lecture 4. Harper Langston New York University

Discrete Mathematics Lecture 4. Harper Langston New York University Discrete Mathematics Lecture 4 Harper Langston New York University Sequences Sequence is a set of (usually infinite number of) ordered elements: a 1, a 2,, a n, Each individual element a k is called a

More information

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

Math 302 Introduction to Proofs via Number Theory. Robert Jewett (with small modifications by B. Ćurgus) Math 30 Introduction to Proofs via Number Theory Robert Jewett (with small modifications by B. Ćurgus) March 30, 009 Contents 1 The Integers 3 1.1 Axioms of Z...................................... 3 1.

More information

ELEMENTARY NUMBER THEORY AND METHODS OF PROOF

ELEMENTARY NUMBER THEORY AND METHODS OF PROOF CHAPTER 4 ELEMENTARY NUMBER THEORY AND METHODS OF PROOF Copyright Cengage Learning. All rights reserved. SECTION 4.8 Application: Algorithms Copyright Cengage Learning. All rights reserved. Application:

More information

Ch 3.4 The Integers and Division

Ch 3.4 The Integers and Division Integers and Division 1 Ch 3.4 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

Modular Arithmetic. Marizza Bailey. December 14, 2015

Modular Arithmetic. Marizza Bailey. December 14, 2015 Modular Arithmetic Marizza Bailey December 14, 2015 Introduction to Modular Arithmetic If someone asks you what day it is 145 days from now, what would you answer? Would you count 145 days, or find a quicker

More information

r=1 The Binomial Theorem. 4 MA095/98G Revision

r=1 The Binomial Theorem. 4 MA095/98G Revision Revision Read through the whole course once Make summary sheets of important definitions and results, you can use the following pages as a start and fill in more yourself Do all assignments again Do the

More information

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

Lemma (x, y, z) is a Pythagorean triple iff (y, x, z) is a Pythagorean triple. Chapter Pythagorean Triples.1 Introduction. The Pythagorean triples have been known since the time of Euclid and can be found in the third century work Arithmetica by Diophantus [9]. An ancient Babylonian

More information

Pick s Theorem and Lattice Point Geometry

Pick s Theorem and Lattice Point Geometry Pick s Theorem and Lattice Point Geometry 1 Lattice Polygon Area Calculations Lattice points are points with integer coordinates in the x, y-plane. A lattice line segment is a line segment that has 2 distinct

More information

4&5 Binary Operations and Relations. The Integers. (part I)

4&5 Binary Operations and Relations. The Integers. (part I) c Oksana Shatalov, Spring 2016 1 4&5 Binary Operations and Relations. The Integers. (part I) 4.1: Binary Operations DEFINITION 1. A binary operation on a nonempty set A is a function from A A to A. Addition,

More information

Computable Euclidean Domains

Computable Euclidean Domains Computable Euclidean Domains Asher M. Kach (Joint Work with Rod Downey and with Paul Ellis and Reed Solomon) Southern Wisconsin Logic Colloquium 9 October 2012 Asher M. Kach Computable Euclidean Domains

More information

Introduction to Modular Arithmetic

Introduction to Modular Arithmetic Randolph High School Math League 2014-2015 Page 1 1 Introduction Introduction to Modular Arithmetic Modular arithmetic is a topic residing under Number Theory, which roughly speaking is the study of integers

More information

ELEMENTARY NUMBER THEORY AND METHODS OF PROOF

ELEMENTARY NUMBER THEORY AND METHODS OF PROOF CHAPTER 4 ELEMENTARY NUMBER THEORY AND METHODS OF PROOF Copyright Cengage Learning. All rights reserved. SECTION 4.2 Direct Proof and Counterexample II: Rational Numbers Copyright Cengage Learning. All

More information

On Jeśmanowicz Conjecture Concerning Pythagorean Triples

On Jeśmanowicz Conjecture Concerning Pythagorean Triples Journal of Mathematical Research with Applications Mar., 2015, Vol. 35, No. 2, pp. 143 148 DOI:10.3770/j.issn:2095-2651.2015.02.004 Http://jmre.dlut.edu.cn On Jeśmanowicz Conjecture Concerning Pythagorean

More information

SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION

SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION CHAPTER 5 SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION Copyright Cengage Learning. All rights reserved. SECTION 5.5 Application: Correctness of Algorithms Copyright Cengage Learning. All rights reserved.

More information

ELEMENTARY NUMBER THEORY AND METHODS OF PROOF

ELEMENTARY NUMBER THEORY AND METHODS OF PROOF CHAPTER 4 ELEMENTARY NUMBER THEORY AND METHODS OF PROOF Copyright Cengage Learning. All rights reserved. SECTION 4.3 Direct Proof and Counterexample III: Divisibility Copyright Cengage Learning. All rights

More information

SCHOOL OF ENGINEERING & BUILT ENVIRONMENT. Mathematics. Numbers & Number Systems

SCHOOL OF ENGINEERING & BUILT ENVIRONMENT. Mathematics. Numbers & Number Systems SCHOOL OF ENGINEERING & BUILT ENVIRONMENT Mathematics Numbers & Number Systems Introduction Numbers and Their Properties Multiples and Factors The Division Algorithm Prime and Composite Numbers Prime Factors

More information

ELEMENTARY NUMBER THEORY AND METHODS OF PROOF

ELEMENTARY NUMBER THEORY AND METHODS OF PROOF CHAPTER 4 ELEMENTARY NUMBER THEORY AND METHODS OF PROOF Copyright Cengage Learning. All rights reserved. SECTION 4.3 Direct Proof and Counterexample III: Divisibility Copyright Cengage Learning. All rights

More information

UNIT-II NUMBER THEORY

UNIT-II NUMBER THEORY UNIT-II NUMBER THEORY An integer n is even if, and only if, n equals twice some integer. i.e. if n is an integer, then n is even an integer k such that n =2k An integer n is odd if, and only if, n equals

More information

Line Graphs and Circulants

Line Graphs and Circulants Line Graphs and Circulants Jason Brown and Richard Hoshino Department of Mathematics and Statistics Dalhousie University Halifax, Nova Scotia, Canada B3H 3J5 Abstract The line graph of G, denoted L(G),

More information

Number System. Introduction. Natural Numbers (N) Whole Numbers (W) Integers (Z) Prime Numbers (P) Face Value. Place Value

Number System. Introduction. Natural Numbers (N) Whole Numbers (W) Integers (Z) Prime Numbers (P) Face Value. Place Value 1 Number System Introduction In this chapter, we will study about the number system and number line. We will also learn about the four fundamental operations on whole numbers and their properties. Natural

More information

Binary Relations McGraw-Hill Education

Binary Relations McGraw-Hill Education Binary Relations A binary relation R from a set A to a set B is a subset of A X B Example: Let A = {0,1,2} and B = {a,b} {(0, a), (0, b), (1,a), (2, b)} is a relation from A to B. We can also represent

More information

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

Problem. Prove that the square of any whole number n is a multiple of 4 or one more than a multiple of 4. CHAPTER 8 Integers Problem. Prove that the square of any whole number n is a multiple of 4 or one more than a multiple of 4. Strategy 13 Use cases. This strategy may be appropriate when A problem can be

More information

CSE 20 DISCRETE MATH. Fall

CSE 20 DISCRETE MATH. Fall CSE 20 DISCRETE MATH Fall 2017 http://cseweb.ucsd.edu/classes/fa17/cse20-ab/ Final exam The final exam is Saturday December 16 11:30am-2:30pm. Lecture A will take the exam in Lecture B will take the exam

More information

Introduction to Sets and Logic (MATH 1190)

Introduction to Sets and Logic (MATH 1190) Introduction to Sets and Logic () Instructor: Email: shenlili@yorku.ca Department of Mathematics and Statistics York University Dec 4, 2014 Outline 1 2 3 4 Definition A relation R from a set A to a set

More information

Section 5.5. Greatest common factors

Section 5.5. Greatest common factors Section 5.5 Greatest common factors Definition GCF The greatest common factor (GCF) is the largest factor common to both of the specified numbers. Ex. GCF(36,84) List factors 36:1,2,3,4,6,9,12,18,36 84:1,2,3,4,6,7,9,12,14,21,28,42,84

More information

Chapter 4. square sum graphs. 4.1 Introduction

Chapter 4. square sum graphs. 4.1 Introduction Chapter 4 square sum graphs In this Chapter we introduce a new type of labeling of graphs which is closely related to the Diophantine Equation x 2 + y 2 = n and report results of our preliminary investigations

More information

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

Chapter 3: Theory of Modular Arithmetic 1. Chapter 3: Theory of Modular Arithmetic Chapter 3: Theory of Modular Arithmetic 1 Chapter 3: Theory of Modular Arithmetic SECTION A Introduction to Congruences By the end of this section you will be able to deduce properties of large positive

More information

36 Modular Arithmetic

36 Modular Arithmetic 36 Modular Arithmetic Tom Lewis Fall Term 2010 Tom Lewis () 36 Modular Arithmetic Fall Term 2010 1 / 10 Outline 1 The set Z n 2 Addition and multiplication 3 Modular additive inverse 4 Modular multiplicative

More information

UCT Algorithm Circle: Number Theory

UCT Algorithm Circle: Number Theory UCT Algorithm Circle: 7 April 2011 Outline Primes and Prime Factorisation 1 Primes and Prime Factorisation 2 3 4 Some revision (hopefully) What is a prime number? An integer greater than 1 whose only factors

More information

CS 310 Advanced Data Structures and Algorithms

CS 310 Advanced Data Structures and Algorithms CS 310 Advanced Data Structures and Algorithms Recursion June 27, 2017 Tong Wang UMass Boston CS 310 June 27, 2017 1 / 20 Recursion Recursion means defining something, such as a function, in terms of itself

More information

COMPSCI 230 Discrete Math Prime Numbers January 24, / 15

COMPSCI 230 Discrete Math Prime Numbers January 24, / 15 COMPSCI 230 Discrete Math January 24, 2017 COMPSCI 230 Discrete Math Prime Numbers January 24, 2017 1 / 15 Outline 1 Prime Numbers The Sieve of Eratosthenes Python Implementations GCD and Co-Primes COMPSCI

More information

Solutions to the Second Midterm Exam

Solutions to the Second Midterm Exam CS/Math 240: Intro to Discrete Math 3/27/2011 Instructor: Dieter van Melkebeek Solutions to the Second Midterm Exam Problem 1 This question deals with the following implementation of binary search. Function

More information

CPSC 121: Models of Computation Assignment #4, due Thursday, March 16 th,2017at16:00

CPSC 121: Models of Computation Assignment #4, due Thursday, March 16 th,2017at16:00 CPSC 121: Models of Computation Assignment #4, due Thursday, March 16 th,2017at16:00 [18] 1. Consider the following predicate logic statement: 9x 2 A, 8y 2 B,9z 2 C, P(x, y, z)! Q(x, y, z), where A, B,

More information

Trail Making Game. Hyun Sung Jun Jaehoon Kim Sang-il Oum Department of Mathematical Sciences KAIST, Daejeon, , Republic of Korea.

Trail Making Game. Hyun Sung Jun Jaehoon Kim Sang-il Oum Department of Mathematical Sciences KAIST, Daejeon, , Republic of Korea. Trail Making Game Hyun Sung Jun Jaehoon Kim Sang-il Oum Department of Mathematical Sciences KAIST, Daejeon, 305-701, Republic of Korea. May 7, 2009 Abstract Trail Making is a game played on a graph with

More information

CMSC Honors Discrete Mathematics

CMSC Honors Discrete Mathematics CMSC 27130 Honors Discrete Mathematics Lectures by Alexander Razborov Notes by Justin Lubin The University of Chicago, Autumn 2017 1 Contents I Number Theory 4 1 The Euclidean Algorithm 4 2 Mathematical

More information

CSE 20 DISCRETE MATH. Winter

CSE 20 DISCRETE MATH. Winter CSE 20 DISCRETE MATH Winter 2017 http://cseweb.ucsd.edu/classes/wi17/cse20-ab/ Final exam The final exam is Saturday March 18 8am-11am. Lecture A will take the exam in GH 242 Lecture B will take the exam

More information

Chapter 18 out of 37 from Discrete Mathematics for Neophytes: Number Theory, Probability, Algorithms, and Other Stuff by J. M. Cargal.

Chapter 18 out of 37 from Discrete Mathematics for Neophytes: Number Theory, Probability, Algorithms, and Other Stuff by J. M. Cargal. Chapter 8 out of 7 from Discrete Mathematics for Neophytes: Number Theory, Probability, Algorithms, and Other Stuff by J. M. Cargal 8 Matrices Definitions and Basic Operations Matrix algebra is also known

More information

Excerpt from "Art of Problem Solving Volume 1: the Basics" 2014 AoPS Inc.

Excerpt from Art of Problem Solving Volume 1: the Basics 2014 AoPS Inc. Chapter 5 Using the Integers In spite of their being a rather restricted class of numbers, the integers have a lot of interesting properties and uses. Math which involves the properties of integers is

More information

Mathematics. Jaehyun Park. CS 97SI Stanford University. June 29, 2015

Mathematics. Jaehyun Park. CS 97SI Stanford University. June 29, 2015 Mathematics Jaehyun Park CS 97SI Stanford University June 29, 2015 Outline Algebra Number Theory Combinatorics Geometry Algebra 2 Sum of Powers n k=1 k 3 k 2 = 1 n(n + 1)(2n + 1) 6 = ( k ) 2 = ( 1 2 n(n

More information

Elementary number theory

Elementary number theory Elementary number theory The notion of primes, greatest common divisors, congruences and Euler s phi function. the number theoretic concepts and Sage commands Sage Implementation of the RSA algorithm.

More information

CS 97SI: INTRODUCTION TO PROGRAMMING CONTESTS. Jaehyun Park

CS 97SI: INTRODUCTION TO PROGRAMMING CONTESTS. Jaehyun Park CS 97SI: INTRODUCTION TO PROGRAMMING CONTESTS Jaehyun Park Today s Lecture Algebra Number Theory Combinatorics (non-computational) Geometry Emphasis on how to compute Sum of Powers n k=1 k 2 = 1 6 n(n

More information

A.1 Numbers, Sets and Arithmetic

A.1 Numbers, Sets and Arithmetic 522 APPENDIX A. MATHEMATICS FOUNDATIONS A.1 Numbers, Sets and Arithmetic Numbers started as a conceptual way to quantify count objects. Later, numbers were used to measure quantities that were extensive,

More information

Lecture Notes, CSE 232, Fall 2014 Semester

Lecture Notes, CSE 232, Fall 2014 Semester Lecture Notes, CSE 232, Fall 2014 Semester Dr. Brett Olsen Week 11 - Number Theory Number theory is the study of the integers. The most basic concept in number theory is divisibility. We say that b divides

More information

2 Solution of Homework

2 Solution of Homework Math 3181 Name: Dr. Franz Rothe February 6, 2014 All3181\3181_spr14h2.tex Homework has to be turned in this handout. The homework can be done in groups up to three due February 11/12 2 Solution of Homework

More information

USA Mathematical Talent Search. PROBLEMS / SOLUTIONS / COMMENTS Round 2 - Year 12 - Academic Year

USA Mathematical Talent Search. PROBLEMS / SOLUTIONS / COMMENTS Round 2 - Year 12 - Academic Year USA Mathematical Talent Search PROBLEMS / SOLUTIONS / COMMENTS Round 2 - Year 12 - Academic Year 2000-2001 Gene A. Berg, Editor 1/2/12. A well-known test for divisibility by 19 is as follows: Remove the

More information

Calculation of extended gcd by normalization

Calculation of extended gcd by normalization SCIREA Journal of Mathematics http://www.scirea.org/journal/mathematics August 2, 2018 Volume 3, Issue 3, June 2018 Calculation of extended gcd by normalization WOLF Marc, WOLF François, LE COZ Corentin

More information

9 abcd = dcba b + 90c = c + 10b b = 10c.

9 abcd = dcba b + 90c = c + 10b b = 10c. 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

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

Section 17. Closed Sets and Limit Points

Section 17. Closed Sets and Limit Points 17. Closed Sets and Limit Points 1 Section 17. Closed Sets and Limit Points Note. In this section, we finally define a closed set. We also introduce several traditional topological concepts, such as limit

More information

Modified Farey Sequences

Modified Farey Sequences Modified Farey Sequences Dhroova Aiylam MIT PRIMES May, Dhroova Aiylam (MIT PRIMES) Modified Farey Sequences May, / 8 The Farey Sequence a b, c d a + c b + d Dhroova Aiylam (MIT PRIMES) Modified Farey

More information

AXIOMS FOR THE INTEGERS

AXIOMS FOR THE INTEGERS AXIOMS FOR THE INTEGERS BRIAN OSSERMAN We describe the set of axioms for the integers which we will use in the class. The axioms are almost the same as what is presented in Appendix A of the textbook,

More information

MITOCW watch?v=kvtlwgctwn4

MITOCW watch?v=kvtlwgctwn4 MITOCW watch?v=kvtlwgctwn4 PROFESSOR: The idea of congruence was introduced to the world by Gauss in the early 18th century. You've heard of him before, I think. He's responsible for some work on magnetism

More information

9 abcd = dcba b + 90c = c + 10b b = 10c.

9 abcd = dcba b + 90c = c + 10b b = 10c. 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

More information

Math 55 - Spring 04 - Lecture notes # 1 - Jan 20 (Tuesday)

Math 55 - Spring 04 - Lecture notes # 1 - Jan 20 (Tuesday) Math 55 - Spring 04 - Lecture notes # 1 - Jan 20 (Tuesday) Name, class, URL (www.cs.berkeley.edu/~demmel/ma55) on board Head TA Mike West speaks on bureaucracy Advertise CS 70 (T Th 2-3:30) as an "honors"

More information

Chapter Summary. Mathematical Induction Recursive Definitions Structural Induction Recursive Algorithms

Chapter Summary. Mathematical Induction Recursive Definitions Structural Induction Recursive Algorithms Chapter Summary Mathematical Induction Recursive Definitions Structural Induction Recursive Algorithms Section 5.1 Sec.on Summary Mathematical Induction Examples of Proof by Mathematical Induction Mistaken

More information

COP 4516: Math for Programming Contest Notes

COP 4516: Math for Programming Contest Notes COP 4516: Math for Programming Contest Notes Euclid's Algorithm Euclid's Algorithm is the efficient way to determine the greatest common divisor between two integers. Given two positive integers a and

More information

EDAA40 At home exercises 1

EDAA40 At home exercises 1 EDAA40 At home exercises 1 1. Given, with as always the natural numbers starting at 1, let us define the following sets (with iff ): Give the number of elements in these sets as follows: 1. 23 2. 6 3.

More information

Non-Standard Models of Arithmetic

Non-Standard Models of Arithmetic Non-Standard Models of Arithmetic Asher M. Kach 1 May 2004 Abstract Almost everyone, mathematician or not, is comfortable with the standard model (N : +, ) of arithmetic. Less familiar, even among logicians,

More information

Star Decompositions of the Complete Split Graph

Star Decompositions of the Complete Split Graph University of Dayton ecommons Honors Theses University Honors Program 4-016 Star Decompositions of the Complete Split Graph Adam C. Volk Follow this and additional works at: https://ecommons.udayton.edu/uhp_theses

More information

arxiv: v1 [math.co] 7 Dec 2018

arxiv: v1 [math.co] 7 Dec 2018 SEQUENTIALLY EMBEDDABLE GRAPHS JACKSON AUTRY AND CHRISTOPHER O NEILL arxiv:1812.02904v1 [math.co] 7 Dec 2018 Abstract. We call a (not necessarily planar) embedding of a graph G in the plane sequential

More information

Hashing. Yufei Tao. Department of Computer Science and Engineering Chinese University of Hong Kong

Hashing. Yufei Tao. Department of Computer Science and Engineering Chinese University of Hong Kong Department of Computer Science and Engineering Chinese University of Hong Kong In this lecture, we will revisit the dictionary search problem, where we want to locate an integer v in a set of size n or

More information

Interpretations and Models. Chapter Axiomatic Systems and Incidence Geometry

Interpretations and Models. Chapter Axiomatic Systems and Incidence Geometry Interpretations and Models Chapter 2.1-2.4 - Axiomatic Systems and Incidence Geometry Axiomatic Systems in Mathematics The gold standard for rigor in an area of mathematics Not fully achieved in most areas

More information

Lesson 19: The Graph of a Linear Equation in Two Variables is a Line

Lesson 19: The Graph of a Linear Equation in Two Variables is a Line Lesson 19: The Graph of a Linear Equation in Two Variables is a Line Classwork Exercises Theorem: The graph of a linear equation y = mx + b is a non-vertical line with slope m and passing through (0, b),

More information

Digital Logic Design: a rigorous approach c

Digital Logic Design: a rigorous approach c Digital Logic Design: a rigorous approach c Chapter 5: Binary Representation Guy Even Moti Medina School of Electrical Engineering Tel-Aviv Univ. November 7, 2017 Book Homepage: http://www.eng.tau.ac.il/~guy/even-medina

More information

2. Sets. 2.1&2.2: Sets and Subsets. Combining Sets. c Dr Oksana Shatalov, Fall

2. Sets. 2.1&2.2: Sets and Subsets. Combining Sets. c Dr Oksana Shatalov, Fall c Dr Oksana Shatalov, Fall 2014 1 2. Sets 2.1&2.2: Sets and Subsets. Combining Sets. Set Terminology and Notation DEFINITIONS: Set is well-defined collection of objects. Elements are objects or members

More information

Module 2 Congruence Arithmetic pages 39 54

Module 2 Congruence Arithmetic pages 39 54 Module 2 Congruence Arithmetic pages 9 5 Here are some excellent websites that can help you on this topic: http://mathcentral.uregina.ca/qq/database/qq.09.98/kupper1.html http://nrich.maths.org/public.viewer.php?obj_id=50

More information

The Chinese remainder theorem

The Chinese remainder theorem Mathematics, KTH Bengt Ek October 2015 Supplementary material for SF2736, Discrete mathematics: The Chinese remainder theorem We know that for all m Z + and all a Z, all integers x that satisfy x a (mod

More information

Public-key encipherment concept

Public-key encipherment concept Date: onday, October 21, 2002 Prof.: Dr Jean-Yves Chouinard Design of Secure Computer Systems CSI4138/CEG4394 Notes on Public Key Cryptography Public-key encipherment concept Each user in a secure communication

More information

Admin ENCRYPTION. Admin. Encryption 10/29/15. Assignment 6. 4 more assignments: Midterm next Thursday. What is it and why do we need it?

Admin ENCRYPTION. Admin. Encryption 10/29/15. Assignment 6. 4 more assignments: Midterm next Thursday. What is it and why do we need it? Admin Assignment 6 4 more assignments:! Assignment 7, due 11/13 5pm! Assignment 8, due 11/20 5pm! Assignments 9 & 10, due 12/9 11:59pm ENCRYPTION David Kauchak CS52 Spring 2015 Admin Midterm next Thursday!

More information

Recursion. Lars-Henrik Eriksson. Functional Programming 1. Based on a presentation by Tjark Weber and notes by Sven-Olof Nyström

Recursion. Lars-Henrik Eriksson. Functional Programming 1. Based on a presentation by Tjark Weber and notes by Sven-Olof Nyström Lars-Henrik Eriksson Functional Programming 1 Based on a presentation by Tjark Weber and notes by Sven-Olof Nyström Tjark Weber (UU) Recursion 1 / 41 Comparison: Imperative/Functional Programming Comparison:

More information

Ramsey s Theorem on Graphs

Ramsey s Theorem on Graphs Ramsey s Theorem on Graphs 1 Introduction Exposition by William Gasarch Imagine that you have 6 people at a party. We assume that, for every pair of them, either THEY KNOW EACH OTHER or NEITHER OF THEM

More information

Exercises for Chapter Three You know you've got to exercise your brain just like your muscles. Will Rogers ( )

Exercises for Chapter Three You know you've got to exercise your brain just like your muscles. Will Rogers ( ) Exercises for Chapter Three You know you've got to exercise your brain just like your muscles. Will Rogers (1879 1935) Investigation Exercise 3.1. (a) Construct a tessellation. (Directions for construction.)

More information

Prepared by Sa diyya Hendrickson. Package Summary

Prepared by Sa diyya Hendrickson. Package Summary Introduction Prepared by Sa diyya Hendrickson Name: Date: Package Summary Exponent Form and Basic Properties Order of Operations Using Divisibility Rules Finding Factors and Common Factors Primes, Prime

More information

Lecture Notes on Contracts

Lecture Notes on Contracts Lecture Notes on Contracts 15-122: Principles of Imperative Computation Frank Pfenning Lecture 2 August 30, 2012 1 Introduction For an overview the course goals and the mechanics and schedule of the course,

More information

Heron Quadrilaterals with Sides in Arithmetic or Geometric Progression

Heron Quadrilaterals with Sides in Arithmetic or Geometric Progression Heron Quadrilaterals with Sides in Arithmetic or Geometric Progression R.H.Buchholz & J.A.MacDougall Abstract We study triangles and cyclic quadrilaterals which have rational area and whose sides form

More information

Math 126 Number Theory

Math 126 Number Theory Math 16 Number Theory Prof. D. Joyce, Clark University 8 Mar 006 Due Friday. Page 155: exercises 1,, 7. Choose one of the three and write it up completely. Whichever one you choose, find all those solutions

More information

Graph Theory. 1 Introduction to Graphs. Martin Stynes Department of Mathematics, UCC January 26, 2011

Graph Theory. 1 Introduction to Graphs. Martin Stynes Department of Mathematics, UCC   January 26, 2011 Graph Theory Martin Stynes Department of Mathematics, UCC email: m.stynes@ucc.ie January 26, 2011 1 Introduction to Graphs 1 A graph G = (V, E) is a non-empty set of nodes or vertices V and a (possibly

More information

Discrete Math: Selected Homework Problems

Discrete Math: Selected Homework Problems Discrete Math: Selected Homework Problems 2006 2.1 Prove: if d is a common divisor of a and b and d is also a linear combination of a and b then d is a greatest common divisor of a and b. (5 3.1 Prove:

More information

Definition MATH Benjamin V.C. Collins, James A. Swenson MATH 2730

Definition MATH Benjamin V.C. Collins, James A. Swenson MATH 2730 MATH 2730 Benjamin V.C. Collins James A. Swenson s and undefined terms The importance of definition s matter! may be more important in Discrete Math than in any math course that you have had previously.

More information

The statement implies that any three intersection points of two distinct planes lie on a line.

The statement implies that any three intersection points of two distinct planes lie on a line. Math 3181 Dr. Franz Rothe February 23, 2015 All3181\3181_spr15ts1.tex 1 Solution of Test Name: Problem 1.1. The second part of Hilbert s Proposition 1 states: Any two different planes have either no point

More information

Provide a drawing. Mark any line with three points in blue color.

Provide a drawing. Mark any line with three points in blue color. Math 3181 Name: Dr. Franz Rothe August 18, 2014 All3181\3181_fall14h1.tex Homework has to be turned in this handout. For extra space, use the back pages, or blank pages between. The homework can be done

More information

Assertions & Verification & Example Loop Invariants Example Exam Questions

Assertions & Verification & Example Loop Invariants Example Exam Questions 2014 November 27 1. Assertions & Verification & Example Loop Invariants Example Exam Questions 2. A B C Give a general template for refining an operation into a sequence and state what questions a designer

More information

The set consisting of all natural numbers that are in A and are in B is the set f1; 3; 5g;

The set consisting of all natural numbers that are in A and are in B is the set f1; 3; 5g; Chapter 5 Set Theory 5.1 Sets and Operations on Sets Preview Activity 1 (Set Operations) Before beginning this section, it would be a good idea to review sets and set notation, including the roster method

More information

Uncharted Territory of Zero Divisor Graphs and Their Complements

Uncharted Territory of Zero Divisor Graphs and Their Complements Uncharted Territory of Zero Divisor Graphs and Their Complements Amanda Phillips, Julie Rogers, Kevin Tolliver, and Frances Worek July, 004 Abstract Let Γ(Z n ) be a zero divisor graph whose vertices are

More information

Lesson 19: The Graph of a Linear Equation in Two Variables Is a Line

Lesson 19: The Graph of a Linear Equation in Two Variables Is a Line The Graph of a Linear Equation in Two Variables Is a Line Classwork Exercises THEOREM: The graph of a linear equation yy = mmmm + bb is a non-vertical line with slope mm and passing through (0, bb), where

More information

Comp 182 Data Structures Sample Midterm Examination

Comp 182 Data Structures Sample Midterm Examination Comp 182 Data Structures Sample Midterm Examination 5 November 2014 Name: ANSWERS C. R. Putnam 5 November 2014 1. Design an ADT that represents a simple Social Networking Site. It should allow a user to

More information

Definition 2 (Projective plane). A projective plane is a class of points, and a class of lines satisfying the axioms:

Definition 2 (Projective plane). A projective plane is a class of points, and a class of lines satisfying the axioms: Math 3181 Name: Dr. Franz Rothe January 30, 2014 All3181\3181_spr14h2.tex Homework has to be turned in this handout. The homework can be done in groups up to three due February 11/12 2 Homework 1 Definition

More information

MATH 423 Linear Algebra II Lecture 17: Reduced row echelon form (continued). Determinant of a matrix.

MATH 423 Linear Algebra II Lecture 17: Reduced row echelon form (continued). Determinant of a matrix. MATH 423 Linear Algebra II Lecture 17: Reduced row echelon form (continued). Determinant of a matrix. Row echelon form A matrix is said to be in the row echelon form if the leading entries shift to the

More information

Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103. Chapter 2. Sets

Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103. Chapter 2. Sets Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103 Chapter 2 Sets Slides are adopted from Discrete Mathematics and It's Applications Kenneth H.

More information

CSE 120. Computer Science Principles

CSE 120. Computer Science Principles Adam Blank Lecture 17 Winter 2017 CSE 120 Computer Science Principles CSE 120: Computer Science Principles Proofs & Computation e w h e q 0 q 1 q 2 q 3 h,e w,e w,h w,h q garbage w,h,e CSE = Abstraction

More information