CS1050 Homework 6: Telescoping Sums and Big O Notation, Assignments of Computer Science

The answers to question 1 to 6 of the cs1050 homework 6. It includes the use of telescoping sums and big o notation. The homework covers finding sums using telescoping series, showing that x^3 is o(x^4) but x^4 is not o(x^3), and determining if x^3 is o(g(x)) for different functions g(x).

Typology: Assignments

Pre 2010

Uploaded on 08/04/2009

koofers-user-npl
koofers-user-npl 🇺🇸

10 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
a) (1+(1)
j
j=0
8
)=2 +0+2+0+2+0+2+0+2=10.
b) (3
j
j=0
8
−2
j
) = 3
j
j=0
8
2
j
j=0
8
=3
9
−1
22
9
1
1=9330.
c) (2⋅3
j
j=0
8
+32
j
)=2⋅ 3
j
j=0
8
+3 2
j
j=0
8
=2⋅ 3
9
1
2
+3⋅ 2
9
1
1
=21215.
d) (2
j+1
j=0
8
−2
j
) =2
9
−2
0
=511.
a) (i −j)
j+1
j=1
2
= (i 1+i −2) = (2i −3) =(2−3)+(43) +(6−3) =3
i =1
3
i =1
3
i=1
3
.
a
k
=1
(k +1).
a
n
−a
0
=1
(n +1) +1= n
n+1.
k
2
−(k 1)
2
[ ]
k=1
n
= (2k 1)
k=1
n
.
CS1050 HW 6 Answer Key
There are 130 points total over the entire homework.
1) [5 points each]
Note: b) and c) below use the closed form for geometric series; d) below uses a
telescoping sum. (You could also use the geometric series form for d).)
2) [5 points each]
3) [20 points]
The rightmost side is now in the form of a telescoping sum with The result is
4) [20 points]
a) Find
Use the telescoping sum formula with ak = k2.
=(9⋅0+6) +(9⋅1+6) +(9⋅ 2+6) +(9⋅3+6) =78.
b) (3i +2j)
j=0
2
= 3i +(3i +2)+(3i +4) = (9i +6)
i=0
3
i=0
3
i=0
3
.
c) j
j=0
2
= (0+1+2) = 3
i=1
3
i =1
3
i =1
3
=9.
d) i
2
j
3
j=0
3
= i
2
0+i
2
⋅1+i
2
8+i
2
⋅27
i=0
2
i=0
2
= 36i
2
i =0
2
=(360 +361+364)=180.
1
k(k +1)
k=1
n
=1
k1
(k +1)
k =1
n
=1
(k +1) 1
k
k=1
n
.
pf2

Partial preview of the text

Download CS1050 Homework 6: Telescoping Sums and Big O Notation and more Assignments Computer Science in PDF only on Docsity!

a) ( 1 +(− 1 )j j= 0 8

∑ )^ =^2 +^0 +^2 +^0 +^2 +^0 +^2 +^0 +^2 =^10.

b) ( 3 j j= 0 8

∑ −^2

j (^) ) = 3 j j= 0 8

∑ −^2

j j= 0 8

c) ( 2 ⋅ 3 j j= 0 8

∑ +^3 ⋅^2

j ) = 2 ⋅ 3 j j= 0 8

∑ +^3 ⋅^2

j j= 0 8

∑ =^2 ⋅^

39 − 1 2 ⎡ ⎣⎢ ⎤ ⎦⎥^

  • 3 ⋅ 29 − 1 1 ⎡ ⎣⎢ ⎤ ⎦⎥^ = 21215. d) ( 2 j+ 1 j= 0 8

∑ −^2

j ) = 2 9 − 2 0 = 511. a) (i −j) j+ 1 j= 1 2

∑ =^ (i^ −^1 +i^ −^2 )^ =^ (^2 i^ −^3 )^ =(^2 −^3 )^ +(^4 −^3 )^ +(^6 −^3 )^ =^3

i = 1 3

i = 1 3

i= 1 3

ak = − 1 (k + 1 ) . an −a 0 = − 1 (n + 1 )

  • 1 = n n+ 1 . k 2 −(k − 1 ) 2 [ ] k= 1 n

∑ =^ (^2 k^ −^1 )

k= 1 n

n 2 − 0 = ( 2 k − 1 ) k = 1 n

**CS1050 HW 6 Answer Key There are 130 points total over the entire homework.

  1. [5 points each]** Note: b) and c) below use the closed form for geometric series; d) below uses a telescoping sum. (You could also use the geometric series form for d).) **2) [5 points each]
  2. [20 points]** The rightmost side is now in the form of a telescoping sum with The result is 4) [20 points] a) Find Use the telescoping sum formula with ak = k^2.

b) ( 3 i + 2 j) j= 0 2

∑ =^3 i^ +(^3 i^ +^2 )^ +(^3 i^ +^4 )^ =^ (^9 i^ +^6 )

i= 0 3

i= 0 3

i= 0 3

c) j j= 0 2

∑ =^ (^0 +^1 +^2 )^ =^3

i= 1 3

i = 1 3

i = 1 3

∑ =^9.

d) i 2 j 3 j= 0 3

∑ =^ i

2 ⋅ 0 +i 2 ⋅ 1 +i 2 ⋅ 8 +i 2 ⋅ 27 i= 0 2

i= 0 2

= 36 i 2 i = 0 2

∑ =(^36 ⋅^0 +^36 ⋅^1 +^36 ⋅^4 )^ =^180.

k= 1 k(k^ +^1 ) n

∑ =^

k

(k + 1 )

k = 1 ⎦⎥ n

∑ =^

(k + 1 )

k

k= 1 ⎦⎥ n

( 2 k − 1 ) =n 2 k= 1 n

5) [20 points] Show that x^3 is O(x^4 ) but that x^4 is not O (x^3 ). First, we show that x^3 is O(x^4 ). We must show that  constants C N and k R such that  x^3 C x^4  whenever x>k. Since x^3  x^4 , it is sufficient to choose k = 1 and C = 1. Now we will show that x^4 is not O (x^3 ). We shall do a proof by contradiction. In order for x^4 to be O (x^3 ), it must be true that  constants C N and k R such that  x^4 C x^3  whenever x>k. By dividing both sides by x^3 , we get xC. But since x can grow without bound, there must be a k such that x>C for a given C. This contradicts our assumption; thus we conclude that x^4 is not O (x^3 ). 6) [5 points each] Is it true that x^3 is O(g(x)) if g is the given function? a. g(x) = x^2 F b. g(x) = x^3 T c. g(x) = x^2 + x^3 T d. g(x) = x^2 + x^4 T e. g(x) = 3x^ T f. g(x) = x^3 /2 T