assignment1 - COT5405 Homework 1 Page 1 of 2 Problem 1 Give...

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

View Full Document Right Arrow Icon
COT5405 - Homework 1 Page 1 of 2 Problem 1 Give a problem P with size n , if it can not be solved in O ( f ( n )) time by any known algorithm, can we say the lower bound of P is Ω( f ( n ))? Why? Problem 2 Solve the following recurrence relations by giving Θ bound. T ( n ) = 3 T ( n/ 2) + n T ( n ) = 8 T ( n/ 2) + n 3 T ( n ) = 2 T ( n/ 4) + n ) T ( n ) = T ( n ) + 1 Problem 3 You are planning to buy gifts for your nephews at a gift store where there are n toys all with different prices. Suppose you have k nephews and d dollars in your pocket all of which you need to spend. The k -gift problem asks to find whether there are k toys with total cost exactly d . Design and analyze an o ( n 3 )(little oh) time algorithm for the 3-gift problem. Note that d should not come into your asymptotic time complexity. (Hint: solve the 2-gift problem first.) Problem 4 Suppose you were given a blackbox, which when given a list as input, returns a pivot in linear time in the following way: The list is partitioned into sublists of length 5. For each of
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 09/28/2011 for the course COT 5405 taught by Professor Ungor during the Fall '08 term at University of Florida.

Page1 / 2

assignment1 - COT5405 Homework 1 Page 1 of 2 Problem 1 Give...

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