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 4Lecturers: Umesh Vazirani & Christos H. Papadimitriou Due September 22, 2006 at 4:00pmProblem Set 41. Fibonacci Fun: Prove the nth Fibonacci number is equal toφn−(1−φ)n√5, where φ =1+√52is theGolden Ratio, and satisfies the identity φ2= φ + 1. Be sure to state what style of proof you are using.2. Hard examples for sta ble mar riage algorithm.In the last homework, you ran the traditional propose and reject a lgorithm on the following instance:Men’s pr e ference 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 4(a) In class we showed that the propose and reject algo rithm must terminate after at mos t n2propos-als. Prove a sharper bound showing that the algorithm must terminate after at most n(n − 1) + 1proposals. Conclude that the above example is a worst case instance for n = 4. How many daysdoes the algorithm take on this instance?(b) Extra credit: generalize the above example to arbitraty n and prove rigorously that the algorithmmakes n(n − 1) + 1 proposals on your example. How many days doe s the a lgorithm ta ke?3. Man-optimal, Woman-optimal In an par ticula r instance of the stable marriage problem with nmen and n women, it turns out that there are exactly three distinct stable matchings, M1, M2, M3.Also, each woman W has a different partner in the three matchings. Therefore each woman ha s a clearpreference ordering of the three matchings (according to the ranking of her partners in her preferencelist). Now, suppose for woman W1, this order is M1> M2> M3. True or false: every woman hasthe same preference o rdering M1> M2> M3. Justify your answer.4. Stable Grouping.(a) In a particula r class, there are n students attending from each of 3 different majors (3n totalstudents). The students ar e asked to split into groups of 3 such that one person from each major isin each group. Each student has a ranking of pre ference for the students from the other 2 majors. Astudent, s ay Anita, as signed to a group, X, will naturally prefer a different group, Y, if Anita ranks theother two members of Y higher than the other two members of X not in her major. The grouping willbe unstable if also Y’s member in Anita’s major, say Rishi, rank s the o ther two member s of X higherthan he ranks his two cur rent compatriots. Prove that there always exis ts a stable grouping of all ofthe students.Hint: try to solve this by applying what you know from the stable marria ge problem. Is there somethinguseful you can say by restricting your attention to only two of the majors. Now can you include thethird major?1(b) What if ther e are m different majors (mn total students)? Using induction, prove that there alwaysexists a stable grouping o f all of the students.(c) For (b), how long would the professor have to wait for the students to asso rt into groups? In otherwords, how many propose / rejects would it take to achieve a stable grouping?5. Modular Equations Solve the following equations for x and y or show that no solution exists. Showyour work (in particular, what division must you carry out to solve each case).(a) 5x + 23 ≡ 6 (mod 499)(b) 9x + 80 ≡ 2 (mod 81)(c) The system of simultaneous equations30x + 3y ≡ 0 (mod 37) and y ≡ 4 + 13x (mod 37)6. Modular Sum of Squares Prove that if n = 3 mod 4, then n ca nnot be the sum of the squares of2 integers.7. Goldbach’s Infinitude of Primes.The Fermat numbers ar e generally described as: Fn= 22n+ 1 . In the 1700’s, Goldbach realize d thatFermat number s held a fasc inating se c ret.(a) P rove that Fn= F0× F1× · · · × Fn−1+ 2.(b) Use (a) to s how that any two Fermat numbers must be r e latively prime with one another.(c) Use (b) to argue that there must be an infinitely many number of


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?