Блог пользователя dino_merlin

Автор dino_merlin, история, 5 лет назад, По-английски

Does anyone have mathematical proof for the solution of CF #614 Div. 2 B. The tutorial says that it: "It is easy to see that we will want each question to eliminate one opponent only, since after each elimination, the ratio t/s will be more and more rewarding ". But that doesnt say much. https://codeforces.net/contest/1293/problem/B

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

»
5 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Auto comment: topic has been updated by dino_merlin (previous revision, new revision, compare).

»
5 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

You can prove it with a simple induction on $$$t$$$.

»
5 лет назад, # |
Rev. 6   Проголосовать: нравится +2 Проголосовать: не нравится

Let f(n) be the max prize with n contestants. Then obviously f(1) = 1. We will prove with mathematical induction that $$$f(n) = \sum_\limits{i=1}^{n}\frac{1}{i}$$$

Assume that for every positive k<n: $$$f(n-k) = \sum\limits_{i=1}^{n-k}\frac{1}{i}$$$.

Then it is clear that $$$f(n) = \max\limits_{k=1}^{n-1}(f(n-k)+\frac{k}{n})$$$. And the maximum is attained at k=1 as the series $$$a_k=f(n-k)+\frac{k}{n}$$$ is strictly decreasing, because: $$$a_k-a_{k-1}=f(n-k)-f(n-(k-1))+\frac{k}{n}-\frac{k-1}{n}=-\frac{1}{n-k+1}+\frac{1}{n}<0$$$, when k>1.

So: $$$f(n)=f(n-1)+\frac{1}{n}=\sum_\limits{i=1}^{n}\frac{1}{i}$$$ which is what we set out to prove.