Suppose you have algorithms with five running times. Assume these are the exact running times. How much slower do each of these algorithms get when you (a) double the input or (b) increase the input size by one? Do both.  This problem requires discrete math. I solved all of these but I had a quick question. My teacher wanted us to use the big 0 notation for these running times, but the problem is that I'm not sure if that's necessary for these problems for the question it's asking. I tried to the big 0 notations for the first three. For (a) I got 8n3. Which I'm not sure is right. For example, for 1b I got 3n2 + 3n + 1 for how much slower these get from the original. Is that correct? Was I supposed to do something more for the big 0 notation. You can check to see if these answers are correct.  The big O notation formula is f(n) = 0(g(n)).  (a) n2  For double size I got 4n2. I got 2n + 1 from the input the size by one. I think that's all I need to do. I got similar answers for theother ones.  (b) n3 I got 2n3  for doubling the size. 3n2 + 3n + 1.  (c) 100 n2 (d) n log n  (e) 2n

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Suppose you have algorithms with five running times. Assume these are the exact running times. How much slower do each of these algorithms get when you (a) double the input or (b) increase the input size by one? Do both. 

This problem requires discrete math. I solved all of these but I had a quick question. My teacher wanted us to use the big 0 notation for these running times, but the problem is that I'm not sure if that's necessary for these problems for the question it's asking. I tried to the big 0 notations for the first three. For (a) I got 8n3. Which I'm not sure is right. For example, for 1b I got 3n2 + 3n + 1 for how much slower these get from the original. Is that correct? Was I supposed to do something more for the big 0 notation. You can check to see if these answers are correct. 

The big O notation formula is f(n) = 0(g(n)). 

(a) n2 

For double size I got 4n2. I got 2n + 1 from the input the size by one. I think that's all I need to do. I got similar answers for theother ones. 

(b) n3

I got 2n for doubling the size. 3n2 + 3n + 1. 

(c) 100 n2

(d) n log n 

(e) 2n

 

 

 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY