proj1 - 433-521 Algorithms and ComplexityProject 1First...

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

View Full Document Right Arrow Icon

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

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

Unformatted text preview: 433-521 Algorithms and ComplexityProject 1First Semester 2009Posted on LMS: Wednesday, 11 March 2009Due: Wednesday, 18 March 2009 [9.05am]Important:Your submissions for this project must be your own individual work. There is a furthernotice about this at the end of this document.Questions1 [2 marks]Order the following functions according to their order of growth (from lowest to high-est):(n−2)!5 log2(n+ 100)1022n.001n4+ 2n3+ 1(lnn)23√n3n.[based on Levitin, 2.2.5, p60]2 [2 marks]Find the order of growth of the following sums.(i)nsummationdisplayi=1(i+ 1)2i-1(ii)n-1summationdisplayi=0i-1summationdisplayj=0(i+j).[based on Levitin, 2.3.2, p67]3 [3 marks]As stated in the text [pp47–8], the worst-case number of key comparisons in the classicSEQUENTIALSEARCH algorithm isn, while the best case number is1.Algorithm 1SEQUENTIALSEARCH(A[0..n−1],K)Require:An arrayA[0..n−1]and a search keyK.Ensure:Returns the index of the first element ofAthat matchesK, or−1if there are no matchingelements.elements....
View Full Document

This note was uploaded on 05/11/2010 for the course COMPUTER S 301 taught by Professor . during the Spring '10 term at Kadir Has Üniversitesi.

Page1 / 2

proj1 - 433-521 Algorithms and ComplexityProject 1First...

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