@Brats: I didn't write E[n=a+1] = 1 + E(n=a), I wrote for the specific case of a=3 (which is true for all a>1) that:
E[n=a] = 1+ sum( p(n=0) * E[n=0] + p(n=1) * E[n=1] + ... + p(n=a) * E[n=a]) Where the n on the LHS is the number of elements in the wrong position before hitting and on the RHS the same after hitting. For a=3 the probabilities are trivial to compute, and hence I used it as an example (because Eagle insisted that E[n=3] > 3), for bigger a this computation is not so easy, but it's still correct. I know the notation is strange, but relating to lemma 1, my E[n=a] is simply x(A), when A has 'a' elements out of place, and my p(n=b) is simply pb. -- You received this message because you are subscribed to the Google Groups "google-codejam" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-code?hl=en.
