Algorithms: Duplicate Relationships from CLRS

Recently, I tried to solve some recursive relations from CLRS, and I noticed a strange nuance when solving these equations. I don’t know if you noticed any of you or not, or maybe members of the theory can throw more light on this. (I also have a degree in CS, but not in Theory!). Solving recursion for the main theorem:

T (n) = a T (n / b) + f (n)

I noticed that the reasoning goes something like this:

i) expand the a-arry recursion tree, and we get the nodes log b n where the work done for the node is Θ (1), which gives Θ (n log b a ) for all leaf nodes

ii) for all non-leaf nodes, g (n) = Σ a j f (b / n j ), where j sums from 0 to the floor (log b n - 1), where the height of the tree is log b n

iii) Now take the leap of faith: make the statement that f (n) is really limited to O (n log b a - epsilon;) for some & epsilon; > 0

iv) Now solve g (n) via f (n) and solve T (n) via g (n). As mentioned in step i, T (n) really is Θ (n log b a ) + g (n), so when you have some g (n), combine with another term to come up with T (n)

, , , : , , X, . ? :

: X 2= 8X - 16

X = 4 RHS X, , , 4!!! , - , X - , ?

, , , , CS . ? , 99% CS - "- " ( CS ), . ?

+3
1

- . , :

  • , (, - node).
  • , n - - , , < n+1 st.

, , , , , , . , .

, , , ; , .

+2

Source: https://habr.com/ru/post/1762586/


All Articles