Discrete Math in Computer Science Solutions to Practice Problems for Midterm 2

Size: px
Start display at page:

Download "Discrete Math in Computer Science Solutions to Practice Problems for Midterm 2"

Transcription

1 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. What is g(4)? g(2) = 2g(1) + g(0) = 4. g(3) = 2g(2) + g(1) = 9. g(4) = 2g(3) + g(2) = Prove by induction that n 2 1 is divisible by 8 whenever n is an odd positive integer. (It is possible to prove this statement in other ways, but I require your proof be by induction.) Let P (n) state If n is odd, then n 2 1 is divisible by 8. Claim: n 1, P (n) Proof: By strong induction. Base case: P (1) is true since = 0 is divisible by 8. Induction step: Let k 1 be arbitrary and assume that P (1), P (2),..., P (k) are true. If k + 1 is even, then P (k + 1) is trivially true. Suppose that k + 1 is odd. Since k 1 and k + 1 is odd, it follows that k So, k 1 1 and k 1 is is odd. By the induction hypothesis P (k 1) is true and, since k 1 is odd, it follows that (k 1) 2 1 is divisible by 8. Further, since k is even and positive, k is divisible by 2; so, 4k is divisible by 8. It follows from the last two sentences that ((k 1) 2 1) + 4k is divisible by 8. Since (k + 1) 2 1 = ((k 1) 2 1) + 4k, it follows that (k + 1) 2 1 is visible by 8. Hence, we have P (k + 1). The claim then follows from the principle of strong induction. 3. Prove by induction that if n is a positive integer, then 133 divides 11 n n 1. Let P (n) state 11 n n 1 is divisible by 133. Claim: n 1, P (n) Proof: By weak induction. Base case: P (1) is true since = 133 is divisible by 133. Induction step: Let k 1 be arbitrary and assume that P (k) is true, i.e., 11 k k 1 is divisible by 133. To show that P (k + 1) is true, we now show that 11 (k+1) (k+1) 1 is divisible by 133. We have 11 (k+1) (k+1) 1 = 11 k k+1 = k k 1 = 11 (11 k k 1 ) k 1. In the final expression, since the first term is divisible by 133 (by the induction hypothesis), it follows that the whole expression is divisible by 133. Hence, we have P (k + 1). The claim then follows from the principle of weak induction. 4. Consider this variation of the game of Nim. The game begins with n matches, where n > 0. Two players take turns, removing matches, one, two, or three at a time. The player removing the last 1

2 match loses. Prove by induction that if each player plays the best strategy possible, the first player wins if n mod 4 is 0, 2, or 3, and the second player wins if n mod 4 is 1. Proof: Let P (n) be a predicate that states that if there are n matches, the player with the first turn has a winning strategy if n mod 4 is 0, 2, or 3, and the player whose turn is second has a winning strategy if n mod 4 is 1. Claim: n 1, P (n) Proof: We prove the claim by strong induction. Base Cases: P (1) is true because, if the initial pile has only one match, the first player is forced to remove that match, which causes him to lose the game. P (2) and P (3) are true because, if the initial pile has 2 or 3 matches, the first player can remove 1 or 2 matches, respectively, thereby forcing the second player to remove the lone remaining match. Induction Step: Assume that k 3 and P (1), P (2),..., P (k) are true (this assumption is the Induction Hypothesis). To complete the induction step, we must show P (k + 1). Assume the pile has k + 1 matches. Since k 3, k + 1 is at least 4. We consider two cases: either (k + 1) mod 4 is 0, 2, or 3, or (k + 1) mod 4 is 1. If (k + 1) mod 4 is 0, 2, or 3, then the first player A can remove 3, 1, or 2 matches, respectively, thereby leaving l matches such that l mod 4 is 1. Now it is the other player B s turn. Since 1 k 2 l k, P (l) holds (by induction hypothesis). Since it is now B s turn and l mod 4 is 1, P (l) implies that A has a winning strategy. Hence, we have P (k + 1). If (k + 1) mod 4 is 1, then regardless of whether the first player A removes 1, 2, or 3 matches, the number l of matches left satisfies 1 k 2 l k and l mod 4 {0, 2, 3}. Therefore, by induction hypothesis P (l) holds. Since it is B s turn and l mod 4 {0, 2, 3}, P (l) implies that B has a winning strategy. Hence, we have P (k + 1). This completes the induction step. The claim then follows from the principle of strong mathematical induction. 5. Define a set S {0, 1} by the following rules: 0 S. If x S then 0x11 S. Describe the above set S in the set builder notation. (In your answer you can use the notation a m b n for a string of m a s followed by n b s.) {0 n 01 2n n 0} = {0 n+1 1 2n n 0} 6. Give an inductive definition for the set D of all integers that are divisible by 5 or 3. For example, 10, -24, 15 are in D, but 8 is not in D. In your inductive definition, you may use + and operations, but not (i.e., the multiplication) operation. 2

3 0, 3, 5 D. If n D and n + 3 D, then n 3 D and n + 6 D. If n D and n + 5 D, then n 5 D and n + 10 D. 7. Define a set S {0, 1} by the following rules: 0 S. If x S, then x1 and 0x1 are in S. You will now prove that S = T, where T = {0 m 1 n n + 1 m 1}, in the following two steps: (a) Prove by structural induction that every element of S is in T (i.e., S T ). Claim: x S, x T Proof: We prove the claim by structural induction. Base Case: 0 T by the definition of T. Hence, we have the base case. Induction Step: Let x be an arbitrary element of S and assume that x T. Then, by definition of T, we have x = 0 m 1 n, where n + 1 m 1. Then: x1 is 0 m 1 n+1, where (n + 1) + 1 > m 1. So, x1 T. 0x1 is 0 m+1 1 n+1, where (n + 1) + 1 m + 1 > 1. So, 0x1 T. Hence, we have the induction step. The claim then follows from the principle of structural induction. (b) Prove by strong induction that every element of T is in S (i.e., T S). Let P be a predicate on Z such that P (z) if 0 m 1 n T and m + n = z, then 0 m 1 n S. Claim: z 1, P (z) Proof: We prove the claim by strong induction. Base Case: Suppose x = 0 m 1 n T and m + n = 1. Since m 1, it follows that m = 1 and n = 0. Thus, 0 m 1 n = 0, which is in S. Hence, we have the base case. Induction Step: Let z 1 be arbitrary and assume that P (1), P (2),..., P (z) are true. To show P (z + 1), we need to argue that if 0 m 1 n T and m + n = z + 1, then 0 m 1 n S. Assume that 0 m 1 n T and m + n = z + 1. Since 0 m 1 n T, we have n + 1 m 1. There are two cases: either n + 1 > m 1 or n + 1 = m 1. Suppose that n + 1 > m 1. It follows that n 1; so, n 1 0. Then, 0 m 1 n 1 T since (n 1) + 1 = n m 1. Further, since m + (n 1) = z and P (z) is true, we have 0 m 1 n 1 S. Then, by the first recursive rule in the definition of S, we have 0 m 1 n 1 1 = 0 m 1 n S. Suppose that n + 1 = m 1. Substituting m = n + 1 in m + n = z + 1 2, we get 2n Since n is an integer, it follows that n 1. Since m = n + 1, we have m 2. So, m 1 0 and n 1 0. Further, (n 1) + 1 = m 1 1. So, 0 m 1 1 n 1 T. Moreover, (m 1) + (n 1) = z 2 1 (since z = m + n and m 2, n 1). Therefore, by induction hypothesis, 0 m 1 1 n 1 S. Then, by the second recursive rule in the definition of S, we have 0 0 m 1 1 n 1 1 = 0 m 1 n S. Hence, we have the induction step. The claim then follows from the principle of strong induction. 3

4 8. Read the following recursive method carefully and understand what it is accomplishing. mymethod(a: array of integers; i, j: integer) { 1. if i = j return i 2. m (i + j)/2 3. p mymethod(a, i, m) 4. q mymethod(a, m + 1, j) 5. if a[p] > a[q] return p else return q } State a predicate that helps you make as strong a claim as possible about what this recursive method accomplishes, and then prove your claim by induction. Let P (n) be the predicate that states If a[i j] = n, then mymethod(a, i, j) terminates and returns x such that i x j, a[x] is the maximum value in a[i... j], and a[x] is strictly greater than each element of a[x j]. Claim: n 0, P (n) Proof: By strong induction. Base case: P (0) states that mymethod(a, i, i) terminates and returns i, which is true by Lines (1) and (2). Induction step: Let k 0 be arbitrary, and assume that P (0), P (1),..., P (k) are true. We show below that P (k + 1) is true. Consider a call to mymethod(a, i, j) such that a[i j] = k + 1. Since k 0, it follows that i < j; so, control goes to Line (3). Since i < j and m = (i + j)/2, it follows that i m < j. Therefore, 0 m i k and 0 j (m + 1) k. From the induction hypothesis, it follows that the recursive call at Line (4) terminates and sets p to a value between i and m such that a[p] is the maximum of a[i... m] and a[p] is strictly greater than each element of a[p m]. Similarly, it follows from the induction hypothesis that the recursive call at Line (5) terminates and sets q to a value between m + 1 and j such that a[q] is the maximum of a[m j] and a[q] is strictly greater than each element of a[q j]. Therefore, if a[p] > a[q] holds at Line (6), it follows that p is a value between i and j, a[p] is the maximum of a[i... j], and a[p] is strictly greater than each element of a[p j]; hence, the return of p at Line (6) ensures P (k + 1). On the other hand, if a[p] a[q] holds at Line (6), it follows that q is a value between i and j, a[q] is the maximum of a[i... j], and a[q] is strictly greater than each element of a[q j]; hence, the return of q at Line (6) ensures P (k + 1). Hence, we have the induction step. The claim then follows from the principle of strong induction. 9. Read the following recursive method carefully and understand what it is accomplishing. mymethod(a, b: array of integers; i, j: integer) { 1. c true 2. if i < j 3. c mymethod(a, b, i + 1, j) 4. return (c (a[i] = b[i])) } 4

5 State a predicate that helps you make as strong a claim as possible about what this recursive method accomplishes, and then prove your claim by induction. Let P (n) be the predicate that states If n = a[i j], then mymethod(a, i, j) terminates and it returns true if and only if a[i j] = b[i j] (i.e., i p j, a[p] = b[p]). Claim: n 1, P (n) Proof: By weak induction. Base case: P (1) states that mymethod(a, b, i, i) terminates and it returns true if and only if a[i] = b[i], which is true because, when executing mymethod(a, b, i, i), the program performs Line 1, skips Lines 2 and 3, and returns true (a[i] = b[i]). Induction step: Let k 1 be arbitrary, and assume that P (1), P (2),..., P (k) are true. We show below that P (k + 1) is true. Consider a call to mymethod(a, i, j) such that a[i j] = k + 1. Since k 1, it follows that i < j; so, control goes to Line 3. Since a[i + 1 j] = k, it follows from the induction hypothesis that the recursive call at Line 3 terminates and sets c to true if and only if a[i + 1 j] = b[i + 1 j]. Therefore, the method terminates after Line 4, and the value c (a[i] = b[i]) returned at Line 4 is true if and only if a[i j] = b[i j]. Hence, we have P (k + 1). The claim then follows from the principle of weak induction. 10. Use Euclid s algorithm to determine whether 749 and 1605 are relative primes. Show your work. Euclid(749, 1605) calls Euclid(107, 749), which returns It turns out there are many integers x such that 70x mod 81 = 1. Use ExtendedEuclid algorithm to find a value for x. If 70x mod 81 = 1, then there must be an integer y such that 70x + 81y = 1. We can find x and y satisfying this equation by calling ExtendedEuclid(70, 81). EE(70, 81) calls EE(11, 70), which calls EE(4, 11), which calls EE(3, 4), which calls EE(1, 3), which returns (1, 0, 1). Then, EE(3, 4) returns ( 1, 1, 1). Then, EE(4, 11) returns (3, 1, 1). Then, EE(11, 70) returns ( 19, 3, 1). Then, EE(70, 81) returns (22, 19, 1). Therefore, x = Prove that if the gcd of two positive integers n and m is 10, then (4 n 4 m) is false. Proof: We prove by contradiction. Assume that gcd(n, m) = 10, and (4 n 4 m) is true. Since gcd(n, m) = 10, we know from the property of ExtendedEuclid that there are integers x and y such that nx + my = 10. Since 4 n and 4 m, it follows that 4 (nx + my); however, 4 does not divide 10, which contradicts that nx + my = Here is a variation of Euclid s algorithm. 5

6 myeuclid(n, m: integer) { 1. if n divides m then return n 2. if (m mod n) divides n then return (m mod n) 3. return myeuclid(n mod (m mod n), m mod n) } Is it true that, for all m n 1, myeuclid(n, m) terminates and returns gcd(n, m)? If it is true, prove rigorously. Otherwise give a counterexample. The statement is true, as implied by the following claim, where P (n) states that If m n > 0, then myeuclid(n, m) terminates and returns gcd(n, m). In the proof of the claim below, we use the following fact that we proved in class: If m n 1 and n does not divide m, then gcd(n, m) = gcd(m mod n, n). Claim: n 1, P (n). Proof: By strong induction. Consider the execution of Euclid(1, m), where m 1. Since 1 m, the method terminates at Line 1 and returns 1. Since gcd(1, m) = 1, we have P (1). Induction step: Let k 1 be arbitrary and asume that P (1), P (2),..., P (k) are true. Consider the execution of ExtendedEuclid(n, m), where m n = k + 1. There are three cases to consider: (i) n divides m, (ii) n does not divide m, but m mod n divides n, or (iii) n does not divide m, and m mod n does not divide n If n divides m, gcd(n, m) = n and the method terminates at Line 1 returning n. Hence, we have P (k + 1). If n does not divide m, it follows from the above mentioned fact from class that gcd(n, m) = gcd(m mod n, n). Further, if m mod n divides n, then gcd(m mod n, n) = m mod n, which is what the method returns at Line 2. Hence, we have P (k + 1). If n does not divide m, then m mod n 0 and gcd(n, m) = gcd(m mod n, n). If m mod n does not divide n, then 0 < (n mod (m mod n)) < (m mod n) and, by the above mentioned fact from class, gcd(m mod n, n) = gcd(n mod (m mod n), m mod n). Further, by the induction hypothesis P (n mod (m mod n)) is true. So, the recursive call terminates and returns gcd(n mod (m mod n), m mod n). Since this value is gcd(n, m), we have P (k + 1). Hence, we have the induction step. The claim then follows from the principle of weak induction. 6

1. 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

1. 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 information

Mathematics for Computer Science Exercises for Week 10

Mathematics for Computer Science Exercises for Week 10 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

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.4 Strong Mathematical Induction and the Well-Ordering Principle for the Integers Copyright

More information

All variables a, b, n, etc are integers unless otherwise stated. Each part of a problem is worth 5 points.

All variables a, b, n, etc are integers unless otherwise stated. Each part of a problem is worth 5 points. Math 152, Problem Set 2 solutions (2018-01-24) All variables a, b, n, etc are integers unless otherwise stated. Each part of a problem is worth 5 points. 1. Let us look at the following equation: x 5 1

More information

INTEGERS. In this section we aim to show the following: Goal. Every natural number can be written uniquely as a product of primes.

INTEGERS. 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 information

Section Summary. Proof by Cases Existence Proofs

Section Summary. Proof by Cases Existence Proofs Section 1.8 1 Section Summary Proof by Cases Existence Proofs Constructive Nonconstructive Disproof by Counterexample Uniqueness Proofs Proving Universally Quantified Assertions Proof Strategies sum up

More information

MATH 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. 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 information

Induction. Induction. Induction. Induction. Induction. Induction 2/22/2018

Induction. 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 information

Homework #2 Solutions Due: September 5, for all n N n 3 = n2 (n + 1) 2 4

Homework #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 information

Fibonacci Nim and a Full Characterization of Winning Moves

Fibonacci Nim and a Full Characterization of Winning Moves Fibonacci Nim and a Full Characterization of Winning Moves Cody Allen and Vadim Ponomarenko January 8, 2014 Abstract In this paper we will fully characterize all types of winning moves in the takeaway

More information

MAT 243 Test 2 SOLUTIONS, FORM A

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 information

Midterm Exam. CS 3110: Design and Analysis of Algorithms. June 20, Group 1 Group 2 Group 3

Midterm Exam. CS 3110: Design and Analysis of Algorithms. June 20, Group 1 Group 2 Group 3 Banner ID: Name: Midterm Exam CS 3110: Design and Analysis of Algorithms June 20, 2006 Group 1 Group 2 Group 3 Question 1.1 Question 2.1 Question 3.1 Question 1.2 Question 2.2 Question 3.2 Question 3.3

More information

MATH10040: Numbers and Functions Homework 1: Solutions

MATH10040: Numbers and Functions Homework 1: Solutions MATH10040: Numbers and Functions Homework 1: Solutions 1. Prove that a Z and if 3 divides into a then 3 divides a. Solution: The statement to be proved is equivalent to the statement: For any a N, if 3

More information

The Fundamental Theorem of Arithmetic

The 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 information

MATH 215 Final. M4. For all a, b in Z, a b = b a.

MATH 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 information

NOTES ON SIMPLE NUMBER THEORY

NOTES 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 information

Consider an infinite row of dominoes, labeled by 1, 2, 3,, where each domino is standing up. What should one do to knock over all dominoes?

Consider an infinite row of dominoes, labeled by 1, 2, 3,, where each domino is standing up. What should one do to knock over all dominoes? 1 Section 4.1 Mathematical Induction Consider an infinite row of dominoes, labeled by 1,, 3,, where each domino is standing up. What should one do to knock over all dominoes? Principle of Mathematical

More information

Math 109 HW 9 Solutions

Math 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 information

PUTNAM TRAINING MATHEMATICAL INDUCTION. Exercises

PUTNAM TRAINING MATHEMATICAL INDUCTION. Exercises PUTNAM TRAINING MATHEMATICAL INDUCTION (Last updated: December 11, 017) Remark. This is a list of exercises on mathematical induction. Miguel A. Lerma 1. Prove that n! > n for all n 4. Exercises. Prove

More information

#G03 INTEGERS 10 (2010), MIN, A COMBINATORIAL GAME HAVING A CONNECTION WITH PRIME NUMBERS

#G03 INTEGERS 10 (2010), MIN, A COMBINATORIAL GAME HAVING A CONNECTION WITH PRIME NUMBERS #G03 INTEGERS 10 (2010), 765-770 MIN, A COMBINATORIAL GAME HAVING A CONNECTION WITH PRIME NUMBERS Grant Cairns Department of Mathematics, La Trobe University, Melbourne, Australia G.Cairns@latrobe.edu.au

More information

12x + 18y = 50. 2x + v = 12. (x, v) = (6 + k, 2k), k Z.

12x + 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 information

arxiv: v2 [math.co] 9 Aug 2011

arxiv: v2 [math.co] 9 Aug 2011 Winning strategies for aperiodic subtraction games arxiv:1108.1239v2 [math.co] 9 Aug 2011 Alan Guo MIT Computer Science and Artificial Intelligence Laboratory Cambridge, MA 02139, USA aguo@mit.edu Abstract

More information

CSE 20 DISCRETE MATH WINTER

CSE 20 DISCRETE MATH WINTER CSE 20 DISCRETE MATH WINTER 2016 http://cseweb.ucsd.edu/classes/wi16/cse20-ab/ Today's learning goals Explain the steps in a proof by (strong) mathematical induction Use (strong) mathematical induction

More information

Homework #2 solutions Due: June 15, 2012

Homework #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 information

Predicate Logic - Undecidability

Predicate Logic - Undecidability CS402, Spring 2016 Undecidable Problems Does the following program halts? (1) N : n, total, x, y, z (2) n GetUserInput() (3) total 3 (4) while true (5) for x 1 to total 2 (6) for y 1 to total x 1 (7) z

More information

Fall 2017 Test II review problems

Fall 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 information

IS 709/809: Computational Methods for IS Research. Math Review: Algorithm Analysis

IS 709/809: Computational Methods for IS Research. Math Review: Algorithm Analysis IS 709/809: Computational Methods for IS Research Math Review: Algorithm Analysis Nirmalya Roy Department of Information Systems University of Maryland Baltimore County www.umbc.edu Topics Proof techniques

More information

2.2 Inverses and GCDs

2.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 information

PRACTICE PROBLEMS: SET 1

PRACTICE 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 information

Input Decidable Language -- Program Halts on all Input Encoding of Input -- Natural Numbers Encoded in Binary or Decimal, Not Unary

Input 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 information

3 - Induction and Recursion

3 - 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 information

Quiz 1, Mon CS 2050, Intro Discrete Math for Computer Science

Quiz 1, Mon CS 2050, Intro Discrete Math for Computer Science Quiz 1, Mon 09-6-11 CS 050, Intro Discrete Math for Computer Science This quiz has 10 pages (including this cover page) and 5 Problems: Problems 1,, 3 and 4 are mandatory ( pages each.) Problem 5 is optional,

More information

Chapter 5.1: Induction

Chapter 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 information

Discrete Mathematics & Mathematical Reasoning Induction

Discrete Mathematics & Mathematical Reasoning Induction Discrete Mathematics & Mathematical Reasoning Induction Colin Stirling Informatics Colin Stirling (Informatics) Discrete Mathematics (Sections 5.1 & 5.2) Today 1 / 11 Another proof method: Mathematical

More information

Name 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 (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 information

MADHAVA MATHEMATICS COMPETITION, December 2015 Solutions and Scheme of Marking

MADHAVA MATHEMATICS COMPETITION, December 2015 Solutions and Scheme of Marking MADHAVA MATHEMATICS COMPETITION, December 05 Solutions and Scheme of Marking NB: Part I carries 0 marks, Part II carries 30 marks and Part III carries 50 marks Part I NB Each question in Part I carries

More information

Lecture 7 Feb 4, 14. Sections 1.7 and 1.8 Some problems from Sec 1.8

Lecture 7 Feb 4, 14. Sections 1.7 and 1.8 Some problems from Sec 1.8 Lecture 7 Feb 4, 14 Sections 1.7 and 1.8 Some problems from Sec 1.8 Section Summary Proof by Cases Existence Proofs Constructive Nonconstructive Disproof by Counterexample Nonexistence Proofs Uniqueness

More information

NOTE: You have 2 hours, please plan your time. Problems are not ordered by difficulty.

NOTE: 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 information

then the hard copy will not be correct whenever your instructor modifies the assignments.

then 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 information

CS 360, Winter Morphology of Proof: An introduction to rigorous proof techniques

CS 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 information

Simultaneous Linear, and Non-linear Congruences

Simultaneous Linear, and Non-linear Congruences Simultaneous Linear, and Non-linear Congruences CIS002-2 Computational Alegrba and Number Theory David Goodwin david.goodwin@perisic.com 09:00, Friday 18 th November 2011 Outline 1 Polynomials 2 Linear

More information

Final Exam Review. 2. Let A = {, { }}. What is the cardinality of A? Is

Final 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 information

Olympiad Number Theory Through Challenging Problems

Olympiad 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 information

Discrete Mathematics & Mathematical Reasoning Induction

Discrete Mathematics & Mathematical Reasoning Induction Discrete Mathematics & Mathematical Reasoning Induction Colin Stirling Informatics Colin Stirling (Informatics) Discrete Mathematics (Sections 5.1 & 5.2) Today 1 / 12 Another proof method: Mathematical

More information

Single Pile (Move Size) Dynamic Blocking Nim

Single Pile (Move Size) Dynamic Blocking Nim Single Pile (Move Size) Dynamic Blocking Nim Abstract: Several authors have written papers dealing with a class of combinatorial games consisting of one-pile counter pickup games for which the maximum

More information

CS280, Spring 2004: Prelim Solutions

CS280, Spring 2004: Prelim Solutions CS280, Spring 2004: Prelim Solutions 1. [3 points] What is the transitive closure of the relation {(1, 2), (2, 3), (3, 1), (3, 4)}? Solution: It is {(1, 2), (2, 3), (3, 1), (3, 4), (1, 1), (2, 2), (3,

More information

Greatest Common Divisor MATH Greatest Common Divisor. Benjamin V.C. Collins, James A. Swenson MATH 2730

Greatest 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 information

Homework 1. 10(b) A useful denial of the statement We will win the first game or the second one is We will lose the first two games.

Homework 1. 10(b) A useful denial of the statement We will win the first game or the second one is We will lose the first two games. Homework 1 Exercises 1.1 (f) P Q Q Q Q P (Q Q) T T F T T T F T T T F T F T F F F T T F 5(d) The proposition Horses have four legs but three quarters do not equal one dollar is of the form A C. Since A

More information

Discrete Math, Second Problem Set (June 24)

Discrete Math, Second Problem Set (June 24) Discrete Math, Second Problem Set (June 24) REU 2003 Instructor: Laszlo Babai Scribe: D Jeremy Copeland 1 Number Theory Remark 11 For an arithmetic progression, a 0, a 1 = a 0 +d, a 2 = a 0 +2d, to have

More information

Number Theory Solutions Packet

Number Theory Solutions Packet Number Theory Solutions Pacet 1 There exist two distinct positive integers, both of which are divisors of 10 10, with sum equal to 157 What are they? Solution Suppose 157 = x + y for x and y divisors of

More information

Problem Set #3 Solutions

Problem Set #3 Solutions Page 3.1 Problem Set #3 Solutions 1. Epp #3.1.: a. Yes: 4rs = (rs) and rs is an integer because r and s are integers and products of integers are integers b. Yes: 6r + 4s + 3 = (3r + s + 1) + 1 and 3r

More information

Math 283 Spring 2013 Presentation Problems 4 Solutions

Math 283 Spring 2013 Presentation Problems 4 Solutions Math 83 Spring 013 Presentation Problems 4 Solutions 1. Prove that for all n, n (1 1k ) k n + 1 n. Note that n means (1 1 ) 3 4 + 1 (). n 1 Now, assume that (1 1k ) n n. Consider k n (1 1k ) (1 1n ) n

More information

1 Overview and revision

1 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 information

Proof 1: Using only ch. 6 results. Since gcd(a, b) = 1, we have

Proof 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 information

Chapter 2 Section 2.1: Proofs Proof Techniques. CS 130 Discrete Structures

Chapter 2 Section 2.1: Proofs Proof Techniques. CS 130 Discrete Structures Chapter 2 Section 2.1: Proofs Proof Techniques CS 130 Discrete Structures Some Terminologies Axioms: Statements that are always true. Example: Given two distinct points, there is exactly one line that

More information

2301 Assignment 1 Due Friday 19th March, 2 pm

2301 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 information

Solving Diophantine Equations With Unique Factorization

Solving Diophantine Equations With Unique Factorization Solving Diophantine Equations With Unique Factorization February 17, 2016 1 Introduction In this note we should how unique factorization in rings like Z[i] and Z[ 2] can be used to find integer solutions

More information

ALGEBRA. 1. Some elementary number theory 1.1. Primes and divisibility. We denote the collection of integers

ALGEBRA. 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 information

MAT 300 RECITATIONS WEEK 7 SOLUTIONS. Exercise #1. Use induction to prove that for every natural number n 4, n! > 2 n. 4! = 24 > 16 = 2 4 = 2 n

MAT 300 RECITATIONS WEEK 7 SOLUTIONS. Exercise #1. Use induction to prove that for every natural number n 4, n! > 2 n. 4! = 24 > 16 = 2 4 = 2 n MAT 300 RECITATIONS WEEK 7 SOLUTIONS LEADING TA: HAO LIU Exercise #1. Use induction to prove that for every natural number n 4, n! > 2 n. Proof. For any n N with n 4, let P (n) be the statement n! > 2

More information

arxiv: v1 [math.co] 27 Aug 2015

arxiv: v1 [math.co] 27 Aug 2015 P-positions in Modular Extensions to Nim arxiv:1508.07054v1 [math.co] 7 Aug 015 Tanya Khovanova August 31, 015 Abstract Karan Sarkar In this paper, we consider a modular extension to the game of Nim, which

More information

Advanced Analysis of Algorithms - Midterm (Solutions)

Advanced Analysis of Algorithms - Midterm (Solutions) Advanced Analysis of Algorithms - Midterm (Solutions) K. Subramani LCSEE, West Virginia University, Morgantown, WV {ksmani@csee.wvu.edu} 1 Problems 1. Solve the following recurrence using substitution:

More information

Number 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. 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 information

Strong Induction (Second Principle) Example: There are two piles of cards, players take turn: each turn: one player removes any number of cards from

Strong Induction (Second Principle) Example: There are two piles of cards, players take turn: each turn: one player removes any number of cards from Strong Induction (Second Principle) Example: There are two piles of cards, players take turn: each turn: one player removes any number of cards from 1 pile (any of the two). The player who removes the

More information

Direct Proof and Proof by Contrapositive

Direct Proof and Proof by Contrapositive Dr. Nahid Sultana October 14, 2012 Consider an implication: p q. Then p q p q T T T T F F F T T F F T Consider an implication: p q. Then p q p q T T T T F F F T T F F T Consider x D, p(x) q(x). It can

More information

Math 324 Summer 2012 Elementary Number Theory Notes on Mathematical Induction

Math 324 Summer 2012 Elementary Number Theory Notes on Mathematical Induction Math 4 Summer 01 Elementary Number Theory Notes on Mathematical Induction Principle of Mathematical Induction Recall the following axiom for the set of integers. Well-Ordering Axiom for the Integers If

More information

MATH 501 Discrete Mathematics. Lecture 6: Number theory. German University Cairo, Department of Media Engineering and Technology.

MATH 501 Discrete Mathematics. Lecture 6: Number theory. German University Cairo, Department of Media Engineering and Technology. MATH 501 Discrete Mathematics Lecture 6: Number theory Prof. Dr. Slim Abdennadher, slim.abdennadher@guc.edu.eg German University Cairo, Department of Media Engineering and Technology 1 Number theory Number

More information

5: The Integers (An introduction to Number Theory)

5: 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 information

Slow k-nim. Vladimir Gurvich a

Slow k-nim. Vladimir Gurvich a R u t c o r Research R e p o r t Slow k-nim Vladimir Gurvich a Nhan Bao Ho b RRR 3-2015, August 2015 RUTCOR Rutgers Center for Operations Research Rutgers University 640 Bartholomew Road Piscataway, New

More information

CS Asymptotic Notations for Algorithm Analysis

CS Asymptotic Notations for Algorithm Analysis CS483-02 Asymptotic Notations for Algorithm Analysis Instructor: Fei Li Room 443 ST II Office hours: Tue. & Thur. 4:30pm - 5:30pm or by appointments lifei@cs.gmu.edu with subject: CS483 http://www.cs.gmu.edu/

More information

Math 3000 Section 003 Intro to Abstract Math Homework 6

Math 3000 Section 003 Intro to Abstract Math Homework 6 Math 000 Section 00 Intro to Abstract Math Homework 6 Department of Mathematical and Statistical Sciences University of Colorado Denver, Spring 01 Solutions April, 01 Please note that these solutions are

More information

This is a recursive algorithm. The procedure is guaranteed to terminate, since the second argument decreases each time.

This is a recursive algorithm. The procedure is guaranteed to terminate, since the second argument decreases each time. 8 Modular Arithmetic We introduce an operator mod. Let d be a positive integer. For c a nonnegative integer, the value c mod d is the remainder when c is divided by d. For example, c mod d = 0 if and only

More information

Solutions, 2004 NCS/MAA TEAM COMPETITION

Solutions, 2004 NCS/MAA TEAM COMPETITION Solutions, 004 NCS/MAA TEAM COMPETITION Each problem number is followed by an 11-tuple (a 10, a 9, a 8, a 7, a 6, a 5, a 4, a 3, a, a 1, a 0 ), where a k is the number of teams that scored k points on

More information

The following techniques for methods of proofs are discussed in our text: - Vacuous proof - Trivial proof

The following techniques for methods of proofs are discussed in our text: - Vacuous proof - Trivial proof Ch. 1.6 Introduction to Proofs The following techniques for methods of proofs are discussed in our text - Vacuous proof - Trivial proof - Direct proof - Indirect proof (our book calls this by contraposition)

More information

Discrete Mathematics with Applications MATH236

Discrete Mathematics with Applications MATH236 Discrete Mathematics with Applications MATH236 Dr. Hung P. Tong-Viet School of Mathematics, Statistics and Computer Science University of KwaZulu-Natal Pietermaritzburg Campus Semester 1, 2013 Tong-Viet

More information

Linear Congruences. The equation ax = b for a, b R is uniquely solvable if a 0: x = b/a. Want to extend to the linear congruence:

Linear Congruences. The equation ax = b for a, b R is uniquely solvable if a 0: x = b/a. Want to extend to the linear congruence: Linear Congruences The equation ax = b for a, b R is uniquely solvable if a 0: x = b/a. Want to extend to the linear congruence: ax b (mod m), a, b Z, m N +. (1) If x 0 is a solution then so is x k :=

More information

International Mathematics TOURNAMENT OF THE TOWNS

International Mathematics TOURNAMENT OF THE TOWNS International Mathematics TOURNAMENT OF THE TOWNS Senior A-Level Paper Fall 2008. 1. A standard 8 8 chessboard is modified by varying the distances between parallel grid lines, so that the cells are rectangles

More information

Solutions Math 308 Homework 9 11/20/2018. Throughout, let a, b, and c be non-zero integers.

Solutions Math 308 Homework 9 11/20/2018. Throughout, let a, b, and c be non-zero integers. Throughout, let a, b, and c be non-zero integers. Solutions Math 308 Homework 9 11/20/2018 1. Consider the following statements: i. a is divisible by 3; ii. a is divisible by 9; iii. a is divisible by

More information

Problems and Solutions

Problems and Solutions TWENTY FOURTH IRISH MATHEMATICAL OLYMPIAD Saturday, 7 May 2011 Second Paper Problems and Solutions 6. Prove that is not an integer. 2 3 + 4 5 + 6 7 + + 2010 2011 Solution (Proposed by Gordon Lessells)

More information

Notes on induction proofs and recursive definitions

Notes on induction proofs and recursive definitions Notes on induction proofs and recursive definitions James Aspnes December 13, 2010 1 Simple induction Most of the proof techniques we ve talked about so far are only really useful for proving a property

More information

1. multiplication is commutative and associative;

1. 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 information

An integer p is prime if p > 1 and p has exactly two positive divisors, 1 and p.

An integer p is prime if p > 1 and p has exactly two positive divisors, 1 and p. Chapter 6 Prime Numbers Part VI of PJE. Definition and Fundamental Results Definition. (PJE definition 23.1.1) An integer p is prime if p > 1 and p has exactly two positive divisors, 1 and p. If n > 1

More information

Sums of Squares. Bianca Homberg and Minna Liu

Sums of Squares. Bianca Homberg and Minna Liu Sums of Squares Bianca Homberg and Minna Liu June 24, 2010 Abstract For our exploration topic, we researched the sums of squares. Certain properties of numbers that can be written as the sum of two squares

More information

1. (16 points) Circle T if the corresponding statement is True or F if it is False.

1. (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 information

Announcements. Read Section 2.1 (Sets), 2.2 (Set Operations) and 5.1 (Mathematical Induction) Existence Proofs. Non-constructive

Announcements. Read Section 2.1 (Sets), 2.2 (Set Operations) and 5.1 (Mathematical Induction) Existence Proofs. Non-constructive Announcements Homework 2 Due Homework 3 Posted Due next Monday Quiz 2 on Wednesday Read Section 2.1 (Sets), 2.2 (Set Operations) and 5.1 (Mathematical Induction) Exam 1 in two weeks Monday, February 19

More information

2k n. k=0. 3x 2 7 (mod 11) 5 4x 1 (mod 9) 2 r r +1 = r (2 r )

2k n. k=0. 3x 2 7 (mod 11) 5 4x 1 (mod 9) 2 r r +1 = r (2 r ) MATH 135: Randomized Exam Practice Problems These are the warm-up exercises and recommended problems take from the extra practice sets presented in random order. The challenge problems have not been included.

More information

M381 Number Theory 2004 Page 1

M381 Number Theory 2004 Page 1 M81 Number Theory 2004 Page 1 [[ Comments are written like this. Please send me (dave@wildd.freeserve.co.uk) details of any errors you find or suggestions for improvements. ]] Question 1 20 = 2 * 10 +

More information

Ma/CS 6a Class 2: Congruences

Ma/CS 6a Class 2: Congruences Ma/CS 6a Class 2: Congruences 1 + 1 5 (mod 3) By Adam Sheffer Reminder: Public Key Cryptography Idea. Use a public key which is used for encryption and a private key used for decryption. Alice encrypts

More information

Math 3012 Applied Combinatorics Lecture 4

Math 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 information

WORKSHEET 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: 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 information

CS Asymptotic Notations for Algorithm Analysis Outline

CS Asymptotic Notations for Algorithm Analysis Outline CS483-02 Asymptotic Notations for Algorithm Analysis Instructor: Fei Li Room 443 ST II Office hours: Tue. & Thur. 4:30pm - 5:30pm or by appointments lifei@cs.gmu.edu with subject: CS483 http://www.cs.gmu.edu/

More information

MATH 420 FINAL EXAM J. Beachy, 5/7/97

MATH 420 FINAL EXAM J. Beachy, 5/7/97 MATH 420 FINAL EXAM J. Beachy, 5/7/97 1. (a) For positive integers a and b, define gcd(a, b). (b) Compute gcd(1776, 1492). (c) Show that if a, b, c are positive integers, then gcd(a, bc) = 1 if and only

More information

3.2 Solving linear congruences. v3

3.2 Solving linear congruences. v3 3.2 Solving linear congruences. v3 Solving equations of the form ax b (mod m), where x is an unknown integer. Example (i) Find an integer x for which 56x 1 mod 93. Solution We have already solved this

More information

Top Down Design. Gunnar Gotshalks 03-1

Top Down Design. Gunnar Gotshalks 03-1 Top Down Design 03-1 Top Down Description Top down is also known as step wise refinement and functional decomposition Given an operation, there are only the following three choices for refinement» Sequence

More information

MAS114: Solutions to Exercises

MAS114: Solutions to Exercises MAS114: s to Exercises Up to week 8 Note that the challenge problems are intended to be difficult! Doing any of them is an achievement. Please hand them in on a separate piece of paper if you attempt them.

More information

The group (Z/nZ) February 17, In these notes we figure out the structure of the unit group (Z/nZ) where n > 1 is an integer.

The group (Z/nZ) February 17, In these notes we figure out the structure of the unit group (Z/nZ) where n > 1 is an integer. The group (Z/nZ) February 17, 2016 1 Introduction In these notes we figure out the structure of the unit group (Z/nZ) where n > 1 is an integer. If we factor n = p e 1 1 pe, where the p i s are distinct

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.

(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 information

Discrete Mathematics and Probability Theory Fall 2013 Vazirani Note 1

Discrete Mathematics and Probability Theory Fall 2013 Vazirani Note 1 CS 70 Discrete Mathematics and Probability Theory Fall 013 Vazirani Note 1 Induction Induction is a basic, powerful and widely used proof technique. It is one of the most common techniques for analyzing

More information

CmSc 250 Intro to Algorithms. Mathematical Review. 1. Basic Algebra. (a + b) 2 = a 2 + 2ab + b 2 (a - b) 2 = a 2-2ab + b 2 a 2 - b 2 = (a + b)(a - b)

CmSc 250 Intro to Algorithms. Mathematical Review. 1. Basic Algebra. (a + b) 2 = a 2 + 2ab + b 2 (a - b) 2 = a 2-2ab + b 2 a 2 - b 2 = (a + b)(a - b) CmSc 250 Intro to Algorithms Mathematical Review 1. Basic Algebra (a + b) 2 = a 2 + 2ab + b 2 (a - b) 2 = a 2-2ab + b 2 a 2 - b 2 = (a + b)(a - b) a/x + b/y = (ay + bx)/xy 2. Exponents X n = XXX..X, n

More information

Cryptography and Security Midterm Exam

Cryptography and Security Midterm Exam Cryptography and Security Midterm Exam Solution Serge Vaudenay 25.11.2015 duration: 1h45 no documents allowed, except one 2-sided sheet of handwritten notes a pocket calculator is allowed communication

More information

Problem Set 5 Solutions

Problem 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 information