Ans1 - 433-521 Algorithms and ComplexitySolutions to Project 1First Semester 2009Posted on LMS Wednesday 11 March 2009Due Wednesday 18 March

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 ComplexitySolutions to Project 1First Semester 2009Posted on LMS: Wednesday, 11 March 2009Due: Wednesday, 18 March 2009 [9.05am]Marks released: Friday, 20 March 2009Solutions to Questions1 [2 marks]First we write the simplest expression for the order of growth of each of these functions.(n-2)!∈Θ((n-2)!)5 log2(n+ 100)10= 50 log2(n+ 100)≤50 log2(2n)(forn≥100)∈Θ(logn)22n= 4n∈Θ(4n).001n4+ 2n3+ 1∈Θ(n4)(lnn)2∈Θ((logn)2)3√n∈Θ(n1/3)3n∈Θ(3n)If we recall that:•nagrows more slowly thannb, if< a < b;•factorials grow faster than exponentials;•logn∈O(na)for alla >;we obtain the correct sequence:5 log2(n+ 100)10(lnn)23√n.001n4+ 2n3+ 13n22n(n-2)!2 [2 marks](i)The first sum can be processed thusS=2·2+3·21+. . .+ (n+ 1)·2n-1,therefore2S=+2·21+. . .+n·2n-1+(n+ 1)·2nSubtracting the first line from the second, we see thatS= (n+ 1)2n-[2n-1+ 2n-2+. . .+ 21+ 2·2] = (n+ 1)2n-2n=n2n∈Θ(n2n)....
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

Ans1 - 433-521 Algorithms and ComplexitySolutions to Project 1First Semester 2009Posted on LMS Wednesday 11 March 2009Due Wednesday 18 March

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