536 ANSWERS TO (Web page design) EXERCISES 3.3.2 by the previous
536 ANSWERS TO EXERCISES 3.3.2 by the previous exercise and Eq. 1.2.9-28. The mean and variance are readily computed using Theorem 1.2.10A and exercise 3.4.1-17. We find that mean(G)=w+(&-l)+…+(d-:+I–I)=d(Hd–Hdw)=ii: var(G) = d (Hy) -H&2_1,) -d(Hd -H–W) = oz. The number of U s examined, as the search for a coupon set is repeated n times, therefore has the characteristics (min wn, ave pn, max 00, dev a&z). 11. 111219 8 5 31617 0141. 12. Algorithm R (Data for run test). Rl. [Initialize.] Set j + -1, and set COUNT[l] + COUNT[2] + . . . + COUNT[S] + 0. Also set U, + U,-i, for convenience in terminating the algorithm. R2. [Set r zero.] Set r + 0. R3. [Is U, < U,+I?] Increase r and j by 1. If U, < U3+1, repeat this step. R4. [Record the length.] If r 2 6, increase COUNT[G] by one, otherwise increase COUNT[r] by one. R5. [Done?] If j < n -1, return to step R2. 1 13. There are (p+ 4 + l)( t ) ways to have Ui-1 2 Ui < . . . < Uz+p-~ 3 U,++, < < Uz+p+q-1; subtract ( ~~- ; ) of th ese in which lJ-1 < Ui, and subtract ( pf;l+l) for those in which Uz+p--l < Ui+,; then add in 1 for the case that both U,-I < U, and Uz+p--l < U,+,, since this case has been subtracted out twice. (This is a special case of the inclusion-exclusion principle, which is explained further in Section 1.3.3.) 14. A run of length r occurs with probability l/r! -l/(r + l)!, assuming distinct U s. 15. This is always true of F(X) when F is continuous and S has distribution F; see Section 3.3.1C. 16. (a) Z i, = max(Z,(t-l),Z(j+l)(t-l)). If the Qt-i) are stored in memory, it is therefore a simple matter to transform this array into the set of Z,, with no auxiliary storage required. (b) With his improvement, each of the V s should indeed have the stated distribution, but the observations are no longer independent. In fact, when U, is a relatively large value, all of Z,,, Z(j+l)t, . , Z(j-t+l)t will be equal to Uj; so we almost have the effect of repeating the same data t times (and that would multiply V by t, cf. exercise 3.3.1-10). 17. (b) By Lagrange s identity, the difference is ~O