code_hard123's blog

By code_hard123, history, 8 years ago, In English

Hi all ,

Is it possible to calculate the Nth (1 <= N <= 1e18) term of following quadratic recurrence using matrix exponentiation.

F(i) = a * F(i -1) * F(i -1) + b * F(i -1) + c , where a , b , c are non negative constants and F0 (Initial Term) is given.

  • Vote: I like it
  • +3
  • Vote: I do not like it

»
8 years ago, # |
  Vote: I like it +1 Vote: I do not like it

No, only linear recurrences terms can be calculated using matrix exponentiation.

  • »
    »
    8 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Cant it be solved any other ways?

    • »
      »
      »
      8 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      If the modulus is small, then find a period. For some a, b, c there might be interesting formulae, but none faster than O(n) that I'm aware of.

»
8 years ago, # |
  Vote: I like it 0 Vote: I do not like it

These type of equation are known as Quadratic Map. Maybe this can help you.