SPP Matrix Exponentiation Problem

Actually the F1 matrix and transform matrix making procedure is not cleared.Help me to clear that.Previous SEQ is cleared and also Fibonacci also cleared but SPP is not clearing.
And I have a question ,In matrix exponentiation for all problem is the power is n-1??

@kaushikghosh199832,
There is no fixed procedure for making F1 and T matrix, it depends on the problem. Like here, in SPP, making F matrix like that was the required “trick” to solve the problem, and I am sure, finding T wouldn’t be hard for you, given F matrix.

The only observation for making F was that, we would not use the given recurrence to make F but, make a recurrence by our own, i.e the recurrence of cumulative sum (S). This would help us to calculate a_1 + a_2 + a_3 .... a_i efficiently, which could then be used to find the final answer.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.