Mathematics for Computer Science Exercises for Week 10
|
|
- Augusta Bridges
- 5 years ago
- Views:
Transcription
1 Mathematics for Computer Science Exercises for Week 10 Silvio Capobianco Last update: 7 November 2018 Problems from Section 9.1 Problem 9.1. Prove that a linear combination of linear combinations of integers a 0,..., a n is a linear combination of a 0,..., a n. Solution. Suppose we have k 2 linear combinations L i = n j=0 s i,ja j. Given k integers b 1,..., b k, we want to show that L = k i=1 L k is also a linear combination of a 0,..., a n. We can do so by exploiting the commutative, associative, and distributive property: ( k k n ) b i L i = b i s i,j a j i=1 i=1 j=0 ( k n ) = b i s i,j a j = = i=1 j=0 ( n k ) b i s i,j a j j=0 i=1 ( n k ) b i s i,j a j j=0 i=1 which is indeed a linear combination of the a j s. 1
2 Problem 9.2. A number is perfect if it is equal to the sum of its positive divisors, other than itself. For example, 6 is perfect, because 6 = Similarly, 28 is perfect, because 28 = Explain why 2 k 1 (2 k 1) is perfect when 2 k 1 is prime. Solution. If 2 k 1 is prime, then every positive factor d of n = 2 k 1 (2 k 1) which is different from n is: 1. either a power 2 i of 2 with i [0..k 1] (for i = 0 this also covers the case d = 1), 2. or a product of the form 2 j (2 k 1) with j [0..k 2]. The sum of the factor of the first kind is k 1 i=0 2i = 2 k 1 (remember that k 1 i=0 ai = ak 1 for every a 1) while the sum of the factors of the second a 1 kind is (2 k 1) k 2 j=0 2j = (2 k 1) (2 k 1 1). Then the sum of all positive factors of 2 j (2 k 1), except itself, is: k 1 k 2 2 i + (2 k 1) 2 j = (2 k 1) + (2 k 1)(2 k 1 1) = 2 k 1 (2 k 1) = n. i=0 j=0 Problems for Section 9.2. Problem 9.3. Let x ::= , y ::= Use the Euclidean algorithm to find the GCD of x and y. Hint: Looks scary, but it s not. Solution. The situation is not scary, because = and = , which makes computing the GCD much less scary 2
3 than it seems: gcd( , ) = gcd( , ) = gcd( , ) = gcd( , 0) = Problem 9.4. Let x ::= y ::= 19 (922) (a) What is gcd(x, y)? (a) What is lcm(x, y)? ( lcm is the least common multiple.) Solution. (a) We use this exercise to introduce an important principle: the greatest common divisor of two numbers, expressed as products of powers of primes, is the product of the common prime factors of the two numbers, each appearing with the lowest exponent of those that appear in the factorizations of the two numbers. Here, the common prime factors are 37 and appears with exponent 2 in x and 12 in y, so it will appear with exponent 2 in gcd(x, y). 59 appears with exponent 1000 in x and 29 in y, so it will appear with exponent 29 in gcd(x, y). In conclusion, gcd(x, y) = (b) For the least common multiple, we use a dual argument: it will be the product of those primes which appear in at least one factorization, each with the highest exponent of those that appear in the factorizations of the two numbers. In our case, lcm(x, y) = (922) Alternatively, we can observe that, whatever the positive integers x and y are, the following holds: x y = gcd(x, y) lcm(x, y) 3
4 Problem 9.5. Show that the following are equivalent: 1. There exists an integer x such that ax = qn + b. 2. gcd(a, n) b. Solution. If ax = qn + b for some integer x, then b = ax qn is a linear combination of a and n, and is thus divisible by gcd(a, n). If b = k gcd(a, n), for a suitable integer k, write gcd(a, n) = sa + tn according to Bézout s theorem: then b = ksa + ktn and we can take x = ks. Problem 9.8. (a) Use the Pulverizer to find integers x, y such that x30 + y22 = gcd(30, 22). (b) Now find integers x, y with 0 y < 30 such that x30 + y22 = gcd(30, 22). Solution. (a) Let us start the Pulverizer: a b rem(a, b) = a qcnt(a, b) b = = = 22 2 (30 22) = = 8 6 = (30 22) ( ) = Then gcd(30, 22) = 2 and we can choose x = 3, y = 4. (b) Of course, gcd(30, 22) = gcd(30, 22): we can obtain the by decreasing x by 22, and the by increasing y by 30. That is, for x = x 22 = 19 and y = y + 30 = 26 we still have gcd(30, 22) = x 30 + y 22. As it turns out, = 570 and =
5 Problem 9.9. (a) Use the Pulverizer to find gcd(84, 108). (b) Find integers x, y with 0 y < 84 such that x 84 + y 108 = gcd(84, 108). (c) Is there an integer k such that rem(84k, 108) = 1? Solution. (a) Let us start the Pulverizer: a b rem(a, b) = a qcnt(a, b) b = = = = 84 3 (108 84) = Then gcd(84, 108) = 12 and we can choose x = 4, y = 3. (b) Of course, gcd(84, 108) = gcd(84, 108): we can obtain the by decreasing x by 108, and the by increasing y by 84. That is, for x = = 104 and y = = 81 we still have gcd(84, 108) = x 84 + y 108. As it turns out, = 8736 and = (c) If such k existed, then k 84 qcnt(k 84, 108) 108 = 1 would be a linear combination of 84 and 108, hence be a multiple of gcd(84, 108): this is not the case, as the latter is 12. Problem Indicate true or false for the following statements about the greatest common divisor, and provide counterexamples for those that are false. 1. If gcd(a, b) 1 and gcd(b, c) 1 then gcd(a, c) If a bc and gcd(a, b) = 1 then a c. 3. gcd(a n, b n ) = (gcd(a, b)) n. 4. gcd(ab, ac) = a gcd(b, c). 5
6 5. gcd(1 + a, 1 + b) = 1 + gcd(a, b). 6. If an integer linear combination of a and b equals 1, then so does some integer linear combination of a and b If no integer linear combination of a and b equals 2, then neither does any integer linear combination of a 2 and b 2. Solution. We are making the silent assumption that all the integers considered are positive. 1. False: gcd(4, 6) = 2 and gcd(6, 9) = 3, but gcd(4, 9) = True: this generalizes Lemma to arbitrary integers. The proof is the same. 3. True: a full proof requires the Fundamental Theorem of Arithmetics, but the exercise does not require to prove true statements, only to provide counterexamples to false ones. 4. True: every common divisor of ab and ac is the product of a divisor of a and a common divisor of b and c, and the maximum such product is a gcd(b, c). 5. False: for a = 4 and b = 6 we have gcd(1 + a, 1 + b) = gcd(5, 7) = 1, but 1 + gcd(4, 6) = = Yes: if sa + tb = 1 with s and t integers, then gcd(a, b) = 1, so gcd(a, b 2 ) = 1 too, because any prime that divides b 2 also divides b. 7. Yes: in the given hypothesis, gcd(a, b) 3, so gcd(a 2, b 2 ) 9 (simply because, if d n, then d 2 n 2 ) and any positive linear combination of a 2 and b 2 will be 9 or more. Problem Here is a game you can analyze with number theory and always beat me. We start with two distinct, positive integers written on a blackboard. Call them a and b. Now we take turns. (I ll let you decide who goes first.) On each turn, the player must write a new positive integer on the board that is 6
7 the difference of two numbers that are already there. If a player cannot play, then they lose. For example, suppose that 12 and 15 are on the board initially. Your first play must be 3, which is Then I might play 9, which is Then you might play 6, which is Then I can t play, so I lose. (a) Show that every number on the board at the end of the game is a multiple of gcd(a, b). (b) Show that every positive multiple of gcd(a, b) up to max(a, b) is on the board at the end of the game. (c) Describe a strategy that lets you win this game every time. Solution. (a) Let P (n) be the predicate: If the game has reached the nth move, then every number on the board is a multiple of gcd(a, b). We prove by induction that P (n) is true for every n N. Base case: n = 0. Then the only numbers on the board are a and b, which are divisible by gcd(a, b). Induction step: Suppose that, when the game has reached the nth move, all the numbers on the board are multiple of gcd(a, b). Two cases are possible: 1. If no more moves are possible, then P (n + 1) is trivially true as the game doesn t reach the (n + 1)st move. 2. If some moves are possible, then the new number of the board is the difference of some multiple of gcd(a, b), thus still a multiple of gcd(a, b) (b) We first observe that every number of the board must be a linear combination of a and b: equivalently, a multiple of gcd(a, b). If we manage to prove that gcd(a, b) can be put on the board, it will follow that every positive multiple of gcd(a, b) up to max(a, b) can be put on the board: for example, as an element of the sequence max(a, b), max(a, b) gcd(a, b), max(a, b) 2 gcd(a, b),... And this can be done, basically, with the Euclidean algorithm! To fix ideas, suppose a > b. First, build the sequence a, a b, a 2b,..., a qcnt(a, b)b = rem(a, b) = c; 7
8 next, build the sequence b, b c, b 2c,..., b qcnt(b, c) = rem(b, c) = d, skipping those numbers which have already been reached; and so on, until the Euclidean algorithm would stop. The number reached at that point must be gcd(a, b). (c) Divide max(a, b) by gcd(a, b): the result is the number of numbers on the board at the end of the game, and this is two more than the number of moves, as a and b are on the board from the start. If the result is odd, you take the first move; if the result is even, you leave the first move to me. This ensures that the last move is yours, and you win the game. Problems for Section 9.4 Problem Let p be a prime number and a 1,..., a n integers. Prove the following Lemma by induction: Lemma. If p divides a product a 1 a n, then it divides some a i. You may assume the case for n = 2 which was given by Lemma Be sure to clearly state and label your Induction Hypothesis, Base case(s), and Induction step. Solution. Let P (n) be the following predicate: for every prime p and integers a 1,..., a n, if p a 1 a n, then there exists i [1..n] such that p a i. We want to prove that P (n) is true for every n 1. (For n = 0 the empty product is 1, p does not divide 1, and P (0) is trivially true.) Base case: n = 1. Nothing to say: if p a 1, then p a 1. Induction step: suppose P (n) is true for some n 1. Let a = a 1 a n and b = a n+1. Two cases are possible: 1. p a. Then, by inductive hypothesis, p a i for some i [1..n]. 8
9 2. p a. Then p b: but b = a n+1. In either case, p a i for some i [1..n + 1]. There are no special hypotheses on n except that n 1, so indeed P (n) implies P (n + 1) for every n 1. By induction, we conclude that P (n) is true for every n 1. 9
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 informationProofs. 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 informationSenior 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 informationExercises 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 informationHomework #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 informationDirect Proof MAT231. Fall Transition to Higher Mathematics. MAT231 (Transition to Higher Math) Direct Proof Fall / 24
Direct Proof MAT231 Transition to Higher Mathematics Fall 2014 MAT231 (Transition to Higher Math) Direct Proof Fall 2014 1 / 24 Outline 1 Overview of Proof 2 Theorems 3 Definitions 4 Direct Proof 5 Using
More informationPRACTICE 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 informationCOMP239: Mathematics for Computer Science II. Prof. Chadi Assi EV7.635
COMP239: Mathematics for Computer Science II Prof. Chadi Assi assi@ciise.concordia.ca EV7.635 The Euclidean Algorithm The Euclidean Algorithm Finding the GCD of two numbers using prime factorization is
More information5: 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 informationDiscrete Math in Computer Science Solutions to Practice Problems for Midterm 2
Discrete Math in Computer Science Solutions to Practice Problems for Midterm 2 CS 30, Fall 2018 by Professor Prasad Jayanti Problems 1. Let g(0) = 2, g(1) = 1, and g(n) = 2g(n 1) + g(n 2) whenever n 2.
More information2 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 informationNumber 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 informationMATH 55 - HOMEWORK 6 SOLUTIONS. 1. Section = 1 = (n + 1) 3 = 2. + (n + 1) 3. + (n + 1) 3 = n2 (n + 1) 2.
MATH 55 - HOMEWORK 6 SOLUTIONS Exercise Section 5 Proof (a) P () is the statement ( ) 3 (b) P () is true since ( ) 3 (c) The inductive hypothesis is P (n): ( ) n(n + ) 3 + 3 + + n 3 (d) Assuming the inductive
More informationStudent 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 informationFall 2015 Lecture 14: Modular congruences. cse 311: foundations of computing
Fall 2015 Lecture 14: Modular congruences cse 311: foundations of computing If a and b are positive integers, then gcd a, b = gcd (b, a mod b) Useful GCD Fact Proof: By definition a = a div b b + (a mod
More informationIntroduction to Number Theory
Introduction to Number Theory Number theory is about integers and their properties. We will start with the basic principles of divisibility, greatest common divisors, least common multiples, and modular
More informationChapter 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 informationINTEGERS. 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 informationNumber Theory Proof Portfolio
Number Theory Proof Portfolio Jordan Rock May 12, 2015 This portfolio is a collection of Number Theory proofs and problems done by Jordan Rock in the Spring of 2014. The problems are organized first by
More informationIntermediate Math Circles February 29, 2012 Linear Diophantine Equations I
Intermediate Math Circles February 29, 2012 Linear Diophantine Equations I Diophantine equations are equations intended to be solved in the integers. We re going to focus on Linear Diophantine Equations.
More informationMat 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 informationNumber 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 informationALGEBRA. 1. Some elementary number theory 1.1. Primes and divisibility. We denote the collection of integers
ALGEBRA CHRISTIAN REMLING 1. Some elementary number theory 1.1. Primes and divisibility. We denote the collection of integers by Z = {..., 2, 1, 0, 1,...}. Given a, b Z, we write a b if b = ac for some
More informationProof 1: Using only ch. 6 results. Since gcd(a, b) = 1, we have
Exercise 13. Consider positive integers a, b, and c. (a) Suppose gcd(a, b) = 1. (i) Show that if a divides the product bc, then a must divide c. I give two proofs here, to illustrate the different methods.
More informationMATH FINAL EXAM REVIEW HINTS
MATH 109 - FINAL EXAM REVIEW HINTS Answer: Answer: 1. Cardinality (1) Let a < b be two real numbers and define f : (0, 1) (a, b) by f(t) = (1 t)a + tb. (a) Prove that f is a bijection. (b) Prove that any
More informationArithmetic Algorithms, Part 1
Arithmetic Algorithms, Part 1 DPV Chapter 1 Jim Royer EECS January 18, 2019 Royer Arithmetic Algorithms, Part 1 1/ 15 Multiplication à la Français function multiply(a, b) // input: two n-bit integers a
More information1 Overview and revision
MTH6128 Number Theory Notes 1 Spring 2018 1 Overview and revision In this section we will meet some of the concerns of Number Theory, and have a brief revision of some of the relevant material from Introduction
More informationNOTES ON INTEGERS. 1. Integers
NOTES ON INTEGERS STEVEN DALE CUTKOSKY The integers 1. Integers Z = {, 3, 2, 1, 0, 1, 2, 3, } have addition and multiplication which satisfy familar rules. They are ordered (m < n if m is less than n).
More information12x + 18y = 50. 2x + v = 12. (x, v) = (6 + k, 2k), k Z.
Math 3, Fall 010 Assignment 3 Solutions Exercise 1. Find all the integral solutions of the following linear diophantine equations. Be sure to justify your answers. (i) 3x + y = 7. (ii) 1x + 18y = 50. (iii)
More informationDiscrete 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 informationChapter 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 informationWriting Assignment 2 Student Sample Questions
Writing Assignment 2 Student Sample Questions 1. Let P and Q be statements. Then the statement (P = Q) ( P Q) is a tautology. 2. The statement If the sun rises from the west, then I ll get out of the bed.
More information4 Powers of an Element; Cyclic Groups
4 Powers of an Element; Cyclic Groups Notation When considering an abstract group (G, ), we will often simplify notation as follows x y will be expressed as xy (x y) z will be expressed as xyz x (y z)
More informationMath 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 informationcse 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 informationElementary Properties of the Integers
Elementary Properties of the Integers 1 1. Basis Representation Theorem (Thm 1-3) 2. Euclid s Division Lemma (Thm 2-1) 3. Greatest Common Divisor 4. Properties of Prime Numbers 5. Fundamental Theorem of
More informationChapter 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 information2 Arithmetic. 2.1 Greatest common divisors. This chapter is about properties of the integers Z = {..., 2, 1, 0, 1, 2,...}.
2 Arithmetic This chapter is about properties of the integers Z = {..., 2, 1, 0, 1, 2,...}. (See [Houston, Chapters 27 & 28]) 2.1 Greatest common divisors Definition 2.16. If a, b are integers, we say
More informationCISC-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 informationChapter 2. Divisibility. 2.1 Common Divisors
Chapter 2 Divisibility 2.1 Common Divisors Definition 2.1.1. Let a and b be integers. A common divisor of a and b is any integer that divides both a and b. Suppose that a and b are not both zero. By Proposition
More informationNumber Theory Marathon. Mario Ynocente Castro, National University of Engineering, Peru
Number Theory Marathon Mario Ynocente Castro, National University of Engineering, Peru 1 2 Chapter 1 Problems 1. (IMO 1975) Let f(n) denote the sum of the digits of n. Find f(f(f(4444 4444 ))). 2. Prove
More informationIntermediate Math Circles February 26, 2014 Diophantine Equations I
Intermediate Math Circles February 26, 2014 Diophantine Equations I 1. An introduction to Diophantine equations A Diophantine equation is a polynomial equation that is intended to be solved over the integers.
More informationPUTNAM 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#26: Number Theory, Part I: Divisibility
#26: Number Theory, Part I: Divisibility and Primality April 25, 2009 This week, we will spend some time studying the basics of number theory, which is essentially the study of the natural numbers (0,
More informationMATH 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 informationThe 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 informationThe following is an informal description of Euclid s algorithm for finding the greatest common divisor of a pair of numbers:
Divisibility Euclid s algorithm The following is an informal description of Euclid s algorithm for finding the greatest common divisor of a pair of numbers: Divide the smaller number into the larger, and
More information18 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 informationNOTES 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 informationThe Euclidean Algorithm and Multiplicative Inverses
1 The Euclidean Algorithm and Multiplicative Inverses Lecture notes for Access 2009 The Euclidean Algorithm is a set of instructions for finding the greatest common divisor of any two positive integers.
More information1. multiplication is commutative and associative;
Chapter 4 The Arithmetic of Z In this chapter, we start by introducing the concept of congruences; these are used in our proof (going back to Gauss 1 ) that every integer has a unique prime factorization.
More informationUniversity 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(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 informationMATH 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 information3. pour from one decanter to the other until either the receiving decanter is full or the poured decanter is empty.
The Euclidean Algorithm The Decanting Problem is a liquid measuring problem that begins with two unmarked decanters with capacities a and b. Usually a and b are integers. The problem is to determine the
More informationNumber Theory and Group Theoryfor Public-Key Cryptography
Number Theory and Group Theory for Public-Key Cryptography TDA352, DIT250 Wissam Aoudi Chalmers University of Technology November 21, 2017 Wissam Aoudi Number Theory and Group Theoryfor Public-Key Cryptography
More informationOlympiad Number Theory Through Challenging Problems
Olympiad Number Theory Justin Stevens Page 1 Olympiad Number Theory Through Challenging Problems Authors Justin Stevens Editor and L A TEX Manager David Altizio Dedicated to my sister. Justin Contents
More informationa 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 informationIntegers and Division
Integers and Division Notations Z: set of integers N : set of natural numbers R: set of real numbers Z + : set of positive integers Some elements of number theory are needed in: Data structures, Random
More informationCSE 311 Lecture 13: Primes and GCD. Emina Torlak and Kevin Zatloukal
CSE 311 Lecture 13: Primes and GCD Emina Torlak and Kevin Zatloukal 1 Topics Modular arithmetic applications A quick wrap-up of Lecture 12. Primes Fundamental theorem of arithmetic, Euclid s theorem, factoring.
More informationAlgorithms (II) Yu Yu. Shanghai Jiaotong University
Algorithms (II) Yu Yu Shanghai Jiaotong University Chapter 1. Algorithms with Numbers Two seemingly similar problems Factoring: Given a number N, express it as a product of its prime factors. Primality:
More informationNumber 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 informationUNIVERSITY 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 informationBasic elements of number theory
Cryptography Basic elements of number theory Marius Zimand By default all the variables, such as a, b, k, etc., denote integer numbers. Divisibility a 0 divides b if b = a k for some integer k. Notation
More informationBasic elements of number theory
Cryptography Basic elements of number theory Marius Zimand 1 Divisibility, prime numbers By default all the variables, such as a, b, k, etc., denote integer numbers. Divisibility a 0 divides b if b = a
More information3. pour from one decanter to the other until either the receiving decanter is full or the poured decanter is empty.
Using the Euclidean Algorithm The Decanting Problem is a liquid measuring problem that begins with two unmarked decanters with capacities a and b. Usually a and b are integers. The problem is to determine
More informationFinal 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 information8 Primes and Modular Arithmetic
8 Primes and Modular Arithmetic 8.1 Primes and Factors Over two millennia ago already, people all over the world were considering the properties of numbers. One of the simplest concepts is prime numbers.
More informationNumber Theory Marathon. Mario Ynocente Castro, National University of Engineering, Peru
Number Theory Marathon Mario Ynocente Castro, National University of Engineering, Peru 1 2 Chapter 1 Problems 1. (IMO 1975) Let f(n) denote the sum of the digits of n. Find f(f(f(4444 4444 ))). 2. Prove
More information1. Factorization Divisibility in Z.
8 J. E. CREMONA 1.1. Divisibility in Z. 1. Factorization Definition 1.1.1. Let a, b Z. Then we say that a divides b and write a b if b = ac for some c Z: a b c Z : b = ac. Alternatively, we may say that
More informationDirect Proof Divisibility
Direct Proof Divisibility Lecture 15 Section 4.3 Robb T. Koether Hampden-Sydney College Fri, Feb 8, 2013 Robb T. Koether (Hampden-Sydney College) Direct Proof Divisibility Fri, Feb 8, 2013 1 / 20 1 Divisibility
More information11 Division Mod n, Linear Integer Equations, Random Numbers, The Fundamental Theorem of Arithmetic
11 Division Mod n, Linear Integer Equations, Random Numbers, The Fundamental Theorem of Arithmetic Bezout s Lemma Let's look at the values of 4x + 6y when x and y are integers. If x is -6 and y is 4 we
More informationHomework 3, solutions
Homework 3, solutions Problem 1. Read the proof of Proposition 1.22 (page 32) in the book. Using simialr method prove that there are infinitely many prime numbers of the form 3n 2. Solution. Note that
More informationMATHEMATICAL INDUCTION
MATHEMATICAL INDUCTION MATH 3A SECTION HANDOUT BY GERARDO CON DIAZ Imagine a bunch of dominoes on a table. They are set up in a straight line, and you are about to push the first piece to set off the chain
More informationDirect Proof Divisibility
Direct Proof Divisibility Lecture 15 Section 4.3 Robb T. Koether Hampden-Sydney College Fri, Feb 7, 2014 Robb T. Koether (Hampden-Sydney College) Direct Proof Divisibility Fri, Feb 7, 2014 1 / 23 1 Divisibility
More informationApplied 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 informationWORKSHEET ON NUMBERS, MATH 215 FALL. We start our study of numbers with the integers: N = {1, 2, 3,...}
WORKSHEET ON NUMBERS, MATH 215 FALL 18(WHYTE) We start our study of numbers with the integers: Z = {..., 2, 1, 0, 1, 2, 3,... } and their subset of natural numbers: N = {1, 2, 3,...} For now we will not
More informationNotes for Recitation 6
6.042/18.062J Mathematics for Computer Science February 18, 2005 Srini Devadas and Eric Lehman Notes for Recitation 6 1 The Pulverizer We saw in lecture that the greatest common divisor (GCD) of two numbers
More informationCSE 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 information2. THE EUCLIDEAN ALGORITHM More ring essentials
2. THE EUCLIDEAN ALGORITHM More ring essentials In this chapter: rings R commutative with 1. An element b R divides a R, or b is a divisor of a, or a is divisible by b, or a is a multiple of b, if there
More informationCool Results on Primes
Cool Results on Primes LA Math Circle (Advanced) January 24, 2016 Recall that last week we learned an algorithm that seemed to magically spit out greatest common divisors, but we weren t quite sure why
More informationC-N Math 207 Discrete Math
C-N Math 207 - Massey, 1 / 70 C-N Math 207 Discrete Math Kenneth Massey September 16, 2011 Question C-N Math 207 - Massey, 2 / 70 Introduction What is the smallest positive number? Sets C-N Math 207 -
More informationC-N Math 207 Discrete Math
C-N Math 207 Discrete Math Kenneth Massey September 16, 2011 C-N Math 207 - Massey, 1 / 70 Question Introduction What is the smallest positive number? C-N Math 207 - Massey, 2 / 70 Sets Introduction a
More informationWORKSHEET MATH 215, FALL 15, WHYTE. We begin our course with the natural numbers:
WORKSHEET MATH 215, FALL 15, WHYTE We begin our course with the natural numbers: N = {1, 2, 3,...} which are a subset of the integers: Z = {..., 2, 1, 0, 1, 2, 3,... } We will assume familiarity with their
More informationWednesday, February 21. Today we will begin Course Notes Chapter 5 (Number Theory).
Wednesday, February 21 Today we will begin Course Notes Chapter 5 (Number Theory). 1 Return to Chapter 5 In discussing Methods of Proof (Chapter 3, Section 2) we introduced the divisibility relation from
More information1. 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 information2x 1 7. A linear congruence in modular arithmetic is an equation of the form. Why is the solution a set of integers rather than a unique integer?
Chapter 3: Theory of Modular Arithmetic 25 SECTION C Solving Linear Congruences By the end of this section you will be able to solve congruence equations determine the number of solutions find the multiplicative
More information3. pour from one decanter to the other until either the receiving decanter is full or the poured decanter is empty.
The Euclidean Algorithm The Decanting Problem is a liquid measuring problem that begins with two unmarked decanters with capacities a and b 1 Usually a and b are integers The problem is to determine the
More informationD-MATH Algebra I HS18 Prof. Rahul Pandharipande. Solution 1. Arithmetic, Zorn s Lemma.
D-MATH Algebra I HS18 Prof. Rahul Pandharipande Solution 1 Arithmetic, Zorn s Lemma. 1. (a) Using the Euclidean division, determine gcd(160, 399). (b) Find m 0, n 0 Z such that gcd(160, 399) = 160m 0 +
More information0 Sets and Induction. Sets
0 Sets and Induction Sets A set is an unordered collection of objects, called elements or members of the set. A set is said to contain its elements. We write a A to denote that a is an element of the set
More informationLecture 2. The Euclidean Algorithm and Numbers in Other Bases
Lecture 2. The Euclidean Algorithm and Numbers in Other Bases At the end of Lecture 1, we gave formulas for the greatest common divisor GCD (a, b), and the least common multiple LCM (a, b) of two integers
More informationIntroduction to Sets and Logic (MATH 1190)
Introduction to Sets and Logic () Instructor: Email: shenlili@yorku.ca Department of Mathematics and Statistics York University Nov 13, 2014 Quiz announcement The second quiz will be held on Thursday,
More informationICS141: Discrete Mathematics for Computer Science I
ICS141: Discrete Mathematics for Computer Science I Dept. Information & Computer Sci., Jan Stelovsky based on slides by Dr. Baek and Dr. Still Originals by Dr. M. P. Frank and Dr. J.L. Gross Provided by
More informationInduction 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 informationSOLUTIONS Math 345 Homework 6 10/11/2017. Exercise 23. (a) Solve the following congruences: (i) x (mod 12) Answer. We have
Exercise 23. (a) Solve the following congruences: (i) x 101 7 (mod 12) Answer. We have φ(12) = #{1, 5, 7, 11}. Since gcd(7, 12) = 1, we must have gcd(x, 12) = 1. So 1 12 x φ(12) = x 4. Therefore 7 12 x
More informationThe Fundamental Theorem of Arithmetic
Chapter 1 The Fundamental Theorem of Arithmetic 1.1 Primes Definition 1.1. We say that p N is prime if it has just two factors in N, 1 and p itself. Number theory might be described as the study of the
More informationGreatest Common Divisor MATH Greatest Common Divisor. Benjamin V.C. Collins, James A. Swenson MATH 2730
MATH 2730 Greatest Common Divisor Benjamin V.C. Collins James A. Swenson The world s least necessary definition Definition Let a, b Z, not both zero. The largest integer d such that d a and d b is called
More informationMath.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 informationMTH 310, Section 001 Abstract Algebra I and Number Theory. Sample Midterm 1
MTH 310, Section 001 Abstract Algebra I and Number Theory Sample Midterm 1 Instructions: You have 50 minutes to complete the exam. There are five problems, worth a total of fifty points. You may not use
More informationMath 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