EECS 233 Written Assignment 3

EECS 233 Written Assignment 3 - EECS 233 Written Assignment...

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

View Full Document Right Arrow Icon
EECS 233 Written Assignment #3 AKSHAYA ANNAVAJHALA 1. Chapter 6, Exercise 6.2 (3points) 1 3 2 6 7 5 4 15 14 12 9 10 11 13 8 2. Consider two efficient algorithms for the selection problem we discussed as an application of heaps (see lecture 13 slides 11 and 12; similar algorithms are discussed as Algorithm 6a and 6b in sec. 6.4.1 of the book). We discussed that both algorithms exhibit similar running time when k is small (constant) and large (Θ(N)). Which of the algorithms has a better running time bound for intermediate values of k, that is when k is not constant (e.g., it does grow with N) but its growth is sub-linear? (3 points) Algorithm 1 is O(N + k log N), and Algorithm 2 is O(k + (N-k)log k). thus, if k is sub-linear, Algorithm 1 will grow slower, as 1 will be O(N) and 2 will be a linear multiplied by the log of a sub-linear term. 3. Chapter 5, Exercise 5.1 (3 points) 0 1 2 3 4 5 6 7 8 9 4371 6173 4344 1989 1323 9679 4199 Each entry is introduced at the head of the doubly linked list for each cell
Background image of page 1

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

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

This note was uploaded on 05/09/2008 for the course EECS 233 taught by Professor Rabinovich during the Spring '08 term at Case Western.

Page1 / 2

EECS 233 Written Assignment 3 - EECS 233 Written Assignment...

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