March 6th, 2003, 5:52 pm
I prefer a more formal solution.p(1) = 1/6 since the only way to win is to get 1 on the first throw.p(i = 2 to 6) = [1 plus the sum from j=1 to i-1 of p(j)]/6. The 1/6 represents the first throw being i, the remaining terms the probabilities that the first throw is i-j.p(i > 6) = [the sum from j=i-6 to i-1 of p(j)]/6 (as kr points out). The first throw is equally likely to be 1 to 6, each term represents the probability of reaching i given a first throw of i-j.This is a full interative definition of p. Before solving anything, it's obvious that the worst number is 1 and the best is 6. p is strictly increasing from 1 to 6. All subsequent numbers are averages of previous values, so they will be between p(1) and p(6).To get the long-term average, we can solve for the eigenvector of the 6x6 transition matrix. It is [6/21,5/21,4/21,3/21,2/21,1/21]. The long term average is the product of this and the transpose of [p(6),p(5),p(4),p(3),p(2),p(1)].p(i<7) = 7^(i-1)*6^(-i) (as zerdna points out).So we need the sum from i = 1 to 6 of [i*7^(i-1)*6^(-i)]/21.Define f(x) = sum from i = 1 to 6 of x^i/126 = (x^7 - x)/[126*(x-1)].The derivative of f(x) with respect to x = sum from i = 1 to 6 of i*x^(i-1)/126 which, when evaluated for x = 7/6, gives the long term average we seek.The derivative is [6*x^7 - 6*x^6 + 1]/[126*(x - 1)^2]. Evaluated at x = 7/6 gives 36/126 = 2/7.1, 2, and 3 are bad; 6 is good. All other numbers have p within 10% of the average value.