question Use substitution method: Show that the solution of T(n) = T(n-1) + n is O(n²) Use master method to find tight asymptotic bounds: T(n) = 2*T(n/4) + n T(n) = 2*T(n/4) + n²

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter5: Control Structures Ii (repetition)
Section: Chapter Questions
Problem 7PE
icon
Related questions
Question
100%

please answer with proper explanation and step by step solution.

answer for 2 is theta(n)

answer for 3 is Theta (n²)

Solve given
question
Use substitution method:
Show that the solution of T(n) = T(n-1) + n is O(n²)
Use master method to find tight asymptotic bounds:
T(n) = 2*T(n/4) + n
T(n) = 2*T(n/4) + n²
Transcribed Image Text:Solve given question Use substitution method: Show that the solution of T(n) = T(n-1) + n is O(n²) Use master method to find tight asymptotic bounds: T(n) = 2*T(n/4) + n T(n) = 2*T(n/4) + n²
Expert Solution
steps

Step by step

Solved in 4 steps

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning