Sums. ITT9131 Konkreetne Matemaatika

Size: px
Start display at page:

Download "Sums. ITT9131 Konkreetne Matemaatika"

Transcription

1 Sums ITT9131 Konkreetne Matemaatika Chapter Two Notation Sums and Recurrences Manipulation of Sums Multiple Sums General Methods Finite and Innite Calculus Innite Sums

2 Contents 1 Sequences 2 Notations for sums 3 Sums and Recurrences Repertoire method Perturbation method Reduction to the known solutions Summation factors 4 Manipulation of Sums

3 Next section 1 Sequences 2 Notations for sums 3 Sums and Recurrences Repertoire method Perturbation method Reduction to the known solutions Summation factors 4 Manipulation of Sums

4 Sequences Denition A sequence of elements of a set A is any function f : N A, where N is set of natural numbers. Notations used: f = {a n }, where a n = f (n) {a n } n N {a n } a n is called n-th term of a sequence f

5 Sequences Denition A sequence of elements of a set A is any function f : N A, where N is set of natural numbers. Notations used: f = {a n }, where a n = f (n) {a n } n N {a n } a n is called n-th term of a sequence f

6 Sequences Denition A sequence of elements of a set A is any function f : N A, where N is set of natural numbers. Notations used: f = {a n }, where a n = f (n) {a n } n N {a n } a n is called n-th term of a sequence f

7 Sequences Denition A sequence of elements of a set A is any function f : N A, where N is set of natural numbers. Notations used: f = {a n }, where a n = f (n) {a n } n N {a n } a n is called n-th term of a sequence f Example a 0 = 0, a 1 = 1 2 3, a 2 = 2 3 4, a 3 = 3 4 5, 0, or 1 6, 1 6, 3 20, 2 15,, n (n + 1)(n + 2),

8 Sequences Denition A sequence of elements of a set A is any function f : N A, where N is set of natural numbers. Notations used: f = {a n }, where a n = f (n) {a n } n N {a n } a n is called n-th term of a sequence f Notation f (n) = a n = n (n + 1)(n + 2) or n (n + 1)(n + 2)

9 Sets of indexes N set of indexes of the sequence f = {a n } n N Any countably innite set can be used for index. Examples of other frequently used indexes are: N + = N {0} N N K N, where K is any nite subset of N Z N {1, 3, 5, 7,...} = ODD N {0, 2, 4, 6,...} = EVEN N

10 Sets of indexes N set of indexes of the sequence f = {a n } n N Any countably innite set can be used for index. Examples of other frequently used indexes are: N + = N {0} N N K N, where K is any nite subset of N Z N {1, 3, 5, 7,...} = ODD N {0, 2, 4, 6,...} = EVEN N

11 Sets of indexes N set of indexes of the sequence f = {a n } n N Any countably innite set can be used for index. Examples of other frequently used indexes are: N + = N {0} N N K N, where K is any nite subset of N Z N {1, 3, 5, 7,...} = ODD N {0, 2, 4, 6,...} = EVEN N A B denotes that sets A and B are of the same cardinality, i.e. A = B.

12 Sets of indexes N set of indexes of the sequence f = {a n } n N Any countably innite set can be used for index. Examples of other frequently used indexes are: N + = N {0} N N K N, where K is any nite subset of N Z N {1, 3, 5, 7,...} = ODD N {0, 2, 4, 6,...} = EVEN N Two sets A and B have the same cardinality if there exists a bijection, that is, an injective and surjective function, from A to B. (See for detailed explanation)

13 Finite sequence Finite sequence of elements of a set A is a function f : K A, where K is set a nite subset of natural numbers For example: f : {1,2,3,4,,n}n A, n N Special case: n = 0, i.e. empty sequence: f (/0) = e

14 Domain of the sequence a n = f : T A n (n 2)(n 5) Domain of f is T = N {2,5}

15 Next section 1 Sequences 2 Notations for sums 3 Sums and Recurrences Repertoire method Perturbation method Reduction to the known solutions Summation factors 4 Manipulation of Sums

16 Notation For a nite set K = {1,2,,m} and a given sequence f : K R with f (n) = a n we write m a k = a 1 + a a m k=1 Alternative notations m k=1 a k = 1 k m a k = k {1,,m} a k = a k K

17 Notation For a nite set K = {1,2,,m} and a given sequence f : K R with f (n) = a n we write m a k = a 1 + a a m k=1 Alternative notations m k=1 a k = 1 k m a k = k {1,,m} a k = a k K

18 Warmup: What does this notation mean? 0 q k k=4 Options: 1 0 k=4 q k = q 4 + q 3 + q 2 + q 1 + q 0 = k {4,3,2,1,0} q k = 4 k=0 q k. This seems the sensible thingbut: 2 4 k 0 q k = 0 also looks like a feasible interpretationbut: 3 If n q k = q k q k, k=m k n k<m (provided the two sums on the right-hand side exist nite) then 0 k=4 q k = k 0 q k k<4 q k = q 1 q 2 q 3.

19 Warmup: What does this notation mean? 0 q k k=4 Options: 1 0 k=4 q k = q 4 + q 3 + q 2 + q 1 + q 0 = k {4,3,2,1,0} q k = 4 k=0 q k. This seems the sensible thingbut: 2 4 k 0 q k = 0 also looks like a feasible interpretationbut: 3 If n q k = q k q k, k=m k n k<m (provided the two sums on the right-hand side exist nite) then 0 k=4 q k = k 0 q k k<4 q k = q 1 q 2 q 3.

20 Warmup: What does this notation mean? 0 q k k=4 Options: 1 0 k=4 q k = q 4 + q 3 + q 2 + q 1 + q 0 = k {4,3,2,1,0} q k = 4 k=0 q k. This seems the sensible thingbut: 2 4 k 0 q k = 0 also looks like a feasible interpretationbut: 3 If n q k = q k q k, k=m k n k<m (provided the two sums on the right-hand side exist nite) then 0 k=4 q k = k 0 q k k<4 q k = q 1 q 2 q 3.

21 Warmup: What does this notation mean? 0 q k k=4 Options: 1 0 k=4 q k = q 4 + q 3 + q 2 + q 1 + q 0 = k {4,3,2,1,0} q k = 4 k=0 q k. This seems the sensible thingbut: 2 4 k 0 q k = 0 also looks like a feasible interpretationbut: 3 If n q k = q k q k, k=m k n k<m (provided the two sums on the right-hand side exist nite) then 0 k=4 q k = k 0 q k k<4 q k = q 1 q 2 q 3.

22 Warmup: Interpreting the Σ-notation Compute {0 k 5} a k and {0 k2 5} a k 2. First sum {0 k 5} = {0,1,2,3,4,5} : thus, {0 k 5} a k = a 0 + a 1 + a 2 + a 3 + a 4 + a 5. Second sum {0 k 2 5} = {0,1,2, 1, 2} : thus, {0 k 5} a k 2 = a a a 2 2+a ( 1) 2 + a ( 2) 2 = a 0 + 2a 1 + 2a 2.

23 Warmup: Interpreting the Σ-notation Compute {0 k 5} a k and {0 k2 5} a k 2. First sum {0 k 5} = {0,1,2,3,4,5} : thus, {0 k 5} a k = a 0 + a 1 + a 2 + a 3 + a 4 + a 5. Second sum {0 k 2 5} = {0,1,2, 1, 2} : thus, {0 k 5} a k 2 = a a a 2 2+a ( 1) 2 + a ( 2) 2 = a 0 + 2a 1 + 2a 2.

24 Warmup: Interpreting the Σ-notation Compute {0 k 5} a k and {0 k2 5} a k 2. First sum {0 k 5} = {0,1,2,3,4,5} : thus, {0 k 5} a k = a 0 + a 1 + a 2 + a 3 + a 4 + a 5. Second sum {0 k 2 5} = {0,1,2, 1, 2} : thus, {0 k 5} a k 2 = a a a 2 2+a ( 1) 2 + a ( 2) 2 = a 0 + 2a 1 + 2a 2.

25 Warmup: Interpreting the Σ-notation Compute {0 k 5} a k and {0 k2 5} a k 2. First sum {0 k 5} = {0,1,2,3,4,5} : thus, {0 k 5} a k = a 0 + a 1 + a 2 + a 3 + a 4 + a 5. Second sum {0 k 2 5} = {0,1,2, 1, 2} : thus, {0 k 5} a k 2 = a a a 2 2+a ( 1) 2 + a ( 2) 2 = a 0 + 2a 1 + 2a 2.

26 Next section 1 Sequences 2 Notations for sums 3 Sums and Recurrences Repertoire method Perturbation method Reduction to the known solutions Summation factors 4 Manipulation of Sums

27 Sums and Recurrences Computation of any sum S n = n a k k=1 can be presented in the recursive form: S 0 = a 0 S n = S n 1 + a n Techniques from CHAPTER ONE can be used for nding closed formulas for evaluating sums.

28 Recalling repertoire method Given g(0) = α g(n) = Φ(g(n 1)) + Ψ(β,γ,...) for n > 0. where Φ and Ψ are linear, for example if g(n) = λ 1 g 1 (n) + λ 2 g 2 (n) then Φ(g(n)) = λ 1 Φ(g 1 (n)) + λ 2 Φ(g 2 (n)). Closed form is g(n) = αa(n) + βb(n) + γc(n) + (1) Functions A(n),B(n),C(n),... could be found from the system of equations α 1 A(n) + β 1 B(n) + γ 1 C(n) + = g 1 (n). =... α m A(n) + β m B(n) + γ m C(n) + = g m (n) where α i,β i,γ i are constants committing (1) and recurrence relationship for the repertoire case g i (n) and any n.

29 Recalling repertoire method Given g(0) = α g(n) = Φ(g(n 1)) + Ψ(β,γ,...) for n > 0. where Φ and Ψ are linear, for example if g(n) = λ 1 g 1 (n) + λ 2 g 2 (n) then Φ(g(n)) = λ 1 Φ(g 1 (n)) + λ 2 Φ(g 2 (n)). Closed form is g(n) = αa(n) + βb(n) + γc(n) + (1) Functions A(n),B(n),C(n),... could be found from the system of equations α 1 A(n) + β 1 B(n) + γ 1 C(n) + = g 1 (n). =... α m A(n) + β m B(n) + γ m C(n) + = g m (n) where α i,β i,γ i are constants committing (1) and recurrence relationship for the repertoire case g i (n) and any n.

30 Recalling repertoire method Given g(0) = α g(n) = Φ(g(n 1)) + Ψ(β,γ,...) for n > 0. where Φ and Ψ are linear, for example if g(n) = λ 1 g 1 (n) + λ 2 g 2 (n) then Φ(g(n)) = λ 1 Φ(g 1 (n)) + λ 2 Φ(g 2 (n)). Closed form is g(n) = αa(n) + βb(n) + γc(n) + (1) Functions A(n),B(n),C(n),... could be found from the system of equations α 1 A(n) + β 1 B(n) + γ 1 C(n) + = g 1 (n). =... α m A(n) + β m B(n) + γ m C(n) + = g m (n) where α i,β i,γ i are constants committing (1) and recurrence relationship for the repertoire case g i (n) and any n.

31 Next subsection 1 Sequences 2 Notations for sums 3 Sums and Recurrences Repertoire method Perturbation method Reduction to the known solutions Summation factors 4 Manipulation of Sums

32 Example 1: arithmetic sequence Arithmetic sequence: a n = a + bn Recurrent equation for the sum S n = a 0 + a 1 + a a n : S 0 = a S n = S n 1 + (a + bn), for n > 0. Let's nd a closed form for a bit more general recurrent equation: R 0 = α R n = R n 1 + (β + γn), for n > 0.

33 Example 1: arithmetic sequence Arithmetic sequence: a n = a + bn Recurrent equation for the sum S n = a 0 + a 1 + a a n : S 0 = a S n = S n 1 + (a + bn), for n > 0. Let's nd a closed form for a bit more general recurrent equation: R 0 = α R n = R n 1 + (β + γn), for n > 0.

34 Evaluation of terms R n = R n 1 + (β + γn) R 0 = α R 1 = α + β + γ R 2 = α + β + γ + (β + 2γ) = α + 2β + 3γ R 3 = α + 2β + 3γ + (β + 3γ) = α + 3β + 6γ Observation R n = A(n)α + B(n)β + C(n)γ A(n), B(n), C(n) can be evaluated using repertoire method: we will consider three cases 1 R n = 1 for all n 2 R n = n for all n 3 R n = n 2 for all n.

35 Evaluation of terms R n = R n 1 + (β + γn) R 0 = α R 1 = α + β + γ R 2 = α + β + γ + (β + 2γ) = α + 2β + 3γ R 3 = α + 2β + 3γ + (β + 3γ) = α + 3β + 6γ Observation R n = A(n)α + B(n)β + C(n)γ A(n), B(n), C(n) can be evaluated using repertoire method: we will consider three cases 1 R n = 1 for all n 2 R n = n for all n 3 R n = n 2 for all n.

36 Repertoire method: case 1 Lemma 1: A(n) = 1 for all n Hence 1 = R 0 = α From R n = R n 1 + (β + γn) follows that 1 = 1 + (β + γn). This is possible only when β = γ = 0 1 = A(n) 1 + B(n) 0 + C(n) 0

37 Repertoire method: case 2 Lemma 2: B(n) = n for all n Hence α = R 0 = 0 From R n = R n 1 +(β +γn) follows that n = (n 1)+(β +γn). I.e. 1 = β + γn. This gives that β = 1 and γ = 0 n = A(n) 0 + B(n) 1 + C(n) 0

38 Repertoire method: case 3 Lemma 3: C(n) = n2 +n 2 for all n Hence α = R 0 = 0 2 = 0 Equation R n = R n 1 + (β + γn) can be transformed as n 2 = (n 1) 2 + β + γn n 2 = n 2 2n β + γn 0 = (1 + β) + n(γ 2) This is valid i 1 + β = 0 and γ 2 = 0 Due to Lemma 2 we get n 2 = A(n) 0 + B(n) ( 1) + C(n)γ 2 n 2 = n + 2C(n)

39 Repertoire method: summing up According to Lemma 1, 2, 3, we get 1 R n = 1 for all n = A(n) = 1 2 R n = n for all n = B(n) = n 3 R n = n 2 for all n = C(n) = (n 2 + n)/2.

40 Repertoire method: summing up According to Lemma 1, 2, 3, we get 1 R n = 1 for all n = A(n) = 1 2 R n = n for all n = B(n) = n 3 R n = n 2 for all n = C(n) = (n 2 + n)/2. That means that ( n 2 ) + n R n = α + nβ + γ 2

41 Repertoire method: summing up According to Lemma 1, 2, 3, we get 1 R n = 1 for all n = A(n) = 1 2 R n = n for all n = B(n) = n 3 R n = n 2 for all n = C(n) = (n 2 + n)/2. That means that ( n 2 ) + n R n = α + nβ + γ 2 The sum for arithmetic sequence we obtain taking α = β = a and γ = b: n S n = (a + bk) = (n + 1)a + k=0 n(n + 1) b 2

42 Next subsection 1 Sequences 2 Notations for sums 3 Sums and Recurrences Repertoire method Perturbation method Reduction to the known solutions Summation factors 4 Manipulation of Sums

43 Perturbation method Finding the closed form for S n = 0 k n a k : Rewrite S n+1 by splitting o rst and last term: S n + a n+1 = a 0 + a k = 1 k n+1 = a 0 + a k+1 = 1 k+1 n+1 = a 0 + a k+1 0 k n Work on last sum and express in terms of S n. Finally, solve for S n.

44 Example 2: geometric sequence Geometric sequence: a n = ax n Recurrent equation for the sum S n = a 0 + a 1 + a a n = 0 k n ax k : S 0 = a S n = S n 1 + ax n, for n > 0.

45 Example 2: geometric sequence Geometric sequence: a n = ax n Recurrent equation for the sum S n = a 0 + a 1 + a a n = 0 k n ax k : S 0 = a S n = S n 1 + ax n, for n > 0. Splitting o the rst term gives S n + a n+1 = a 0 + a k+1 = 0 k n = a + ax k+1 = 0 k n = a + x ax k = 0 k n Hence, we have the equation = a + xs n

46 Example 2: geometric sequence Geometric sequence: a n = ax n Recurrent equation for the sum S n = a 0 + a 1 + a a n = 0 k n ax k : S 0 = a S n = S n 1 + ax n, for n > 0. Hence, we have the equation S n + ax n+1 = a + xs n Solution: S n = a axn+1 1 x

47 Example 2: geometric sequence Geometric sequence: a n = ax n Recurrent equation for the sum S n = a 0 + a 1 + a a n = 0 k n ax k : S 0 = a S n = S n 1 + ax n, for n > 0. Hence, we have the equation S n + ax n+1 = a + xs n Solution: S n = a axn+1 1 x

48 Example 2: geometric sequence Geometric sequence: a n = ax n Recurrent equation for the sum S n = a 0 + a 1 + a a n = 0 k n ax k : S 0 = a S n = S n 1 + ax n, for n > 0. Closed formula for geometric sum: S n = a(xn+1 1) x 1

49 Next subsection 1 Sequences 2 Notations for sums 3 Sums and Recurrences Repertoire method Perturbation method Reduction to the known solutions Summation factors 4 Manipulation of Sums

50 Example 3: Hanoi sequence The Tower of Hanoi recurrence: T 0 = 0 T n = 2T n 1 + 1

51 Example 3: Hanoi sequence The Tower of Hanoi recurrence: T 0 = 0 T n = 2T n This sequence can be transformed into geometric sum using following manipulations: Divide equations by 2 n : T 0 /2 0 = 0 T n /2 n = T n 1 /2 n 1 + 1/2 n Set S n = T n /2 n to have: S 0 = 0 S n = S n n (This is geometric sum with the parameters a = 1 and x = 1/2.)

52 Example 3: Hanoi sequence The Tower of Hanoi recurrence: T 0 = 0 T n = 2T n This sequence can be transformed into geometric sum using following manipulations: Divide equations by 2 n : T 0 /2 0 = 0 T n /2 n = T n 1 /2 n 1 + 1/2 n Set S n = T n /2 n to have: S 0 = 0 S n = S n n (This is geometric sum with the parameters a = 1 and x = 1/2.)

53 Example 3: Hanoi sequence The Tower of Hanoi recurrence: T 0 = 0 T n = 2T n Hence, S n = 0.5(0.5n 1) = 1 2 n (a 0 = 0 has been left out of the sum) T n = 2 n S n = 2 n 1

54 Example 3: Hanoi sequence The Tower of Hanoi recurrence: T 0 = 0 T n = 2T n Hence, S n = 0.5(0.5n 1) = 1 2 n (a 0 = 0 has been left out of the sum) T n = 2 n S n = 2 n 1 Just the same result we have proven by means of induction! :))

55 Next subsection 1 Sequences 2 Notations for sums 3 Sums and Recurrences Repertoire method Perturbation method Reduction to the known solutions Summation factors 4 Manipulation of Sums

56 Linear recurrence in form a n T n = b n T n 1 + c n Here {a n }, {b n } and {c n } are any sequences and initial value T 0 is a constant. The idea: Find a summation factor s n satisfying the property s n b n = s n 1 a n 1 for any n If such a factor exists, one can do following transformations: s n a n T n = s n b n T n 1 + s n c n = s n 1 a n 1 T n 1 + s n c n Setting S n = s n a n T n, to rewrite the equation as Closed formula (!) for solution: S 0 = s 0 a 0 T 0 S n = S n 1 + s n c n T n = 1 n (s 0 a 0 T 0 + s n a n s k c k ) = 1 n (s 1 b 1 T 0 + s k=1 n a n s k c k ) k=1

57 Linear recurrence in form a n T n = b n T n 1 + c n Here {a n }, {b n } and {c n } are any sequences and initial value T 0 is a constant. The idea: Find a summation factor s n satisfying the property s n b n = s n 1 a n 1 for any n If such a factor exists, one can do following transformations: s n a n T n = s n b n T n 1 + s n c n = s n 1 a n 1 T n 1 + s n c n Setting S n = s n a n T n, to rewrite the equation as Closed formula (!) for solution: S 0 = s 0 a 0 T 0 S n = S n 1 + s n c n T n = 1 n (s 0 a 0 T 0 + s n a n s k c k ) = 1 n (s 1 b 1 T 0 + s k=1 n a n s k c k ) k=1

58 Finding summation factor Assuming that b n 0 for all n: Set s 0 = 1 Compute next elements using the property s n b n = s n 1 a n 1 : s 1 = a 0 b 1 s 2 = s 1a 1 = a 0a 1 b 2 b 1 b 2 s 3 = s 2a 2 = a 0a 1 a 2 b 3 b 1 b 2 b 3... s n = s n 1a n 1 b n (To be proved by induction!) = a 0a 1...a n 1 b 1 b 2...b n

59 Example: application of summation factor a n = c n = 1 and b n = 2 gives Hanoi Tower sequence: Evaluate summation factor s n = s n 1a n 1 b n = a 0a 1...a n 1 b 1 b 2...b n = 1 2 n Solution is T n = 1 (s 1 b 1 T 0 + s n a n n k=1 s k c k ) = 2 n n k=1 1 2 k = 2n (1 2 n ) = 2 n 1

60 YAE: constant coecients Equation Z n = az n 1 + b Taking a n = 1,b n = a and c n = b : Evaluate summation factor s n = s n 1a n 1 b n = a 0a 1...a n 1 b 1 b 2...b n = 1 a n Solution is ( ) ) Z n = 1 n s 1 b 1 Z 0 + s n a n s k c k = a (Z n n b a k k=1 k=1 = a n Z 0 + b(1 + a + a a n 1 ) = a n Z 0 + an 1 a 1 b

61 YAE : check up on results Equation Z n = az n 1 + b Z n = az n 1 + b = = a 2 Z n 2 + ab + b = = a 3 Z n 3 + a 2 b + ab + b = = a k Z n k + (a k 1 + a k )b = = a k Z n k + ak 1 b (assuming a 1) a 1 Continuing until k = n: Z n = a n Z n n + an 1 a 1 b = = a n Z 0 + an 1 a 1 b

62 YAE : check up on results Equation Z n = az n 1 + b Z n = az n 1 + b = = a 2 Z n 2 + ab + b = = a 3 Z n 3 + a 2 b + ab + b = = a k Z n k + (a k 1 + a k )b = = a k Z n k + ak 1 b (assuming a 1) a 1 Continuing until k = n: Z n = a n Z n n + an 1 a 1 b = = a n Z 0 + an 1 a 1 b

63 Eciency of quick sort Average number of comparisons: C n = n n n 1 k=0 C k

64 Eciency of quick sort (2) The average number of comparison steps when it is applied to n items C 0 = 0 C n = n n n 1 C k k=0 The following transformations reduce this equation nc n = n 2 n 2 + n + 2 C k + 2C n 1 k=0 Write the last equation for n 1 and subtract to eliminate the sum: (n 1)C n 1 = (n 1) 2 n 2 + (n 1) + 2 C k k=0

65 Eciency of quick sort (2) The average number of comparison steps when it is applied to n items C 0 = 0 C n = n n n 1 C k k=0 The following transformations reduce this equation nc n = n 2 n 2 + n + 2 C k + 2C n 1 k=0 Write the last equation for n 1 and subtract to eliminate the sum: (n 1)C n 1 = (n 1) 2 n 2 + (n 1) + 2 C k k=0 nc n (n 1)C n 1 = n 2 + n + 2C n 1 (n 1) 2 (n 1)

66 Eciency of quick sort (2) The average number of comparison steps when it is applied to n items C 0 = 0 C n = n n n 1 C k k=0 The following transformations reduce this equation nc n = n 2 n 2 + n + 2 C k + 2C n 1 k=0 Write the last equation for n 1 and subtract to eliminate the sum: (n 1)C n 1 = (n 1) 2 n 2 + (n 1) + 2 C k k=0 nc n nc n 1 + C n 1 = n 2 + n + 2C n 1 n 2 + 2n 1 n + 1

67 Eciency of quick sort (2) The average number of comparison steps when it is applied to n items C 0 = 0 C n = n n n 1 C k k=0 The following transformations reduce this equation nc n = n 2 n 2 + n + 2 C k + 2C n 1 k=0 Write the last equation for n 1 and subtract to eliminate the sum: (n 1)C n 1 = (n 1) 2 n 2 + (n 1) + 2 C k k=0 nc n nc n 1 = C n 1 + 2n

68 Eciency of quick sort (2) The average number of comparison steps when it is applied to n items C 0 = 0 C n = n n n 1 C k k=0 The following transformations reduce this equation nc n = n 2 n 2 + n + 2 C k + 2C n 1 k=0 Write the last equation for n 1 and subtract to eliminate the sum: (n 1)C n 1 = (n 1) 2 n 2 + (n 1) + 2 C k k=0 nc n = (n + 1)C n 1 + 2n

69 Eciency of quick sort (3) Equation nc n = (n + 1)C n 1 + 2n Assuming a n = n,b n = n + 1 and c n = 2n evaluate summation factor s n = a 1a 2...a n (n 1) = b 2 b 3...b n (n + 1) = 2 n(n + 1) Solution is ( C n = 1 s n a n = n s 1 b 1 C 0 + n k=1 4k k(k + 1) ) n s k c k k=1 n 1 = 2(n + 1) = 2(n + 1) k + 1 k=1 = 2(n + 1)H n 2n ( n 1 k + 1 k=1 n ) where H n = n is n-th harmonic number.

70 Eciency of quick sort (3) Equation nc n = (n + 1)C n 1 + 2n Assuming a n = n,b n = n + 1 and c n = 2n evaluate summation factor s n = a 1a 2...a n (n 1) = b 2 b 3...b n (n + 1) = 2 n(n + 1) Solution is ( C n = 1 s n a n = n s 1 b 1 C 0 + n k=1 4k k(k + 1) ) n s k c k k=1 n 1 = 2(n + 1) = 2(n + 1) k + 1 k=1 = 2(n + 1)H n 2n ( n 1 k + 1 k=1 n ) where H n = n is n-th harmonic number. (k-th harmonic produced by a violin string is the fundamental tone produced by a string that is 1/k times as long.)

71 Eciency of quick sort (3) Equation nc n = (n + 1)C n 1 + 2n Assuming a n = n,b n = n + 1 and c n = 2n evaluate summation factor s n = a 1a 2...a n (n 1) = b 2 b 3...b n (n + 1) = 2 n(n + 1) Solution is ( C n = 1 s n a n = n s 1 b 1 C 0 + n k=1 4k k(k + 1) ) n s k c k k=1 n 1 = 2(n + 1) = 2(n + 1) k + 1 k=1 = 2(n + 1)H n 2n ( n 1 k + 1 k=1 n ) where H n = n lnn. (k-th harmonic produced by a violin string is the fundamental tone produced by a string that is 1/k times as long.)

72 Next section 1 Sequences 2 Notations for sums 3 Sums and Recurrences Repertoire method Perturbation method Reduction to the known solutions Summation factors 4 Manipulation of Sums

73 Manipulation of Sums Some properties of sums: For K being a nite set and p(k) is any permutation of the set of all integers. Distributive law Associative law Commutative law ca k = c a k k K k K (a k + b k ) = a k + b k k K k K k K a k = a p(k) k K p(k) K Application of these laws for S = 0 k n (a + bk) S = (a + b(n k)) = (a + bn bk) (commutativity) 0 n k n 0 k n 2S = ((a + bk) + (a + bn bk)) = (2a + bn) (associativity) 0 k n 0 k n 2S = (2a + bn) 1 = (2a + bn)(n + 1) (distributivity) 0 k n

74 Manipulation of Sums Some properties of sums: For K being a nite set and p(k) is any permutation of the set of all integers. Distributive law Associative law Commutative law ca k = c a k k K k K (a k + b k ) = a k + b k k K k K k K a k = a p(k) k K p(k) K Application of these laws for S = 0 k n (a + bk) S = (a + b(n k)) = (a + bn bk) (commutativity) 0 n k n 0 k n 2S = ((a + bk) + (a + bn bk)) = (2a + bn) (associativity) 0 k n 0 k n 2S = (2a + bn) 1 = (2a + bn)(n + 1) (distributivity) 0 k n

75 Yet another useful equality a k + k K a k = a k + k K k K K k K K a k Special cases: a) for 1 m n b) for n 0 c) for n 0 m k=1 n a k + a k = a m + k=m n k=1 a k = a 0 + a k 0 k n 1 k n a k S n + a n+1 = a 0 + a k+1 0 k n

76 Example: S n = n k=0 kxk For x 1: S n + (n + 1)x n+1 = 0 k n (k + 1)x k+1 = kx k k n = xs n + x(1 x n+1 ) 1 x x k+1 0 k n n kx k = x (n + 1)x n+1 + nx n+2 k=0 (x 1) 2

Concrete Mathematics: Exploring Sums

Concrete Mathematics: Exploring Sums Concrete Mathematics: Exploring Sums Anmol Sakarda Nhat Pham May 20, 2018 Anmol Sakarda, Nhat Pham Concrete Mathematics: Exploring Sums May 20, 2018 1 / 24 Outline 1 Abstract 2 Sums and Recurrences 3 Manipulating

More information

EECS 1028 M: Discrete Mathematics for Engineers

EECS 1028 M: Discrete Mathematics for Engineers EECS 1028 M: Discrete Mathematics for Engineers Suprakash Datta Office: LAS 3043 Course page: http://www.eecs.yorku.ca/course/1028 Also on Moodle S. Datta (York Univ.) EECS 1028 W 18 1 / 16 Sequences and

More information

Cse547. Chapter 1 Problem 16 GENERALIZATION

Cse547. Chapter 1 Problem 16 GENERALIZATION Cse547 Chapter 1 Problem 16 GENERALIZATION Use the Repertoire method to solve the general fiveparameter recurrence: g(1) = α g(2n+ j) = 3g(n) + Ɛn 2 + γn + β j, for j = 0, 1 and n 1 and n є N Convert recursive

More information

Sequences and Summations

Sequences and Summations COMP 182 Algorithmic Thinking Sequences and Summations Luay Nakhleh Computer Science Rice University Chapter 2, Section 4 Reading Material Sequences A sequence is a function from a subset of the set of

More information

Binomial Coefficient Identities/Complements

Binomial Coefficient Identities/Complements Binomial Coefficient Identities/Complements CSE21 Fall 2017, Day 4 Oct 6, 2017 https://sites.google.com/a/eng.ucsd.edu/cse21-fall-2017-miles-jones/ permutation P(n,r) = n(n-1) (n-2) (n-r+1) = Terminology

More information

Final Exam Review. 2. Let A = {, { }}. What is the cardinality of A? Is

Final Exam Review. 2. Let A = {, { }}. What is the cardinality of A? Is 1. Describe the elements of the set (Z Q) R N. Is this set countable or uncountable? Solution: The set is equal to {(x, y) x Z, y N} = Z N. Since the Cartesian product of two denumerable sets is denumerable,

More information

CSCE 222 Discrete Structures for Computing. Dr. Hyunyoung Lee

CSCE 222 Discrete Structures for Computing. Dr. Hyunyoung Lee CSCE 222 Discrete Structures for Computing Sequences and Summations Dr. Hyunyoung Lee Based on slides by Andreas Klappenecker 1 Sequences 2 Sequences A sequence is a function from a subset of the set of

More information

Legendre s Equation. PHYS Southern Illinois University. October 18, 2016

Legendre s Equation. PHYS Southern Illinois University. October 18, 2016 Legendre s Equation PHYS 500 - Southern Illinois University October 18, 2016 PHYS 500 - Southern Illinois University Legendre s Equation October 18, 2016 1 / 11 Legendre s Equation Recall We are trying

More information

Problem Set 5 Solutions

Problem Set 5 Solutions Problem Set 5 Solutions Section 4.. Use mathematical induction to prove each of the following: a) For each natural number n with n, n > + n. Let P n) be the statement n > + n. The base case, P ), is true

More information

Section Summary. Sequences. Recurrence Relations. Summations. Examples: Geometric Progression, Arithmetic Progression. Example: Fibonacci Sequence

Section Summary. Sequences. Recurrence Relations. Summations. Examples: Geometric Progression, Arithmetic Progression. Example: Fibonacci Sequence Section 2.4 Section Summary Sequences. Examples: Geometric Progression, Arithmetic Progression Recurrence Relations Example: Fibonacci Sequence Summations Introduction Sequences are ordered lists of elements.

More information

ADVANCED CALCULUS - MTH433 LECTURE 4 - FINITE AND INFINITE SETS

ADVANCED CALCULUS - MTH433 LECTURE 4 - FINITE AND INFINITE SETS ADVANCED CALCULUS - MTH433 LECTURE 4 - FINITE AND INFINITE SETS 1. Cardinal number of a set The cardinal number (or simply cardinal) of a set is a generalization of the concept of the number of elements

More information

Chapter 2 - Basics Structures MATH 213. Chapter 2: Basic Structures. Dr. Eric Bancroft. Fall Dr. Eric Bancroft MATH 213 Fall / 60

Chapter 2 - Basics Structures MATH 213. Chapter 2: Basic Structures. Dr. Eric Bancroft. Fall Dr. Eric Bancroft MATH 213 Fall / 60 MATH 213 Chapter 2: Basic Structures Dr. Eric Bancroft Fall 2013 Dr. Eric Bancroft MATH 213 Fall 2013 1 / 60 Chapter 2 - Basics Structures 2.1 - Sets 2.2 - Set Operations 2.3 - Functions 2.4 - Sequences

More information

Chapter 2 - Basics Structures

Chapter 2 - Basics Structures Chapter 2 - Basics Structures 2.1 - Sets Definitions and Notation Definition 1 (Set). A set is an of. These are called the or of the set. We ll typically use uppercase letters to denote sets: S, A, B,...

More information

2.1 Sets. Definition 1 A set is an unordered collection of objects. Important sets: N, Z, Z +, Q, R.

2.1 Sets. Definition 1 A set is an unordered collection of objects. Important sets: N, Z, Z +, Q, R. 2. Basic Structures 2.1 Sets Definition 1 A set is an unordered collection of objects. Important sets: N, Z, Z +, Q, R. Definition 2 Objects in a set are called elements or members of the set. A set is

More information

MATH 324 Summer 2011 Elementary Number Theory. Notes on Mathematical Induction. Recall the following axiom for the set of integers.

MATH 324 Summer 2011 Elementary Number Theory. Notes on Mathematical Induction. Recall the following axiom for the set of integers. MATH 4 Summer 011 Elementary Number Theory Notes on Mathematical Induction Principle of Mathematical Induction Recall the following axiom for the set of integers. Well-Ordering Axiom for the Integers If

More information

Review of Power Series

Review of Power Series Review of Power Series MATH 365 Ordinary Differential Equations J. Robert Buchanan Department of Mathematics Fall 2018 Introduction In addition to the techniques we have studied so far, we may use power

More information

5 Set Operations, Functions, and Counting

5 Set Operations, Functions, and Counting 5 Set Operations, Functions, and Counting Let N denote the positive integers, N 0 := N {0} be the non-negative integers and Z = N 0 ( N) the positive and negative integers including 0, Q the rational numbers,

More information

Mathematical Structures Combinations and Permutations

Mathematical Structures Combinations and Permutations Definitions: Suppose S is a (finite) set and n, k 0 are integers The set C(S, k) of k - combinations consists of all subsets of S that have exactly k elements The set P (S, k) of k - permutations consists

More information

SOLVING LINEAR RECURRENCE RELATIONS

SOLVING LINEAR RECURRENCE RELATIONS SOLVING LINEAR RECURRENCE RELATIONS Schaum's outline Sec. 6.6 6.9 Rosen Sec. 8.1 8. November 9, 017 margarita.spitsakova@ttu.ee ICY0001: Lecture 8 November 9, 017 1 / 47 Contents 1 Motivation examples

More information

Exploring the infinite : an introduction to proof and analysis / Jennifer Brooks. Boca Raton [etc.], cop Spis treści

Exploring the infinite : an introduction to proof and analysis / Jennifer Brooks. Boca Raton [etc.], cop Spis treści Exploring the infinite : an introduction to proof and analysis / Jennifer Brooks. Boca Raton [etc.], cop. 2017 Spis treści Preface xiii I Fundamentals of Abstract Mathematics 1 1 Basic Notions 3 1.1 A

More information

Math 324 Summer 2012 Elementary Number Theory Notes on Mathematical Induction

Math 324 Summer 2012 Elementary Number Theory Notes on Mathematical Induction Math 4 Summer 01 Elementary Number Theory Notes on Mathematical Induction Principle of Mathematical Induction Recall the following axiom for the set of integers. Well-Ordering Axiom for the Integers If

More information

Recurrence Relations

Recurrence Relations Recurrence Relations Winter 2017 Recurrence Relations Recurrence Relations A recurrence relation for the sequence {a n } is an equation that expresses a n in terms of one or more of the previous terms

More information

Advanced Counting Techniques. Chapter 8

Advanced Counting Techniques. Chapter 8 Advanced Counting Techniques Chapter 8 Chapter Summary Applications of Recurrence Relations Solving Linear Recurrence Relations Homogeneous Recurrence Relations Nonhomogeneous Recurrence Relations Divide-and-Conquer

More information

Contribution of Problems

Contribution of Problems Exam topics 1. Basic structures: sets, lists, functions (a) Sets { }: write all elements, or define by condition (b) Set operations: A B, A B, A\B, A c (c) Lists ( ): Cartesian product A B (d) Functions

More information

MAT115A-21 COMPLETE LECTURE NOTES

MAT115A-21 COMPLETE LECTURE NOTES MAT115A-21 COMPLETE LECTURE NOTES NATHANIEL GALLUP 1. Introduction Number theory begins as the study of the natural numbers the integers N = {1, 2, 3,...}, Z = { 3, 2, 1, 0, 1, 2, 3,...}, and sometimes

More information

Section Summary. Sequences. Recurrence Relations. Summations. Examples: Geometric Progression, Arithmetic Progression. Example: Fibonacci Sequence

Section Summary. Sequences. Recurrence Relations. Summations. Examples: Geometric Progression, Arithmetic Progression. Example: Fibonacci Sequence Section 2.4 1 Section Summary Sequences. Examples: Geometric Progression, Arithmetic Progression Recurrence Relations Example: Fibonacci Sequence Summations 2 Introduction Sequences are ordered lists of

More information

What you learned in Math 28. Rosa C. Orellana

What you learned in Math 28. Rosa C. Orellana What you learned in Math 28 Rosa C. Orellana Chapter 1 - Basic Counting Techniques Sum Principle If we have a partition of a finite set S, then the size of S is the sum of the sizes of the blocks of the

More information

Mathematical Fundamentals

Mathematical Fundamentals Mathematical Fundamentals Sets Factorials, Logarithms Recursion Summations, Recurrences Proof Techniques: By Contradiction, Induction Estimation Techniques Data Structures 1 Mathematical Fundamentals Sets

More information

3.3 Accumulation Sequences

3.3 Accumulation Sequences 3.3. ACCUMULATION SEQUENCES 25 3.3 Accumulation Sequences Overview. One of the most important mathematical ideas in calculus is that of an accumulation of change for physical quantities. As we have been

More information

Mathematical Induction Assignments

Mathematical Induction Assignments 1 Mathematical Induction Assignments Prove the Following using Principle of Mathematical induction 1) Prove that for any positive integer number n, n 3 + 2 n is divisible by 3 2) Prove that 1 3 + 2 3 +

More information

Week 9-10: Recurrence Relations and Generating Functions

Week 9-10: Recurrence Relations and Generating Functions Week 9-10: Recurrence Relations and Generating Functions April 3, 2017 1 Some number sequences An infinite sequence (or just a sequence for short is an ordered array a 0, a 1, a 2,..., a n,... of countably

More information

Chapter 11 - Sequences and Series

Chapter 11 - Sequences and Series Calculus and Analytic Geometry II Chapter - Sequences and Series. Sequences Definition. A sequence is a list of numbers written in a definite order, We call a n the general term of the sequence. {a, a

More information

Lecture Notes: Mathematical/Discrete Structures

Lecture Notes: Mathematical/Discrete Structures Lecture Notes: Mathematical/Discrete Structures Rashid Bin Muhammad, PhD. This booklet includes lecture notes, homework problems, and exam problems from discrete structures course I taught in Fall 2006

More information

Konkretna matematika

Konkretna matematika ITT9131 Konkreetne Matemaatika Concrete mathematics Konkretna matematika Jaan Penjam Silvio Capobianco TTÜ arvutiteaduse instituut, teoreetilise informaatika õppetool Küberneetika Instituudi tarkvarateaduse

More information

Mathematical Background

Mathematical Background Chapter 1 Mathematical Background When we analyze various algorithms in terms of the time and the space it takes them to run, we often need to work with math. That is why we ask you to take MA 2250 Math

More information

1.4 Cardinality. Tom Lewis. Fall Term Tom Lewis () 1.4 Cardinality Fall Term / 9

1.4 Cardinality. Tom Lewis. Fall Term Tom Lewis () 1.4 Cardinality Fall Term / 9 1.4 Cardinality Tom Lewis Fall Term 2006 Tom Lewis () 1.4 Cardinality Fall Term 2006 1 / 9 Outline 1 Functions 2 Cardinality 3 Cantor s theorem Tom Lewis () 1.4 Cardinality Fall Term 2006 2 / 9 Functions

More information

Recursion. Algorithms and Data Structures. (c) Marcin Sydow. Introduction. Linear 2nd-order Equations. Important 3 Cases. Quicksort Average Complexity

Recursion. Algorithms and Data Structures. (c) Marcin Sydow. Introduction. Linear 2nd-order Equations. Important 3 Cases. Quicksort Average Complexity Recursion Topics covered by this lecture: Recursion: Fibonacci numbers, Hanoi Towers,... cases of recursive equations (with proofs) QuickSort (Proof) Recursion e.g.: n! = (n 1)!n Mathematics: recurrent

More information

Outline. We will cover (over the next few weeks) Induction Strong Induction Constructive Induction Structural Induction

Outline. We will cover (over the next few weeks) Induction Strong Induction Constructive Induction Structural Induction Outline We will cover (over the next few weeks) Induction Strong Induction Constructive Induction Structural Induction Induction P(1) ( n 2)[P(n 1) P(n)] ( n 1)[P(n)] Why Does This Work? I P(1) ( n 2)[P(n

More information

Combinations. April 12, 2006

Combinations. April 12, 2006 Combinations April 12, 2006 Combinations, April 12, 2006 Binomial Coecients Denition. The number of distinct subsets with j elements that can be chosen from a set with n elements is denoted by ( n j).

More information

Announcements. CS243: Discrete Structures. Sequences, Summations, and Cardinality of Infinite Sets. More on Midterm. Midterm.

Announcements. CS243: Discrete Structures. Sequences, Summations, and Cardinality of Infinite Sets. More on Midterm. Midterm. Announcements CS43: Discrete Structures Sequences, Summations, and Cardinality of Infinite Sets Işıl Dillig Homework is graded, scores on Blackboard Graded HW and sample solutions given at end of this

More information

Use mathematical induction in Exercises 3 17 to prove summation formulae. Be sure to identify where you use the inductive hypothesis.

Use mathematical induction in Exercises 3 17 to prove summation formulae. Be sure to identify where you use the inductive hypothesis. Exercises Exercises 1. There are infinitely many stations on a train route. Suppose that the train stops at the first station and suppose that if the train stops at a station, then it stops at the next

More information

COM S 330 Lecture Notes Week of Feb 9 13

COM S 330 Lecture Notes Week of Feb 9 13 Monday, February 9. Rosen.4 Sequences Reading: Rosen.4. LLM 4.. Ducks 8., 8., Def: A sequence is a function from a (usually infinite) subset of the integers (usually N = {0,,, 3,... } or Z + = {,, 3, 4,...

More information

Discrete Mathematics. Spring 2017

Discrete Mathematics. Spring 2017 Discrete Mathematics Spring 2017 Previous Lecture Principle of Mathematical Induction Mathematical Induction: rule of inference Mathematical Induction: Conjecturing and Proving Climbing an Infinite Ladder

More information

Advanced Counting Techniques

Advanced Counting Techniques . All rights reserved. Authorized only for instructor use in the classroom. No reproduction or further distribution permitted without the prior written consent of McGraw-Hill Education. Advanced Counting

More information

The integers. Chapter 3

The integers. Chapter 3 Chapter 3 The integers Recall that an abelian group is a set A with a special element 0, and operation + such that x +0=x x + y = y + x x +y + z) =x + y)+z every element x has an inverse x + y =0 We also

More information

1 The distributive law

1 The distributive law THINGS TO KNOW BEFORE GOING INTO DISCRETE MATHEMATICS The distributive law The distributive law is this: a(b + c) = ab + bc This can be generalized to any number of terms between parenthesis; for instance:

More information

CS483 Design and Analysis of Algorithms

CS483 Design and Analysis of Algorithms CS483 Design and Analysis of Algorithms Lecture 6-8 Divide and Conquer Algorithms Instructor: Fei Li lifei@cs.gmu.edu with subject: CS483 Office hours: STII, Room 443, Friday 4:00pm - 6:00pm or by appointments

More information

CS483 Design and Analysis of Algorithms

CS483 Design and Analysis of Algorithms CS483 Design and Analysis of Algorithms Chapter 2 Divide and Conquer Algorithms Instructor: Fei Li lifei@cs.gmu.edu with subject: CS483 Office hours: Room 5326, Engineering Building, Thursday 4:30pm -

More information

Section Summary. Sequences. Recurrence Relations. Summations Special Integer Sequences (optional)

Section Summary. Sequences. Recurrence Relations. Summations Special Integer Sequences (optional) Section 2.4 Section Summary Sequences. o Examples: Geometric Progression, Arithmetic Progression Recurrence Relations o Example: Fibonacci Sequence Summations Special Integer Sequences (optional) Sequences

More information

Analysis on Graphs. Alexander Grigoryan Lecture Notes. University of Bielefeld, WS 2011/12

Analysis on Graphs. Alexander Grigoryan Lecture Notes. University of Bielefeld, WS 2011/12 Analysis on Graphs Alexander Grigoryan Lecture Notes University of Bielefeld, WS 0/ Contents The Laplace operator on graphs 5. The notion of a graph............................. 5. Cayley graphs..................................

More information

Recurrent Problems. ITT9131 Konkreetne Matemaatika. Chapter One The Tower of Hanoi Lines in the Plane The Josephus Problem

Recurrent Problems. ITT9131 Konkreetne Matemaatika. Chapter One The Tower of Hanoi Lines in the Plane The Josephus Problem Recurrent Problems ITT93 Konkreetne Matemaatika Chapter One The Tower of Hanoi Lines in the Plane The Josephus Problem Contents The Tower of Hanoi Lines in the Plane 3 The Josephus Problem 4 Intermezzo:

More information

Sec$on Summary. Sequences. Recurrence Relations. Summations. Ex: Geometric Progression, Arithmetic Progression. Ex: Fibonacci Sequence

Sec$on Summary. Sequences. Recurrence Relations. Summations. Ex: Geometric Progression, Arithmetic Progression. Ex: Fibonacci Sequence Section 2.4 Sec$on Summary Sequences Ex: Geometric Progression, Arithmetic Progression Recurrence Relations Ex: Fibonacci Sequence Summations 2 Introduc$on Sequences are ordered lists of elements. 1, 2,

More information

CSE 421 Algorithms. T(n) = at(n/b) + n c. Closest Pair Problem. Divide and Conquer Algorithms. What you really need to know about recurrences

CSE 421 Algorithms. T(n) = at(n/b) + n c. Closest Pair Problem. Divide and Conquer Algorithms. What you really need to know about recurrences CSE 421 Algorithms Richard Anderson Lecture 13 Divide and Conquer What you really need to know about recurrences Work per level changes geometrically with the level Geometrically increasing (x > 1) The

More information

Mathematical Induction

Mathematical Induction Chapter 6 Mathematical Induction 6.1 The Process of Mathematical Induction 6.1.1 Motivating Mathematical Induction Consider the sum of the first several odd integers. produce the following: 1 = 1 1 + 3

More information

1 Sequences and Summation

1 Sequences and Summation 1 Sequences and Summation A sequence is a function whose domain is either all the integers between two given integers or all the integers greater than or equal to a given integer. For example, a m, a m+1,...,

More information

5. Sequences & Recursion

5. Sequences & Recursion 5. Sequences & Recursion Terence Sim 1 / 42 A mathematician, like a painter or poet, is a maker of patterns. Reading Sections 5.1 5.4, 5.6 5.8 of Epp. Section 2.10 of Campbell. Godfrey Harold Hardy, 1877

More information

Given a sequence a 1, a 2,...of numbers, the finite sum a 1 + a 2 + +a n,wheren is an nonnegative integer, can be written

Given a sequence a 1, a 2,...of numbers, the finite sum a 1 + a 2 + +a n,wheren is an nonnegative integer, can be written A Summations When an algorithm contains an iterative control construct such as a while or for loop, its running time can be expressed as the sum of the times spent on each execution of the body of the

More information

Mathematical Induction

Mathematical Induction Mathematical Induction MAT30 Discrete Mathematics Fall 018 MAT30 (Discrete Math) Mathematical Induction Fall 018 1 / 19 Outline 1 Mathematical Induction Strong Mathematical Induction MAT30 (Discrete Math)

More information

CPSC 121: Models of Computation. Module 9: Proof Techniques (part 2) Mathematical Induction

CPSC 121: Models of Computation. Module 9: Proof Techniques (part 2) Mathematical Induction CPSC 121: Models of Computation Module 9: Proof Techniques (part 2) Mathematical Induction Module 9: Announcements Midterm #2: th Monday November 14, 2016 at 17:00 Modules 5 (from multiple quantifiers

More information

CHAPTER 8 Advanced Counting Techniques

CHAPTER 8 Advanced Counting Techniques 96 Chapter 8 Advanced Counting Techniques CHAPTER 8 Advanced Counting Techniques SECTION 8. Applications of Recurrence Relations 2. a) A permutation of a set with n elements consists of a choice of a first

More information

Generating Functions

Generating Functions Semester 1, 2004 Generating functions Another means of organising enumeration. Two examples we have seen already. Example 1. Binomial coefficients. Let X = {1, 2,..., n} c k = # k-element subsets of X

More information

Introduction to Series and Sequences Math 121 Calculus II Spring 2015

Introduction to Series and Sequences Math 121 Calculus II Spring 2015 Introduction to Series and Sequences Math Calculus II Spring 05 The goal. The main purpose of our study of series and sequences is to understand power series. A power series is like a polynomial of infinite

More information

Section Summary. Definition of a Function.

Section Summary. Definition of a Function. Section 2.3 Section Summary Definition of a Function. Domain, Codomain Image, Preimage Injection, Surjection, Bijection Inverse Function Function Composition Graphing Functions Floor, Ceiling, Factorial

More information

Recurrence Relations

Recurrence Relations Recurrence Relations Recurrence Relations Reading (Epp s textbook) 5.6 5.8 1 Recurrence Relations A recurrence relation for a sequence aa 0, aa 1, aa 2, ({a n }) is a formula that relates each term a k

More information

Mathematics 220 Workshop Cardinality. Some harder problems on cardinality.

Mathematics 220 Workshop Cardinality. Some harder problems on cardinality. Some harder problems on cardinality. These are two series of problems with specific goals: the first goal is to prove that the cardinality of the set of irrational numbers is continuum, and the second

More information

Algorithm Analysis Recurrence Relation. Chung-Ang University, Jaesung Lee

Algorithm Analysis Recurrence Relation. Chung-Ang University, Jaesung Lee Algorithm Analysis Recurrence Relation Chung-Ang University, Jaesung Lee Recursion 2 Recursion 3 Recursion in Real-world Fibonacci sequence = + Initial conditions: = 0 and = 1. = + = + = + 0, 1, 1, 2,

More information

Axioms for Set Theory

Axioms for Set Theory Axioms for Set Theory The following is a subset of the Zermelo-Fraenkel axioms for set theory. In this setting, all objects are sets which are denoted by letters, e.g. x, y, X, Y. Equality is logical identity:

More information

Exercises. Template for Proofs by Mathematical Induction

Exercises. Template for Proofs by Mathematical Induction 5. Mathematical Induction 329 Template for Proofs by Mathematical Induction. Express the statement that is to be proved in the form for all n b, P (n) forafixed integer b. 2. Write out the words Basis

More information

The Inclusion Exclusion Principle and Its More General Version

The Inclusion Exclusion Principle and Its More General Version The Inclusion Exclusion Principle and Its More General Version Stewart Weiss June 28, 2009 1 Introduction The Inclusion-Exclusion Principle is typically seen in the context of combinatorics or probability

More information

Math 210 Exam 2 - Practice Problems. 1. For each of the following, determine whether the statement is True or False.

Math 210 Exam 2 - Practice Problems. 1. For each of the following, determine whether the statement is True or False. Math 20 Exam 2 - Practice Problems. For each of the following, determine whether the statement is True or False. (a) {a,b,c,d} TRE (b) {a,b,c,d} FLSE (c) {a,b, } TRE (d) {a,b, } TRE (e) {a,b} {a,b} FLSE

More information

Decidability of Existence and Construction of a Complement of a given function

Decidability of Existence and Construction of a Complement of a given function Decidability of Existence and Construction of a Complement of a given function Ka.Shrinivaasan, Chennai Mathematical Institute (CMI) (shrinivas@cmi.ac.in) April 28, 2011 Abstract This article denes a complement

More information

MATH FINAL EXAM REVIEW HINTS

MATH FINAL EXAM REVIEW HINTS MATH 109 - FINAL EXAM REVIEW HINTS Answer: Answer: 1. Cardinality (1) Let a < b be two real numbers and define f : (0, 1) (a, b) by f(t) = (1 t)a + tb. (a) Prove that f is a bijection. (b) Prove that any

More information

1 Examples of Weak Induction

1 Examples of Weak Induction More About Mathematical Induction Mathematical induction is designed for proving that a statement holds for all nonnegative integers (or integers beyond an initial one). Here are some extra examples of

More information

Chapter Summary. Mathematical Induction Strong Induction Well-Ordering Recursive Definitions Structural Induction Recursive Algorithms

Chapter Summary. Mathematical Induction Strong Induction Well-Ordering Recursive Definitions Structural Induction Recursive Algorithms 1 Chapter Summary Mathematical Induction Strong Induction Well-Ordering Recursive Definitions Structural Induction Recursive Algorithms 2 Section 5.1 3 Section Summary Mathematical Induction Examples of

More information

1 Homework. Recommended Reading:

1 Homework. Recommended Reading: Analysis MT43C Notes/Problems/Homework Recommended Reading: R. G. Bartle, D. R. Sherbert Introduction to real analysis, principal reference M. Spivak Calculus W. Rudin Principles of mathematical analysis

More information

CS Analysis of Recursive Algorithms and Brute Force

CS Analysis of Recursive Algorithms and Brute Force CS483-05 Analysis of Recursive Algorithms and Brute Force Instructor: Fei Li Room 443 ST II Office hours: Tue. & Thur. 4:30pm - 5:30pm or by appointments lifei@cs.gmu.edu with subject: CS483 http://www.cs.gmu.edu/

More information

. As the binomial coefficients are integers we have that. 2 n(n 1).

. As the binomial coefficients are integers we have that. 2 n(n 1). Math 580 Homework. 1. Divisibility. Definition 1. Let a, b be integers with a 0. Then b divides b iff there is an integer k such that b = ka. In the case we write a b. In this case we also say a is a factor

More information

Midterm Exam. There are 6 problems. Your 5 best answers count. Please pay attention to the presentation of your work! Best 5

Midterm Exam. There are 6 problems. Your 5 best answers count. Please pay attention to the presentation of your work! Best 5 Department of Mathematical Sciences Instructor: Daiva Pucinskaite Modern Algebra June 22, 2017 Midterm Exam There are 6 problems. Your 5 best answers count. Please pay attention to the presentation of

More information

What we have learned What is algorithm Why study algorithm The time and space efficiency of algorithm The analysis framework of time efficiency Asympt

What we have learned What is algorithm Why study algorithm The time and space efficiency of algorithm The analysis framework of time efficiency Asympt Lecture 3 The Analysis of Recursive Algorithm Efficiency What we have learned What is algorithm Why study algorithm The time and space efficiency of algorithm The analysis framework of time efficiency

More information

Algorithms: Background

Algorithms: Background Algorithms: Background Amotz Bar-Noy CUNY Amotz Bar-Noy (CUNY) Algorithms: Background 1 / 66 What is a Proof? Definition I: The cogency of evidence that compels acceptance by the mind of a truth or a fact.

More information

Math 42, Discrete Mathematics

Math 42, Discrete Mathematics c Fall 2018 last updated 10/10/2018 at 23:28:03 For use by students in this class only; all rights reserved. Note: some prose & some tables are taken directly from Kenneth R. Rosen, and Its Applications,

More information

MATH 3300 Test 1. Name: Student Id:

MATH 3300 Test 1. Name: Student Id: Name: Student Id: There are nine problems (check that you have 9 pages). Solutions are expected to be short. In the case of proofs, one or two short paragraphs should be the average length. Write your

More information

Definition: A sequence is a function from a subset of the integers (usually either the set

Definition: A sequence is a function from a subset of the integers (usually either the set Math 3336 Section 2.4 Sequences and Summations Sequences Geometric Progression Arithmetic Progression Recurrence Relation Fibonacci Sequence Summations Definition: A sequence is a function from a subset

More information

Countable and uncountable sets. Matrices.

Countable and uncountable sets. Matrices. Lecture 11 Countable and uncountable sets. Matrices. Instructor: Kangil Kim (CSE) E-mail: kikim01@konkuk.ac.kr Tel. : 02-450-3493 Room : New Milenium Bldg. 1103 Lab : New Engineering Bldg. 1202 Next topic:

More information

CITS2211 Discrete Structures (2017) Cardinality and Countability

CITS2211 Discrete Structures (2017) Cardinality and Countability CITS2211 Discrete Structures (2017) Cardinality and Countability Highlights What is cardinality? Is it the same as size? Types of cardinality and infinite sets Reading Sections 45 and 81 84 of Mathematics

More information

1 Ordinary points and singular points

1 Ordinary points and singular points Math 70 honors, Fall, 008 Notes 8 More on series solutions, and an introduction to \orthogonal polynomials" Homework at end Revised, /4. Some changes and additions starting on page 7. Ordinary points and

More information

n(n 1) = (n + 1)n(n 1)/ ( 1) n(n 1)(n 2) = (n + 1)n(n 1)(n 2)/4

n(n 1) = (n + 1)n(n 1)/ ( 1) n(n 1)(n 2) = (n + 1)n(n 1)(n 2)/4 NOTES FROM THE FIRST TWO CLASSES MIKE ZABROCKI - SEPTEMBER 6 &, 202 main idea of this class + 2 + 3 + + n = n(n + )/2 to r + 2 r + + n r =??? Just to show what we are up against: + 2 + 3 + + n = n(n +

More information

Recurrence Relations and Recursion: MATH 180

Recurrence Relations and Recursion: MATH 180 Recurrence Relations and Recursion: MATH 180 1: Recursively Defined Sequences Example 1: The sequence a 1,a 2,a 3,... can be defined recursively as follows: (1) For all integers k 2, a k = a k 1 + 1 (2)

More information

Problem 1. Let I and J be ideals in a ring commutative ring R with 1 R. Recall

Problem 1. Let I and J be ideals in a ring commutative ring R with 1 R. Recall I. Take-Home Portion: Math 350 Final Exam Due by 5:00pm on Tues. 5/12/15 No resources/devices other than our class textbook and class notes/handouts may be used. You must work alone. Choose any 5 problems

More information

Analysis of Algorithm Efficiency. Dr. Yingwu Zhu

Analysis of Algorithm Efficiency. Dr. Yingwu Zhu Analysis of Algorithm Efficiency Dr. Yingwu Zhu Measure Algorithm Efficiency Time efficiency How fast the algorithm runs; amount of time required to accomplish the task Our focus! Space efficiency Amount

More information

Notes for Math 290 using Introduction to Mathematical Proofs by Charles E. Roberts, Jr.

Notes for Math 290 using Introduction to Mathematical Proofs by Charles E. Roberts, Jr. Notes for Math 290 using Introduction to Mathematical Proofs by Charles E. Roberts, Jr. Chapter : Logic Topics:. Statements, Negation, and Compound Statements.2 Truth Tables and Logical Equivalences.3

More information

Ch 9/10/11/12 Exam Review

Ch 9/10/11/12 Exam Review Ch 9/0// Exam Review The vector v has initial position P and terminal point Q. Write v in the form ai + bj; that is, find its position vector. ) P = (4, 6); Q = (-6, -) Find the vertex, focus, and directrix

More information

MATH 802: ENUMERATIVE COMBINATORICS ASSIGNMENT 2

MATH 802: ENUMERATIVE COMBINATORICS ASSIGNMENT 2 MATH 80: ENUMERATIVE COMBINATORICS ASSIGNMENT KANNAPPAN SAMPATH Facts Recall that, the Stirling number S(, n of the second ind is defined as the number of partitions of a [] into n non-empty blocs. We

More information

Analysis of Algorithms I: Asymptotic Notation, Induction, and MergeSort

Analysis of Algorithms I: Asymptotic Notation, Induction, and MergeSort Analysis of Algorithms I: Asymptotic Notation, Induction, and MergeSort Xi Chen Columbia University We continue with two more asymptotic notation: o( ) and ω( ). Let f (n) and g(n) are functions that map

More information

Appendix G: Mathematical Induction

Appendix G: Mathematical Induction Appendix G: Mathematical Induction Introduction In this appendix, you will study a form of mathematical proof called mathematical induction. To see the logical need for mathematical induction, take another

More information

Sequences. 1. Number sequences. 2. Arithmetic sequences. Consider the illustrated pattern of circles:

Sequences. 1. Number sequences. 2. Arithmetic sequences. Consider the illustrated pattern of circles: Sequences 1. Number sequences Consider the illustrated pattern of circles: The first layer has just one blue ball. The second layer has three pink balls. The third layer has five black balls. The fourth

More information

1 Basic Combinatorics

1 Basic Combinatorics 1 Basic Combinatorics 1.1 Sets and sequences Sets. A set is an unordered collection of distinct objects. The objects are called elements of the set. We use braces to denote a set, for example, the set

More information

S15 MA 274: Exam 3 Study Questions

S15 MA 274: Exam 3 Study Questions S15 MA 274: Exam 3 Study Questions You can find solutions to some of these problems on the next page. These questions only pertain to material covered since Exam 2. The final exam is cumulative, so you

More information

2 Lecture 2: Logical statements and proof by contradiction Lecture 10: More on Permutations, Group Homomorphisms 31

2 Lecture 2: Logical statements and proof by contradiction Lecture 10: More on Permutations, Group Homomorphisms 31 Contents 1 Lecture 1: Introduction 2 2 Lecture 2: Logical statements and proof by contradiction 7 3 Lecture 3: Induction and Well-Ordering Principle 11 4 Lecture 4: Definition of a Group and examples 15

More information

The Inclusion Exclusion Principle

The Inclusion Exclusion Principle The Inclusion Exclusion Principle 1 / 29 Outline Basic Instances of The Inclusion Exclusion Principle The General Inclusion Exclusion Principle Counting Derangements Counting Functions Stirling Numbers

More information