I can solve this recurrence equations f(N)=f(N-1)+f(N-2)+C using matrix exponentiation.when C is constraint.But when i use N instant of constraint C or when our recurrence equations look like f(N)=f(N-1)+f(N-2)+N then how to solve this Recurrence equations using matrix exponentiation?
Consider the following matrix:
It transforms a vector
[f_{n-2}, f_{n-1}, n, 1]
into[f_{n-1}, f_{n-1} + f_{n-2} + n, n + 1, 1]
.You can make this transformations to delete $$$n$$$.