

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Main points of this past exam are: Min-Cut Algorithm, Probability, Random Permutations, Odd Values, Values Alternate, Probabilistic Algorithm, Deterministic Alg>thm, Running Time, Odd Values, Values Alternate
Typology: Exams
1 / 2
This page cannot be seen from the preview
Don't miss anything!


CS 174, Fall, 05, Steiger
Instructions: Do all your work in the blue exam books. Please write your answers IN THE GIVEN ORDER, though you may solve problems in any order. There is no need to reduce answers to simplest terms. You may use one page of prepared notes, but all work must be your own. Show ALL your work. You will get little or no credit for an unexplained answer. The value of each question appears in parentheses. Use this as a guide in allocating your time. There are 80 points, and you have 80 minutes.
(c) Let C be the event that π has two cycles, one of length k, and one of length k + 1, the odd numbers in one cycle and the even numbers in the other. Find P(C) and explain how you did it. (d) Let D be the event that even and odd values alternate (if π i is even then π i+1 is odd, and vice-versa, all i < n. Find the probability of D and explain how you did it.