This is a pretty vague question and can be applied to many math problems not just recurrence relations.
Above I fully understand, setting up the recurrence relation from the algorithm given. And how the next step would be plugging and chugging to find a pattern that we can use.
So as shown above, we do not know what M(n-1)
is but we do know what M(n)
is equal to. So every guide just makes M(n) -> M(n-1)
by substracting 1
in the original M(n)
and then substracting 1
in M(n-1)
as well, making the new equation M(n-1) = M((n-1)-1)+1
so now we "know" what M(n-1)
is now and can substitute it in the original equation M(n) = M(n-1)+1 ---> M(n) = [M((n-1)-1)+1]+1
. And this is where I have my question, to me this seems like math magic just subtracting 1
inside the M(n)
parenthesis only, what substitution rule is being used here? Am I just horribly overthinking it?
9 = (4) + 5
so9-1 = (4-1)+5
. I think I just answered my own question. I think doing it inside of theM(n)
and not something likeM(n)-1
messed with me. $\endgroup$