Now that you learned Master Theorem that could help you with solving recursions. However, keep in mind that it doesn't apply to all cases: you may need to carefully check the applicability of Master Theorem. Also, it's still important to know how to solve some recurrences directly, e.g., using the expansion tree. Let's have some exercises. Solve the recurrences below. If you use Master Theorem, please show how you know that Master Theorem is applicable, and which case are you using (case 1, 2, and 3 as shown in class slides). Use (.) to present your answer. Note that not all of them can be solved using Master Theorem. Please provide some details about your calculation instead of just giving you final answer. Of course you can use any other approaches to solve them (e.g., substitution). For the last question, please first solve it without using Master Theorem, and then check the cor- rectness of your answer using Master Theorem (in other words, please solve it twice, with or without using Master Theorem). For all of them, you can assume the base case is when n is a constant, T(n) is also a constant. Use (.) to present your answer. (1) (2) (3) (4) T(n) = T(n-1) + n² T(n) = 3T(n/2) +n³ T(n) = 2T (n/6) + log log n T(n) = 2T(n/2) + n logn [For this question, please provide two solutions (with and without using Master Theorem)]

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
100%

I need 2, 3, and 4 for when solving with other methods that is not master method please use recursive tree or iterative substitut

Now that you learned Master Theorem that could help you with solving recursions. However, keep in mind that it doesn’t apply to all cases: you may need to carefully check the applicability of Master Theorem. Also, it’s still important to know how to solve some recurrences directly, e.g., using the expansion tree.

Let’s have some exercises. Solve the recurrences below. If you use Master Theorem, please show how you know that Master Theorem is applicable, and which case are you using (case 1, 2, and 3 as shown in class slides). Use Θ(·) to present your answer. Note that not all of them can be solved using Master Theorem. **Please provide some details about your calculation instead of just giving you final answer.** Of course you can use any other approaches to solve them (e.g., substitution).

For the last question, please first solve it ***without*** using Master Theorem, and then ***check the correctness*** of your answer using Master Theorem (in other words, please solve it twice, with or without using Master Theorem).

For all of them, you can assume the base case is when *n* is a constant, *T(n)* is also a constant. Use Θ(·) to present your answer.

1. \( T(n) = T(n-1) + n^2 \)

2. \( T(n) = 3T(n/2) + n^3 \)

3. \( T(n) = 2T(n/6) + \log \log n \)

4. \( T(n) = 2T(n/2) + n \log n \) [For this question, please provide two solutions (with and without using Master Theorem)]
Transcribed Image Text:Now that you learned Master Theorem that could help you with solving recursions. However, keep in mind that it doesn’t apply to all cases: you may need to carefully check the applicability of Master Theorem. Also, it’s still important to know how to solve some recurrences directly, e.g., using the expansion tree. Let’s have some exercises. Solve the recurrences below. If you use Master Theorem, please show how you know that Master Theorem is applicable, and which case are you using (case 1, 2, and 3 as shown in class slides). Use Θ(·) to present your answer. Note that not all of them can be solved using Master Theorem. **Please provide some details about your calculation instead of just giving you final answer.** Of course you can use any other approaches to solve them (e.g., substitution). For the last question, please first solve it ***without*** using Master Theorem, and then ***check the correctness*** of your answer using Master Theorem (in other words, please solve it twice, with or without using Master Theorem). For all of them, you can assume the base case is when *n* is a constant, *T(n)* is also a constant. Use Θ(·) to present your answer. 1. \( T(n) = T(n-1) + n^2 \) 2. \( T(n) = 3T(n/2) + n^3 \) 3. \( T(n) = 2T(n/6) + \log \log n \) 4. \( T(n) = 2T(n/2) + n \log n \) [For this question, please provide two solutions (with and without using Master Theorem)]
Expert Solution
Step 1

The solution is given in the next step

steps

Step by step

Solved in 6 steps with 5 images

Blurred answer
Knowledge Booster
Recurrence Relation
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education