Homework 7 Solutions, Math 55

Similar documents
MATH 55 - HOMEWORK 6 SOLUTIONS. 1. Section = 1 = (n + 1) 3 = 2. + (n + 1) 3. + (n + 1) 3 = n2 (n + 1) 2.

PRACTICE PROBLEMS: SET 1

Math 324 Summer 2012 Elementary Number Theory Notes on Mathematical Induction

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

MATH 220 (all sections) Homework #12 not to be turned in posted Friday, November 24, 2017

Fall 2017 Test II review problems

a + b = b + a and a b = b a. (a + b) + c = a + (b + c) and (a b) c = a (b c). a (b + c) = a b + a c and (a + b) c = a c + b c.

Properties of the Integers

0 Sets and Induction. Sets

MATH 324 Summer 2011 Elementary Number Theory. Notes on Mathematical Induction. Recall the following axiom for the set of integers.

Homework 1 (revised) Solutions

Quantitative Aptitude


Proofs. Chapter 2 P P Q Q

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

Solutions to Homework Set 1

Chapter 2. Divisibility. 2.1 Common Divisors

(1) Which of the following are propositions? If it is a proposition, determine its truth value: A propositional function, but not a proposition.

Induction and Recursion

Name (please print) Mathematics Final Examination December 14, 2005 I. (4)

Mathathon Round 1 (2 points each)

Binomial Coefficient Identities/Complements

Math 370 Homework 2, Fall 2009

Recursive Definitions

Induction and recursion. Chapter 5

Proofs. Chapter 2 P P Q Q

Chapter Summary. Mathematical Induction Strong Induction Well-Ordering Recursive Definitions Structural Induction Recursive Algorithms

Four Basic Sets. Divisors

Lecture Notes 1 Basic Concepts of Mathematics MATH 352

CSE 20 DISCRETE MATH. Fall

CSC B36 Additional Notes sample induction and well-ordering proofs. c Nick Cheng

Discrete Structures, Final Exam

Chapter 5.1: Induction

Intermediate Math Circles February 14, 2018 Contest Prep: Number Theory

Solutions to Homework Problems

Definition: Let S and T be sets. A binary relation on SxT is any subset of SxT. A binary relation on S is any subset of SxS.

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

CSE 20 DISCRETE MATH. Winter

Exam Practice Problems

With Question/Answer Animations

MAT115A-21 COMPLETE LECTURE NOTES

Mathematical Background

Lecture 4: Counting, Pigeonhole Principle, Permutations, Combinations Lecturer: Lale Özkahya

DISCRETE MATH: FINAL REVIEW

11 Division Mod n, Linear Integer Equations, Random Numbers, The Fundamental Theorem of Arithmetic

COMBINATORIAL COUNTING

Complete Induction and the Well- Ordering Principle

Polynomials. In many problems, it is useful to write polynomials as products. For example, when solving equations: Example:

EDULABZ INTERNATIONAL NUMBER SYSTEM

We want to show P (n) is true for all integers

MATH 114 Fall 2004 Solutions to practice problems for Final Exam

Climbing an Infinite Ladder

In N we can do addition, but in order to do subtraction we need to extend N to the integers

1 Predicates and Quantifiers

PUTNAM PROBLEMS SEQUENCES, SERIES AND RECURRENCES. Notes

Lecture Notes on DISCRETE MATHEMATICS. Eusebius Doedel

MATH 580, midterm exam SOLUTIONS

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

Math Homework # 4

HMMT February 2018 February 10, 2018

NOTES ON INTEGERS. 1. Integers

D-MATH Algebra I HS18 Prof. Rahul Pandharipande. Solution 1. Arithmetic, Zorn s Lemma.

WORKSHEET MATH 215, FALL 15, WHYTE. We begin our course with the natural numbers:

Basic Proof Examples

Discrete Mathematics & Mathematical Reasoning Chapter 6: Counting


Recitation 7: Existence Proofs and Mathematical Induction

Chapter 5: The Integers

Preparing for the CS 173 (A) Fall 2018 Midterm 1

Maths Book Part 1. By Abhishek Jain

Homework 3 Solutions, Math 55

Chapter Generating Functions

1.4 Equivalence Relations and Partitions

Week Some Warm-up Questions

Numbers. 2.1 Integers. P(n) = n(n 4 5n 2 + 4) = n(n 2 1)(n 2 4) = (n 2)(n 1)n(n + 1)(n + 2); 120 =

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

HW2 Solutions Problem 1: 2.22 Find the sign and inverse of the permutation shown in the book (and below).

EGMO 2016, Day 1 Solutions. Problem 1. Let n be an odd positive integer, and let x1, x2,..., xn be non-negative real numbers.

1 Sequences and Summation

Lecture 17: Trees and Merge Sort 10:00 AM, Oct 15, 2018

MATH 4400 SOLUTIONS TO SOME EXERCISES. 1. Chapter 1

. As the binomial coefficients are integers we have that. 2 n(n 1).

Definitions. Notations. Injective, Surjective and Bijective. Divides. Cartesian Product. Relations. Equivalence Relations

ADVANCED CALCULUS - MTH433 LECTURE 4 - FINITE AND INFINITE SETS

LECTURE NOTES DISCRETE MATHEMATICS. Eusebius Doedel

Chapter 1. Sets and Numbers

Discrete Mathematics (CS503)

Executive Assessment. Executive Assessment Math Review. Section 1.0, Arithmetic, includes the following topics:

34 th United States of America Mathematical Olympiad

MATH HL OPTION - REVISION SETS, RELATIONS AND GROUPS Compiled by: Christos Nikolaidis

Department of Computer Science University at Albany, State University of New York Solutions to Sample Discrete Mathematics Examination II (Fall 2007)

Recurrence Relations and Recursion: MATH 180

In N we can do addition, but in order to do subtraction we need to extend N to the integers

Sets. We discuss an informal (naive) set theory as needed in Computer Science. It was introduced by G. Cantor in the second half of the nineteenth

PUTNAM TRAINING NUMBER THEORY. Exercises 1. Show that the sum of two consecutive primes is never twice a prime.

Math 2070BC Term 2 Weeks 1 13 Lecture Notes

Counting. Mukulika Ghosh. Fall Based on slides by Dr. Hyunyoung Lee

Definitions, Theorems and Exercises. Abstract Algebra Math 332. Ethan D. Bloch

Practice Exam 1 CIS/CSE 607, Spring 2009

Definition 6.1 (p.277) A positive integer n is prime when n > 1 and the only positive divisors are 1 and n. Alternatively

Transcription:

Homework 7 Solutions, Math 55 5..36. (a) Since a is a positive integer, a = a 1 + b 0 is a positive integer of the form as + bt for some integers s and t, so a S. Thus S is nonempty. (b) Since S is nonempty, it has a least element c by the well-ordering principle. (c) Let d be a common divisor of a and b. Then a = dk and b = dl for some k, l Z. We know that c = ax + by for some x, y Z since c is an element of S. Since we see that d is also a divisor of c. c = ax + by = dkx + dly = d(kx + ly), (d) If c a, then by the division algorithm there exists a unique integer r such that a = qc+r and 0 < r < c. We know that c = ax + by since c is an element of S, so r = a qc = a q(ax + by) = a(1 qx) + b( qy) is an element of S also. But r < c, and c was supposed to be the smallest element of S. This is a contradiction. Thus c a. The proof that c b is identical. (e) The integer c must be the greatest common divisor of a and b. Indeed, it is a common divisor of a and b by part (d). Every other common divisor d is a divisor of c, so d c, which means that c is the greatest common divisor. If c were another common divisor that was at least as large as all other divisors, then by part (c) we would have c c, but c is maximal amongst common divisors so we must have c = c. 5.3.. (c) 5.3.4. (d) 5.3.6. f(1) = f(0) f(0) = 9 6 = 1. f() = f(1) f(1) = 1 = 3. f(3) = f() f() = 9 + 6 = 13. f(4) = f(3) f(3) = 169 6 = 141. f() = f(1)/f(0) = 1. f(3) = f()/f(1) = 1. f(4) = f(3)/f() = 1. f(5) = f(4)/f(3) = 1. (a) This is well-defined, and f(n) = ( 1) n. We prove this by induction. Let P (n) be the statement that f(n) = ( 1) n. The base case P (0) is given to us. If P (k) is true for some k, then we know that f(k) = ( 1) k, which means that f(k + 1) = f(k) = ( 1) k = ( 1) k+1, so P (k + 1) is true too. Thus P (n) is true for all n. 1

(b) This is well-defined, and n/3 if n 0 mod 3 f(n) = 0 if n 1 mod 3 (n+1)/3 if n mod 3. We prove this by strong induction. The base cases n = 0, 1, are given to us. Suppose that we know this formula for all nonnegative integers up to some integer k. We have three cases. If k + 1 0 mod 3, then k 0 mod 3 also, so f(k + 1) = f(k ) = (k )/3 = (k+1)/3. If k + 1 1 mod 3, then k 0 mod 3 also, so f(k + 1) = f(k ) = 0. If k + 1 mod 3, then k mod 3 also, so This completes the induction. (c) This is not well-defiend. f(k + 1) = f(k ) = (k 1)/3 = (k+)/3. (d) This is well-defined, and we have f(n) = n 1 for all n 1. We prove this by induction. The base case n = 1 is given to us, and if f(k) = k 1 for some k 1, then completing the induction. f(k + 1) = f(k) = k 1 = k (e) This is well-defined, and we have f(n) = n/ +1. We prove this by strong induction. The base case is given to us, so suppose that, for some k, we have f(j) = j/ +1 for all 0 j k. If k + 1 is even, then k 1 = (k + 1) is even also, and which means that k 1 + 1 = k 1 + = k + 1, 5.3.8. f(k + 1) = f(k 1) = (k 1)/ +1 = (k+1)/ = (k+1)/ +1. If, on the other hand, k +1 is odd, then we need to verify that f(k) = f(k 1) and that both of these quantities are equal to (k+1)/ +1. Since k+1 is odd, we see that k is even and (k + 1)/ = k/. Moreover k 1 is odd and (k 1)/ = (k )/ = (k/) 1, so f(k) = k/ +1 = k/ = (k/) 1 = (k 1)/ +1 = f(k 1). Moreover, completing the induction. (a) a 1 = and a n+1 = a n + 4 for all n 1. (b) a 1 = and a n+1 = a n. (c) a 1 = and a n+1 = a n + (n + 1). f(k + 1) = f(k) = k/ +1 = (k+1)/ +1

(d) a 1 = 1 and a n+1 = a n + n + 1. 5.3.1. We prove that f 1 + + f n = f n f n+1 for all n 1 by induction. When n = 1, this just says that f 1 = 1 is equal to f 1 f = 1, which is true. Suppose that f 1 + +f k = f kf k+1 for some k. Then f 1 + + f k + f k+1 = f k f k+1 + f k+1 = f k+1 (f k + f k+1 ) = f k+1 f k+ and this completes the induction. 5.3.14. Note that f f 0 f 1 = 1 0 1 = 1 = ( 1) 1, so that kicks off the induction. Suppose f k+1 f k f k = ( 1)k for some positive integer k. Then and that completes the induction. f k+ f k f k+1 = (f k + f k+1 f k f k+1 = f k + f k f k+1 f k+1 = f k + f k+1 (f k f k+1 ) = f k + f k+1 ( f k 1 ) = (f k 1 f k+1 f k ) = ( 1) k = ( 1) k+1 5.3.16. Note that f 0 f 1 + f = 0 1 + 1 = 0 and f 1 1 1 = f 1 1 = 0 also, so this kicks off the induction. If f 0 + f k = f k 1 1 for some positive integer k, then f 0 + f k f k+1 + f k+ = (f k 1 1) f k+1 + f k+ = (f k 1 1) f k+1 + (f k + f k+1 ) and that completes the induction. = (f k 1 1) + f k = f k+1 1 5.3.0. We define and then max{a, b} := { a if a b b if b > a. max{a 1,..., a n } := max{a 1, max{a,..., a n }} for all n. Similar definitions work for min also. 5.3.. First, we show that Z + S by usual induction. Let P (n) be the statement that n S. Then P (1) is the statement that 1 S, which we know is true. If P (k) is true for some k, then we know that k S. We know that 1 S, so then k + 1 S also, proving that P (k + 1) is also true. Thus P (n) is true for all n, which means that Z + S. Next, we show that S Z + by structural induction. Notice that 1 Z +. Moreover, if s, t Z +, then s + t Z + also clearly. This shows that S Z +, which proves that S = Z +. 5.3.4. (a) 1 S and if s S, then s + S. (b) 3 S and if s S, then 3s S. 3

(c) 1, x S, and if p, q S then p + q S, p q S and pq S. 5.3.6. (a) First step: (, 3), (3, ). Second step: (4, 6), (5, 5), (6, 4). Third step: (6, 9), (7, 8), (8, 7), (9, 6). Fourth step: (8, 1), (9, 11), (10, 10), (11, 9), (1, 8). (b) Let P (n) be the statement that, if (a, b) S is obtained from (0, 0) after n applications of the recursive definition, then 5 a+b. Then P (0) is clear, so suppose P (0),..., P (k) are all true. If (a, b) S is obtained using k +1 applications of the recursive definition, then either (a, b) = (a +, b + 3) for some (a, b ) S that is obtained using k applications, or (a, b) = (a + 3, b + ) for some (a, b ) S that is obtained using k applications. In either case, a + b = (a + b ) + 5 so a + b is divisible by 5 because a + b is. This completes the induction. (c) Clearly 5 (0 + 0). Inductively, if 5 (a + b), then 5 ((a + ) + (b + 3)) and also 5 ((a + 3) + (b + )). 5.3.35. The reversal of the empty string is the empty string. If w is a string of length n+1, then we can write w as xy where x has length n and y is just a single character. Then we define w R := yx R. 5.3.46. Notice that (1+1)+1 = 5, so we have a m,n = (m+n)+1 for (m, n) = 1. Suppose that for some (m, n) (1, 1) we have a m,n = (m + n ) + 1 for all (m, n ) < (m, n), where means the lexicographic order on Z + Z +. If n = 1, then (m 1, 1) < (m, 1), so a m,n = a m 1,n + = (((m 1) + n) + 1) + = (m + n) +. If n > 1, then (m, n 1) < (m, n) also, so again 6.1.3. (a) 4 10. (b) 5 10. 6.1.8. 6 5 4. a m,n = a m,n 1 + = ((m + (n 1)) + 1) + = (m + n) +. 6.1.1. ( 6 ) n 1 = ( 7 1) 1 = 7. n=0 6.1.14. If n = 1, there is only one such string. If n, we get to choose all but the first and last bits freely, so we have n options. 6.1.16. There are 6 4 total strings, and 5 4 strings that do not have x in them, so the number of strings that do have an x in them is 6 4 5 4. 6.1.. (b) 999/7 of them are divisible by 7. Of those, the ones that are also divisible by 11 are the ones that are multiples of 77, and there are 999/77 of those. So the number that are divisible by 7 but not 11 is 999/7 999/77. 4

(f) 1000 999/7 999/11 + 999/77. (g) There are 9 ways of choosing a 1-digit positive integer, 9 9 ways of choosing a -digit positive integer with distinct digits, and 9 9 8 ways of choosing a 3-digit positive integer with distinct digits. So we just add these numbers up. (h) There are 4 ways of choosing a 1-digit positive integer that is even. There are 5 5 ways of choosing a -digit integer where the first (tens) digit is odd and the second digit is even (the first can be 1,3,5,7,9 and the second can be 0,,4,6,8, and notice that the end result will necessarily have two distinct digits and will be even). Also, there are 4 4 ways of choosing a -digit integer where both digits are even and distinct (the first digit can be,4,6,8 and the second can 0,,4,6,8 except whatever the first digit was). Similarly, there are 5 4 5 + 5 5 4 + 4 5 4 + 4 4 3 ways of choosing 3-digit numbers. 6.1.4. (a) There are 9999/9 = 1111 integers less than or equal to 9999 that are divisible by 9, and of those 999/9 = 111 of them are less than 1000. So there are 1000 such integers. (b) There are 9999 1000 + 1 = 9000 total integers in this range, and half of them will be even, so 4500. (g) There are 9999/5 integers that are divisible by 5 less than or equal to 9999, and of them 999/5 are less than 1000. Also, a multiple of 5 is also a multiple of 7 if and only if its a multiple of 35, and there are 9999/35 integers less than or equal to 9999 that are divisible by 35, and of them 999/35 are less than 1000. So we get ( 9999/5 999/5 ) ( 9999/35 999/35 ). (h) An integer is divisible by 5 and 7 if and only if it is divisible by 35. 9999/35 999/35, like we saw above. 6.1.3. (d) 1 5 4 (6 7). So we have (e) 1 6 6 1. 6.1.34. (d) 5 10. 6.1.40. There are 100 total subsets. Of them, 1 has no elements and 100 have 1 element. So 100 100 1 have more than 1 element. 6.1.44. There are 6! ways of arranging the people around the table, but each arrangement is being considered equivalent to 6 arrangements, so we get (6!)/6 = 5!. 6.1.46. (a) There are 10 9 5 = (10!)/4! ways of choosing some permutation of 6 people out of the 10. There are 9!/3! ways where the bride is excluded. So there are 10!/4! 9!/3! ways. (b) Using the same idea as above, 10!/4! 8!/!. (c) We can count the ways of choosing a permutation of 6 people of of the 9 non-groom people that include the bride using the idea above. We then repeat the idea for the 9 non-bride people. These two sets of permutations are disjoint, so we get a total of (9!/3! 8!/!) + (9!/3! 8!/!). 5

6.1.50. It s sufficient to calculate the number N of bit strings with 5 consecutive 0 s. Indeed, the number of bit strings with 5 consecutive 1 s is also N since the bijection which swaps 1 s for 0 s and conversely maps the set of bit strings with 5 consecutive 0 s to the set of bit strings with 5 consecutive 1 s. Notice that there are bit strings that have both 5 consecutive 0 s and 5 consecutive 1 s, so the total number we re looking for is N. The bit strings with 5 consecutive 0 s are all of one the following possible forms, where x stands for an arbitrary bit. (i) 00000xxxxx. (ii) 100000xxxx. (iii) x100000xxx. (iv) xx100000xx. (v) xxx100000x. (vi) xxxx100000. Notice that a string cannot simultaneously be of two of these types. There are 5 strings of type (i), and 4 strings of types (ii)-(vi). So N = 5 + 5 4. 6.1.5. There are 38 + 3 7 students in the class. 6