There are n horses. You are to determine the minimum number of races it takes to identify the j fastest horses amongst the n horses. Each horse's speed is constant and different than that of any other horse. Each horse race is comprised of a maximum of k horses where k>j. You don't have a stop watch to time the horses' speeds. All you can infer from each race is the rankings of the horses with respect to their speeds in that race.
Here's my thoughts with following assumptions
1. F(N, k, j) defines as finding jth fastest horse from N horses and run maximum k horse at a time
2. F(N, k, j) = F(N, k, N-j+1) - finding jth fastest horse is the same as finding jth slowest horse
3. F(N, k, j) = 1 for any k >= N
Now, the strategy to find the fastest horse is to divide N horse to N/k group for N/K race, and divide the group winner to N/(k^2) groups for race, this strategy goes on, and we have the following
F(N, k, 1) = [N/K] + [N/k^2] + [N/k^2] + ... + [N/k^m]; and (m-1)^k < N <= m^k; [N/K] represents the upper bound integer of the N/k.
During this process of finding the fastest one, we have build a k-nary tree, with each non-leaf node has at most k children, and the parent node is the fastest horse comparing the all the children nodes. The tree would have level m ;
After finding the 1st horse, we pick the fastest horse from the subtree of the 1st horse, and replace all the 1st horse position in the tree until the top, and we would have to run (m-1) race to find out the second fastest horse
F(N, k, 2) = F(N, k , 1) + (m-1)
Continue this strategy, we have F(N, k, j) = F(N, k, 1) + (j-1)*(m-1) for all j < k
I can verify this strategy for N = k^m; say N = 9, k = 3, 2, and j = 1, 2
for the fastest horse it's 9/3 + 9/9 = 4 times, and the 2nd fastest horse is 5 times.
The question I have is how to prove this strategy finds out the minimal number of race?