Data Structures and Algorithms in Java
Data Structures and Algorithms in Java
6th Edition
ISBN: 9781118771334
Author: Michael T. Goodrich
Publisher: WILEY
Question
Book Icon
Chapter 4, Problem 28R
Program Plan Intro

Largest size of n of a problem P:

The following table is need to fill the time taken for each function “f(n)” that the algorithm need to take solve “P” in “f(n)” microseconds.

Before filling the table, let us discuss about the calculation of following time for second, hour, month and century.

  • It is known that 1 microsecond is 106 seconds. Thus,

1second =106microseconds

hour = 3600000000 = 3.6 ×109microseconds,

1month  = 2592000000000 (assume a monthhas 30 days)= 2.592×1012 microseconds

1century=3110400000000000 = 3.1104 ×1015 microseconds

Blurred answer
Students have asked these similar questions
1-1 Comparison of running times For each function f(n) and time t in the following table, determine the largest size n of a problem that can be solved in time t, assuming that the algorithm to solve the problem takes f(n) microseconds. n lg n n? п! please explain every step thank you
3) For each function f(n) and time t in the following table, determine the largest size n of a problem that can be solved in timet, assuming that the algorithm to solve the problem takes f (n) microseconds. 1 1 second minute hour day month year century lgn n n lg n n2 n3 2" п!
7. Suppose that you have two different algorithms for solving a problem. To solve a problem of size n, the first algorithm uses exactly n(log2 n) operations and the second algorithm uses exactly n3/2 operations. As n grows, which algorithm uses fewer operations?

Chapter 4 Solutions

Data Structures and Algorithms in Java

Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education