Correct answer of Family of Recurrences

kan13acm
matrix-expo
recurrence

#1

Here is the problem.

If the input is

1

2 2

2 1

2 1

Ans should be f0 * sigma2 + f1 * sigma1 i.e. 2 * 1+2 * 1=4.
But all accepted solution like this are giving 5 please explain.

Please Help .


#2

Thanks for the reply, in the question it is given

si = fi - 1 * sigma1 + … + fi - m * sigmam

so shouldn`t s2 be equal to f1 * sigma1+f0 * sigma2.

Please help where I am going wrong


#3

Even Considering only 2 values of sigma

If the input is

1

2 2

0 1

0 1

Ans should be f0 * sigma2 + f1 * sigma1 i.e. 0 * 1 + 0 * 1 = 0. But all accepted solution like this are giving 1 please explain.

Please Help .


#4

Still stuck !!!


#5

Please Help !!!


#6

I just realized, the input itself is wrong, as sigma variable can take only 2 values. But I still could not figure out how their answer is coming 5…:frowning:


#7

Please Help !!!