# q1 - f 6 f 4 f 5 See ﬁg 2 COMP523 1 Tutorial 1 COMP523...

This preview shows pages 1–3. Sign up to view the full content.

Tutorial 1 COMP523 Advanced Algorithmic Techniques Dariusz Kowalski Andrew Collins Task 1 Exercise 1 (1) a) ( n + 1) 2 = n 2 + 2 n + 1 = (1 + 2 /n + 1 /n 2 ) * ( n 2 ) b) (2 n ) 2 = 4( n 2 ) (2) a) ( n + 1) 3 = n 3 + 3 n 2 + 3 n + 1 = (1 + 3 /n + 3 /n 2 + 1 /n 3 ) * ( n 3 ) b) (2 n ) 3 = 8( n 3 ) (3) a) 100( n + 1) 2 = (1 + 2 /n + 1 /n 2 ) * (100 n 2 ) b) 100(2 n ) 2 = 4(100 n 2 ) (4) a) ( n + 1) log( n + 1) = log[( n + 1) n +1 ] = log[ n n * ( n + 1) * (1 + 1 /n ) n ] = log[ n n ] + log[( n + 1) * (1 + 1 /n ) n ] = (1 + x ) * (log[ n n ]) where: (log( en + e )) / ( n log n ) < x < (log(4 n +4)) / ( n log n ) so it is almost 1 plus something close to 1/n since: ( n + 1) n +1 = n n * ( n + 1) * [( n + 1) /n ] n = n n * ( n + 1) * (1 + 1 /n ) n b) (2 n ) log(2 n ) = 2( n log n + n ) * ( n log n ) (5) a) 2 n +1 = 2 * 2 n b) 2 2 n = 2 n * 2 n See ﬁg. 1 In the graph you can see the rate of growth for values of n from 1 to 20. Exercise 3 The correct order is f 2 , f 3 , f 1 ,

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: f 6 , f 4 , f 5 . See ﬁg. 2 COMP523 1 Tutorial 1 COMP523 Advanced Algorithmic Techniques Dariusz Kowalski Andrew Collins 0.5 2 8 32 128 512 2048 8192 32768 131072 524288 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 n^2 n^3 100n^2 n log n 2^n Figure 1: Exercise 1 COMP523 2 Tutorial 1 COMP523 Advanced Algorithmic Techniques Dariusz Kowalski Andrew Collins 1 4 16 64 256 1024 4096 16384 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 n^2.5 sqrt 2n n + 10 10^n 100^n n^2 log n Figure 2: Exercise 2 COMP523 3...
View Full Document

{[ snackBarMessage ]}

### Page1 / 3

q1 - f 6 f 4 f 5 See ﬁg 2 COMP523 1 Tutorial 1 COMP523...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online