Assignment 1 - e. Suggest an improvement or a better...

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

View Full Document Right Arrow Icon
Qatar University College of Engineering Department of Computer Science and Engineering Course: CMPS 323 Design and Analysis of Algorithms Instructor: Khaled Bashir Shaban Assignment #1 Due date Wednesday, March 16 th , 2011 (12:00 midnight). 1. Order the following functions by their growth rate: 2. The following is a pseudocode of a brute-force algorithm for computing the value of a polynomial p ( x ) = a n x n + a n-1 x n-1 + … + a 1 x + a 0 at a given point x . a. determine the worst-case efficiency class of the algorithm b. Re-design (re-write) the algorithm so that you have a more efficient solution for this problem. 3. Consider the following algorithm. a. What does this algorithm compute? b. What is its basic operation? c. How many times is the basic operation executed? d. What is the efficiency class of this algorithm?
Background image of page 1

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

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: e. Suggest an improvement or a better algorithm altogether and indicate its efficiency class. 4. Consider a variation of sequential search that scans a list to return the number of occurrences of a given search key in the list. a. Write a pseudo code for this algorithm. b. Will the efficiency of this algorithm compared to the classical sequential search differ? Explain. 5. Indicate whether the first function of each of the following pairs has a smaller, same, or larger order of growth than the second function. 6. Use the formal definitions of O, Θ, and Ω to determine whether the following assertions are true or false. 7. For each of the following functions, indicate the class Θ( f ( n )) the function belongs to. Prove your Answers (using definitions or limits)....
View Full Document

This note was uploaded on 05/14/2011 for the course CMPS 323 taught by Professor Shaban during the Spring '11 term at Qatar University.

Page1 / 2

Assignment 1 - e. Suggest an improvement or a better...

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