Let q(n,k) be the probability that not all safes can be opened, i.e., q(n,k)=1-p(n,k). Then in the total C(n,k) n! combinations, there are C(n,k) n!q(n,k) combinations that not all safes can be opened. For 1<=i <=n-k, there are C(n,i)i!(1-q(n-i, k))C(n-i, k) (n-i)! cases in which exactly i safes can not be opened (these i safes form some cycles...). Therefore, we have: C(n,k) n!q(n,k)=C(n,1)1!(1-q(n-1, k))C(n-1, k)(n-1)!+....+C(n, n-k)(1-q(k,k))C(k,k)k!. Now we are left to prove by induction on n-k that q(n,k)=1-k/n, which can be done easily. www.ddhw.com
|