This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: CSE310 HW01 Grading Keys 1. (10 pts) Let f ( n ) = n 2 and g ( n ) = 100 n log 2 n . Find the smallest integer N 0 such that f ( N ) g ( N ) but f ( N + 1) > g ( N + 1). Show the values of N , f ( N ), g ( N ), f ( N + 1) and g ( N + 1). Solutions: How to obtain the correct N ? You can write a program to iteratively check for N = 1 , 2 , . . . . N=996, f(N)=992016, g(N)=992016.19, f(N+1)=994009, g(N+1)=993156. Grading Keys: 6 pts for the value of N , 1 pt each for f ( N ) , g ( N ) , f ( N + 1) , g ( N + 1). 2. (10 pts) For each function f ( n ) (the row index in the following table) and time t (the column index in the following table), determine the largest size n of a problem that can be solved in time t , assuming that the algorithm takes f ( n ) microseconds to solve an instance of a problem of size n . Fill the value n in the corresponding entry. 1 second 1 minute 1 hour 1 day 1 year n 10 12 3 . 6 10 15 1 . 296 10 19 7 . 46496 10 21 9 . 95 10 26 n 10 6...
View Full
Document
 Spring '08
 Davulcu,H
 Algorithms, Data Structures

Click to edit the document details