MAT 243 Test 2 SOLUTIONS, FORM A
|
|
- Adam Poole
- 5 years ago
- Views:
Transcription
1 MAT 24 Test 2 SOLUTIONS, FORM A 1. [1 points] Prove the following using Mathematical Induction. L 2 i = L n L n where L is the Lucas sequence: L 0 = 2 L 1 = 1 L n = L n 1 + L n 2, n 2 Solution: Let P (n) denote the predicate L 2 i = L n L n (not just the right-hand side). First, P (0) is true, because the left-hand side is L 0 2 = 2 2 = 4 and the right-hand side is L 0 L = = 4. Now, assume that P (k) is true, that is The goal is to prove P (k + 1), which is This is true, because k+1 L 2 i = k L 2 i = L k L k k+1 L 2 i = L k+1 L k k L 2 i + L 2 k+1 = (L k L k+1 + 2) + L 2 k+1 = L k+1 (L k + L k+1 ) + 2 = L k+1 L k Hence, by the Principle of Mathematical Induction, L 2 i = L n L n is true for all n. Grading: + points for the base case, + points for setting up the inductive case, + points for proving the inductive case. 2. [10 points] Find a simple function g(x) such that the following function is O(g(x)). x ( 12 2 {{ x + 2 {{ 4 ) 2 x 4 x (8 x x + {{ 2 ) x 2 {{ x max( x, 2 x ) = x max(2 x, 4 x ) = 4 x 4 x x = 12 x + ( (ln x) 2 ) ( 9 2 x + x ) 1 (ln x) 2 2 x x {{ max(1, (ln x) 2 ) = (ln x) 2 max(2 x, x ) = 2 x 2 x (ln x) 2 {{ max(12 x, 2 x (ln x) 2 ) = 12 x Solution: The big-o estimates for each piece of the formula above are given. The final answer is 12 x. Grading: Done on a 0///7/10 point basis. 2
2 MAT 24 Test 2 SOLUTIONS, FORM A. Evaluate the following. a. [ points] 6 mod 10 Solution: 6 divided by 10 gives a quotient of 6 and a remainder of. Thus 6 mod 10 =. b. [ points] 6 div 10 Solution: 6 divided by 10 gives a quotient of 6 and a remainder of. Thus 6 div 10 = 6. c. [ points] (67 div 9) mod (67 mod 9) Solution: 67 divided by 9 gives a quotient of 7 and a remainder of 4. Thus (67 div 9) mod (67 mod 9) = 7 mod 4 = because the remainder when you divide 7 by 4 is. 4. [10 points] Find real numbers C and k such that x + x 4 x + 8x 2 4x 7 C x whenever x k and show that they work. Solution: The easiest way to get an upper bound on x + x 4 x + 8x 2 4x 7 is to write x + x 4 x + 8x 2 4x 7 x + x 4 + x + 8x 2 + 4x + 7 Note the change in signs to + s! = x + x 4 + x + 8 x x + 7 x 0 Now, if x 1, then x x n for all n <. In other words, you can replace all the x n terms with x : = x + x + x + 8 x + 4 x + 7 x = 28 x Thus, you can let C = 28 and k = 1. (The proof that they work is the scratch work above.) Other answers were possible. In that case, the scratch work was analyzed to make sure that the choice of C and k really did work. Grading: On a 0///7/10 point basis. Grading for common mistakes: 2 points for breaking up Y Z into Y Z.
3 MAT 24 Test 2 SOLUTIONS, FORM A. [10 points] Find a big-o estimate for the running time of the following pseudocode. s 0 t 1 i 1 do for j from n + n 2 to n + n s s t t s t end for i 2i until i 4n Solution: Start on the inside of the loops and work your way outwards. Inside of the for loop, there are two assignment statements (for s and t). Each of these takes time O(1), so the running time for one iteration of the for loop is O(max(1, 1)) = O(1). The number of iterations of the for loop is O(( n + n ) ( n + n 2 )) = O(n n 2 ) = O(n ). Hence, the running time for the for loop is O(1 n ) = O(n ). Now for the do loop; one iteration consists of the for loop (running time: O(n )) followed by an assignment statement (running time: O(1)). Hence the running time of one iteration of the do loop is O(max(n, 1)) = O(n ). Now you need to find the number of iterations of the do loop. Let k be the number of times the do loop is executed. The value of i after k iterations can be calculated by considering some small values and looking for a pattern: k i, after k loops So it appears that i = 2 k after k loops. The equation which tells us how many iterations will occur is i = 4n, which becomes i = 4n (2 k ) = 4n 8 k = 4n k ln 8 = ln(8 k ) = ln(4n) = ln 4 + ln n k = ln 4 ln ln n = O(ln n) ln 8 Thus, the running time for the do loop is O(ln n n ) = O(n ln n). Finally, there are three assignment statements before the loop, which all take time O(1). The overall running time is thus O(max(1, 1, 1, n ln n)) = O(n ln n). Grading: Done on a 0///7/10 point basis. 6. [10 points] Use the Euclidean Algorithm to find gcd(1892, 090). Solution: 1892 = = = The gcd is the last nonzero remainder, so gcd(1892, 090) = 206. Grading for common mistakes: 7 points for no work, points for not using the Euclidean Algorithm. 4
4 7. [10 points] Convert 201 to base 9. MAT 24 Test 2 SOLUTIONS, FORM A Solution: Repeatedly divide quotients by 9: 201 = = = = Reading from bottom to top yields (2678) 9. Grading for common mistakes: 7 points for no work; 2 points for reading off the remainders backwards; 7 points for converting from base 9 to base Let S be the set defined as follows: (i) S. (ii) If x S, then x 2 S and x S. (iii) The only elements of S are those which can be obtained from condition (i) by applying condition (ii) a finite number of times. a. [10 points] Find S 0, S 1, and S 2. Solution: S n is the set of all elements of S which are obtained from the base case(s) by applying { the recursive part(s) exactly n times. Hence S 0 = is the set of base cases. Then { S 1 = 2, = S 2 = { 7 { 7, 9 7 2,, 9 2, 9 = { 17, 21, 1, 27 Grading: +2 points for S 0, +4 points for S 1, and +4 points for S 2. Grading for common mistakes: 2 points for including the base case(s) in S 1, including S 1 in S 2. b. [10 points] Use Structural Induction to prove that for all x S, x is a fraction whose numerator is odd and whose denominator is (when reduced to lowest terms). Solution: There are two parts to a structural induction proof: showing that the property is true for the base case(s), and showing that the property is preserved when the recursive rule(s) are applied. First the base case: is clearly an odd number divided by. Now, suppose x S, and that x is an odd number divided by ; i.e. x = n, where n is odd. Then: x 2 = n 2 = n 10 is an odd number divided by ; the numerator is odd, because it is the sum of an odd number and an even number. x = n = n is an odd number divided by ; the numerator is odd, because it is the product of two odd numbers. Hence, by Structural Induction, every element of S is an odd number divided by. Grading for common mistakes: points for only considering x = in the recursive part.
5 MAT 24 Test 2 SOLUTIONS, FORM B 1. [1 points] Prove the following using Mathematical Induction. F 2 i = F n F n+1 where F is the Fibonacci sequence: F 0 = 0 F 1 = 1 F n = F n 1 + F n 2, n 2 Solution: Let P (n) denote the predicate F 2 i = F n F n+1 (not just the right-hand side). First, P (0) is true, because the left-hand side is F 2 0 = 0 2 = 0 and the right-hand side is F 0 F 1 = 0 1 = 0. Now, assume that P (k) is true, that is The goal is to prove P (k + 1), which is This is true, because k+1 F 2 i = k F 2 i = F k F k+1. k+1 F 2 i = F k+1 F k+2. k F 2 i + F 2 k+1 = F k F k+1 + F 2 k+1 = F k+1 (F k + F k+1 ) = F k+1 F k+2. Hence, by the Principle of Mathematical Induction, F 2 i = F n F n+1 is true for all n. Grading: + points for the base case, + points for setting up the inductive case, + points for proving the inductive case. 2. [10 points] Find a simple function g(x) such that the following function is O(g(x)). 10 ( 9 2 x + x ) x + ( (ln x) 2 4 {{ x! ) ( 8x ) 1 1 x x {{ x 1 (ln x) 2 x! 1 x max(1, x, x ) = x max(1, (ln x) 2 max(1, x) = x, x!) = x! 1 x x = 9 x x! x max(9 x, x! x) = x! x Solution: The big-o estimates for each piece of the formula above are given. The final answer is x! x. Grading: Done on a 0///7/10 point basis. 2
6 MAT 24 Test 2 SOLUTIONS, FORM B. Evaluate the following. a. [ points] 49 mod 6 Solution: 49 divided by 6 gives a quotient of 8 and a remainder of 1. Thus 49 mod 6 = 1. b. [ points] 49 div 6 Solution: 49 divided by 6 gives a quotient of 8 and a remainder of 1. Thus 49 mod 6 = 8. c. [ points] (1 div 8) mod (1 mod 8) Solution: 1 divided by 8 gives a quotient of 6 and a remainder of. Thus (1 div 8) mod (1 mod 8) = 6 mod = 0 because the remainder when you divide 6 by is zero. 4. [10 points] Find real numbers C and k such that x 6 4x 4 4x 2 8x + 7 C x 6 whenever x k and show that they work. Solution: The easiest way to get an upper bound on x 6 4x 4 4x 2 8x + 7 is to write x 6 4x 4 4x 2 8x + 7 x 6 + 4x 4 + 4x 2 + 8x + 7x 0 Note the change in signs to + s! = x x x x + 7 x 0 Now, if x 1, then x 6 x n for all n < 6. In other words, you can replace all the x n terms with x 6 : = x x x x x 6 = 24 x 6 Thus, you can let C = 24 and k = 1. (The proof that they work is the scratch work above.) Other answers were possible. In that case, the scratch work was analyzed to make sure that the choice of C and k really did work. Grading: On a 0///7/10 point basis. Grading for common mistakes: 2 points for breaking up Y Z into Y Z.
7 MAT 24 Test 2 SOLUTIONS, FORM B. [10 points] Find a big-o estimate for the running time of the following pseudocode. s 0 t 0 for i from 2 n + n to n + 2 n j 0 while j 2 < n s 2s 4t s s + t j j + 4 end while if i 2 9s then s 2s n 2 end if end for Solution: Start on the inside of the loops and work your way outwards. When the if statement is executed, a condition is checked (which takes time O(1)), and if that statement is true, then an assignment statement is made (which takes time O(1)); thus, the overall running time of the if statement is O(max(1, 1)) = O(1). Now for the while loop. Every iteration of the while loop consists of three assignment statements, each of which takes time O(1), so each iteration takes time O(max(1, 1, 1)) = O(1). Now you need to calculate the number of iterations of the while loop. To do this, you need to consider the value of j after k iterations. Constructing a small table (shown below), it appears that j = 4k after k iterations. The equation which tells you how many iterations will actually occur is j 2 = n, which becomes k j, after k iterations (4k) 2 = n 16k 2 = n k 2 = n 16 n k = 16 = 1 4 n/2 = O(n /2 ). Thus, the running time of the while loop is O(n /2 1) = O(n /2 ). Now for the for loop; one iteration of the for loop involves an assignment, the while loop, and the if statement. The total running time of one iteration is then O(max(1, n /2, 1)) = O(n /2 ). The number of iterations of the for loop is O(( n + 2 n ) (2 n + n)) = O( n n) = O( n ), and the total running time of the for loop is O(n /2 n ). Finally, two assignment statements are executed, in addition to the for loop. The overall running time is O(max(1, 1, n /2 n )) = O(n /2 n ). Grading: Done on a 0///7/10 point basis. 6. [10 points] Use the Euclidean Algorithm to find gcd(4189, 6860). Solution: 4189 = = = The gcd is the last nonzero remainder, so gcd(4189, 6860) = 24. Grading for common mistakes: 7 points for no work, points for not using the Euclidean Algorithm. 4
8 7. [10 points] Convert 201 to base 6. MAT 24 Test 2 SOLUTIONS, FORM B Solution: Repeatedly divide quotients by 6: 201 = 6 + = 6 + = = = Reading from bottom to top yields (11) 6. Grading for common mistakes: 7 points for no work; 2 points for reading off the remainders backwards; 7 points for converting from base 6 to base Let S be the set defined as follows: (i) 1 S. (ii) If x S, then x + 2 S and 7x S. (iii) The only elements of S are those which can be obtained from condition (i) by applying condition (ii) a finite number of times. a. [10 points] Find S 0, S 1, and S 2. Solution: S n is the set of all elements of S which are obtained from the base case(s) by applying { 1 the recursive part(s) exactly n times. Hence S 0 = is the set of base cases. Then { 1 S 1 = + 2, 1 { 7 7 = { 7 S 2 = + 2, 7 { 1 7 =, 49 Grading: +2 points for S 0, +4 points for S 1, and +4 points for S 2. Grading for common mistakes: 2 points for including the base case(s) in S 1, including S 1 in S 2. b. [10 points] Use Structural Induction to prove that for all x S, x is a fraction whose numerator is odd and whose denominator is (when reduced to lowest terms). Solution: There are two parts to a structural induction proof: showing that the property is true for the base case(s), and showing that the property is preserved when the recursive rule(s) are applied. 1 First the base case: is clearly an odd number divided by. Now, suppose x S, and that x is an odd number divided by ; i.e. x = n, where n is odd. Then: x + 2 = n + 2 = n + 6 is an odd number divided by ; the numerator is odd, because it is the sum of an odd number and an even number. 7x = 7 n = 7n is an odd number divided by ; the numerator is odd, because it is the product of two odd numbers. Hence, by Structural Induction, every element of S is an odd number divided by. Grading for common mistakes: points for only considering x = 1 in the recursive part.
MAT 243 Test 2 SOLUTIONS, FORM A
MAT Test SOLUTIONS, FORM A 1. [10 points] Give a recursive definition for the set of all ordered pairs of integers (x, y) such that x < y. Solution: Let S be the set described above. Note that if (x, y)
More informationFall 2017 Test II review problems
Fall 2017 Test II review problems Dr. Holmes October 18, 2017 This is a quite miscellaneous grab bag of relevant problems from old tests. Some are certainly repeated. 1. Give the complete addition and
More informationMath 109 HW 9 Solutions
Math 109 HW 9 Solutions Problems IV 18. Solve the linear diophantine equation 6m + 10n + 15p = 1 Solution: Let y = 10n + 15p. Since (10, 15) is 5, we must have that y = 5x for some integer x, and (as we
More informationTopic Contents. Factoring Methods. Unit 3: Factoring Methods. Finding the square root of a number
Topic Contents Factoring Methods Unit 3 The smallest divisor of an integer The GCD of two numbers Generating prime numbers Computing prime factors of an integer Generating pseudo random numbers Raising
More informationName CMSC203 Fall2008 Exam 2 Solution Key Show All Work!!! Page (16 points) Circle T if the corresponding statement is True or F if it is False.
Name CMSC203 Fall2008 Exam 2 Solution Key Show All Work!!! Page ( points) Circle T if the corresponding statement is True or F if it is False T F GCD(,0) = 0 T F For every recursive algorithm, there is
More informationHomework #2 Solutions Due: September 5, for all n N n 3 = n2 (n + 1) 2 4
Do the following exercises from the text: Chapter (Section 3):, 1, 17(a)-(b), 3 Prove that 1 3 + 3 + + n 3 n (n + 1) for all n N Proof The proof is by induction on n For n N, let S(n) be the statement
More informationInduction. Induction. Induction. Induction. Induction. Induction 2/22/2018
The principle of mathematical induction is a useful tool for proving that a certain predicate is true for all natural numbers. It cannot be used to discover theorems, but only to prove them. If we have
More informationthen the hard copy will not be correct whenever your instructor modifies the assignments.
Assignments for Math 2030 then the hard copy will not be correct whenever your instructor modifies the assignments. exams, but working through the problems is a good way to prepare for the exams. It is
More informationInput Decidable Language -- Program Halts on all Input Encoding of Input -- Natural Numbers Encoded in Binary or Decimal, Not Unary
Complexity Analysis Complexity Theory Input Decidable Language -- Program Halts on all Input Encoding of Input -- Natural Numbers Encoded in Binary or Decimal, Not Unary Output TRUE or FALSE Time and Space
More informationRemainders. We learned how to multiply and divide in elementary
Remainders We learned how to multiply and divide in elementary school. As adults we perform division mostly by pressing the key on a calculator. This key supplies the quotient. In numerical analysis and
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 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 informationExercise on Continued Fractions
Exercise on Continued Fractions Jason Eisner, Spring 1993 This was one of several optional small computational projects assigned to undergraduate mathematics students at Cambridge University in 1993. I
More informationFibonacci mod k. In this section, we examine the question of which terms of the Fibonacci sequence have a given divisor k.
Fibonacci mod k I start by giving out a table of the first 0 Fibonacci numbers actually the first, because we begin with u 0 =0 (and I have a reason for that which will soon become apparent). Okay, which
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 informationNOTE: You have 2 hours, please plan your time. Problems are not ordered by difficulty.
EXAM 2 solutions (COT3100, Sitharam, Spring 2017) NAME:last first: UF-ID Section NOTE: You have 2 hours, please plan your time. Problems are not ordered by difficulty. (1) Are the following functions one-to-one
More informationThe running time of Euclid s algorithm
The running time of Euclid s algorithm We analyze the worst-case running time of EUCLID as a function of the size of and Assume w.l.g. that 0 The overall running time of EUCLID is proportional to the number
More informationMathematical Induction
Mathematical Induction MAT231 Transition to Higher Mathematics Fall 2014 MAT231 (Transition to Higher Math) Mathematical Induction Fall 2014 1 / 21 Outline 1 Mathematical Induction 2 Strong Mathematical
More informationMATH 25 CLASS 12 NOTES, OCT Contents 1. Simultaneous linear congruences 1 2. Simultaneous linear congruences 2
MATH 25 CLASS 12 NOTES, OCT 17 2011 Contents 1. Simultaneous linear congruences 1 2. Simultaneous linear congruences 2 1. Simultaneous linear congruences There is a story (probably apocryphal) about how
More informationMath 230 Final Exam, Spring 2008
c IIT Dept. Applied Mathematics, May 15, 2008 1 PRINT Last name: Signature: First name: Student ID: Math 230 Final Exam, Spring 2008 Conditions. 2 hours. No book, notes, calculator, cell phones, etc. Part
More information201-1A5-MT - Mathematics Summer 2015 HOMEWORK 2 Deadline : Sunday, August 30, 2015 at 12 :30.
01-1A5-MT - Mathematics Summer 015 HOMEWORK Deadline : Sunday, August 30, 015 at 1 :30. Instructions : The assignment consists of five questions, each worth 0 points. Only hardcopy submissions of your
More information1. (16 points) Circle T if the corresponding statement is True or F if it is False.
Name Solution Key Show All Work!!! Page 1 1. (16 points) Circle T if the corresponding statement is True or F if it is False. T F The sequence {1, 1, 1, 1, 1, 1...} is an example of an Alternating sequence.
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 informationChinese Remainder Theorem
Chinese Remainder Theorem Theorem Let R be a Euclidean domain with m 1, m 2,..., m k R. If gcd(m i, m j ) = 1 for 1 i < j k then m = m 1 m 2 m k = lcm(m 1, m 2,..., m k ) and R/m = R/m 1 R/m 2 R/m k ;
More informationThere are seven questions, of varying point-value. Each question is worth the indicated number of points.
Final Exam MAT 200 Solution Guide There are seven questions, of varying point-value. Each question is worth the indicated number of points. 1. (15 points) If X is uncountable and A X is countable, prove
More informationMathematical Induction
Mathematical Induction MAT30 Discrete Mathematics Fall 018 MAT30 (Discrete Math) Mathematical Induction Fall 018 1 / 19 Outline 1 Mathematical Induction Strong Mathematical Induction MAT30 (Discrete Math)
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 information2WF15 - Discrete Mathematics 2 - Part 1. Algorithmic Number Theory
1 2WF15 - Discrete Mathematics 2 - Part 1 Algorithmic Number Theory Benne de Weger version 0.54, March 6, 2012 version 0.54, March 6, 2012 2WF15 - Discrete Mathematics 2 - Part 1 2 2WF15 - Discrete Mathematics
More informationAlgorithms 2/6/2018. Algorithms. Enough Mathematical Appetizers! Algorithm Examples. Algorithms. Algorithm Examples. Algorithm Examples
Enough Mathematical Appetizers! Algorithms What is an algorithm? Let us look at something more interesting: Algorithms An algorithm is a finite set of precise instructions for performing a computation
More informationThe most factored form is usually accomplished by common factoring the expression. But, any type of factoring may come into play.
MOST FACTORED FORM The most factored form is the most factored version of a rational expression. Being able to find the most factored form is an essential skill when simplifying the derivatives found using
More informationDiscrete Mathematics CS October 17, 2006
Discrete Mathematics CS 2610 October 17, 2006 Uncountable sets Theorem: The set of real numbers is uncountable. If a subset of a set is uncountable, then the set is uncountable. The cardinality of a subset
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 informationDiscrete Mathematics: Logic. Discrete Mathematics: Lecture 14. Recursive algorithm
Discrete Mathematics: Logic Discrete Mathematics: Lecture 14. Recursive algorithm recursive algorithms a n = a a a a a a a = a a n-1 power (a, n) = a power (a, n-1) basis step: if n = 0, power(a, 0) =
More informationDefinition: A "system" of equations is a set or collection of equations that you deal with all together at once.
System of Equations Definition: A "system" of equations is a set or collection of equations that you deal with all together at once. There is both an x and y value that needs to be solved for Systems
More informationCh 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 information3 - Induction and Recursion
November 14, 2017 3 - Induction and Recursion William T. Trotter trotter@math.gatech.edu Using Recurrence Equations (1) Basic Problem How many regions are determined by n lines that intersect in general
More information3 Finite continued fractions
MTH628 Number Theory Notes 3 Spring 209 3 Finite continued fractions 3. Introduction Let us return to the calculation of gcd(225, 57) from the preceding chapter. 225 = 57 + 68 57 = 68 2 + 2 68 = 2 3 +
More informationNumber Theory. Zachary Friggstad. Programming Club Meeting
Number Theory Zachary Friggstad Programming Club Meeting Outline Factoring Sieve Multiplicative Functions Greatest Common Divisors Applications Chinese Remainder Theorem Throughout, problems to try are
More informationAlgebra for error control codes
Algebra for error control codes EE 387, Notes 5, Handout #7 EE 387 concentrates on block codes that are linear: Codewords components are linear combinations of message symbols. g 11 g 12 g 1n g 21 g 22
More informationCS 829 Polynomial systems: geometry and algorithms Lecture 3: Euclid, resultant and 2 2 systems Éric Schost
CS 829 Polynomial systems: geometry and algorithms Lecture 3: Euclid, resultant and 2 2 systems Éric Schost eschost@uwo.ca Summary In this lecture, we start actual computations (as opposed to Lectures
More informationDivisibility in the Fibonacci Numbers. Stefan Erickson Colorado College January 27, 2006
Divisibility in the Fibonacci Numbers Stefan Erickson Colorado College January 27, 2006 Fibonacci Numbers F n+2 = F n+1 + F n n 1 2 3 4 6 7 8 9 10 11 12 F n 1 1 2 3 8 13 21 34 89 144 n 13 14 1 16 17 18
More informationPartial Fractions. June 27, In this section, we will learn to integrate another class of functions: the rational functions.
Partial Fractions June 7, 04 In this section, we will learn to integrate another class of functions: the rational functions. Definition. A rational function is a fraction of two polynomials. For example,
More informationSolutions to Practice Final 3
s to Practice Final 1. The Fibonacci sequence is the sequence of numbers F (1), F (2),... defined by the following recurrence relations: F (1) = 1, F (2) = 1, F (n) = F (n 1) + F (n 2) for all n > 2. For
More informationCSCE 750, Spring 2001 Notes 1 Page 1 An outline of the book 1. Analyzing algorithms 2. Data abstraction 3. Recursion and induction 4. Sorting 5. Selec
CSCE 750, Spring 2001 Notes 1 Page 1 An outline of the book 1. Analyzing algorithms 2. Data abstraction 3. Recursion and induction 4. Sorting 5. Selection and adversary arguments 6. Dynamic sets and searching
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 informationMath 3012 Applied Combinatorics Lecture 4
August 27, 2015 Math 3012 Applied Combinatorics Lecture 4 William T. Trotter trotter@math.gatech.edu The Principle of Math Induction Postulate If S is a set of positive integers, 1 is in S, and k + 1 is
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 informationSolutions to Math 41 First Exam October 15, 2013
Solutions to Math 41 First Exam October 15, 2013 1. (16 points) Find each of the following its, with justification. If the it does not exist, explain why. If there is an infinite it, then explain whether
More informationNotes on Continued Fractions for Math 4400
. Continued fractions. Notes on Continued Fractions for Math 4400 The continued fraction expansion converts a positive real number α into a sequence of natural numbers. Conversely, a sequence of natural
More informationComputational Complexity - Pseudocode and Recursions
Computational Complexity - Pseudocode and Recursions Nicholas Mainardi 1 Dipartimento di Elettronica e Informazione Politecnico di Milano nicholas.mainardi@polimi.it June 6, 2018 1 Partly Based on Alessandro
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 informationMathematical Induction. Part Two
Mathematical Induction Part Two Announcements Problem Set due Friday, January 8 at the start of class. Problem Set checkpoints graded, will be returned at end of lecture. Afterwards, will be available
More informationDiscrete Mathematics and Probability Theory Summer 2014 James Cook Note 5
CS 70 Discrete Mathematics and Probability Theory Summer 2014 James Cook Note 5 Modular Arithmetic In several settings, such as error-correcting codes and cryptography, we sometimes wish to work over a
More informationSlides by Christopher M. Bourke Instructor: Berthe Y. Choueiry. Spring 2006
Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry Spring 2006 1 / 1 Computer Science & Engineering 235 Introduction to Discrete Mathematics Sections 2.4 2.6 of Rosen Introduction I When talking
More information2301 Assignment 1 Due Friday 19th March, 2 pm
Show all your work. Justify your solutions. Answers without justification will not receive full marks. Only hand in the problems on page 2. Practice Problems Question 1. Prove that if a b and a 3c then
More informationMathematical Induction. Part Two
Mathematical Induction Part Two The principle of mathematical induction states that if for some property P(n), we have that If it starts P(0) is true and and it keeps going For any n N, we have P(n) P(n
More informationNUMBER THEORY AND CODES. Álvaro Pelayo WUSTL
NUMBER THEORY AND CODES Álvaro Pelayo WUSTL Talk Goal To develop codes of the sort can tell the world how to put messages in code (public key cryptography) only you can decode them Structure of Talk Part
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 informationTypos/errors in Numerical Methods Using Matlab, 4th edition by Mathews and Fink
MAT487 Fall 2004 David Hiebeler University of Maine http://www.math.umaine.edu/faculty/hiebeler Typos/errors in Numerical Methods Using Matlab, 4th edition by Mathews and Fink Please let me know if you
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 informationCS 161 Summer 2009 Homework #2 Sample Solutions
CS 161 Summer 2009 Homework #2 Sample Solutions Regrade Policy: If you believe an error has been made in the grading of your homework, you may resubmit it for a regrade. If the error consists of more than
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 informationMath 261 Exercise sheet 5
Math 261 Exercise sheet 5 http://staff.aub.edu.lb/~nm116/teaching/2018/math261/index.html Version: October 24, 2018 Answers are due for Wednesday 24 October, 11AM. The use of calculators is allowed. Exercise
More information2.3 In modular arithmetic, all arithmetic operations are performed modulo some integer.
CHAPTER 2 INTRODUCTION TO NUMBER THEORY ANSWERS TO QUESTIONS 2.1 A nonzero b is a divisor of a if a = mb for some m, where a, b, and m are integers. That is, b is a divisor of a if there is no remainder
More informationCPSC 467: Cryptography and Computer Security
CPSC 467: Cryptography and Computer Security Michael J. Fischer Lecture 9 September 30, 2015 CPSC 467, Lecture 9 1/47 Fast Exponentiation Algorithms Number Theory Needed for RSA Elementary Number Theory
More informationFermat s Little Theorem. Fermat s little theorem is a statement about primes that nearly characterizes them.
Fermat s Little Theorem Fermat s little theorem is a statement about primes that nearly characterizes them. Theorem: Let p be prime and a be an integer that is not a multiple of p. Then a p 1 1 (mod p).
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 informationAlgorithms and Their Complexity
CSCE 222 Discrete Structures for Computing David Kebo Houngninou Algorithms and Their Complexity Chapter 3 Algorithm An algorithm is a finite sequence of steps that solves a problem. Computational complexity
More informationGrade 7/8 Math Circles. Continued Fractions
Faculty of Mathematics Waterloo, Ontario N2L 3G Centre for Education in Mathematics and Computing A Fraction of our History Grade 7/8 Math Circles October th /2 th Continued Fractions Love it or hate it,
More informationAlgorithms CMSC Basic algorithms in Number Theory: Euclid s algorithm and multiplicative inverse
Algorithms CMSC-27200 Basic algorithms in Number Theory: Euclid s algorithm and multiplicative inverse Instructor: László Babai Last updated 02-14-2015. Z denotes the set of integers. All variables in
More informationCS 4424 GCD, XGCD
CS 4424 GCD, XGCD eschost@uwo.ca GCD of polynomials First definition Let A and B be in k[x]. k[x] is the ring of polynomials with coefficients in k A Greatest Common Divisor of A and B is a polynomial
More informationPRIMALITY TESTING. Professor : Mr. Mohammad Amin Shokrollahi Assistant : Mahdi Cheraghchi. By TAHIRI JOUTI Kamal
PRIMALITY TESTING Professor : Mr. Mohammad Amin Shokrollahi Assistant : Mahdi Cheraghchi By TAHIRI JOUTI Kamal TABLE OF CONTENTS I- FUNDAMENTALS FROM NOMBER THEORY FOR RANDOMIZED ALGORITHMS:.page 4 1)
More information6.4 Division of Polynomials. (Long Division and Synthetic Division)
6.4 Division of Polynomials (Long Division and Synthetic Division) When we combine fractions that have a common denominator, we just add or subtract the numerators and then keep the common denominator
More informationCMPUT 403: Number Theory
CMPUT 403: Number Theory Zachary Friggstad February 26, 2016 Outline Factoring Sieve Multiplicative Functions Greatest Common Divisors Applications Chinese Remainder Theorem Factoring Theorem (Fundamental
More information5 + 9(10) + 3(100) + 0(1000) + 2(10000) =
Chapter 5 Analyzing Algorithms So far we have been proving statements about databases, mathematics and arithmetic, or sequences of numbers. Though these types of statements are common in computer science,
More informationNumber Theory and the abc Conjecture
Number Theory is the study of integers. Common topics include prime numbers, divisors and multiples, modular arithmetic, and Diophantine equations (equations in which we re looking for integer solutions).
More informationMAT 210 Test #1 Solutions, Form A
1. Where are the following functions continuous? a. ln(x 2 1) MAT 210 Test #1 Solutions, Form A Solution: The ln function is continuous when what you are taking the log of is positive. Hence, we need x
More informationProblem Set 5 Solutions
Problem Set 5 Solutions Section 4.. Use mathematical induction to prove each of the following: a) For each natural number n with n, n > + n. Let P n) be the statement n > + n. The base case, P ), is true
More informationChapter 3: Root Finding. September 26, 2005
Chapter 3: Root Finding September 26, 2005 Outline 1 Root Finding 2 3.1 The Bisection Method 3 3.2 Newton s Method: Derivation and Examples 4 3.3 How To Stop Newton s Method 5 3.4 Application: Division
More informationChapter 3 Basic Number Theory
Chapter 3 Basic Number Theory What is Number Theory? Well... What is Number Theory? Well... Number Theory The study of the natural numbers (Z + ), especially the relationship between different sorts of
More informationMATH 361: NUMBER THEORY FOURTH LECTURE
MATH 361: NUMBER THEORY FOURTH LECTURE 1. Introduction Everybody knows that three hours after 10:00, the time is 1:00. That is, everybody is familiar with modular arithmetic, the usual arithmetic of the
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 informationProof Techniques (Review of Math 271)
Chapter 2 Proof Techniques (Review of Math 271) 2.1 Overview This chapter reviews proof techniques that were probably introduced in Math 271 and that may also have been used in a different way in Phil
More information2.2 Inverses and GCDs
34 CHAPTER 2. CRYPTOGRAPHY AND NUMBER THEORY 2.2 Inverses and GCDs 2.2.1 Inverses mod p In the last section we explored the multiplication in Z n. We saw in the special case with n =12 and a = 4 that if
More informationMath 55 Second Midterm Exam, Prof. Srivastava April 5, 2016, 3:40pm 5:00pm, F295 Haas Auditorium.
Math 55 Second Midterm Exam, Prof Srivastava April 5, 2016, 3:40pm 5:00pm, F295 Haas Auditorium Name: SID: Instructions: Write all answers in the provided space Please write carefully and clearly, in complete
More informationSection 4.1: Sequences and Series
Section 4.1: Sequences and Series In this section, we shall introduce the idea of sequences and series as a necessary tool to develop the proof technique called mathematical induction. Most of the material
More informationThe Euclidean Algorithm
MATH 324 Summer 2006 Elementary Number Theory Notes on the Euclidean Algorithm Department of Mathematical and Statistical Sciences University of Alberta The Euclidean Algorithm Given two positive integers
More information. As x gets really large, the last terms drops off and f(x) ½x
Pre-AP Algebra 2 Unit 8 -Lesson 3 End behavior of rational functions Objectives: Students will be able to: Determine end behavior by dividing and seeing what terms drop out as x Know that there will be
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 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 informationO Notation (Big Oh) We want to give an upper bound on the amount of time it takes to solve a problem.
O Notation (Big Oh) We want to give an upper bound on the amount of time it takes to solve a problem. defn: v(n) = O(f(n)) constants c and n 0 such that v(n) c f(n) whenever n > n 0 Termed complexity:
More informationMath 110 FOUNDATIONS OF THE REAL NUMBER SYSTEM FOR ELEMENTARY AND MIDDLE SCHOOL TEACHERS
4-1Divisibility Divisibility Divisibility Rules Divisibility An integer is if it has a remainder of 0 when divided by 2; it is otherwise. We say that 3 divides 18, written, because the remainder is 0 when
More informationA p-adic Euclidean Algorithm
A p-adic Euclidean Algorithm Cortney Lager Winona State University October 0, 009 Introduction The rational numbers can be completed with respect to the standard absolute value and this produces the real
More informationCS 360, Winter Morphology of Proof: An introduction to rigorous proof techniques
CS 30, Winter 2011 Morphology of Proof: An introduction to rigorous proof techniques 1 Methodology of Proof An example Deep down, all theorems are of the form If A then B, though they may be expressed
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 informationInstructional Materials for the WCSD Math Common Finals
201-2014 Algebra 2 Semester 1 Instructional Materials for the WCSD Math Common Finals The Instructional Materials are for student and teacher use and are aligned to the Math Common Final blueprint for
More informationCSE 20 DISCRETE MATH. Fall
CSE 20 DISCRETE MATH There are 10 types of people in the world: those who understand binary and those who don't. Fall 2017 http://cseweb.ucsd.edu/classes/fa17/cse20-ab/ Today's learning goals Define the
More informationSolutions to MAT 117 Test #1
Solutions to MAT 117 Test #1 Because there are two versions of the test, solutions will only be given for Form A. Differences from the Form B version will be given. (The values for Form A appear above
More informationWith Question/Answer Animations. Chapter 4
With Question/Answer Animations Chapter 4 Chapter Motivation Number theory is the part of mathematics devoted to the study of the integers and their properties. Key ideas in number theory include divisibility
More information3. Algorithms. What matters? How fast do we solve the problem? How much computer resource do we need?
3. Algorithms We will study algorithms to solve many different types of problems such as finding the largest of a sequence of numbers sorting a sequence of numbers finding the shortest path between two
More information