Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

CS70 Midterm 1 Solutions: Problems and Their Solutions, Exams of Discrete Mathematics

The solutions to the midterm exam of the cs70 course at uc berkeley, focusing on problems related to propositional logic, permutations, and tilings. The solutions include justifications and calculations for each problem.

Typology: Exams

2012/2013

Uploaded on 04/02/2013

sharda_852
sharda_852 🇮🇳

3

(2)

66 documents

1 / 4

Toggle sidebar

Related documents


Partial preview of the text

Download CS70 Midterm 1 Solutions: Problems and Their Solutions and more Exams Discrete Mathematics in PDF only on Docsity! Midterm Exam 1 Solutions CS70 Blum/Wagner, 9 March 2001 This is a CLOSED BOOK examination. One page of notes is permitted. Calculators are permitted. Do all your work on the pages of this examination. Give reasons for all your answers. Problem 1 (Short answer grab-bag) [10 Points] For parts (a)-(c), justify your answer briefly. (a) [2 Points] True or False: (P => Q) => (Q => P) always holds, for all propositions P, Q. False. Counter example: P=False, Q=True. This is a converse error. (b) [3 Points] True or False: ((P v Q) => Q) => (Q => (P v Q)) always holds, for all propositions P, Q. True. (Q => (P v Q)) = True for all P,Q, and (anything => True) is true. (Don't be fooled into thinking this is another converse error. It's not.) (Common error: Not realizing that (False => False) is True.) (c) [3 Points] Recall that two sest S,T are said to be disjoint if = Ø. Can two events A and B be simultaneously independent and disjoint? Yes. An example: If A = Ø, then A isect B = Ø and Pr[A]=0. So, Pr[A isect B] = 0 = 0 × Pr[B] = Pr[A]Pr[B], and A,B are independent and disjoint. (d) [2 Points] Recall that two random variables X and Y are independent just if the pair of events X=i and Y=j are independent no matter how you choose the values i and j. Which of the following most accurately expresses the proposition that X and Y are not independent? (You do not need to justify your answer.) The answer is (iv) since . Problem 2 (Permutations) [25 Points] Let S be the sample space of all permutations on the n letters {1,2,...,n}, with the uniform probability distribution. In each of the following, give reasons for all your answers. (You may find the next page, which has been left blank, useful for justifying your answers.) CS 70 Midterm 1 Solutions 1 (a) [1 Point] The uniform probability distribution assigns to every permutation on n letters the probability: 1/(n!) Each of the n! permutations is assigned the same probability, and these probabilities must sum to 1. Define the random variable Xi to be the number of cycles of length i, i.e., Xi maps each permutation to an integer equal to the number of cycles in that permutation that are of length i. (b) [1 Point] For the permutation (124)(36)(5)(7) on n=7 letters: X1= 2 , X2= 1 , X3= 1 , X4= 0 . 2 cycles of length 1: (5) and (7), 1 of length 2: (56), 1 of length 3: (124) For general positive integers n, give: (c) [3 Points] E[X1] = 1 . Define random variable Note that By linearity of expectation, (d) [7 Points] E[X2] = 1/2 . Define random variable Note that By Linearity of expectation, For an integer k {1,2,...,n}, what is CS 70 Midterm 1 Solutions 2
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved