Solving recurrence by changing variables

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 2K views
22990atinesh
Messages
143
Reaction score
1
Consider the below recurrence
##T(n) = 2 T(\sqrt(n)) + \log n##
substituting ##\log n = m \implies n = 2^m##
##T(2^m) = 2 T(2^{\frac{m}{2}}) + m##
substituting ##S(k) = T(2^m)## I'm getting below equation
##S(k) = 2 S(\frac{k}{2}) + m##
How can I change 'm' to 'k' in above equation.
 
Physics news on Phys.org
22990atinesh said:
Consider the below recurrence
##T(n) = 2 T(\sqrt(n)) + \log n##
substituting ##\log n = m \implies n = 2^m##
##T(2^m) = 2 T(2^{\frac{m}{2}}) + m##
substituting ##S(k) = T(2^m)## I'm getting below equation
##S(k) = 2 S(\frac{k}{2}) + m##
How can I change 'm' to 'k' in above equation.
You need to define the relation between ##k## and ##m## when setting ##S(k) = T(2^m)##.
You could define ##S## by ##S(m)=T(2^m)##.
Then you get ##S(m)=2S(\frac{m}{2}) + m##.
 
  • Like
Likes   Reactions: 22990atinesh