Job Recruitment Website - Recruitment portal - How to solve this game algorithm problem?
How to solve this game algorithm problem?
Lemma 1: Any number of homogeneous Kendoff theorems can be expressed as the sum of discontinuous Fibonacci numbers. See Wikipedia homogeneous Kendoff theorem for proof.
Lemma 2: Fibonacci sequence satisfies f (k+ 1) < 2×f(k).
Mathematical induction proves that:
I= 1 does not meet the meaning of the question, so it is not considered.
When i=2, n=2 is obviously a defeat.
When i=3, n=3 is obviously a defeat.
i=k≥3
Suppose i=k,
When i=k+ 1, f(i)=f(k)+f(k? 1), that is, can the subsequent players get f(k? 1) proved the original proposition, and now it is proved as follows:
If x≥ 13f(k? 1), subsequent hands can take the rest of the y=f(k? 1)? x?
And y=f(k? 1)? x & lt23f(k? 1)& lt; 12f(k), that is, the remaining f(k) cannot be taken away by the first hand at one time.
If x≤ 13f(k? 1), there must be f(k? 3)>; 13f(k? 1), the subsequent hand can take f(k-3)-x, and the problem goes back to the previous step.
Then prove the original proposition.
On the other hand, if n is not Fibonacci number, take x first, so that n-x is Fibonacci number, and you win.
- Previous article:The role of crystal
- Next article:How about Wenling Zeguo Primary School?
- Related articles
- How do you say the salary after the probation period when recruiting state-owned enterprises through the Personnel Bureau?
- How much is the monthly salary of public welfare posts in Zhangdian District, Zibo?
- How to determine the relationship
- What are the requirements for the position of people's police in Chongqing civil service examination in 2020? Is it demanding?
- How about Yongkang Zhongtai Automobile Service Co., Ltd.?
- The geographical location of Sanshipu Town
- Business hours of Wuyue Plaza in Changchun
- What about Fujian Anneng Laboratory Equipment Co., Ltd.?
- What scenic spots are there in Hangzhou Hengdian Film and Television City?
- How about going to Tianjin Denso after studying in Japan?