3.1 ANSWERS TO EXERCISES 519 where Q(m) is defined in Section 1.2.11.3, Eq. (2). By Eq. (25) in that section, the probability is approximately 6&7% z 1.25/fi. The chance of Algorithm K converging as it did is only about one in 80000; the author was decidedly unlucky. But see exercise 15 for further comments on the colossalness. 12. c XP(b,X)=;(1+3(1-;)+6(1-;)(+2-)+..j lo a, nl (See Section 2.3.4.4.) Any function is such a function followed by a permutation of the n elements that were the one-cycles. Hence xn>i Tmn n! = mm. Let Pnk be the number of permutations ofx elements in which the longest cycle is of length k. Then the number of functions with a maximum cycle of length k is c,>1 Tmnpnk. To get the average value of k, we compute c,,, zn>r kT,,l ,k, which by the result of exercise 1.3.3-23 is c, > 1 T,, n!(n + i + tn)c where c = .62433 and E, + 0 as n + oo. Summing, we get the-average value c&(m) + fc + S,, where &I +Oasm-+oo. (This is not substantially larger than the average value when X0 is selected at random. The average value of max(p + X) is still unknown.) 14. Let c,(m) be the number of functions with exactly r different final cycles. From the recurrence c,(m) = (m -l)! -c,,, (T)(-l) (m -k)kcl(m -k), which comes by counting the number of functions whose image contains at most m -k elements, we find the solution cl(m) = m - &(m). (Cf. exercise 1.2.11.3-16.) Another way to obtain the value of cl(m), which is perhaps more elegant and revealing, is given in exercise 2.3.4.4-1 7. The value of c,(m) may be determined by solving the recurrence c,(k)c,-l(m-k), which has the solution c,(m) = m - ($]+;[:]~+$]~q+.-).
In case you need affordable webhost to host your website, our recommendation is ecommerce web host services.
This entry was posted
on Tuesday, March 11th, 2008 at 11:22 am and is filed under J2EE.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.