Solving recurrence by changing variables

AI Thread Summary
The discussion centers on solving the recurrence relation T(n) = 2 T(√n) + log n by substituting log n with m, leading to the transformation of the equation into T(2^m) = 2 T(2^(m/2)) + m. The key challenge is converting 'm' into 'k' in the derived equation S(k) = 2 S(k/2) + m. To achieve this, it is suggested to define the relationship between k and m, specifically by setting S(m) = T(2^m). This results in the modified equation S(m) = 2 S(m/2) + m, effectively allowing the transition from m to k in the context of the recurrence.
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.
 
Technology 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 22990atinesh
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I have a quick questions. I am going through a book on C programming on my own. Afterwards, I plan to go through something call data structures and algorithms on my own also in C. I also need to learn C++, Matlab and for personal interest Haskell. For the two topic of data structures and algorithms, I understand there are standard ones across all programming languages. After learning it through C, what would be the biggest issue when trying to implement the same data...
Back
Top