CS 70
Discrete Mathematics and Probability Theory
Fall 2013
Midterm #2
1.
(30 points) Short Answer. No justifcation 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 52card 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 de±nition 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
nonzero
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 nonzero 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
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentName:
SID:
Alternate interpretation:
6
49
. Let x take on any nonzero 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
]
?
This is the end of the preview.
Sign up
to
access the rest of the document.
 Winter '09
 Probability theory, Equals sign, Secret sharing, Bob n

Click to edit the document details