Cse547. Chapter 1 Problem 16 GENERALIZATION
|
|
- Vernon Richardson
- 5 years ago
- Views:
Transcription
1 Cse547 Chapter 1 Problem 16 GENERALIZATION
2 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
3 Convert recursive formula into R: g(1) = α g(2n+ 0) = 3g(n) + Ɛn 2 + γn + β 0 g(2n+ 1) = 3g(n) + Ɛn 2 + γn + β 1 (for n є N and n 1)
4 Compute few initial values for R Observe values and guess a general format for the required closed form Use Repertoire method to find exact closed formula If fails at some point, use Binary Expansion
5 g(1) = α g(2) = g(2(1) + 0) = 3g(1) + Ɛ + γ+ β 0 = 3α + Ɛ + γ+ β 0 g(3) = g(2(1) + 1) = 3g(1) + Ɛ + γ+ β 1 = 3α + Ɛ + γ+ β 1 g(4) = g(2(2) + 0) = 3g(2) + 4Ɛ + 2γ+ β 0 = 9α + 7Ɛ +5γ + 4β 0 g(5) = g(2(2) + 1) = 3g(2) + 4Ɛ + 2γ + β 1 = 9α + 7Ɛ +5γ + 3β 0 + β 1
6 g(6) = g(2(3) + 0) = 3g(3) + 9Ɛ + 3γ + β 0 = 9α + 12Ɛ +6γ + β 0 + 3β 1 g(7) = g(2(3) + 1) = 3g(3) + 9Ɛ + 3γ+ β 1 = 9α + 12Ɛ + 6γ + 4β 1 g(8) = g(2(4) + 0) = 3g(4) + 16Ɛ + 4γ + β 0 = 27α + 37Ɛ + 19γ + 13β 0 g(9) = g(2(4) + 1) = 3g(4) + 16Ɛ + 4γ + β 1 = 27α + 37Ɛ +19γ + 12β 0 + β 1 g(10) = g(2(5) + 0) = 3g(5) + 25Ɛ + 5γ + β 0 = 27α + 46Ɛ +20γ+ 10β 0 + 3β 1
7 n g(n) 1 α + 0Ɛ +0γ + 0β 0 + 0β 1 2 3α + Ɛ + γ + β 0 + 0β 1 3 3α + Ɛ + γ + 0β 0 + β 1 4 9α +7Ɛ+ 5γ+ 4β 0 + 0β 1 5 9α +7Ɛ+ 5γ+ 3β 0 + β 1 6 9α +12Ɛ + 6γ + β 0 +3β 1 7 9α +12Ɛ + 6γ + 0β 0 + 4β α +37Ɛ + 19γ + 13β 0 + 0β 1
8 n g(n) 9 27α +37Ɛ+ 19γ + 12β 0 + β α +46Ɛ + 20γ + 10β 0 + 3β 1
9 g(n) = A(n)α + B(n)Ɛ +C(n)γ + D(n)β 0 + E(n)β 1 For all n N and n 1, n can be written in the form (2 k + h), where, 2 k is the highest power of 2, not exceeding n, and (0 h < 2 k ). (Here h є N). From our table we can observe that when n = 2 k + h, then the coefficient for α = 3 k. Example, let n=10, then n = , and the coefficient for α after computing g(n) is, 3 3 = 27.
10 CASE I: g(n) = A(n) CASE II: g(n) = 1 CASE III: g(n) = n x CASE IV: g(n) = n 2 x CASE V: g(n) = n 3 for all n є N
11 Let: Ɛ = γ = β 0 = β 1 = 0 and α =1 In this case our general formula becomes: g (n) = A(n)1 + B(n)0 + C(n)0 + D(n)0 + E(n)0 g (n) = A(n) for all n є N
12 So, now the recurrence relation becomes: A(1) = α A(2n+ j) = 3A(n) for j = 0,1 and n 1 and n є N [Recall: g(2n+ j) = 3g(n) + Ɛn 2 + γn + β j ]
13 Now we want to prove that: A(2 k + h) = 3 k α for all k 0 (Here 0 h < 2k and h є N ) It is easy to prove by induction that: A(2 k + h) = 3 k α for all k 0
14 A(1) = 1, A(2n) = 3A(n), A(2n+1) = 3A(n), A(n) = 3 k for n = 2 k + h where 0 h < 2 k Base case: k=0 => n = 1 + h, h < 1 so n = 1 g(n) = A(n) and g(1) = 1 => A(1) = 1 A(1) = 3 0 = 1 [YES] Assume A(2 k 1 + h) = 3 k 1, 0 h < 2 k 1 To prove: A(2 k + h) = 3 k, 0 h < 2 k d
15 Case n even (n = 2n 1 ): 2 k + h = 2n 1 iff h is even => n 1 = 2 k 1 + h/2 A(2n 1 ) = A(2 k + h) = 3A(n 1 ) = 3A(2 k 1 + h/2) = 3. 3 k 1 = 3 k [YES] Case n odd (n = 2n 1 + 1): 2 k + h = 2n iff h is odd => n 1 = 2 k 1 + (h 1)/2 A(2n 1 +1) = A(2 k + h) = 3A(n 1 ) = 3A(2 k 1 + (h 1)/2) = 3. 3 k 1 = 3 k [YES]
16 We have that g(n)=1, for all n є N. From g(1) = α, we find that g(1) = 1 = α. So α = 1. g(2n+0) = 3g(n) + Ɛn 2 + γn + β 0 1 = 3(1) + Ɛn 2 + γn + β 0 1= 3 + Ɛn 2 + γn + β = Ɛn 2 + γn + β 0 0 = Ɛn 2 + γn + β 0 +2, for all n є N Hence, Ɛ = γ = 0 and β 0 = 2
17 g(2n+1) = 3g(n) + Ɛn 2 + γn + β 1 1 = 3(1) + Ɛn 2 + γn + β 1 1= 3 + Ɛn 2 + γn + β = Ɛn 2 + γn + β 1 0 = Ɛn 2 + γn + β 1 +2, for all n є N Hence, Ɛ = γ = 0 and β 1 = 2
18 Plugging the values of α, Ɛ, γ, β and β 0 1 into the general form of the CF: g (n) = A(n)α + B(n)Ɛ + C(n)γ + D(n)β 0 + E(n)β 1 1 = A(n) 2D(n) 2E(n), for all n є N.
19 We have that g(n) =n, for all n є N. From g(1) = α, we find that g(1) = 1 = α. So α = 1. g(2n+0) = 3g(n) + Ɛn 2 + γn + β 0 2n = 3n + Ɛn 2 + γn + β 0 0 = 3n 2n + Ɛn 2 + γn + β 0 0 = Ɛn 2 + n + γn + β 0 0 = Ɛn 2 + (γ+1)n + β 0,, for all n є N. Hence γ = 1, Ɛ = β 0 = 0
20 We have that g(n)=n, for all n g(2n+1) = 3g(n) + Ɛn 2 + γn + β 1 2n + 1 = 3n + Ɛn 2 + γn + β 1 1 = 3n 2n + Ɛn 2 + γn + β 1 1 = Ɛn 2 + n + γn + β 1 0= Ɛn 2 + (γ+1)n 1 + β 1, for all n є N. Hence, γ = 1, Ɛ = 0, β 1 = 1
21 Plugging the values of α, Ɛ, γ, β and β 0 1 into the general form of the CF: g (n) = A(n)α + +B(n)Ɛ + C(n)γ + D(n)β 0 + E(n)β 1 n = A(n) C(n) + E(n), for all n є N
22 We have that g(n) = n 2, for all n. From g(1) = α, we deduce that g(1) = 1 2 = 1 = α. So, α =1. g(2n+1) = 3g(n) + Ɛn 2 + γn + β 1 (2n+1 = 3n 2 + Ɛn 2 + γn + β 1 4n n = 3n 2 + Ɛn 2 + γn + β 1 n n = Ɛn 2 + γn + β 1 0 = (Ɛ 1)n 2 + (γ 4)n + β 1, for all n є N. Hence Ɛ = 1, γ = 4, β 1 = 1
23 g(2n+0) = 3g(n) + Ɛn 2 + γn + β 0 (2n+ 0 = 3n 2 + Ɛn 2 + γn + β 0 4n 2 = 3n 2 + Ɛn 2 + γn + β 0 0 = (Ɛ 1)n 2 + γn + β 0 => Ɛ = 1, γ = 0, β 0 = 0 Ɛ = 1, γ = 4, β 1 = 1 But for g(2n+1) we just obtained: Contradiction! Method fails!
24 We get a similar contradiction here too (No need to proceed beyond first contradiction)
25 Let us consider the case when the input value to R is of the form 2n+0 = 2n. Let the binary representation of 2n be: (b m,., b 1, b 0 This means 2n = 2 m b m + + 2b 1 + b 0 We observe that b 0 = 0, because 2n is even Dividing by 2: n = 2 m 1 b m + + b 1 or n = (b m,., b 1... Fact [1]
26 Now, let us consider the case when the input value to R is of the form (2n+1). Let the binary representation of (2n+1) be: (b m,., b 1, b 0 So, (2n+1) = 2 m b m + 2 m 1 b m b 1 + b 0 Since 2n+1 is an odd number b 0 = 1
27 2n+1 = 2 m b m + + 2b 1 + b 0 2n+1 = 2 m b m + + 2b n = 2 m b m + + 2b 1 n = 2 m 1 b m + + b 1 This means that n = (b m,,b 1... Fact [2] From [1] & [2], we observe same representation for both even/odd n. So, the CF need not have 2 cases
28 g(2n+0) = g(2n+1) = g( (b m,., b 1, b 0 ) = 3g( (b m,., b 1 ) + Ɛ[(b m,., b 1 ] 2 + γ(b m, b m 1,., b 1 + β b0 = 3{3g( (b m,., b 2 ) + Ɛ[(b m,., b 2 ] 2 + γ(b m, b m 1,., b 2 + β b1 } + Ɛ[(b m,., b 1 ] 2 + γ(b m,., b 1 + β b0
29 g ( (b m,., b 1, b 0 ) = 3 2 g( (b m,., b 2 ) + 3Ɛ[(b m,., b 2 ] 2 +3γ(b m, b m 1,., b 2 + 3β b1 + Ɛ[(b m,., b 1 ] 2 + γ(b m,., b 1 + β b0 = 3 2 {3g( (b m,., b 3 ) + Ɛ[(b m,., b 3 ] 2 + γ(b m, b m 1,., b 3 + β b2 } + 3Ɛ[(b m,., b 2 ] 2 + 3γ(b m, b m 1,., b 2 + 3β b1 + Ɛ[(b m,., b 1 ]2 + γ(b m,., b 1 + β b0
30 (repeated) = 3 2 {3g( (b m,., b 3 ) + Ɛ[(b m,., b 3 ] 2 + γ(b m, b m 1,., b 3 + β b2 } + 3Ɛ[(b m,., b 2 ] 2 + 3γ(b m, b m 1,., b 2 + 3β b1 + Ɛ[(b m,., b 1 ]2 + γ(b m,., b 1 + β b0 = 3 3 g( (b m,., b 3 ) Ɛ[(b m,., b 3 ] γ(b m,., b β b2 + 3Ɛ[(b m,., b 2 ] 2 + 3γ(b m,., b 2 + 3β b1 + Ɛ[(b m,., b 1 ] 2 + γ(b m, b m 1,., b 1 + β b0
31 (repeated) = 3 3 g( (b m,., b 3 ) Ɛ[(b m,., b 3 ] γ(b m, b m 1,., b β b2 + 3Ɛ[(b m,., b 2 ] 2 + 3γ(b m,., b 2 + 3β b1 + Ɛ[(b m,., b 1 ] 2 + γ(b m,., b 1 + β b0 Generalizing: g ((b m,., b 1, b 0 ) = 3 m g((b m ) + Ɛ{3 m 1 [(b m ] m 2 [(b m b m 1 ] [(b m b 1 ] 2 } + γ{3 m 1 (b m + 3 m 2 (b m b m (b m,.,b 1 } + 3 m 1 β bm m 2 β bm β b β b0
32 Input value 1 is represented by only one bit b m. In this case b m = 1. Also, the only time when b m is 0, is when the decimal number itself is 0. Any natural number is going to have b m = 1. Since the input to R are all natural numbers, therefore, in our computation b m = 1. So, g(b m ) = g(1) = α
33 g ((b m,., b 1, b 0 ) = 3 m α + Ɛ{3 m 1 [(b m ] m 2 [(b m b m 1 ] [(b m b 1 ] 2 } + γ{3 m 1 (b m + 3 m 2 (b m b m (b m,.,b 1 } + 3 m 1 β bm 1 + 3m 2 β bm β b β b0 = 3 m α + Ɛ{Σ3 m i [(b m b m i+1 ] 2 } + γ{σ3 m i (b m b m i+1 } + Σ3 m i β bm i (i = 1 to m)
34 n = 8: Binary representation: (1000 m = 3, b 0 = 0, b 1 =0, b 2 = 0 and b 3 = b m = 1 CF: g ((b m,., b 1, b 0 ) = 3 m α + Ɛ{Σ3 m i [(b m b m i+1 ] 2 } + γ{σ3 m i (b m b m i+1 } + Σ3 m i β bm i g((1000 ) = 3 3 α + ƐΣ3 3 i (b 3 b 3 i+1 + γσ3 3 i (b 3 b 3 i+1 ) + Σ3 3 i β b3 i
35 g((1000 ) = 3 3 α + ƐΣ3 3 i (b 3 b 3 i+1 + γσ3 3 i (b 3 b 3 i+1 ) + Σ3 3 i β b3 i = 3 3 α + Ɛ{3 3 1 [(b 3 b ] [(b 3...b ] [(b 3 b ] 2 } + γ{3 3 1 (b 3 b (b 3...b (b 3 b } β b β b β b3 3 = 3 3 α + Ɛ{3 2 [(1 ] [(10 ] [(100 ] 2 } + γ{3 2 ( ( (100 }+ 3 2 β β β 0
36 (repeated) = 3 3 α + Ɛ{3 2 [(1 ] [(10 ] [(100 ] 2 } + γ{3 2 ( ( (100 }+ 3 2 β β β 0 = 27α + Ɛ{9[1] + 3[4] + [16]} + γ{9(1) + 3(2) + 1(4)}+ 9β 0 + 3β 0 + β 0 = 27α +37Ɛ + 19γ + 13β 0 D b b b
37 n g(n) 1 α + 0Ɛ +0γ + 0β 0 + 0β 1 2 3α + Ɛ + γ + β 0 + 0β 1 3 3α + Ɛ + γ + 0β 0 + β 1 4 9α +7Ɛ+ 5γ+ 4β 0 + 0β 1 5 9α +7Ɛ+ 5γ+ 3β 0 + β 1 6 9α +12Ɛ + 6γ + β 0 +3β 1 7 9α +12Ɛ + 6γ + 0β 0 + 4β α +37Ɛ + 19γ + 13β 0 + 0β 1
Sums. ITT9131 Konkreetne Matemaatika
Sums ITT9131 Konkreetne Matemaatika Chapter Two Notation Sums and Recurrences Manipulation of Sums Multiple Sums General Methods Finite and Innite Calculus Innite Sums Contents 1 Sequences 2 Notations
More informationcse547, math547 DISCRETE MATHEMATICS Professor Anita Wasilewska
cse547, math547 DISCRETE MATHEMATICS Professor Anita Wasilewska LECTURE 2 CHAPTER 1 PART THREE: The Josephus Problem Flavius Josephus - historian of 1st century Josephus Story: During Jewish-Roman war
More informationDivide and Conquer. Andreas Klappenecker. [based on slides by Prof. Welch]
Divide and Conquer Andreas Klappenecker [based on slides by Prof. Welch] Divide and Conquer Paradigm An important general technique for designing algorithms: divide problem into subproblems recursively
More informationNote that r = 0 gives the simple principle of induction. Also it can be shown that the principle of strong induction follows from simple induction.
Proof by mathematical induction using a strong hypothesis Occasionally a proof by mathematical induction is made easier by using a strong hypothesis: To show P(n) [a statement form that depends on variable
More informationAgenda. We ve discussed
Agenda We ve discussed Now Next C++ basics Some built-in data structures and their applications: stack, map, vector, array The Fibonacci example showing the importance of good algorithms and asymptotic
More informationAlgorithm 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 information1 Substitution method
Recurrence Relations we have discussed asymptotic analysis of algorithms and various properties associated with asymptotic notation. As many algorithms are recursive in nature, it is natural to analyze
More informationMathematical Fundamentals
Mathematical Fundamentals Sets Factorials, Logarithms Recursion Summations, Recurrences Proof Techniques: By Contradiction, Induction Estimation Techniques Data Structures 1 Mathematical Fundamentals Sets
More informationName CMSC203 Fall2008 Exam 2 Solution Key Show All Work!!! Page (16 points) Circle T if the corresponding statement is True or F if it is False.
Name CMSC203 Fall2008 Exam 2 Solution Key Show All Work!!! Page ( points) Circle T if the corresponding statement is True or F if it is False T F GCD(,0) = 0 T F For every recursive algorithm, there is
More informationDivide and Conquer. Andreas Klappenecker
Divide and Conquer Andreas Klappenecker The Divide and Conquer Paradigm The divide and conquer paradigm is important general technique for designing algorithms. In general, it follows the steps: - divide
More informationPower Series Solutions We use power series to solve second order differential equations
Objectives Power Series Solutions We use power series to solve second order differential equations We use power series expansions to find solutions to second order, linear, variable coefficient equations
More informationCS 2110: INDUCTION DISCUSSION TOPICS
CS 110: INDUCTION DISCUSSION TOPICS The following ideas are suggestions for how to handle your discussion classes. You can do as much or as little of this as you want. You can either present at the board,
More informationCompare the growth rate of functions
Compare the growth rate of functions We have two algorithms A 1 and A 2 for solving the same problem, with runtime functions T 1 (n) and T 2 (n), respectively. Which algorithm is more efficient? We compare
More informationDivide and Conquer. Arash Rafiey. 27 October, 2016
27 October, 2016 Divide the problem into a number of subproblems Divide the problem into a number of subproblems Conquer the subproblems by solving them recursively or if they are small, there must be
More informationLecture 3 - Tuesday July 5th
Lecture 3 - Tuesday July 5th jacques@ucsd.edu Key words: Identities, geometric series, arithmetic series, difference of powers, binomial series Key concepts: Induction, proofs of identities 3. Identities
More informationConcrete 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 informationNotes for Recitation 14
6.04/18.06J Mathematics for Computer Science October 7, 006 Tom Leighton and Ronitt Rubinfeld Notes for Recitation 14 Guessing a Particular Solution A general linear recurrence has the form: fn) = b 1
More informationA REFINEMENT OF THE ALLADI-SCHUR THEOREM
A REFINEMENT OF THE ALLADI-SCHUR THEOREM GEORGE E. ANDREWS Abstract. K. Alladi first observed a variant of I. Schur s 1926 partition theore. Namely, the number of partitions of n in which all parts are
More informationb + O(n d ) where a 1, b > 1, then O(n d log n) if a = b d d ) if a < b d O(n log b a ) if a > b d
CS161, Lecture 4 Median, Selection, and the Substitution Method Scribe: Albert Chen and Juliana Cook (2015), Sam Kim (2016), Gregory Valiant (2017) Date: January 23, 2017 1 Introduction Last lecture, we
More informationMultiplication by an Integer Constant: Lower Bounds on the Code Length
Multiplication by an Integer Constant: Lower Bounds on the Code Length Vincent LEFÈVRE Loria, INRIA Lorraine RNC 5 September 3 5, 2003 Vincent LEFÈVRE Multiplication by an Integer Constant: Lower Bounds
More informationComplete Induction and the Well- Ordering Principle
Complete Induction and the Well- Ordering Principle Complete Induction as a Rule of Inference In mathematical proofs, complete induction (PCI) is a rule of inference of the form P (a) P (a + 1) P (b) k
More informationData structures Exercise 1 solution. Question 1. Let s start by writing all the functions in big O notation:
Data structures Exercise 1 solution Question 1 Let s start by writing all the functions in big O notation: f 1 (n) = 2017 = O(1), f 2 (n) = 2 log 2 n = O(n 2 ), f 3 (n) = 2 n = O(2 n ), f 4 (n) = 1 = O
More informationNotes for Recitation 14
6.04/18.06J Mathematics for Computer Science October 4, 006 Tom Leighton and Marten van Dijk Notes for Recitation 14 1 The Akra-Bazzi Theorem Theorem 1 (Akra-Bazzi, strong form). Suppose that: is defined
More information1 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 informationRecurrence Relations
Recurrence Relations Analysis Tools S.V. N. (vishy) Vishwanathan University of California, Santa Cruz vishy@ucsc.edu January 15, 2016 S.V. N. Vishwanathan (UCSC) CMPS101 1 / 29 Recurrences Outline 1 Recurrences
More informationI. Induction. Po-Shen Loh June 16, 2003
I. Induction Po-Shen Loh June 16, 2003 1 News Flash From Zuming! Remind Po to take all the markers from CBA 337 Tonight s study session for Red/Blue is in Bessey 104 Future Red lectures are in NM B-7,
More informationDepartment of Computer Science University at Albany, State University of New York Solutions to Sample Discrete Mathematics Examination II (Fall 2007)
Department of Computer Science University at Albany, State University of New York Solutions to Sample Discrete Mathematics Examination II (Fall 2007) Problem 1: Specify two different predicates P (x) and
More informationBinomial 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 informationAlgorithms CMSC The Method of Reverse Inequalities: Evaluation of Recurrent Inequalities
Algorithms CMSC 37000 The Method of Reverse Inequalities: Evaluation of Recurrent Inequalities László Babai Updated 1-19-2014 In this handout, we discuss a typical situation in the analysis of algorithms:
More informationIntroduction Integers. Discrete Mathematics Andrei Bulatov
Introduction Integers Discrete Mathematics Andrei Bulatov Discrete Mathematics - Integers 9- Integers God made the integers; all else is the work of man Leopold Kroenecker Discrete Mathematics - Integers
More informationRecursion: Introduction and Correctness
Recursion: Introduction and Correctness CSE21 Winter 2017, Day 7 (B00), Day 4-5 (A00) January 25, 2017 http://vlsicad.ucsd.edu/courses/cse21-w17 Today s Plan From last time: intersecting sorted lists and
More informationOn a generalized combinatorial conjecture involving addition mod 2 k 1
On a generalized combinatorial conjecture involving addition mod k 1 Gérard Cohen Jean-Pierre Flori Tuesday 14 th February, 01 Abstract In this note, e give a simple proof of the combinatorial conjecture
More informationHomework 3, solutions
Homework 3, solutions Problem 1. Read the proof of Proposition 1.22 (page 32) in the book. Using simialr method prove that there are infinitely many prime numbers of the form 3n 2. Solution. Note that
More informationComputational Complexity - Pseudocode and Recursions
Computational Complexity - Pseudocode and Recursions Nicholas Mainardi 1 Dipartimento di Elettronica e Informazione Politecnico di Milano nicholas.mainardi@polimi.it June 6, 2018 1 Partly Based on Alessandro
More informationDefn: A linear recurrence relation has constant coefficients if the a i s are constant. Ch 14: 1, 4, 5, 10, 13, 18, 22, 24, 25 and
7.4: linear homogeneous recurrence relation: Defn: A recurrence relation is linear if h n = a 1 (n)h n 1 + a (n)h n +... + a k (n)h n k + b(n) A recurrence relation has order k if a k 0 Ex: Derangement
More informationmeans is a subset of. So we say A B for sets A and B if x A we have x B holds. BY CONTRAST, a S means that a is a member of S.
1 Notation For those unfamiliar, we have := means equal by definition, N := {0, 1,... } or {1, 2,... } depending on context. (i.e. N is the set or collection of counting numbers.) In addition, means for
More informationLebesgue Measure and The Cantor Set
Math 0 Final year project Lebesgue Measure and The Cantor Set Jason Baker, Kyle Henke, Michael Sanchez Overview Define a measure Define when a set has measure zero Find the measure of [0, ], I and Q Construct
More informationSection 4.1: Sequences and Series
Section 4.1: Sequences and Series In this section, we shall introduce the idea of sequences and series as a necessary tool to develop the proof technique called mathematical induction. Most of the material
More informationSolutions to Practice Final
s to Practice Final 1. (a) What is φ(0 100 ) where φ is Euler s φ-function? (b) Find an integer x such that 140x 1 (mod 01). Hint: gcd(140, 01) = 7. (a) φ(0 100 ) = φ(4 100 5 100 ) = φ( 00 5 100 ) = (
More informationCOMP Analysis of Algorithms & Data Structures
COMP 3170 - Analysis of Algorithms & Data Structures Shahin Kamali Lecture 5 - Jan. 12, 2018 CLRS 1.1, 1.2, 2.2, 3.1, 4.3, 4.5 University of Manitoba Picture is from the cover of the textbook CLRS. 1 /
More informationRecurrence 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 informationCS 577 Introduction to Algorithms: Strassen s Algorithm and the Master Theorem
CS 577 Introduction to Algorithms: Jin-Yi Cai University of Wisconsin Madison In the last class, we described InsertionSort and showed that its worst-case running time is Θ(n 2 ). Check Figure 2.2 for
More informationBig O 2/14/13. Administrative. Does it terminate? David Kauchak cs302 Spring 2013
/4/3 Administrative Big O David Kauchak cs3 Spring 3 l Assignment : how d it go? l Assignment : out soon l CLRS code? l Videos Insertion-sort Insertion-sort Does it terminate? /4/3 Insertion-sort Loop
More information1.1. The Kleene Recursion Theorem
1.1. The Kleene Recursion Theorem This brief note covers Kleene s recursion Theorem and a few applications. 1.1.1 Theorem. Kleene s recursion theorem If λz x.fz, x n P, then for some e, Proof. Let φ n+1
More informationDivide and Conquer. CSE21 Winter 2017, Day 9 (B00), Day 6 (A00) January 30,
Divide and Conquer CSE21 Winter 2017, Day 9 (B00), Day 6 (A00) January 30, 2017 http://vlsicad.ucsd.edu/courses/cse21-w17 Merging sorted lists: WHAT Given two sorted lists a 1 a 2 a 3 a k b 1 b 2 b 3 b
More informationMAT3500/ Mandatory assignment 2013 Solutions
MAT3500/4500 - Mandatory assignment 2013 s Problem 1 Let X be a topological space, A and B be subsets of X. Recall the definition of the boundary Bd A of a set A. Prove that Bd (A B) (Bd A) (Bd B). Discuss
More informationDefinition: Let S and T be sets. A binary relation on SxT is any subset of SxT. A binary relation on S is any subset of SxS.
4 Functions Before studying functions we will first quickly define a more general idea, namely the notion of a relation. A function turns out to be a special type of relation. Definition: Let S and T be
More information1 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 informationMid-term Exam Answers and Final Exam Study Guide CIS 675 Summer 2010
Mid-term Exam Answers and Final Exam Study Guide CIS 675 Summer 2010 Midterm Problem 1: Recall that for two functions g : N N + and h : N N +, h = Θ(g) iff for some positive integer N and positive real
More informationHomework 4, 5, 6 Solutions. > 0, and so a n 0 = n + 1 n = ( n+1 n)( n+1+ n) 1 if n is odd 1/n if n is even diverges.
2..2(a) lim a n = 0. Homework 4, 5, 6 Solutions Proof. Let ɛ > 0. Then for n n = 2+ 2ɛ we have 2n 3 4+ ɛ 3 > ɛ > 0, so 0 < 2n 3 < ɛ, and thus a n 0 = 2n 3 < ɛ. 2..2(g) lim ( n + n) = 0. Proof. Let ɛ >
More informationCDM. Recurrences and Fibonacci
CDM Recurrences and Fibonacci Klaus Sutner Carnegie Mellon University 20-fibonacci 2017/12/15 23:16 1 Recurrence Equations Second Order The Fibonacci Monoid Recurrence Equations 3 We can define a sequence
More informationCSE 311: Foundations of Computing. Lecture 26: Cardinality
CSE 311: Foundations of Computing Lecture 26: Cardinality Cardinality and Computability Computers as we know them grew out of a desire to avoid bugs in mathematical reasoning A brief history of reasoning
More informationMATH 117 LECTURE NOTES
MATH 117 LECTURE NOTES XIN ZHOU Abstract. This is the set of lecture notes for Math 117 during Fall quarter of 2017 at UC Santa Barbara. The lectures follow closely the textbook [1]. Contents 1. The set
More informationSolving recurrences. Frequently showing up when analysing divide&conquer algorithms or, more generally, recursive algorithms.
Solving recurrences Frequently showing up when analysing divide&conquer algorithms or, more generally, recursive algorithms Example: Merge-Sort(A, p, r) 1: if p < r then 2: q (p + r)/2 3: Merge-Sort(A,
More informationAlgorithm efficiency analysis
Algorithm efficiency analysis Mădălina Răschip, Cristian Gaţu Faculty of Computer Science Alexandru Ioan Cuza University of Iaşi, Romania DS 2017/2018 Content Algorithm efficiency analysis Recursive function
More informationCDM. Recurrences and Fibonacci. 20-fibonacci 2017/12/15 23:16. Terminology 4. Recurrence Equations 3. Solution and Asymptotics 6.
CDM Recurrences and Fibonacci 1 Recurrence Equations Klaus Sutner Carnegie Mellon University Second Order 20-fibonacci 2017/12/15 23:16 The Fibonacci Monoid Recurrence Equations 3 Terminology 4 We can
More informationRecurrences COMP 215
Recurrences COMP 215 Analysis of Iterative Algorithms //return the location of the item matching x, or 0 if //no such item is found. index SequentialSearch(keytype[] S, in, keytype x) { index location
More informationn 2 R. SHAW Department of Mathematics, University of Hull, Hull HU6 7RX, United Kingdom 19 August 2005
The Grassmannian G 1;n; has polynomial degree 1 n R. SHAW r.shaw@hull.ac.uk Department of Mathematics, University of Hull, Hull HU6 7RX, United Kingdom 19 August 005 Abstract The Grassmannian G 1;n; of
More informationCSE 105 Theory of Computation
CSE 105 Theory of Computation http://www.jflap.org/jflaptmp/ Professor Jeanne Ferrante 1 Undecidability Today s Agenda Review and More Problems A Non-TR Language Reminders and announcements: HW 7 (Last!!)
More informationSeunghee Ye Ma 8: Week 2 Oct 6
Week 2 Summary This week, we will learn about sequences and real numbers. We first define what we mean by a sequence and discuss several properties of sequences. Then, we will talk about what it means
More informationFinal 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 informationCS 5321: Advanced Algorithms - Recurrence. Acknowledgement. Outline. Ali Ebnenasir Department of Computer Science Michigan Technological University
CS 5321: Advanced Algorithms - Recurrence Ali Ebnenasir Department of Computer Science Michigan Technological University Acknowledgement Eric Torng Moon Jung Chung Charles Ofria Outline Motivating example:
More informationOn binary reflected Gray codes and functions
Discrete Mathematics 308 (008) 1690 1700 www.elsevier.com/locate/disc On binary reflected Gray codes and functions Martin W. Bunder, Keith P. Tognetti, Glen E. Wheeler School of Mathematics and Applied
More informationChapter 1. Sets and Numbers
Chapter 1. Sets and Numbers 1. Sets A set is considered to be a collection of objects (elements). If A is a set and x is an element of the set A, we say x is a member of A or x belongs to A, and we write
More informationCS 5321: Advanced Algorithms Analysis Using Recurrence. Acknowledgement. Outline
CS 5321: Advanced Algorithms Analysis Using Recurrence Ali Ebnenasir Department of Computer Science Michigan Technological University Acknowledgement Eric Torng Moon Jung Chung Charles Ofria Outline Motivating
More informationCS 4104 Data and Algorithm Analysis. Recurrence Relations. Modeling Recursive Function Cost. Solving Recurrences. Clifford A. Shaffer.
Department of Computer Science Virginia Tech Blacksburg, Virginia Copyright c 2010,2017 by Clifford A. Shaffer Data and Algorithm Analysis Title page Data and Algorithm Analysis Clifford A. Shaffer Spring
More informationSums and Products. a i = a 1. i=1. a i = a i a n. n 1
Sums and Products -27-209 In this section, I ll review the notation for sums and products Addition and multiplication are binary operations: They operate on two numbers at a time If you want to add or
More informationCMSC250 Homework 9 Due: Wednesday, December 3, Question: Total Points: Score:
Name & UID: Circle Your Section! 0101 (10am: 3120, Ladan) 0102 (11am: 3120, Ladan) 0103 (Noon: 3120, Peter) 0201 (2pm: 3120, Yi) 0202 (10am: 1121, Vikas) 0203 (11am: 1121, Vikas) 0204 (9am: 2117, Karthik)
More informationLecture 9: Polynomial-Time Hierarchy, Time-Space Tradeoffs
CSE 531: Computational Complexity I Winter 2016 Lecture 9: Polynomial-Time Hierarchy, Time-Space Tradeoffs Feb 3, 2016 Lecturer: Paul Beame Scribe: Paul Beame 1 The Polynomial-Time Hierarchy Last time
More informationLegendre 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 informationDivide and Conquer Algorithms
Divide and Conquer Algorithms T. M. Murali February 19, 2013 Divide and Conquer Break up a problem into several parts. Solve each part recursively. Solve base cases by brute force. Efficiently combine
More informationFINITE ABELIAN GROUPS Amin Witno
WON Series in Discrete Mathematics and Modern Algebra Volume 7 FINITE ABELIAN GROUPS Amin Witno Abstract We detail the proof of the fundamental theorem of finite abelian groups, which states that every
More informationWhen we use asymptotic notation within an expression, the asymptotic notation is shorthand for an unspecified function satisfying the relation:
CS 124 Section #1 Big-Oh, the Master Theorem, and MergeSort 1/29/2018 1 Big-Oh Notation 1.1 Definition Big-Oh notation is a way to describe the rate of growth of functions. In CS, we use it to describe
More informationCOM 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 informationMathematics 228(Q1), Assignment 3 Solutions
Mathematics 228(Q1), Assignment 3 Solutions Exercise 1.(10 marks)(a) If m is an odd integer, show m 2 1 mod 8. (b) Let m be an odd integer. Show m 2n 1 mod 2 n+2 for all positive natural numbers n. Solution.(a)
More informationIn-Class Soln 1. CS 361, Lecture 4. Today s Outline. In-Class Soln 2
In-Class Soln 1 Let f(n) be an always positive function and let g(n) = f(n) log n. Show that f(n) = o(g(n)) CS 361, Lecture 4 Jared Saia University of New Mexico For any positive constant c, we want to
More informationStanford University CS254: Computational Complexity Handout 8 Luca Trevisan 4/21/2010
Stanford University CS254: Computational Complexity Handout 8 Luca Trevisan 4/2/200 Counting Problems Today we describe counting problems and the class #P that they define, and we show that every counting
More informationMathematical Induction
Mathematical Induction Let s motivate our discussion by considering an example first. What happens when we add the first n positive odd integers? The table below shows what results for the first few values
More informationarithmetic properties of weighted catalan numbers
arithmetic properties of weighted catalan numbers Jason Chen Mentor: Dmitry Kubrak May 20, 2017 MIT PRIMES Conference background: catalan numbers Definition The Catalan numbers are the sequence of integers
More informationChapter 2. Recurrence Relations. Divide and Conquer. Divide and Conquer Strategy. Another Example: Merge Sort. Merge Sort Example. Merge Sort Example
Recurrence Relations Chapter 2 Divide and Conquer Equation or an inequality that describes a function by its values on smaller inputs. Recurrence relations arise when we analyze the running time of iterative
More informationLecture 2. Fundamentals of the Analysis of Algorithm Efficiency
Lecture 2 Fundamentals of the Analysis of Algorithm Efficiency 1 Lecture Contents 1. Analysis Framework 2. Asymptotic Notations and Basic Efficiency Classes 3. Mathematical Analysis of Nonrecursive Algorithms
More informationIndistinguishability and Pseudo-Randomness
Chapter 3 Indistinguishability and Pseudo-Randomness Recall that one main drawback of the One-time pad encryption scheme and its simple encryption operation Enc k (m) = m k is that the key k needs to be
More information(i) By Corollary 1.3 (a) on P. 88, we know that the predicate. Q(x, y, z) S 1 (x, (z) 1, y, (z) 2 )
COMPUTABILITY: ANSWERS TO SOME EXERCISES IN CHAPTER 5 AND 6 5.1.5, P. 90. 1. This exercise is important for several reasons. For example, it tells us that taking inverses is an effect operation; see Example
More informationarxiv: v2 [quant-ph] 5 Dec 2013
Decomposition of quantum gates Chi Kwong Li and Diane Christine Pelejo Department of Mathematics, College of William and Mary, Williamsburg, VA 23187, USA E-mail: ckli@math.wm.edu, dcpelejo@gmail.com Abstract
More informationMath 110 HW 3 solutions
Math 0 HW 3 solutions May 8, 203. For any positive real number r, prove that x r = O(e x ) as functions of x. Suppose r
More informationCSE 105 Theory of Computation
CSE 105 Theory of Computation http://www.jflap.org/jflaptmp/ Professor Jeanne Ferrante 1 Undecidability Today s Agenda Review: The TM Acceptance problem, A TM The Halting Problem for TM s Other problems
More informationD-MATH Algebra I HS 2013 Prof. Brent Doran. Solution 3. Modular arithmetic, quotients, product groups
D-MATH Algebra I HS 2013 Prof. Brent Doran Solution 3 Modular arithmetic, quotients, product groups 1. Show that the functions f = 1/x, g = (x 1)/x generate a group of functions, the law of composition
More informationMassachusetts Institute of Technology Handout J/18.062J: Mathematics for Computer Science May 3, 2000 Professors David Karger and Nancy Lynch
Massachusetts Institute of Technology Handout 48 6.042J/18.062J: Mathematics for Computer Science May 3, 2000 Professors David Karger and Nancy Lynch Quiz 2 Solutions Problem 1 [10 points] Consider n >
More informationDivide-and-Conquer and Recurrence Relations: Notes on Chapter 2, Dasgupta et.al. Howard A. Blair
Divide-and-Conquer and Recurrence Relations: Notes on Chapter 2, Dasgupta et.al. Howard A. Blair 1 Multiplication Example 1.1: Carl Friedrich Gauss (1777-1855): The multiplication of two complex numbers
More informationOutline. 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 informationarxiv: v1 [math.co] 13 Jul 2017
A GENERATING FUNCTION FOR THE DISTRIBUTION OF RUNS IN BINARY WORDS arxiv:1707.04351v1 [math.co] 13 Jul 2017 JAMES J. MADDEN Abstract. Let N(n, r, k) denote the number of binary words of length n that begin
More informationGordon solutions. n=1 1. p n
Gordon solutions 1. A positive integer is called a palindrome if its base-10 expansion is unchanged when it is reversed. For example, 121 and 7447 are palindromes. Show that if we denote by p n the nth
More informationCMPS 2200 Fall Divide-and-Conquer. Carola Wenk. Slides courtesy of Charles Leiserson with changes and additions by Carola Wenk
CMPS 2200 Fall 2017 Divide-and-Conquer Carola Wenk Slides courtesy of Charles Leiserson with changes and additions by Carola Wenk 1 The divide-and-conquer design paradigm 1. Divide the problem (instance)
More informationHomework 5 Solutions
Homework 5 Solutions ECS 0 (Fall 17) Patrice Koehl koehl@cs.ucdavis.edu ovember 1, 017 Exercise 1 a) Show that the following statement is true: If there exists a real number x such that x 4 +1 = 0, then
More informationPractice Exam 1 CIS/CSE 607, Spring 2009
Practice Exam 1 CIS/CSE 607, Spring 2009 Problem 1) Let R be a reflexive binary relation on a set A. Prove that R is transitive if, and only if, R = R R. Problem 2) Give an example of a transitive binary
More information3 The fundamentals: Algorithms, the integers, and matrices
3 The fundamentals: Algorithms, the integers, and matrices 3.4 The integers and division This section introduces the basics of number theory number theory is the part of mathematics involving integers
More informationDivide and Conquer Algorithms
Divide and Conquer Algorithms T. M. Murali March 17, 2014 Divide and Conquer Break up a problem into several parts. Solve each part recursively. Solve base cases by brute force. Efficiently combine solutions
More informationCOMP Analysis of Algorithms & Data Structures
COMP 3170 - Analysis of Algorithms & Data Structures Shahin Kamali Lecture 4 - Jan. 10, 2018 CLRS 1.1, 1.2, 2.2, 3.1, 4.3, 4.5 University of Manitoba Picture is from the cover of the textbook CLRS. 1 /
More informationSloping Binary Numbers: A New Sequence Related to the Binary Numbers
Sloping Binary Numbers: A New Sequence Related to the Binary Numbers David Applegate, Internet and Network Systems Research Center, AT&T Shannon Labs, 180 Park Avenue, Florham Park, NJ 0793 0971, USA (Email:
More informationMath Circle: Recursion and Induction
Math Circle: Recursion and Induction Prof. Wickerhauser 1 Recursion What can we compute, using only simple formulas and rules that everyone can understand? 1. Let us use N to denote the set of counting
More information