正文
增加 19 行删除 0 行
1,904 行未改动全部展开19051906190719081,904 行未改动全部展开观察二进制异或性质:- $2^m\oplus 2^{m+1}=3\times 2^m$- $(2^m+t) \oplus (2^{m-1}+\left \lfloor \frac{t}{2} \right \rfloor) = (2^m\oplus 2^{m-1})+(t \oplus \left \lfloor \frac{t}{2} \right \rfloor)$1,904 行未改动全部展开190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271,904 行未改动全部展开观察二进制异或性质:- $2^m\oplus 2^{m+1}=3\times 2^m$- $(2^m+t) \oplus (2^{m-1}+\left \lfloor \frac{t}{2} \right \rfloor) = (2^m\oplus 2^{m-1})+(t \oplus \left \lfloor \frac{t}{2} \right \rfloor)$右边:$$\begin{align*}f(2^m+t)&=(2^m+t)\oplus(2^{m-1}+\left \lfloor \frac{t}{2} \right \rfloor)\\&=(2^m \oplus 2^{m-1})+(t \oplus \left \lfloor \frac{t}{2} \right \rfloor)\\&=3\times 2^{m-1}+f(t)\end{align*}$$左边:$$\begin{align*}2^m + f(2^m - 1 - t) &= 2^m + \left[ (2^m - 1 - t) \oplus \lfloor (2^m - 1 - t)/2 \rfloor \right] \\&= 2^m + \left[ (2^m - 1 - t) \oplus (2^{m-1} - 1 - \lfloor t/2 \rfloor) \right] \quad \text{(右移后等价)} \\&= 2^m + \left[ (2^m - 1 \oplus 2^{m-1} - 1) + (t \oplus \lfloor t/2 \rfloor) \right] \quad \text{(奇偶性补偿)} \\&= 2^m + 2^{m-1} + f(t) \quad \text{(因 } 2^m - 1 \oplus 2^{m-1} - 1 = 2^{m-1} \text{)} \\&= 3 \times 2^{m-1} + f(t).\end{align*}$$得证,故原命题成立。