证明:对于 n ∈ N + n\in \mathbb{N^+} n∈N+:
∑ i = 1 n 1 i = ∑ i = 1 n ( − 1 ) i − 1 ( n i ) 1 i \sum_{i=1}^n \frac{1}{i}=\sum_{i=1}^n (-1)^{i-1}\binom{n}{i}\frac{1}{i} i=1∑ni1=i=1∑n(−1)i−1(in)i1
组合意义:
证明:
考虑问题 “ n n n 个不同的球,每次等概率抽出一个放回,问把所有球都抽过一次的期望抽的次数。”
f [ i ] f[i] f[i] 表示还有 i i i 个球没有被抽到过的情况下,期望次数,转移有 f [ i ] = n − i n f [ i ] + i n f [ i − 1 ] + 1 f[i]=\frac{n-i}{n}f[i]+\frac{i}{n}f[i-1]+1 f[i]=nn−if[i]+nif[i−1]+1。则 f [ i ] = f [ i − 1 ] + n i f[i]=f[i-1]+\frac{n}{i} f[i]=f[i−1]+in, f [ 0 ] = 0 f[0]=0 f[0]=0。问题答案为 f [ n ] = n × L H S f[n]=n\times LHS f[n]=n×LHS。
令
t
i
t_i
ti 为第
i
i
i 个球首次被抽到的次数的随机变量,记集合
S
=
t
1
,
t
2
,
…
,
t
n
S={t_1,t_2,\ldots,t_n}
S=t1,t2,…,tn,问题答案是
E
(
max
t
∈
S
{
t
}
)
E(\max_{t\in S}\{t\})
E(maxt∈S{t})。根据最值反演:
E
(
max
t
∈
S
{
t
}
)
=
∑
T
⊆
S
T
≠
∅
(
−
1
)
∣
T
∣
−
1
E
(
min
t
∈
T
{
t
}
)
=
∑
i
=
1
n
∑
∣
T
∣
=
i
(
−
1
)
i
−
1
E
(
min
t
∈
T
{
t
}
)
=
∑
i
=
1
n
∑
∣
T
∣
=
i
(
−
1
)
i
−
1
n
i
=
∑
i
=
1
n
(
−
1
)
i
−
1
n
i
∑
∣
T
∣
=
i
1
=
∑
i
=
1
n
(
−
1
)
i
−
1
(
n
i
)
n
i
=
n
×
R
H
S
\begin{aligned} E(\max_{t\in S}\{t\})&=\sum_{\substack{T\subseteq S\\T\neq \emptyset}}(-1)^{|T|-1}E(\min_{t\in T}\{t\})\\ &=\sum_{i=1}^n \sum_{|T|=i} (-1)^{i-1}E(\min_{t\in T}\{t\})\\ &=\sum_{i=1}^n \sum_{|T|=i} (-1)^{i-1}\frac{n}{i}\\ &=\sum_{i=1}^n (-1)^{i-1}\frac{n}{i} \sum_{|T|=i} 1\\ &=\sum_{i=1}^n (-1)^{i-1}\binom{n}{i}\frac{n}{i}\\ &=n\times RHS\\ \end{aligned}
E(t∈Smax{t})=T⊆ST=∅∑(−1)∣T∣−1E(t∈Tmin{t})=i=1∑n∣T∣=i∑(−1)i−1E(t∈Tmin{t})=i=1∑n∣T∣=i∑(−1)i−1in=i=1∑n(−1)i−1in∣T∣=i∑1=i=1∑n(−1)i−1(in)in=n×RHS
因此 L H S = R H S LHS=RHS LHS=RHS □ \square □
代数推导:
证明:令 f ( x ) = ∑ i = 1 n 1 i x i f(x)=\sum_{i=1}^n\frac{1}{i}x^i f(x)=∑i=1ni1xi
则 L H S = f ( 1 ) − f ( 0 ) = ∫ 0 1 f ′ ( x ) d x = ∫ 0 1 ∑ i = 0 n − 1 x i d x = ∫ 0 1 1 − x n 1 − x d x LHS=f(1)-f(0)=\int_{0}^1f'(x)dx=\int_{0}^1 \sum_{i=0}^{n-1}x^i dx=\int^{1}_0\frac{1-x^n}{1-x}dx LHS=f(1)−f(0)=∫01f′(x)dx=∫01∑i=0n−1xidx=∫011−x1−xndx
令 g ( x ) = ∑ i = 1 n ( − 1 ) i − 1 ( n i ) 1 i x i g(x)=\sum_{i=1}^n (-1)^{i-1}\binom{n}{i}\frac{1}{i}x^i g(x)=∑i=1n(−1)i−1(in)i1xi
则
R
H
S
=
g
(
1
)
−
g
(
0
)
=
∫
0
1
g
′
(
x
)
d
x
=
∫
0
1
∑
i
=
1
n
(
−
1
)
i
−
1
(
n
i
)
x
i
−
1
d
x
=
∫
0
1
(
−
1
)
x
∑
i
=
1
n
(
−
1
)
i
(
n
i
)
x
i
d
x
=
∫
0
1
(
−
1
)
x
(
∑
i
=
0
n
(
−
1
)
i
(
n
i
)
x
i
−
1
)
d
x
=
∫
0
1
(
−
1
)
x
(
(
1
−
x
)
n
−
1
)
d
x
\begin{aligned} RHS&=g(1)-g(0)\\ &=\int_0^1g'(x)dx\\ &=\int_0^1\sum_{i=1}^n (-1)^{i-1}\binom{n}{i}x^{i-1}dx\\ &=\int_0^1\frac{(-1)}{x}\sum_{i=1}^n (-1)^{i}\binom{n}{i}x^{i}dx\\ &=\int_0^1\frac{(-1)}{x}(\sum_{i=0}^n (-1)^{i}\binom{n}{i}x^{i}-1)dx\\ &=\int_0^1\frac{(-1)}{x}((1-x)^n-1)dx \end{aligned}
RHS=g(1)−g(0)=∫01g′(x)dx=∫01i=1∑n(−1)i−1(in)xi−1dx=∫01x(−1)i=1∑n(−1)i(in)xidx=∫01x(−1)(i=0∑n(−1)i(in)xi−1)dx=∫01x(−1)((1−x)n−1)dx
令
x
=
1
−
t
x=1-t
x=1−t,则:
R H S = ∫ 0 1 1 − t n 1 − t d t = ∫ 0 1 1 − x n 1 − x d x = L H S □ \begin{aligned} RHS&=\int_0^1\frac{1-t^n}{1-t}dt\\ &=\int_0^1\frac{1-x^n}{1-x}dx\\ &=LHS&\square \end{aligned} RHS=∫011−t1−tndt=∫011−x1−xndx=LHS□