DOC PREVIEW
Berkeley COMPSCI 70 - Homework

This preview shows page 1 out of 2 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 2 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 2 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

U.C. Berkeley – CS70: Discrete Mathematics and Probability Problem Set 3Lecturers: Umesh Vazirani & Christos H. Papadimitriou Due September 15, 2006 at 4:00pmProblem Set 31. Simple Induction Prove that for every n ≥ 2,q1 +p1 + ···√1 (n square roots) is irrational.2. Strengthen induction hypothesis Prove that for all n ≥ 1, all the entries of the matrix1 10 1nare bounded above by n.3. Proofs to GradeGrade the following induction proofs. If you think the proof is incorrect, please explain exa c tly whatis wrong with the str uctur e or the reasoning in the proof. Remember, simply saying that the claim (orthe induction hypothesis is false) is n ot a justification.(a) Claim: (∀n ∈ N)(n2≤ n). Proof:i) Base Case: When n = 1, the statement is 12≤ 1 whcih is true.ii) Induction hypothesis: Assume that k2≤ k.ii) Inductive step: We need to show that(k + 1)2≤ k + 1Working backwards we see that:(k + 1)2≤ k + 1k2+ 2k + 1 ≤ k + 1k2+ 2k ≤ kk2≤ kSo we get back to our original hypothesis which is assumed to be tr ue. Hence, fo r e very n ∈ Nwe know that n2≤ n. ♠(b) Claim: (∀n ∈ N)(7n= 1).Proof: (uses strong induction)Base Case: Certainly 70= 1.Induction hypothesis: Assume that 7j= 1 for a ll 0 ≤ j ≤ k.Inductive step: We need to prove that 7k+1= 1. But,7k+1=(7k·7k)7k−1=(1 ·1)1= 1Hence, by the Principle of Strong Induction, 7m= 1 for all m ∈ N. ♥(c) Claim: For all natural numbers n ≥ 4, 2n< n!.Proof: 24= 16 and 4! = 24, so the statement is true fo r n = 4.Assume that 2n< n! for some n ∈ N. Then 2n+1= 2(2n) < 2(n!) ≤ (n + 1)(n!) = (n + 1)!, so2n+1< (n + 1)!. By the principle of mathematical induction, the statement is true for all n ≥ 4.♣1(d) Claim: All natural numbers are equal.Proof: It is sufficient to show that for any two natural numbers A and B, A = B. Further, it issufficient to show that for all N ≥ 0, if A and B satisfy MAX(A, B) = N then A = B.Proceed by induction on N.Base case: If N = 0, then A and B, being natural numbers , must both be 0. So A = B.Induction Step: Assume that the theorem is true for some value k. Take A and B with MAX(A,B) = k+1. Then MAX((A-1), (B-1)) = k. And hence (A-1) = (B-1). Consequently, A = B. ♦4. Consider the following recursively progra m for a function f :function f(n)if n = 0 return 0else return(f (n −1) + 2n)end functionProve by induction that f(n) = n2+ n.5. Examples for stable marriage algorithm.(a) For the following instance of the stable marriag e problem:Men’s preference list:1 B A C2 C B A3 A C BWomen’s preference list:A 1 2 3B 2 3 1C 3 1 2i. List the rogue couples in the pairing (1, C), (2, B), (3, A).ii. Lis t all the stable pairings.(b) Run the traditional propose a nd reject alg orithm on the following example.Men’s preference list:1 A B C D2 B C A D3 C A B D4 A B C DWomen’s preference list:A 2 3 4 1B 3 4 1 2C 4 1 2 3D 1 2 3


View Full Document

Berkeley COMPSCI 70 - Homework

Documents in this Course
Notes 1

Notes 1

12 pages

Note 2

Note 2

6 pages

Notes

Notes

6 pages

Notes

Notes

7 pages

Note 10

Note 10

8 pages

n20

n20

10 pages

n19

n19

10 pages

n18

n18

10 pages

n17

n17

6 pages

n16

n16

9 pages

n15

n15

10 pages

n14

n14

9 pages

n13

n13

6 pages

n12

n12

7 pages

n11

n11

6 pages

n10

n10

8 pages

n9

n9

5 pages

n8

n8

7 pages

n7

n7

8 pages

n6

n6

5 pages

n5

n5

8 pages

n4

n4

7 pages

n3

n3

10 pages

n2

n2

7 pages

n1

n1

5 pages

Load more
Download Homework
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Homework and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Homework 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?