HW01-sln

HW01-sln - CSE310 HW01 Grading Keys 1. (10 pts) Let f ( n )...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the 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

Page1 / 3

HW01-sln - CSE310 HW01 Grading Keys 1. (10 pts) Let f ( n )...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online