Download Extra Problems.

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Probability interpretations wikipedia , lookup

Ars Conjectandi wikipedia , lookup

Probability wikipedia , lookup

Transcript
Extra Problems.
1. The class of STOR 215 consists of 20 freshmen, 45 sophomores, 30 juniors
and 5 seniors. How many committees of 8 students can be created that
have 2 freshmen, 2 sophomores, 2 juniors, and 2 seniors?
Solution:
20
2
45
2
30
2
5
2
= 818, 235, 000.
2. The famous symbologist Robert Langdon of da Vinci Code is convinced
that the clue to the great secret he is trying to unravel is hidden in an anagram formed by using the letters in the word GENESIS. Unfortunately he
has never taken STOR 215, so he does not know how many such anagrams
there are. Compute the number of such anagrams.
Solution:
7!
1!1!1!2!2!
= 1260.
3. Let n and k be positive integers. How many subsets of {1, 2, 3, · · · , 2n}
contain exactly k odd numbers? (Assume that 0 ≤ k ≤ n.)
Solution: There
n odd and n even integers in the set {1, 2, 3, · · · , 2n}.
There are nk ways to choose k of them. There are also 2n subsets of the
even integers. A subset containing exactly k odd numbers can be obtained
by picking k of the n odd numbers and then selecting
any number of the
n even numbers. Hence the total number is nk 2n .
4. Show that
n
X
(3i2 + 3i + 1) = (n + 1)3 ,
n ≥ 0.
i=0
Solution: Use induction. The equation is true for n = 0 and n = 1. Now
assume it is true for some n ≥ 1. We shall show that it is true for n + 1.
We have
n+1
X
(3i2 + 3i + 1)
=
i=0
n
X
(3i2 + 3i + 1) + 3(n + 1)2 + 3(n + 1) + 1
i=0
=
(n + 1)3 + 3(n + 1)2 + 3(n + 1) + 1
=
(n + 2)3 .
We have used the binomial expansion of (n + 2)3 = (n + 1 + 1)3 to obtain
the last term.
5. In a basketball game the score of UNC Tarheels increases by 1, 2 or 3 at
a time. We call each sequence of basket scores a trajectory. For example
1-1-1-1, 1-2-1, 2-1-1, 1-3, 3-1 are some of the distinct trajectories in a game
with final score of 4. (Let us hope the Tarheels never play such a lousy
1
game.) Let Tn be the number of possible trajectories in a game in which
UNC scores n points.
(a) (1) Compute T1 , T2 , T3 .
(b) (6) For n ≥ 4, derive an equation for Tn in terms of Tk , k ≤ n − 1.
(c) (3) Using the above equation, compute T8 .
(The sequence T1 , T2 , T3 , · · · is sometimes called the tribonacci sequence!)
Solution:
(a) T1 = 1, T2 = 2 (1 − 1, 2),, T3 = 4 (1 − 1 − 1, 1 − 2, 2 − 1, 3)
(b) Consider the score on the first basket. If it is 1, then we have Tn−1
trajectories to get the remaining n − 1 points. If it is 2, then we have
Tn−2 trajectories to get the remaining n − 2 points. If it is 3, then
we have Tn−3 trajectories to get the remaining n − 3 points. Hence
we must have
Tn = Tn−1 + Tn−2 + Tn−3 , n ≥ 4.
(c) The first eight terms are 1,2,4,7,13,24,44,81. Hence we have T8 = 81.
6. Let A1 , A2 , · · · , An be n given events.
(a). Prove that
P (A1 ∪ A2 ) ≤ P (A1 ) + P (A2 ).
Solution: We have
P (A1 ∪ A2 ) = P (A1 ) + P (A2 ) − P (A1 ∩ A2 ) ≤ P (A1 ) + P (A2 )
since P (A1 ∩ A2 ) ≥ 0.
(b). Using the above result, and induction, prove that
P (A1 ∪ A2 ∪ · · · ∪ An ) ≤
n
X
P (Ai ), n ≥ 2.
i=1
Solution: Suppose the statement is true for 2,3,· · · , n − 1. We shall
show that it is true for n. Let B = A1 ∪ A2 · · · ∪ An−1 . Then
P (A1 ∪ A2 ∪ · · · ∪ An )
= P (B ∪ An )
≤ P (B) + P (An ) (from part (a))
= P (A1 ∪ A2 · · · ∪ An−1 ) + P (An )
≤
=
n−1
X
i=1
n
X
i=1
2
P (Ai ) + P (An ), (from induction hypothesis)
P (Ai ).
This completes the induction.
7. A couple decides to stop having children as soon as they get (1) one boy
and one girl or (2) four kids in total. Suppose the probability of a child
being a boy is p and a girl is q = 1 − p. Genders of successive children are
independent of each other.
(a). What is an appropriate sample space that describes all possible outcomes for this couple?
Solution: S = {BBBB, BBBG, BBG, BG, GGGG, GGGB, GGB, GB}.
S consists of 8 possible sequences.
(b). Write the event A = {the couple gets four children} as a subset of
the sample space. What is P (A)?
Solution: A = {BBBB, BBBG, GGGB, GGGG}. We have
P (A) = p4 + p3 q + q 3 + q 4 = p3 + q 3 .
Here we have used p + q = 1.
(c). Let B be the number of boys born to this couple. What is the
distribution of B, assuming p = q = 1/2?
Solution: B can take values 0,1,2,3,4. We have
P (B = 0) = P (GGGG) = q 4 = 1/16,
P (B = 1) = P (BG)+P (GB)+P (GGB)+P (GGGB) = pq+qp+q 2 p+q 3 p = 11/16.
P (B = 2) = P (BBG.) = p2 q = 2/16,
P (B = 3) = P (BBBG) = p3 q = 1/16,
P (B = 4) = P (BBBB) = p4 = 1/16.
(d). Compute E(B), assuming p = q = 1/2.
Solution: We have
E(B) =
4
X
kP (B = k) = (0∗1+1∗11+2∗2+3∗1+4∗1)/16 = 22/16 = 1.375.
k=0
(e). What is the probability that couple gets 2 boys, given that the couple
stops after three children?
Solution: Let C be the event that the couple gets 3 children. We
have
P (C) = P (BBG) + P (GGB) = p2 q + pq 2 = pq.
Let D be the event that the couple gets two boys. We have
P (D) = P (B = 2) = p2 q.
Hence
P (D|C) = P (D ∩ C)/P (C) = p2 q/pq = p.
3
8. We select a subset X of the set S = {1, 2, · · · , 100} randomly and uniformly, so that every subset has the same probability of being selected.
What is the probability that
(a). X has an even number of elements,
Solution: Let N be the number of subsets with an even number of
elements. We have
X
49 100
100
100
+
N =
+
0
2k
100
k=1
49
X
99
99
= 1+
+
+ 1 (Th 2, Page 366)
2k
2k − 1
k=1
98 X
99
= 2+
i
i=1
99 X
99
=
i
i=0
=
299 .
The total number of subsets is 2100 . Since all are equally likely, we
have
P (X has even number of elements) = N/2100 = 299 /2100 = 1/2.
(b). both 1 and 100 belong to X,
Solution: We have
P (X includes 1 and 100) = 298 /2100 = 1/4.
(c). the largest element of X is 50,
Solution: We have
P (the largest element of X is 50) = 249 /2100 = 1/251 .
(d). X has at most two elements.
Solution: We have
P (X has at most two elements) = (1+100+100∗99/2)/2100 = 5051/2100 .
9. Suppose we randomly draw four cards out of a standard deck of 52 cards.
(All the answers to the following questions must be given as decimal numbers, for example .35. Show all steps.)
4
(a) Let A be the event that all are face cards (there are sixteen face
cards in a deck of 52 cards), and B be the event that all four are
red cards. Compute P (A), P (B) and P (A|B). Are these two events
independent? Why or why not?
Solution: Number of ways of picking four cards = 52
4 = 270725.
Number of ways of picking four face cards = 16
4 = 1820. Number
26
of ways of picking four red cards = 4 = 14950. Number of ways
of picking four red face cards = 84 = 70 Hence
P (A) = 1820/270725 = .006722,
P (B) = 14950/270725 = .05522,
P (AB) = 70/270725 = .0002586,
P (A|B) = 70/14950 = .0046822.
Since P (A|B) 6= P (A), events A and B are not independent.
(b) Let X be the number of black cards among the four cards drawn.
What is the probability distribution of X?
Solution: X can take values k = 0, 1, 2, 3, 4. P (X = k) = Probability
exactly k black cards among the four cards =
26of getting
52
26
/
.
Computing
this for all values of k we get
k
4−k
4
P (X = 0) = .0522, P (X = 1) = .2497, P (X = 2) = .3902,
P (X = 3) = .2497, P (X = 4) = .0522.
(c) (2) Compute the expected value of X.
Solution:
4
X
kP (X = k) = 2.
E(X) =
k=0
10. Consider a complete graph G = (V, E) with four nodes.
(a) How many edges does it have?
Solution: 6.
(b) How many subgraphs of G are there? (Not necessarily connected.)
Solution: 26 = 64 subgraphs with 4 nodes. 23 = 8 subgraphs
for each of the four complete subgraphs of three nodes. 21 = 2
subgraphs for the each of the six complete subgraphs of 2 nodes, and
four subgraphs with one node, and one with no nodes (the empty
subgraph). A total of 64 + 8*4 + 2*6 + 4 +1 = 113 subgraphs.
(c) How many of these subgraphs are distinct labeled spanning trees of
G?
Solution: 42 = 16.
5
Now suppose we construct a random subgraph of G by picking a random
number of edges as follows: each edge is picked independently with probability p, where 0 ≤ p ≤ 1 is a given number. Assume this randomization
method in answering the following questions:
(a) What is the probability that the randomly selected subgraph is a
complete graph?
Solution: p6 .
(b) What is the probability that a given subgraph of three edges is
picked?
Solution: p3 (1 − p)3 .
(c) What is the probability that the randomly picked subgraph is a spanning tree?
Solution: There are 16 spanning trees. Each spanning tree has a
probability of p3 (1 − p)3 of being picked. Hence the required probability is 16p3 (1 − p)3 .
11. Consider the network in exercise 21 on page 243 of the textbook. Suppose
the weights on the edges are commute times in minutes.
(a) Find the least commute time from s to t.
(b) What path will produce the least commute time?
(c) Suppose it is possible to reduce the commute time on any one road
by a minute by spending a million dollars on road improvement.
We have two million dollars available to reduce the commute times.
Which two roads should we spend it on, if the aim is to reduce the
minimum commute time from s to t?
12. Consider the network of the type shown in F.7.8 (b) on page 248 of the
text. This is called a ladder graph with three rungs (the vertical edges).
Let Ln be a ladder graph with n rungs.
(a) How many vertices and edges does Ln have?
(b) Does it have an Euler path or circuit? (The answer may depend on
n.)
(c) Does it have a Hamiltonian path or circuit?
(d) Let Tn be the number of spanning trees in Ln . Show that
Tn+1 = 3Tn + 1,
n ≥ 0,
with T0 = 0.
Solution: Clearly L1 has only one spanning tree, namely the single
vertical edge. Hence T1 = 1, that is, the equation holds for n = 0.
Now let n ≥ 1, and consider the ladder graph Ln+1 . Note that there
6
are three new edges in Ln+1 that don’t belong to Ln . Consider any
spanning tree in Ln . From this spanning tree we can create exactly
three spanning trees of Ln+1 by adding to it any two of the three new
edges in Ln+1 . In addition, we can also create one other spanning
tree by using only the horizontal edges of Ln and all three new edges
in Ln+1 . Hence we get
Tn+1 = 3Tn + 1.
13. Consider the graph in Figure 7.8(a) on page 248.
(a) Suppose the edge with weight 2 is unreliable, and is available with
probability .4 and not available with probability .6. Let X be the
weight of the minimum weight spanning tree. What is the value of
X if the edge is available? What is the value of X if the edge is
unavailable?
(b) What is the distribution of X?
(c) What is the expected value of X?
7