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

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

I was doing this problem on Spoj. The solution of this problem is that first player always wins.

Can anyone give me proof of this?

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

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

Proof by contradiction :
Say the initial state is always a losing state. This means regardless of the number the first player picks , the second player ends up with a winning state (if not , the initial state would have been a winning state). Say the first player picks 1 and the second player ends up with {2,3,4,.....,N} which is a winning state. Say the second player picks X now and provides the first player with state S (a losing state) , the first player could have just picked X and forced the second player to state S ( a losing state) which is a contradiction. Hence the first player always wins.