Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Mathematics of radio engineering wikipedia , lookup
Foundations of statistics wikipedia , lookup
Fundamental theorem of algebra wikipedia , lookup
Central limit theorem wikipedia , lookup
Four color theorem wikipedia , lookup
Infinite monkey theorem wikipedia , lookup
Proofs of Fermat's little theorem wikipedia , lookup
Solutions to Homework 7 Section 6.1 8. In order to solve this problem, we need to compute the number of poker hands that contain the ace of hearts. There is no choice about choosing the ace of hearts. To form the rest of the hand, we need to choose 4 cards from the 51 remaining cards, so there are C(51, 4) hands containing the ace of hearts. Therefore the 5 = 52 . answer to the question is the ratio C(51,4) C(52,5) 16. Of the C(52, 5) = 2, 598, 960 hands, 4 · C(13, 5) = 5148 are flushes, since we can specify a flush by choosing a suit and then choosing 5 cards from that suit. Therefore the answer is 5148/2598960 = 33/16660 ≈ 0.0020. 24. In each case, if the numbers are chosen from the integers from 1 to n, then there are C(n, 6) possible entries, only one of which is the winning one, so the answer is 1/C(n, 6). (a) 1/C(30, 6) ≈ 1.7 × 10−6 (d) 1/C(48, 6) ≈ 8.1 × 10−8 34. (a) There are 50·49·48·47 equally likely outcomes of the drawings. In only one of these do Bo, Colleen, Jeff, and Rohini win the first, second, third, and fourth prizes, respectively. Therefore the probability is 1/(50 · 49 · 48 · 47) = 1/5527200. (b) There are 50 · 50 · 50 · 50 equally likely outcomes of the drawings. In only one of these do Bo, Colleen, Jeff, and Rohini win the first, second, third, and fourth prizes, respectively. Therefore the probability is 1/504 = 1/6250000. Section 6.2 1 8. (a) Since 1 has either to precede 2 or to follow it, and there is no reason that one of these should be any more likely than the other, we immediately see that the answer is 1/2. (c) For 1 immediately to precede 2, we can think of these two numbers as glued together in forming the permutation. Then we are really permuting n − 1 numbers the single numbers from 3 through n and the one glued object, 12. There are (n − 1)! ways to do this. Since there are n! permutations in all, the probability of randomly selecting one of these is (n − 1)!/n! = 1/n. 18. We assume that births are independent and the probability of a birth in each day is 1/7. (a) The probability that the second person has the same birth day-of-the-week as the first person is 1/7. (b) The probability that all the birth days-of-the-week are different if pn = 6 5 · · · · 8−n since each person after the first must have a different birth day-of-the7 7 7 week from all the previous people in the group. Note that if n ≥ 8, then pn = 0 since the seventh fraction is 0. The probability that at least two are born on the same day of the week is therefore 1 − pn . (c) We compute 1 − pn for n = 2, 3, . . . and find that the first time this exceeds 1/2 is when n = 4, so that is our answer. With four people, the probability that at least two will share a birth day-of-the-week is 223/243, or about 65%. 24. There are 16 equally likely outcomes of flipping a fair coin five times in which the first flip comes up tails (each of the other flips can be either heads or tails). Of these only one will result in four heads appearing namely THHHH. Therefore the answer is 1/16. 26. Intuitively the answer should be yes, because the parity of the number of 1’s is a fifty-fifty proposition totally determined by any one of the flips. What happened on the other flips is really rather irrelevant. Let us be more rigorous, though. There are 8 bit strings of length 3, and 4 of them contain an odd number 1’s (namely 001, 010, 100, and 111). Therefore p(E) = 4/8 = 1/2. Since 4 bit strings of length 3 start with a 1 (namely 100, 101, 110, 111), we see that p(F ) = 4/8 = 1/2 as well. Furthermore, since there are 2 strings that start with a 1 and contain an odd number of 1’s (namely 100 and 111), we see that p(E ∩ F ) = 2/8 = 1/4. then 2 since p(E) · p(F ) = (1/2) · (1/2) = 1/4 = p(E ∩ F ), we conclude from the definition that E and F are independent. 30. (b) The answer is 0.610 ≈ 0.0060. (c) We need to multiply the probabilities of each bit being a 1, so the answer is 1 1 1 1 1 · 2 · · · 10 = 1+2+···+10 = 55 ≈ 2.8 × 10−17 2 2 2 2 2 34. We need to use the binomial distribution, which tells us that the probability of k successes is b(k; n, p) = C(n, k)pk (1 − p)n−k (c)There are two ways in which there can be at most one success: no success or one success. The probability of no success is (1 − p)n . Plugging in k = 1, we compute that the probability of exactly one success is b(1; n, p) = np1 (1 − p)n−1 . Therefore the answer is (1 − p)n + np(1 − p)n−1 . This formula only makes sense if n > 0, of course; if n = 0, then the answer is clearly 1. (d) Since this event is just that the event in part (c) does not happen, the answer is 1 − [(1 − p)n + np(1 − p)n−1 ]. Again, this is for n > 0; the probability is clearly 0 if n = 0. Section 6.3 2. We know that p(E|F ) = p(E ∩ F )/p(F ), so we need to find those two quantities. We are given p(F ) = 3/4. To compute p(E ∩ F ), we can use the fact that p(E ∩ F ) = p(E)p(F |E). We are given that p(E) = 2/3 and that p(F |E) = 5/8; therefore p(F ∩ E) = (2/3)(5/8) = 5/12. Putting this together, we have p(E|F ) = (5/12)(3/4) = 5/9. 8. Let D be the event that a randomly chosen person has the rare genetic disease. We are told that p(D) = 1/10000 = 0.0001 and therefore p(D) = 0.9999. Let P be the event that a randomly chosen person tests positive for the disease. We are told that p(P |D) = 0.999 and that p(P |D) = 0.0002. From these we can conclude that p(P |D) = 0.001 and p(P |D) = 0.9998. 3 (a) We are asked for p(D|P ). We use Bayes’ Theorem: p(D|P ) = p(P |D)p(D) (0.999)(0.0001) = ≈ 0.333 (0.999)(0.0001) + (0.0002)(0.9999) p(P |D)p(D) + p(P |D)p(D) (b) We are asked for p(D|P ). We uses Bayes’ Theorem: p(D|P ) = (0.9998)(0.9999) p(P |D)p(D) = ≈ 1.000 (0.9998)(0.9999) + (0.001)(0.0001) p(P |D)p(D) + p(P |D)p(D) 16. Let L be the event that Ramesh is late, and let B, C, and O be the events that he went by bicycle, car, and bus, respectively. We are told that p(L|B) = 0.05, p(L|C) = 0.50, and p(L|O) = 0.20. We are asked to find p(C|L). (a) We are to assume here that p(B) = p(C) = p(O) = 1/3. Then by Generalized Bayes’ Theorem, p(C|L) = 2 p(L|C)p(C) = p(L|B)p(B) + p(L|C)p(C) + p(L|O)p(O) 3 (b) Now we are to assume here that p(B) = 0.60, p(C) = 0.30, p(O) = 0.10. Then by Generalized Bayes’ Theorem, p(C|L) = 3 p(L|C)p(C) = p(L|B)p(B) + p(L|C)p(C) + p(L|O)p(O) 4 Section 6.4 8. By Theorem 3 we know that the expectation of a sum is the sum of the expectations. In the current exercise we can let X be the random variable giving the value on the first die, let Y be the random variable giving the value one the second die, and let Z be the random variable giving the value on the third die. In order to compute the expectation of X, of Y, and of Z, we can ignore what happens on the dice not under consideration. Looking just at the first die, then, we compute that the expectation of X is 1· 1 1 1 1 1 1 + 2 · + 3 · + 4 · + 5 · + 6 · = 3.5 6 6 6 6 6 6 4 Similarly, E(Y ) = 3.5 and E(Z) = 3.5. Therefore E(X+Y +Z) = 3·3.5 = 10.5. 10. There are 6 different outcomes of our experiment. Let the random variable X be the number of times we flip the coin. For i = 1, 2, . . . , 6, we need to compute the probability that X = i. In order for this to happen when i < 6, the first i − 1 flips must contain exactly one tail, and these are i − 1 ways this can happen. Therefore p(X = i) = (i − 1)/2i , since there are 2i equally likely outcomes of i flips. So we have p(X = 1) = 0, p(X = 2) = 1/4, p(X = 3) = 2/8 = 1/4, p(X = 4) = 3/16, p(X = 5) = 4/32 = 1/8. To compute p(X = 6), we note that this will happen when there is exactly one tail or no tails among the first five flips. As a check see that 0 + 1/4 + 1/4 + 3/16 + 1/8 + 3/16 = 1. We compute the expected number by summing i times p(X = i), so we get 1 · 0 + 2 · 1/4 + 3 · 1/4 + 4 · 3/16 + 5 · 1/8 + 6 · 3/16 = 3.75. 12. If X is the number of times we roll the die, then X has a geometric distribution with p = 1/6 (a) p(X = n) = (1 − p)n−1 p = 5n−1 /6n (b) 1/(1/6) = 6 by theorem 4. 16. We need to show that p(X = i and Y = j) is not always equal to p(X = i)p(Y = j). If we try i = j = 2, then we see that the former is 0, whereas the latter is 1/16. 20. P P By definition of expectation we have E(IA ) = s∈S p(s)I (s) = A s∈A p(s), P since IA (s) is 1 when s ∈ A and 0 when s ∈ / A. But s∈A p(s) = p(A) by definition. 24. In Example 18 we saw that the variance of the number of successes in n Bernoulli trials is npq. Here n = 10 and p = 1/6 and q = 5/6. Therefore the variance is 25/18. 30. We proceed as in Example 19, applying Chebychev’s Inequality with V (X) = 5 (0.6)(0.4)n = 0.24n by Example 18 and r = √ n) ≤ V (X)/r2 = (0.24n)/n = 0.24. √ n. We have p(|X(s) − E(X)| ≥ 34. Since n X i=1 n X 1 n(n + 1) 1 i 1 = = i= n(n + 1) n(n + 1) i=1 n(n + 1) 2 2 the probability that the item is not in the list is 1/2. We know that if the item is not in the list, then 2n + 2 comparisons are needed; and if the item is the ith item in the list then 2i + 1 comparisons are needed. Therefore the expected number of comparisons is given by n X i 1 (2n + 2) + (2i + 1). 2 n(n + 1) i=1 To evaluate the Psum, we use not only the fact that also the fact that ni=1 i2 = n(n + 1)(2n + 1)/6: n Pn i=1 n i = n(n + 1)/2, but n X X X 1 i 2 1 (2n + 2) + (2i + 1) = n + 1 + i2 + i 2 n(n + 1) n(n + 1) n(n + 1) i=1 i=1 i=1 =n+1+ 2 n(n + 1)(2n + 1) 1 n(n + 1) 10n + 11 + = n(n + 1) 6 n(n + 1) 2 6 Section 9.1 6. This is a multigraph; the edges are undirected, and there are no loops, but there are parallel edges. 8. This is a directed multigraph; the edges are directed, and there are parallel edges. Section 9.2 8. 6 Figure 1: Section9.3 Exercise 16. In this directed multigraph there are 4 vertices and 8 edges. The degrees are deg (a) = 2, deg + (a) = 2, deg − (b) = 3, deg + (b) = 4, deg − (c) = 2, deg + (c) = 1, deg − (d) = 1, and deg + (d) = 1. − 24. We have the complete bipartite graph K2,4 . The vertices in the part of size 2 are c and f, and the vertices in the part of size 4 are a, b, d, e. Section 9.3 16. Because of the numbers larger than 1, we need multiple edges in this graph. 38. These two graphs are isomorphic. Each consists of a K4 with a fifth vertex adjacent to two of the vertices in the K4 . Many isomorphisms are possible. One is f (u1 ) = v1 , f (u2 ) = v3 , f (u3 ) = v2 , f (u4 ) = v5 , and f (u5 ) = v4 . Section 10.1 4. (a) Vertex a is the root, since it is drawn at the top. (b) The internal vertices are the vertices with children, namely a,b,d,e,g,h,i and o. (c) The leaves are the vertices without children, namely c, f, j, k, l, m, n, p, q, 7 r, and s. (d) The children of j are the vertices adjacent to j and below j. There are no such vertices, so there are no children. (e) The parent of h is the vertex adjacent to h and above h, namely d. (f) Vertex o has only one sibling, namely p, which is the other child of o’s parent, i. (g) The ancestors of m are all the vertices on the unique simple path from m back to the root, namely g, b, and a. (h) The descendants of b are all the vertices that have b as an ancestor, namely e, f, g, j, k, l, and m. Section 10.3 8. The answer is a, b, d, e, i, j, m, n, o, c, f, g, h, k, l, p. 8