Tell me more ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I am reading a book on Algorithms and it was mentioned that generating functions are helpful in analyzing algorithms. I am not able to understand how it is useful? I request help here like giving an simple example how generating functions can be used in analyzing algorithms?

and also any good link on tutorial regarding generating functions with respect to computer algorithms.

Thanks!

share|improve this question

migrated from stackoverflow.com Aug 9 '11 at 13:08

2 Answers

See Mathematical Methods in the Analysis of Algorithms and Data Structures by Flajolet for relevant information.

share|improve this answer
5  
Posting a single link as an answer is not recommended on StackExchange. It is better to quote a short summary of the referred article, to provide a valid (if brief) answer to the question in place, and to ensure that your answer stays (at least partially) valid even if the link breaks in the future. – Péter Török Aug 9 '11 at 13:21
@Péter: yup, you're right, I should have just post this link as a comment. – bpgergo Aug 9 '11 at 13:25
@BlackJack, thanks for editing – bpgergo Aug 9 '11 at 13:26

They can be used to find closed-form formulas for recurrence relations. They can also be used to analyze the asymptotic behavior of certain sequences. This is very useful tool when trying to find the time-complexity of recursive algorithms.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.