How to determine the height of a recursion tree from a recurrence relation?

前端 未结 5 1101
刺人心
刺人心 2021-02-05 18:29

How does one go about determining the height of a recursion tree, built when dealing with recurrence run-times? How does it differ from determining the height of a regular tree

5条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-05 19:10

    Firstly, if this is a homework question, please mark it as such. The images you link to imply that you're in CS 455, with Professor Wisman. :)

    The main hint I'll give is this: The height of the tree is obviously determined by when you get to the "leaves". The leaves of a tree modelling the recurrence relation of a function are the base case. Thus, I would look towards seeing how "quickly" N can shrink to the base case.

提交回复
热议问题