I apologize for this ugly contribution. I started writing before realizing how messy it would become. Because I believe that it is basically correct I couldn't help but posting it.
The problem is not Herman's but the one stated in my previous post. I think there are similarities, so I feel justified in my topic jacking even more because everything here is Off Topic.
In the remaining I keep n and k fixed. I underscore stochasts. So
S is a random k-selection from N.
A1 is the first number of this selection.
W(
S) is the stochastic function that represents the smallest step in
S.
We need to find f(n,k,r) defined as f(n,k,r) = P(
W(
S) = r ) for 1 < k <= n and 1 <= r <= (n-1)/(k-1). For convenience we define f = 0 for other k or r. The easy case is for k = n because then
W(
S) = 1.
Hence f(n,n,r) = 1 for r = 1 but zero otherwise. .......... (1)
For k = 2. We count the number of pairs at distant r apart. There are n - r such pairs. But there are ( n over 2 ) arbitrary pairs.
So f(n,2,r) = 2(n-r)/(n*(n-1)) ..............(2)
I will express f(n,k,r) in terms of several f(m,l,s) where m is smaller than n. Thus f is determined by recursion.
f(n,k,r) = P(
A1 = 1 ) * P(
W(
S) = r |
A1 = 1 ) + P(
A1 > 1 ) * P(
W(
S) = r |
A1 > 1 ) ...... ( 3 )
P(
A1 = 1 ) = k/n ............. ( 4 )
P(
A1 > 1 ) = 1 - k/n .............( 5 )
P(
W(
S) = r |
A1 > 1 ) = f(n-1,k,r) .......(6)
The remaining factor is less easy but doable.
We split this case in two disjoint subcases. In the first subcase the first step equals r and the remaining steps are at least r. Its probability given
A1 = 1 is
P1 = ( N - 2s over k - 2 )/ ( N - 1 over k - 1 ) * ( 1 - Sum ( f(n-2s, k-2, t ))).... (7)
where the sum is over positive integers t < s
In the second subcase the first step is bigger then r and the remaining steps are at least r but at least one equals r. Its probability given
A1 = 1 is
P2 = ( N - s -1 over k - 1 )/ ( N - 1 over k - 1 ) * f(n-s-1,k-1,s) ...... (8)
For the remaining factor in (3) we substitute the sum of P1 and P2 and we get our recursion formula. I realize that my derivations need some more explanation, but as a start of the solving process they might be fine. Next Mac Gates can compute the numerical values and the problem is solved.
Apart from the fact that the book only allows for elegant solutions.
