पुनरावृत्ति पर विचार करें
कुछ सकारात्मक निरंतर सी के साथ लिए , और ।
मैं पुनरावृत्ति को हल करने के लिए मास्टर प्रमेय जानता हूं, लेकिन मुझे यकीन नहीं है कि हम इस संबंध को कैसे उपयोग कर हल कर सकते हैं। आप वर्गाकार मूल पैरामीटर से कैसे संपर्क करते हैं?
पुनरावृत्ति पर विचार करें
कुछ सकारात्मक निरंतर सी के साथ लिए , और ।
मैं पुनरावृत्ति को हल करने के लिए मास्टर प्रमेय जानता हूं, लेकिन मुझे यकीन नहीं है कि हम इस संबंध को कैसे उपयोग कर हल कर सकते हैं। आप वर्गाकार मूल पैरामीटर से कैसे संपर्क करते हैं?
जवाबों:
हम राफेल के सुझाव का उपयोग करेंगे और पुनरावृत्ति को प्रकट करेंगे। निम्नलिखित में, सभी लघुगण आधार 2 हैं। हम प्राप्त करते हैं
जहांβ(एन)कितनी बार आप वर्गमूल n के साथ शुरू करने के लिए लेते हैं, और 2. तक पहुँचने ऐसा नहीं है कि पता चला है के लिए है हैβ(एन)=लॉगलॉगएन। आप इसे कैसे देख सकते हैं? विचार करें: एन
In your comment you mentioned that you tried substitution but got stuck. Here's a derivation that works. The motivation is that we'd like to get rid of the multiplier on the right hand side, leaving us with something that looks like . In this case, things work out very nicely:
If you write you have .
Now you know the recursion tree has hight of order , and again it's not hard to see it's in each level, so total running time is in: , which concludes for .
In all when you see or , is good to check logarithm.
P.S: Sure proof should include more details by I skipped them.
Let's follow Raphael's suggestion, for :
Edit: Thanks Peter Shor for the correction!
Unravel the recurrence once as follows:
Continuing the unraveling for steps, we have that:
These steps will continue until the base case of . Solving for we have:
Substituting into the unraveled recurrence, we have