{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

midterm2sol - CS 70 Fall 2013 Discrete Mathematics and...

Info icon This preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
CS 70 Discrete Mathematics and Probability Theory Fall 2013 Midterm #2 1. (30 points) Short Answer. No justification necessary. Please write only the answer in the space provided after each question. Please do any calculations on the back of the page. (a) (2 points) How many distinct polynomials of degree (at most) 3 are there modulo 11, such that the value at the points x = 1 , 2 , 3 , 4 lie in the set { 1 , 2 , 3 , 4 , 5 } ? Solution: 5 4 . 4 points uniquely determine a degree 3 polynomial and each of the 4 points have 5 possibilities. (b) (2 points) A bridge hand is a set of 13 cards from a standard 52-card deck. A bridge hand is called balanced if it has 4 cards from one suit and 3 each from the remaining three suits. How many distinct balanced bridge hands are there? Solution: 4 1 13 4 13 3 3 . Select one suit out of 4 to have 4 cards from that suit, and all other suits have 3 cards. (c) (2 points) Recall that an anagram of a word is a string made up from the letters of that word, in any order. (For instance, there are exactly three anagrams of BEE: namely EEB, EBE, and BEE. Note that by our definition anagrams need not form legal words.) How many anagrams are there of the word ANAGRAM? Solution: 7! 3! . There are 7! ways to permute the letters, and 3! accounts for over counting for the A’s. (d) (2 points) In an n dimensional hypercube, how many vertices are there at a distance of exactly 6 from a particular vertex? Solution: n 6 . The vertex can be represented by an n -bit string and all vertices at a distance of exactly 6 differ in 6 bits - we just need to choose which 6 bits. (e) (2 points) If A , B , C are event such that P [ A ] = . 5, P [ B ] = . 4 and P [ C ] = . 3, and such that P [ A B ] = . 2, P [ A C ] = . 1, P [ B C ] = . 1 and P [ A B C ] = . 9. What is P [ A B C ] ? Solution: . 1 . By the inclusion/exclusion principle, Pr [ A B C ] = Pr [ A ]+ Pr [ B ]+ Pr [ C ] Pr [ A B ] Pr [ A C ] Pr [ B C ]+ Pr [ A B C ] . (f) (5 points) Pick two non-zero numbers x and y modulo 7 at random. Let z = xy mod 7. Let A be the event that x = 3, B that y = 3 and C that z = 3. Note: An alternate interpretation would be picking a random non-zero number and reducing it modulo 7, so you are picking from the set { 0 ,..., 6 } . This was also given full credit, and the solutions for this interpretation (in italics) are included below. Of course you used the alternative interpretation the solution to part v. was different. i. What is Pr [ C ] ? Solution: 1 6 . z can be any value other than zero. CS 70, Fall 2013, Midterm #2 1
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Name: SID: Alternate interpretation: 6 49 . Let x take on any non-zero value (6 possibilities) and y equal 3 x 1 . ii. What is Pr [ A B ] ? Solution: 1 36 . Both x and y are equal to 3 with probability ( 1 6 ) 2 . Alternate interpretation: 1 49 . Both x and y are equal to 3 with probability ( 1 7 ) 2 . iii. What is Pr [ A C ] ?
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern