# Assignment2 - Assignment#2 Due Date Submit Tuesday January...

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

Assignment #2 Due Date: Tuesday, January 29 at 11:55pm Submit: WebCT Late Policy: -1 point per minute late Instructions: This is an individual assignment. Answers should be your own work. Chapter 2 5 pts 1. In the definition of Big-O, why is the "for N >= n0" needed? If N>=n0 wasn’t a requirement, the Big-O of a function could be a lot of things. The Big-O of a function has to be at least greater or equal to the lowest term of the function. 5 pts 2. If f1(N) = 2N and f2(N) = 3N, why are they both O(N), since 3N grows faster than 2N? As the value of N increases, 3N and 2N doesn’t make much difference and the definition of Big-O includes greater or equal to. 5 pts 3. For f1(N) = 2N and f2(N) = 3N, compare the values f1(10) with f1(20) and f2(10) with f2(20). What do you notice in the comparisons? f1(10) = 20. f1(20) = 40. f2(10) = 30. f2(20) = 60. I noticed that for f1, the difference was 20 and for f2, the difference was 30. The difference isn’t that big. 5 pts 4. Since Big-O notation is a mathematical tool for functions like f(N) or g(N), how is it applicable to algorithm analysis? Yes you can always estimate the running time of an algorithm in Big-O term so it’s easier to have an idea

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 04/07/2008 for the course CS 3345 taught by Professor Ozbirn during the Spring '08 term at University of Texas at Dallas, Richardson.

### Page1 / 5

Assignment2 - Assignment#2 Due Date Submit Tuesday January...

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

View Full Document
Ask a homework question - tutors are online