use summation to analyze the running time (i.e. T(n)) of these functions and able to find some simple function f(n) such that T(n) = Θ(f(n)).

Systems Architecture
7th Edition
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Stephen D. Burd
Chapter10: Application Development
Section: Chapter Questions
Problem 6VE
icon
Related questions
Question

use summation to analyze the running time (i.e. T(n)) of these functions and able to find some simple function f(n) such that T(n) = Θ(f(n)). show the steps, please

 

(h) FuncH(n)
s = 0
i = 1
while (i < n) do
for j = 1 to n do
i = i+ 1
s = s+i+j
(f) FuncF(n)
s = 0
for i = 1 to n do
for j = i to n² do
for k = j to n³ do
return s
3
s = s +i+j
return s
Transcribed Image Text:(h) FuncH(n) s = 0 i = 1 while (i < n) do for j = 1 to n do i = i+ 1 s = s+i+j (f) FuncF(n) s = 0 for i = 1 to n do for j = i to n² do for k = j to n³ do return s 3 s = s +i+j return s
Expert Solution
steps

Step by step

Solved in 3 steps with 3 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
  • SEE MORE QUESTIONS
Recommended textbooks for you
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning