Assignment 2 Solutions

# Assignment 2 Solutions - Assignment#2 Due Date Wednesday...

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
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Assignment #2 Due Date: Wednesday, February 4 at 11:59pm Submit: WebCT Late Policy: -1 point per minute late Instructions: This is an individual assignment. Answers should be your own Chapter 2 5 pts 1. In the definition of Big-O, why is the "for N >= n0" needed? This is due to signify a starting point where big -O is applicable, since Big-Oh is a restriction function of the upper bound as long as there is some scalar that can be multiplied against the bound. 5 pts 2. If f1(N) = 2N and f2(N) = 3N, why are they both O(N)? Big Oh classic definition is f(x) <= cg(x) while n>n0. They would all be to the order N do to the fact the scalar c could be adjusted to fit all of them. 5 pts 3. For f1(N) = 2N and f2(N) = 3N, compare the values f1(10) with f1(20) and with f2(20). What do you notice in the comparisons? f1(10)= 20, f(20) = 40, f2(10) = 30, f2(20) = 60. It is always a multiple of N and grows accordingly 5 pts 4. Since Big-O notation is a mathematical tool for functions like f(N) or g it applicable to algorithm analysis?it applicable to algorithm analysis?...
View Full Document

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

### Page1 / 4

Assignment 2 Solutions - Assignment#2 Due Date Wednesday...

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

View Full Document
Ask a homework question - tutors are online