Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
31 views
3 pages
Mater Theorem Questions
Uploaded by
RAM CHANDRA MARANDI
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download
Save
Save Mater theorem questions For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
0 ratings
0% found this document useful (0 votes)
31 views
3 pages
Mater Theorem Questions
Uploaded by
RAM CHANDRA MARANDI
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Carousel Previous
Carousel Next
Download
Save
Save Mater theorem questions For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
Download
Save Mater theorem questions For Later
You are on page 1
/ 3
Search
Fullscreen
Master Theorem: Practice Problems and Solutions Master Theorem The Master Theorem applies to recurrences of the following form: T(n) = aT(n/b) + f(r) where a > 1 and b> 1 are constants and f(n) is an asymptotically positive function, ‘There are 3 eases 1. If f(n) = O(n! 4-4) for some constant € > 0, then T(n) = O(n!™*), 2. If fn) = O(n!" log n) with! & > 0, then T(n) = @(n" tog! n). 3. If F(n) = Onl +4*) with € > 0, and f(n) satisfies the regularity condition, then T(n) = @(F(n)). Regularity condition: af(/b) < ef(n) for some constant ¢ <1 and all sufficiently lange n. Practice Problems For each of the following recurrences, give an expression for the runtime T(x) if the recurrence can be solved with the Master Theorem, Otherwise, indicate that the Master Theorem does not apply. 1, P(n) = 30 (n/2) +n? 2. P(n) = AP (n/2) +n? 3. Tn) =T(n/2) +2" 4. T(n) T(n/2) +n" 5. T(n) = 16T (n/a) +0 6. T(n) = 27(n/2) + nlognT(n) = 2T(n/2) + n/logn T(n) = 20 (n/4) + 005 T(n) = O.5T(n/2) + 1/n T(n) = 167 (n/4) +n! _ P(n) = VEE(n/2) + logn T(n) = 37 (n/2) +n T(n) = 3T(n/3)+ vn T(n) = AT(n/2)-+en T(n) = 37(n/4) + mlogn T(n) = 7 (n/3) + n/2 T(n) = 6T(n/3) + n*logn T(n) = AT(n/2)+n/ logn T(x) = 64T(n/8) ~ n®logn |. T(n) = TP (n/3) +n? . T(n) = AT (n/2) + logn, . T(n) = T(n/2) + n(2 — cosn)Solutions 1. Tn) = 37 (n/2) +n? =+ T(n) = O(n?) (Case 3) T(n) = 4T(n/2) +n? + T(n) = O(n? logn) (Case 2) 1(n) = T(n/2) +2" = @(2") (Case 3) T(n) = 2° (n/2) +n" —+ Does not apply (a is not constant) T(n) = 167(n/4) +n = T(n) = O(n?) (Case 1) T(n) = 27 (n/2) + mlogn =+ T(n) = nlog? n (Case 2) T(n) = 27 (n/2) +n/ logn —+ Does not apply (non-polynomial difference between f(n) and mn!) T(n) = 27(n/4) +0! => Tin) = O(n!) (Case 3) Tn) = 0.5E(n/2) + 1) => Does not apply (a <1) T(n) = 167(n/4) +n! = T(n) = O(n!) (Case 3) . P(n) = VEE(n/2)-+ logn => T(n) = OV) (Case 1) T(n) = 3T(n/2)-+n => Tin) = @(nl8%) (Case 1) T(n) = 31 (n/3) + V8 = T(n) = O(n) (Case 1) 14, T(n) = AT (n/2) +n = T(n) = O(n?) (Case 1) . T(n) = 87 (n/4) + nlogn => T(n) = @(nlogn) (Case 3) T(n) = 81 (n/3) + 0/2 => T(n) = O(n logn) (Case 2) 17. T(n) = 6T(n/3) +n? logn => T(n) = (n* logn) (Case 3) T(n) = AP(n/2) + nf logn = T(n) = O(n?) (Case 1) |. T(n) = GAT (n/8) — n®logn =+ Does not apply ({(n) is not positive) T(n) = 70 (n/3) +n? = T(n) = O(n?) (Case 3) T(n) = AP(n]2) + logn = T(n) = O(n®) (Case 1) 22, T(n) = T(n/2) + n(2—cosn) —+ Does not apply. We are in Case 3, but the regularity condition is, violated. (Consider n= 2rk, where k is odd and arbitrarily large. For any such choice of rn, you can show that ¢ > 8/2, thereby violating the regularity condition.)
You might also like
Recurrence Relations, Master Theorem and Mathematical Preliminaries
PDF
No ratings yet
Recurrence Relations, Master Theorem and Mathematical Preliminaries
37 pages
03 Solving Recurrence
PDF
No ratings yet
03 Solving Recurrence
40 pages
4d MasterMethod
PDF
No ratings yet
4d MasterMethod
27 pages
Recurrence
PDF
No ratings yet
Recurrence
47 pages
Master Theoram
PDF
No ratings yet
Master Theoram
20 pages
Lec06 Annotated
PDF
No ratings yet
Lec06 Annotated
19 pages
Lecture 6
PDF
No ratings yet
Lecture 6
17 pages
05 Master Theorem
PDF
No ratings yet
05 Master Theorem
39 pages
Mastertheorem
PDF
No ratings yet
Mastertheorem
10 pages
Mastertheorem Umd
PDF
No ratings yet
Mastertheorem Umd
9 pages
Master Theorem Revision
PDF
No ratings yet
Master Theorem Revision
10 pages
ADE Lec12 Master Theorem
PDF
No ratings yet
ADE Lec12 Master Theorem
15 pages
4 Recurrence and Master Theorem
PDF
No ratings yet
4 Recurrence and Master Theorem
37 pages
Recurrences Practice Questions 16042024 044116pm
PDF
No ratings yet
Recurrences Practice Questions 16042024 044116pm
53 pages
Master Theorem
PDF
No ratings yet
Master Theorem
8 pages
On DAA
PDF
No ratings yet
On DAA
8 pages
cs250 Solved
PDF
No ratings yet
cs250 Solved
5 pages
Ad Endsem Imp
PDF
No ratings yet
Ad Endsem Imp
27 pages
A N & R R: Symptotic Otations Ecurrence Elations
PDF
No ratings yet
A N & R R: Symptotic Otations Ecurrence Elations
25 pages
Recursion
PDF
No ratings yet
Recursion
66 pages
Substitution Method and Master Theorem
PDF
No ratings yet
Substitution Method and Master Theorem
36 pages
3-Divide and Conquer
PDF
No ratings yet
3-Divide and Conquer
11 pages
03 Divide and Conquer 3 Master Theorem
PDF
No ratings yet
03 Divide and Conquer 3 Master Theorem
76 pages
05 - Master's - Theorem
PDF
No ratings yet
05 - Master's - Theorem
6 pages
Order P&S
PDF
No ratings yet
Order P&S
8 pages
The Master Theorem
PDF
No ratings yet
The Master Theorem
11 pages
Recurrence and Master Theorem
PDF
50% (2)
Recurrence and Master Theorem
35 pages
DAA Asng 1
PDF
No ratings yet
DAA Asng 1
3 pages
3 Divideandconquer 3 Mastertheorem
PDF
No ratings yet
3 Divideandconquer 3 Mastertheorem
76 pages
Lecture 18 Eso207a 2022 Recuurence
PDF
No ratings yet
Lecture 18 Eso207a 2022 Recuurence
41 pages
Unit I Introduction To Algoritm Design
PDF
No ratings yet
Unit I Introduction To Algoritm Design
6 pages
Master Theorem - (Decreasing and Dividing Functions)
PDF
No ratings yet
Master Theorem - (Decreasing and Dividing Functions)
53 pages
Ada 3
PDF
No ratings yet
Ada 3
10 pages
Ada 2
PDF
No ratings yet
Ada 2
3 pages
COMP3121 2 Basic Tools For Analysis of Algorithms
PDF
No ratings yet
COMP3121 2 Basic Tools For Analysis of Algorithms
23 pages
CSE 2201 Algorthm Analysis & Design: Solving Recurrence
PDF
No ratings yet
CSE 2201 Algorthm Analysis & Design: Solving Recurrence
22 pages
CSE-304 Design & Analysis of Algorithm: Recurrence Relation
PDF
No ratings yet
CSE-304 Design & Analysis of Algorithm: Recurrence Relation
5 pages
Lec 3
PDF
No ratings yet
Lec 3
4 pages
Design A Algorithm
PDF
No ratings yet
Design A Algorithm
20 pages
Anuj Thomas Mathew 1001237364
PDF
No ratings yet
Anuj Thomas Mathew 1001237364
2 pages
Master Method Cheat Sheet
PDF
No ratings yet
Master Method Cheat Sheet
2 pages
DAA Unit-2
PDF
No ratings yet
DAA Unit-2
25 pages
Master Theorem
PDF
No ratings yet
Master Theorem
4 pages
Topic 1 Recurrences Short
PDF
No ratings yet
Topic 1 Recurrences Short
20 pages
Hwk1 Solution
PDF
No ratings yet
Hwk1 Solution
8 pages
Data Structures and Algorithms: (CS210/ESO207/ESO211)
PDF
No ratings yet
Data Structures and Algorithms: (CS210/ESO207/ESO211)
22 pages
B A K N C B A: COMP2101 - Discrete Mathematics Binomial Theorem and Master Theorem
PDF
No ratings yet
B A K N C B A: COMP2101 - Discrete Mathematics Binomial Theorem and Master Theorem
5 pages
Extended Master Theorem
PDF
No ratings yet
Extended Master Theorem
3 pages
Ps 1 Sol
PDF
No ratings yet
Ps 1 Sol
4 pages
Unit I Introduction To Algoritm Design Session - 8
PDF
No ratings yet
Unit I Introduction To Algoritm Design Session - 8
7 pages
7 Recurrence Relations
PDF
No ratings yet
7 Recurrence Relations
21 pages
Teorema Master && Exercitii
PDF
No ratings yet
Teorema Master && Exercitii
3 pages
Recurrences PDF
PDF
No ratings yet
Recurrences PDF
24 pages
Algorithms . Recurrences: Dr. Issam Alhadid Modification Date 25/2/2019
PDF
No ratings yet
Algorithms . Recurrences: Dr. Issam Alhadid Modification Date 25/2/2019
25 pages
33 - BD - Data Structures and Algorithms - Narasimha Karumanchi
PDF
No ratings yet
33 - BD - Data Structures and Algorithms - Narasimha Karumanchi
12 pages
Indian Union Driving Licence Issued by Odisha
PDF
100% (1)
Indian Union Driving Licence Issued by Odisha
1 page
Current Affairs Q&A PDF - July 2022 by AffairsCloud 1
PDF
No ratings yet
Current Affairs Q&A PDF - July 2022 by AffairsCloud 1
327 pages
Current Affairs Pocket PDF - June 2022 by AffairsCloud New 1
PDF
No ratings yet
Current Affairs Pocket PDF - June 2022 by AffairsCloud New 1
152 pages
Static GK May 2022 PDF by AffairsCloud 1
PDF
No ratings yet
Static GK May 2022 PDF by AffairsCloud 1
25 pages
Simple Pastel Gradient 3D Digital Marketing Corporate Presentation
PDF
No ratings yet
Simple Pastel Gradient 3D Digital Marketing Corporate Presentation
12 pages
Evergreen Rules of Grammar - 7001PM
PDF
No ratings yet
Evergreen Rules of Grammar - 7001PM
35 pages
Class On Nouns - 1 - 9052AM
PDF
No ratings yet
Class On Nouns - 1 - 9052AM
63 pages
Current Affairs Q&A PDF June 1 2023 by Affairscloud 1
PDF
No ratings yet
Current Affairs Q&A PDF June 1 2023 by Affairscloud 1
20 pages
SpeedMaths 3 35PM
PDF
No ratings yet
SpeedMaths 3 35PM
14 pages
Current Affairs November 13-14 2022 PDF by AffairsCloud 1
PDF
No ratings yet
Current Affairs November 13-14 2022 PDF by AffairsCloud 1
21 pages
Current Affairs September 7 2022 PDF by AffairsCloud 1
PDF
No ratings yet
Current Affairs September 7 2022 PDF by AffairsCloud 1
20 pages