Converting recurrence into matrix

Правка en4, от tatya_bichu, 2018-03-25 10:17:27

Solving Problem , I got recurrence as f(n)= ((n+1)/2) + (n-1) ,here ~ denotes negation, f(x) is 0 if player with x stones loose and 1 if player left with x stones wins.As n can be high as 1018 so matrix exponentiation would do this,

| ~ ~ | x | f(n) | = | f(n+1) |
| 1 0 | | f(n/2+1) | | f(n) |

but I am unable to do algebra with this ~ operation.

Теги #dynamic-programming, #matrix exponentialtion, large inputs, pattern

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en6 Английский tatya_bichu 2018-03-25 10:19:44 2 Tiny change: 'with this ~ operation' -> 'with this @ operation'
en5 Английский tatya_bichu 2018-03-25 10:18:24 32
en4 Английский tatya_bichu 2018-03-25 10:17:27 4
en3 Английский tatya_bichu 2018-03-25 10:16:18 4 Tiny change: '1 0 | | f(n/2+1) | | f(n)' -> '1 0 | | f(n/2+1) | | f(n)'
en2 Английский tatya_bichu 2018-03-25 10:15:50 4
en1 Английский tatya_bichu 2018-03-25 10:15:24 481 Initial revision (published)