This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: 433521 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.(n2)!∈Θ((n2)!)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(n2)!2 [2 marks](i)The first sum can be processed thusS=2·2+3·21+. . .+ (n+ 1)·2n1,therefore2S=+2·21+. . .+n·2n1+(n+ 1)·2nSubtracting the first line from the second, we see thatS= (n+ 1)2n[2n1+ 2n2+. . .+ 21+ 2·2] = (n+ 1)2n2n=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.
 Spring '10
 .
 Algorithms

Click to edit the document details