I have some ambiguity in recurrence, so I'll set the following questions:
(1) What does it really mean saying recurrence? Does it apply only when talking about divide and conquer?
(2) Assume I have this simple Algorithm:
sum <- 0
for i<- 1 to n
sum <- sum + 1
return sum
How do I write a recurrence for this algorithm? I mean I understand this algorithm just does summation but how to transfer this into recurrence?
Thank you
I don't know what syntax you are using, but I suppose it would go something line this.