Recurrence Relation: Master Theorem Solution

In summary, the conversation involved using the master theorem to find the exact asymptotic solution of a function with a given recurrence relation. The solution was found to be $S(m)=\Theta(m^3 \sqrt{m})$. The person asking for confirmation was reassured that their solution was correct.
  • #1
evinda
Gold Member
MHB
3,836
0
Hello! (Wave)

I want to use the master theorem, in order to find the exact asymptotic solution of $S(m)=4S \left ( \frac{m}{2}\right )+m^3 \sqrt{m}$.

$$a=4 \geq 1, b=2>1, f(m)=m^3 \sqrt{m}$$

$$m^{\log_b a}=m^{\log_2{2^2}}=m^2$$

$$f(m)=m^{3+\frac{1}{2}}=m^{\log_b a+ \frac{3}{2}}$$

Thus, $f(m)=\Omega(m^{\log_b a+ \epsilon}), \epsilon=\frac{3}{2}$

$$af \left ( \frac{m}{b}\right )=4 \left (\frac{m}{2} \right )^3 \sqrt{\frac{m}{2}}=4 \frac{m^3}{8} \frac{\sqrt{m}}{\sqrt{2}}=\frac{1}{2 \sqrt{2}} m^3 \sqrt{m} \leq c f(m), \forall c \in [\frac{1}{2 \sqrt{2}},1) $$

Therefore, $S(m)=\Theta(m^3 \sqrt{m})$.

Is it right or do I have to simplify the complexity I found? (Thinking)
 
Physics news on Phys.org
  • #2
evinda said:
Hello! (Wave)

I want to use the master theorem, in order to find the exact asymptotic solution of $S(m)=4S \left ( \frac{m}{2}\right )+m^3 \sqrt{m}$.

$$a=4 \geq 1, b=2>1, f(m)=m^3 \sqrt{m}$$

$$m^{\log_b a}=m^{\log_2{2^2}}=m^2$$

$$f(m)=m^{3+\frac{1}{2}}=m^{\log_b a+ \frac{3}{2}}$$

Thus, $f(m)=\Omega(m^{\log_b a+ \epsilon}), \epsilon=\frac{3}{2}$

$$af \left ( \frac{m}{b}\right )=4 \left (\frac{m}{2} \right )^3 \sqrt{\frac{m}{2}}=4 \frac{m^3}{8} \frac{\sqrt{m}}{\sqrt{2}}=\frac{1}{2 \sqrt{2}} m^3 \sqrt{m} \leq c f(m), \forall c \in [\frac{1}{2 \sqrt{2}},1) $$

Therefore, $S(m)=\Theta(m^3 \sqrt{m})$.

Is it right or do I have to simplify the complexity I found? (Thinking)

Hey! (Smile)

It is right! (Nod)
 
  • #3
I like Serena said:
Hey! (Smile)

It is right! (Nod)

Nice! Thanks a lot! (Smirk)
 

FAQ: Recurrence Relation: Master Theorem Solution

1. What is a recurrence relation?

A recurrence relation is a mathematical function that recursively defines a sequence or progression of values. It expresses each term of the sequence in terms of previous terms, and is often used to model problems in computer science and engineering.

2. What is the Master Theorem for solving recurrence relations?

The Master Theorem is a mathematical tool used to solve recurrence relations that have a specific form. It provides a simple and efficient way to determine the asymptotic behavior (i.e. time complexity) of the recurrence without having to explicitly solve for the entire sequence.

3. What are the three cases in the Master Theorem?

The three cases in the Master Theorem are based on the comparison between the growth rate (i.e. order of magnitude) of the terms in the recurrence relation. These cases are known as the "big O" notation, and are represented as O(1), O(n), and O(n^k) respectively.

4. How do I know which case to use in the Master Theorem?

To determine which case to use in the Master Theorem, you need to compare the growth rate of the terms in the recurrence relation. If the growth rate is constant (O(1)), then you use case 1. If it is linear (O(n)), then you use case 2. If it is polynomial (O(n^k)), then you use case 3.

5. Can the Master Theorem be used to solve any recurrence relation?

No, the Master Theorem can only be used to solve recurrence relations that have a specific form. It works for "divide and conquer" algorithms that have a recurrence of the form T(n) = aT(n/b) + f(n), where a ≥ 1, b > 1, and f(n) is a polynomial function. Recurrences that do not follow this form must be solved using other methods, such as substitution or iteration.

Similar threads

Back
Top