SlideShare a Scribd company logo
1 of 7
Download to read offline
Sums
Notation: We will be working with sums of the general form
1 2 3 1n na a a a a    
This form of representing sums is called three-dot notation. Other alternative notations
are also available to represent sums.
1
k
k n
a
 
 is called Sigma-notation because it uses the Greek letter  (sigma).
1
n
k
k
a

 is called delimited form to represent sums.
For example, we can express the sum of the squares of all odd positive integers below
100 as follows:
. The delimited equivalent of this sum is
49
2
0
(2 1)
k
k

 .
The biggest advantage of Sigma-notation is that we can manipulate it more easily than
the delimited form. For example, suppose we want to change the index k to k+1.
1 1 1
k k
k n k n
a a
    
  it is easy to see what is going one. But for delimited form, we have
1
1
1 0
n n
k k
k k
a a


 
  it is harder to see what is happed and more likely to make mistake. But
delimited form is nice and tidy, we can write it quickly.
People are often tempted to write
1
2
( 1)( )
n
k
k k n k


  instead of
0
( 1)( )
n
k
k k n k

  because
the terms for k = 0, 1 and n in this sum are zero. But it is more helpful to keep upper and
lower bounds on an index of summation as simple as possible, because sum can be
manipulated much more easily when the bounds are simple. Indeed the form
1
2
n
k

 can
even be ambiguous, because it’s meaning is not clear when n = 0 or n = 1.
Sums and Recurrences: There is an intimate relation between sums and recurrences.
The sum
0
n
n k
k
S a

  is equivalent to the recurrence
0 0S a
1n n nS S a  , for 0n   (1)
Therefore, we can evaluate sums by using methods we learned earlier to solve recurrence
in closed form. For example, if na is equal to a constant plus a multiple of n, the
recurrence takes the following form:
0R 
1n nR R n    , for 0n   (2)
If we look after small cases to solve the above recurrence then we get
2
1 100
odd
k
k
k
 

1 0R R          
2 1 2 2 2 3R R                     ,
3 2 3 2 3 3 3 6R R                    
and so on, in general the solution can be written in the form ( ) ( ) ( )nR A n B n C n    
where A(n), B(n) and C(n) are coefficients of dependence on the general parameters
, and   . Setting 1nR  in equation (2), we get
1
1 1 0 0 and 0n n

     

        
hence ( ) 1A n  .
Setting nR n in equation (2), we get
0
1 1 1 and 0n n n n

     

         
hence ( )B n n .
Again, setting 2
nR n in equation (2), we get
2 2 2 2
0
( 1) 2 1 2 1 1 and 2n n n n n n n n n

       

                 
hence 2 2
2 ( ) ( ) 2 ( ) ( ) ( 1)
2
n
C n B n n C n n n C n n       
Putting the values of A(n), B(n) and C(n) we get the solution of equation (2)
( 1)
2
n
n
R n n     
Therefore if we want to evaluate
0
( )
n
k
a bk

 , then we can write the sum as follows
0S a
1n nS S a bn   , for 0n 
Comparing with general equation (2) with the above sum, we get , anda a b     .
Thus
0
( ) ( 1) ( 1) ( 1) ( 1)( )
2 2 2
n
k
n n nb
a bk a na n b a n n b n a

           
Conversely, many recurrences can be reduced to sums. For example, we are going to
transfer the Tower of Hanoi recurrence solution into sums.
0 0T 
12 1n nT T   , for 0n 
Dividing both side by 2n
, we get
0
0 0
0
2 2
T

1 1
1
2 1 2
2 2 2 2
nn n n
n n n n
T T T  
    , for 0n 
Setting
2
n
nn
T
S  , we get
0 0S 
1 2 n
n nS S 
  , for 0n 
= ( 1)
2 2 2n n
nS   
  
= ( 2) ( 1)
3 2 2 2n n n
nS     
   

= ( 1) ( 2) ( 3) ( 2) ( 1)
2 2 2 2 2 2n n n n n n n n n
n nS              
       
= 1 2 3 ( 2) ( 1)
0 2 2 2 2 2 2n n n
S        
      
=
1
2
n
k
k



We have derived sum from the Tower of Hanoi recurrence solution. Adding 0
2 with both
side of the sum, we get
0 0
1
2 2 2
n
k
n
k
S 

  
0 1 2 2 1
1 1 1 1 1 11
2 2 2 2 2 2n n nnS          
1
11
2 1
11
2
n
nS

  

1
12(1 ) 1
2nnS    
11
2 2
n
n n
T
  
2 1n
nT  
The trick of dividing both-side by 2n
in Tower of Hanoi recurrence to get fromn nS T is a
special case of a general technique that can reduce virtually any recurrence of the form
1n n n n na T b T c   (3)
to a sum. The idea is to multiple both sides by a summation faction, ns :
1n n n n n n n ns a T s b T s c 
This factor ns is clearly chosen to make 1 1n n n ns b s a 
Then if we write n n n nS s a T , we have a sum-recurrence
1 1 1 1 1n n n n n n n n n n n n n nS s b T s c s a T s c S s c         
Hence, 1 2 1 1n n n n n n n n nS S s c S s c s c       

0 1 1 2 2 1 1
0 0 0 0 1 1 0
1 1 1
n n n n
n n n
k k k k k k
k k k
S s c s c s c s c
S s c s a T s c s bT s c
 
  
     
       

The solution of the general recurrence is 1 1 0
1
1
( )
n
n
n k k
kn n n n
S
T s bT s c
s a s a 
     (4)
For example, when n = 1, then 1 1 0 1 1 1 0 1
1
1 1 1
( ) ( )s bT s c bT c
T
s a a
 
  . The value of 1s
cancels out, so it can be anything but zero. To find out the right summation factor, ns we
can unfold the relation 1 1 2 2 1 1 1 2 1
1 2 1
n n n n n n n
n
n n n n n
s a s a a s a a a
s
b b b b b b
      
 
  



Thus, 1 2 1
2 1
n n
n
n n
a a a
s
b b b
 




or any convenient constant multiple of this value, will be a
suitable summation factor.
To understand the whole process, we are going to apply these ideas to solve the average
number of comparison steps required by quick-sort when it is applied to n items
0 0C 
1
0
2
( 1)
n
n k
k
C n C
n


    , for 0n   (5)
We can find out some small cases from the above sum to guess the solution.
1 0(1 1) 2 2C C   
2 0 1
2
(2 1) ( ) 3 2 5
2
C C C      
With the intent to simplify the equation (5), we can multiply both sides by n
1 1
2
0 0
( 1) 2 2
n n
n k k
k k
nC n n C n n C
 
 
       , for 0n   (6)
hence, if we replace n by (n-1), we get
2
2
1
0
( 1) ( 1) ( 1) 2
n
n k
k
n C n n C



       , for 1 0n    (7)
Now, we can subtract equation (7) from equation (6) to get rid of  sign
1 2
2 2
1
0 0
( 1) 2 ( 2 1) ( 1) 2
n n
n n k k
k k
nC n C n n C n n n C
 

 
            , for 1n 
2 2
2 2
1
0 0
2 2 2 1 1 2
n n
k n k
k k
n n C C n n n C
 

 
Now, we are going to find out a suitable summation faction for the above recurrence.
Here, na n , 1nb n  and 2nc n .
Thus the summation faction, 1 2 2 1
1 3 2
( 1) ( 2) 2 1 2
( 1) 4 3 ( 1)
n n
n
n n
a a a a n n
s
b b b b n n n n
 

   
  
   
 
 
.
The solution to our recurrence according to equation (4), is therefore
0
1 1
( 1) 2 2 1
[ (1 1) 2 ] 2( 1)
2 (1 1) 1 ( 1) 1
n n
n
k k
n n
C C k n
n k k k 

    
   
   (8)
            , for n 1
 2n  2Cn1 , for n 11
We can represent nC using Harmonic number,
1
1 1 1 1 1
1
2 3 1
n
n
k
H
n n k
      


To find out the closed form of quick-sort recurrence, we have to find out the summation
portion of the equation.
1 1
1 1 1 1 1 1 1 1 1 1 1 1
(1 ) 1
1 2 3 1 2 3 1 1 1
n n
n
k k
n n
H
k n n n n k n n 
  
               
    
  
Putting the value of summation in equation (8), we get
2( 1)[ ] 2( 1) 2
1
n n n
n
C n H n H n
n
     

.
We can check small cases to verify our solution
1 12(1 1) 2 1 4(1) 2 4 2 2C H        
2 2
1 3
2(2 1) 2 2 6(1 ) 4 6 4 5
2 2
C H          
3 3
1 1 11 44 26
2(3 1) 2 3 8(1 ) 6 8 6 6
2 3 6 3 3
C H             
☺Good Luck☺
Sums
Manipulation of Sums: Let P be any finite set of integers. Sums over the elements
of P can be transformed by using three simple rules:
Distributive Law: k k
k P k P
ca c a
 
   (1)
Associative Law: ( )k k k k
k P k P k P
a b a b
  
      (2)
Commutative Law: k m
k P m P
a a
 
   (3)
For example, if { 1,0,1}K   and m k  these three laws tell us respectively that
1 0 1 1 0 1( )ca ca ca c a a a       [Distributive Law]
1 1 0 0 1 1 1 0 1 1 0 1( ) ( ) ( ) ( ) ( )a b a b a b a a a b b b              [Associative Law]
1 0 1 1 0 1a a a a a a      [Commutative Law]
Suppose, we want to compute the general sum,
0
( )
k n
S a bk
 
 
By using commutative law, we can replace k by n k , obtaining
0 ( ) 0
( ( )) ( )
n k n k n
S a b n k a bn bk
    
      
These two equations can be added by using associative law:
0 0 0 0
2 ( ) ( ) ( ) (2 )
k n k n k n k n
S a bk a bn bk a bk a bn bk a bn
       
              
Now, we can apply distributive law to evaluate the sum.
0 0
2 (2 ) (2 ) 1 (2 )( 1)
(2 )( 1)
( )( 1)
2 2
k n k n
S a bn a bn a bn n
a bn n bn
S a n
   
      
 
    
 
Perturbation Method: This method is used to evaluate a sum in closed form. The
operation of splitting off a term is the basis of this method. The idea is to start with an
unknown sum and call it nS .
0
n k
k n
S a
 
 
Then, we rewrite 1nS  in two ways, by splitting off both its last term and its first term:
1 0 0 1 0 1
0 1 1 1 1 1 1 0
n n k k k k
k n k n k n k n
S a a a a a a a a  
           
          
Now, we try to represent the last in terms of nS and if we succeed then we obtain an
equation whose solution is the sum we seek.
For example, let’s use this technique to find out the sum,
0
k
n
k n
S ax
 
  .
1 0 1
1 1 1 1 1 0
n k k k
n n
k n k n k n
S ax ax ax a ax a x ax a xS 
        
          
1n
n nS xS a ax 
   
1
(1 )
1
n
n
a x
S
x


 

, for 1x 
Let’s try perturbation technique for another example. Evaluate
0
2k
k n
k
 
 .
Let,
0
2k
n
k n
S k
 
 
1 0 1 1 1
0 0 0 0 0
( 1) 2 0 2 ( 1) 2 2 2 2 2 2 2n k k k k k
n
k n k n k n k n k n
S n k k k   
         
                 
Let,
0
2k
n
k n
R
 
 . Now, first we find out the sum of nR , using the result we get nS finally.
1 0 1
0 0
2 2 2 1 2 2 1 2n k k
n n
k n k n
R R 
   
       
1
1
2 1 2
2 1
n
n n
n
n
R R
R


   
  
Now, 1 1 2
0 0
( 1) 2 2 2 2 2 2 2(2 1) 2 2 2n k k n n
n n n
k n k n
S n k S S  
   
            
1 1 2 1 1 1 1 1
2 2 2 2 2 2 (1 2) 2 2 2 2 2 ( 1)2n n n n n n n n
nS n n n n       
              
Try to prove that
1 2
2
0
( 1)
(1 )
n nn
k
k
x n x nx
kx
x
 

  


 using perturbation technique.
☺Good Luck☺

More Related Content

What's hot

Higher order ODE with applications
Higher order ODE with applicationsHigher order ODE with applications
Higher order ODE with applicationsPratik Gadhiya
 
02 first order differential equations
02 first order differential equations02 first order differential equations
02 first order differential equationsvansi007
 
Higher Order Differential Equation
Higher Order Differential EquationHigher Order Differential Equation
Higher Order Differential EquationShrey Patel
 
Chapter 8 c solution
Chapter 8 c solutionChapter 8 c solution
Chapter 8 c solutionAzhar Javed
 
classification of second order partial differential equation
classification of second order partial differential equationclassification of second order partial differential equation
classification of second order partial differential equationjigar methaniya
 
1st order differential equations
1st order differential equations1st order differential equations
1st order differential equationsNisarg Amin
 
LINEAR DIFFERENTIAL EQUATION AND BERNOULLIS EQUATIONS
LINEAR DIFFERENTIAL EQUATION AND BERNOULLIS EQUATIONSLINEAR DIFFERENTIAL EQUATION AND BERNOULLIS EQUATIONS
LINEAR DIFFERENTIAL EQUATION AND BERNOULLIS EQUATIONSParthivpal17
 
10.5 Circles in the Coordinate Plane
10.5 Circles in the Coordinate Plane10.5 Circles in the Coordinate Plane
10.5 Circles in the Coordinate Planesmiller5
 
Chapter 3 : Balagurusamy Programming ANSI in C
Chapter 3 : Balagurusamy Programming ANSI in C Chapter 3 : Balagurusamy Programming ANSI in C
Chapter 3 : Balagurusamy Programming ANSI in C BUBT
 
Lesson 13: Exponential and Logarithmic Functions (slides)
Lesson 13: Exponential and Logarithmic Functions (slides)Lesson 13: Exponential and Logarithmic Functions (slides)
Lesson 13: Exponential and Logarithmic Functions (slides)Matthew Leingang
 
Presentation on function
Presentation on functionPresentation on function
Presentation on functionAbu Zaman
 
3.1 properties of logarithm
3.1 properties of logarithm3.1 properties of logarithm
3.1 properties of logarithmmath123c
 
APPLICATION OF HIGHER ORDER DIFFERENTIAL EQUATIONS
APPLICATION OF HIGHER ORDER DIFFERENTIAL EQUATIONSAPPLICATION OF HIGHER ORDER DIFFERENTIAL EQUATIONS
APPLICATION OF HIGHER ORDER DIFFERENTIAL EQUATIONSAYESHA JAVED
 
Ordinary Differential Equations: Variable separation method
Ordinary Differential Equations: Variable separation method  Ordinary Differential Equations: Variable separation method
Ordinary Differential Equations: Variable separation method AMINULISLAM439
 
Python Unit 3 - Control Flow and Functions
Python Unit 3 - Control Flow and FunctionsPython Unit 3 - Control Flow and Functions
Python Unit 3 - Control Flow and FunctionsDhivyaSubramaniyam
 

What's hot (20)

Higher order ODE with applications
Higher order ODE with applicationsHigher order ODE with applications
Higher order ODE with applications
 
02 first order differential equations
02 first order differential equations02 first order differential equations
02 first order differential equations
 
Higher Order Differential Equation
Higher Order Differential EquationHigher Order Differential Equation
Higher Order Differential Equation
 
Chapter 8 c solution
Chapter 8 c solutionChapter 8 c solution
Chapter 8 c solution
 
classification of second order partial differential equation
classification of second order partial differential equationclassification of second order partial differential equation
classification of second order partial differential equation
 
1st order differential equations
1st order differential equations1st order differential equations
1st order differential equations
 
LINEAR DIFFERENTIAL EQUATION AND BERNOULLIS EQUATIONS
LINEAR DIFFERENTIAL EQUATION AND BERNOULLIS EQUATIONSLINEAR DIFFERENTIAL EQUATION AND BERNOULLIS EQUATIONS
LINEAR DIFFERENTIAL EQUATION AND BERNOULLIS EQUATIONS
 
10.5 Circles in the Coordinate Plane
10.5 Circles in the Coordinate Plane10.5 Circles in the Coordinate Plane
10.5 Circles in the Coordinate Plane
 
Chapter 3 : Balagurusamy Programming ANSI in C
Chapter 3 : Balagurusamy Programming ANSI in C Chapter 3 : Balagurusamy Programming ANSI in C
Chapter 3 : Balagurusamy Programming ANSI in C
 
Conic Section
Conic SectionConic Section
Conic Section
 
Lesson 13: Exponential and Logarithmic Functions (slides)
Lesson 13: Exponential and Logarithmic Functions (slides)Lesson 13: Exponential and Logarithmic Functions (slides)
Lesson 13: Exponential and Logarithmic Functions (slides)
 
Presentation on function
Presentation on functionPresentation on function
Presentation on function
 
Ordinary differential equation
Ordinary differential equationOrdinary differential equation
Ordinary differential equation
 
3.1 properties of logarithm
3.1 properties of logarithm3.1 properties of logarithm
3.1 properties of logarithm
 
Presentation binomial theorem
Presentation binomial theoremPresentation binomial theorem
Presentation binomial theorem
 
APPLICATION OF HIGHER ORDER DIFFERENTIAL EQUATIONS
APPLICATION OF HIGHER ORDER DIFFERENTIAL EQUATIONSAPPLICATION OF HIGHER ORDER DIFFERENTIAL EQUATIONS
APPLICATION OF HIGHER ORDER DIFFERENTIAL EQUATIONS
 
Ordinary Differential Equations: Variable separation method
Ordinary Differential Equations: Variable separation method  Ordinary Differential Equations: Variable separation method
Ordinary Differential Equations: Variable separation method
 
DIFFERENTIAL EQUATIONS
DIFFERENTIAL EQUATIONSDIFFERENTIAL EQUATIONS
DIFFERENTIAL EQUATIONS
 
Complex function
Complex functionComplex function
Complex function
 
Python Unit 3 - Control Flow and Functions
Python Unit 3 - Control Flow and FunctionsPython Unit 3 - Control Flow and Functions
Python Unit 3 - Control Flow and Functions
 

Similar to Summation Series

Representation of Integer Positive Number as A Sum of Natural Summands
Representation of Integer Positive Number as A Sum of Natural SummandsRepresentation of Integer Positive Number as A Sum of Natural Summands
Representation of Integer Positive Number as A Sum of Natural SummandsIJERA Editor
 
Recurrent problems: TOH, Pizza Cutting and Josephus Problems
Recurrent problems: TOH, Pizza Cutting and Josephus ProblemsRecurrent problems: TOH, Pizza Cutting and Josephus Problems
Recurrent problems: TOH, Pizza Cutting and Josephus ProblemsMenglinLiu1
 
Analysis Of Algorithms Ii
Analysis Of Algorithms IiAnalysis Of Algorithms Ii
Analysis Of Algorithms IiSri Prasanna
 
Lecture -Earthquake Engineering (2).pdf
Lecture -Earthquake Engineering (2).pdfLecture -Earthquake Engineering (2).pdf
Lecture -Earthquake Engineering (2).pdfRayRabara
 
Solving recurrences
Solving recurrencesSolving recurrences
Solving recurrencesWaqas Akram
 
Solving recurrences
Solving recurrencesSolving recurrences
Solving recurrencesWaqas Akram
 
Binomial Theorem
Binomial TheoremBinomial Theorem
Binomial Theoremitutor
 
Solucao_Marion_Thornton_Dinamica_Classic (1).pdf
Solucao_Marion_Thornton_Dinamica_Classic (1).pdfSolucao_Marion_Thornton_Dinamica_Classic (1).pdf
Solucao_Marion_Thornton_Dinamica_Classic (1).pdfFranciscoJavierCaedo
 
Decay Property for Solutions to Plate Type Equations with Variable Coefficients
Decay Property for Solutions to Plate Type Equations with Variable CoefficientsDecay Property for Solutions to Plate Type Equations with Variable Coefficients
Decay Property for Solutions to Plate Type Equations with Variable CoefficientsEditor IJCATR
 
PART VII.3 - Quantum Electrodynamics
PART VII.3 - Quantum ElectrodynamicsPART VII.3 - Quantum Electrodynamics
PART VII.3 - Quantum ElectrodynamicsMaurice R. TREMBLAY
 
D03402029035
D03402029035D03402029035
D03402029035theijes
 
Kittel c. introduction to solid state physics 8 th edition - solution manual
Kittel c.  introduction to solid state physics 8 th edition - solution manualKittel c.  introduction to solid state physics 8 th edition - solution manual
Kittel c. introduction to solid state physics 8 th edition - solution manualamnahnura
 
Catalan number edit
Catalan number editCatalan number edit
Catalan number editsusuksak
 
Arithmetic Progressions and the Construction of Doubly Even Magic Squares and...
Arithmetic Progressions and the Construction of Doubly Even Magic Squares and...Arithmetic Progressions and the Construction of Doubly Even Magic Squares and...
Arithmetic Progressions and the Construction of Doubly Even Magic Squares and...Lossian Barbosa Bacelar Miranda
 
About testing the hypothesis of equality of two bernoulli
About testing the hypothesis of equality of two bernoulliAbout testing the hypothesis of equality of two bernoulli
About testing the hypothesis of equality of two bernoulliAlexander Decker
 

Similar to Summation Series (20)

Representation of Integer Positive Number as A Sum of Natural Summands
Representation of Integer Positive Number as A Sum of Natural SummandsRepresentation of Integer Positive Number as A Sum of Natural Summands
Representation of Integer Positive Number as A Sum of Natural Summands
 
Recurrent problems: TOH, Pizza Cutting and Josephus Problems
Recurrent problems: TOH, Pizza Cutting and Josephus ProblemsRecurrent problems: TOH, Pizza Cutting and Josephus Problems
Recurrent problems: TOH, Pizza Cutting and Josephus Problems
 
Number theory
Number theoryNumber theory
Number theory
 
Binomial theorem
Binomial theorem Binomial theorem
Binomial theorem
 
Analysis Of Algorithms Ii
Analysis Of Algorithms IiAnalysis Of Algorithms Ii
Analysis Of Algorithms Ii
 
Lecture -Earthquake Engineering (2).pdf
Lecture -Earthquake Engineering (2).pdfLecture -Earthquake Engineering (2).pdf
Lecture -Earthquake Engineering (2).pdf
 
Vivek
VivekVivek
Vivek
 
Solving recurrences
Solving recurrencesSolving recurrences
Solving recurrences
 
Solving recurrences
Solving recurrencesSolving recurrences
Solving recurrences
 
Binomial Theorem
Binomial TheoremBinomial Theorem
Binomial Theorem
 
Computer Network Assignment Help
Computer Network Assignment HelpComputer Network Assignment Help
Computer Network Assignment Help
 
Solucao_Marion_Thornton_Dinamica_Classic (1).pdf
Solucao_Marion_Thornton_Dinamica_Classic (1).pdfSolucao_Marion_Thornton_Dinamica_Classic (1).pdf
Solucao_Marion_Thornton_Dinamica_Classic (1).pdf
 
Decay Property for Solutions to Plate Type Equations with Variable Coefficients
Decay Property for Solutions to Plate Type Equations with Variable CoefficientsDecay Property for Solutions to Plate Type Equations with Variable Coefficients
Decay Property for Solutions to Plate Type Equations with Variable Coefficients
 
PART VII.3 - Quantum Electrodynamics
PART VII.3 - Quantum ElectrodynamicsPART VII.3 - Quantum Electrodynamics
PART VII.3 - Quantum Electrodynamics
 
B02404014
B02404014B02404014
B02404014
 
D03402029035
D03402029035D03402029035
D03402029035
 
Kittel c. introduction to solid state physics 8 th edition - solution manual
Kittel c.  introduction to solid state physics 8 th edition - solution manualKittel c.  introduction to solid state physics 8 th edition - solution manual
Kittel c. introduction to solid state physics 8 th edition - solution manual
 
Catalan number edit
Catalan number editCatalan number edit
Catalan number edit
 
Arithmetic Progressions and the Construction of Doubly Even Magic Squares and...
Arithmetic Progressions and the Construction of Doubly Even Magic Squares and...Arithmetic Progressions and the Construction of Doubly Even Magic Squares and...
Arithmetic Progressions and the Construction of Doubly Even Magic Squares and...
 
About testing the hypothesis of equality of two bernoulli
About testing the hypothesis of equality of two bernoulliAbout testing the hypothesis of equality of two bernoulli
About testing the hypothesis of equality of two bernoulli
 

More from MenglinLiu1

Random variables
Random variablesRandom variables
Random variablesMenglinLiu1
 
Probability Basics and Bayes' Theorem
Probability Basics and Bayes' TheoremProbability Basics and Bayes' Theorem
Probability Basics and Bayes' TheoremMenglinLiu1
 
Math for anomaly detection
Math for anomaly detectionMath for anomaly detection
Math for anomaly detectionMenglinLiu1
 
Anomaly detection Full Article
Anomaly detection Full ArticleAnomaly detection Full Article
Anomaly detection Full ArticleMenglinLiu1
 
Questions on Anomaly Detection
Questions on Anomaly DetectionQuestions on Anomaly Detection
Questions on Anomaly DetectionMenglinLiu1
 

More from MenglinLiu1 (7)

Queueing theory
Queueing theoryQueueing theory
Queueing theory
 
Markov chain
Markov chainMarkov chain
Markov chain
 
Random variables
Random variablesRandom variables
Random variables
 
Probability Basics and Bayes' Theorem
Probability Basics and Bayes' TheoremProbability Basics and Bayes' Theorem
Probability Basics and Bayes' Theorem
 
Math for anomaly detection
Math for anomaly detectionMath for anomaly detection
Math for anomaly detection
 
Anomaly detection Full Article
Anomaly detection Full ArticleAnomaly detection Full Article
Anomaly detection Full Article
 
Questions on Anomaly Detection
Questions on Anomaly DetectionQuestions on Anomaly Detection
Questions on Anomaly Detection
 

Recently uploaded

chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learningmisbanausheenparvam
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
power system scada applications and uses
power system scada applications and usespower system scada applications and uses
power system scada applications and usesDevarapalliHaritha
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
microprocessor 8085 and its interfacing
microprocessor 8085  and its interfacingmicroprocessor 8085  and its interfacing
microprocessor 8085 and its interfacingjaychoudhary37
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2RajaP95
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfAsst.prof M.Gokilavani
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx959SahilShah
 

Recently uploaded (20)

chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learning
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
power system scada applications and uses
power system scada applications and usespower system scada applications and uses
power system scada applications and uses
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
microprocessor 8085 and its interfacing
microprocessor 8085  and its interfacingmicroprocessor 8085  and its interfacing
microprocessor 8085 and its interfacing
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx
 

Summation Series

  • 1. Sums Notation: We will be working with sums of the general form 1 2 3 1n na a a a a     This form of representing sums is called three-dot notation. Other alternative notations are also available to represent sums. 1 k k n a    is called Sigma-notation because it uses the Greek letter  (sigma). 1 n k k a   is called delimited form to represent sums. For example, we can express the sum of the squares of all odd positive integers below 100 as follows: . The delimited equivalent of this sum is 49 2 0 (2 1) k k   . The biggest advantage of Sigma-notation is that we can manipulate it more easily than the delimited form. For example, suppose we want to change the index k to k+1. 1 1 1 k k k n k n a a        it is easy to see what is going one. But for delimited form, we have 1 1 1 0 n n k k k k a a       it is harder to see what is happed and more likely to make mistake. But delimited form is nice and tidy, we can write it quickly. People are often tempted to write 1 2 ( 1)( ) n k k k n k     instead of 0 ( 1)( ) n k k k n k    because the terms for k = 0, 1 and n in this sum are zero. But it is more helpful to keep upper and lower bounds on an index of summation as simple as possible, because sum can be manipulated much more easily when the bounds are simple. Indeed the form 1 2 n k   can even be ambiguous, because it’s meaning is not clear when n = 0 or n = 1. Sums and Recurrences: There is an intimate relation between sums and recurrences. The sum 0 n n k k S a    is equivalent to the recurrence 0 0S a 1n n nS S a  , for 0n   (1) Therefore, we can evaluate sums by using methods we learned earlier to solve recurrence in closed form. For example, if na is equal to a constant plus a multiple of n, the recurrence takes the following form: 0R  1n nR R n    , for 0n   (2) If we look after small cases to solve the above recurrence then we get 2 1 100 odd k k k   
  • 2. 1 0R R           2 1 2 2 2 3R R                     , 3 2 3 2 3 3 3 6R R                     and so on, in general the solution can be written in the form ( ) ( ) ( )nR A n B n C n     where A(n), B(n) and C(n) are coefficients of dependence on the general parameters , and   . Setting 1nR  in equation (2), we get 1 1 1 0 0 and 0n n                  hence ( ) 1A n  . Setting nR n in equation (2), we get 0 1 1 1 and 0n n n n                   hence ( )B n n . Again, setting 2 nR n in equation (2), we get 2 2 2 2 0 ( 1) 2 1 2 1 1 and 2n n n n n n n n n                             hence 2 2 2 ( ) ( ) 2 ( ) ( ) ( 1) 2 n C n B n n C n n n C n n        Putting the values of A(n), B(n) and C(n) we get the solution of equation (2) ( 1) 2 n n R n n      Therefore if we want to evaluate 0 ( ) n k a bk   , then we can write the sum as follows 0S a 1n nS S a bn   , for 0n  Comparing with general equation (2) with the above sum, we get , anda a b     . Thus 0 ( ) ( 1) ( 1) ( 1) ( 1)( ) 2 2 2 n k n n nb a bk a na n b a n n b n a              Conversely, many recurrences can be reduced to sums. For example, we are going to transfer the Tower of Hanoi recurrence solution into sums. 0 0T  12 1n nT T   , for 0n  Dividing both side by 2n , we get 0 0 0 0 2 2 T  1 1 1 2 1 2 2 2 2 2 nn n n n n n n T T T       , for 0n 
  • 3. Setting 2 n nn T S  , we get 0 0S  1 2 n n nS S    , for 0n  = ( 1) 2 2 2n n nS       = ( 2) ( 1) 3 2 2 2n n n nS           = ( 1) ( 2) ( 3) ( 2) ( 1) 2 2 2 2 2 2n n n n n n n n n n nS                       = 1 2 3 ( 2) ( 1) 0 2 2 2 2 2 2n n n S                = 1 2 n k k    We have derived sum from the Tower of Hanoi recurrence solution. Adding 0 2 with both side of the sum, we get 0 0 1 2 2 2 n k n k S      0 1 2 2 1 1 1 1 1 1 11 2 2 2 2 2 2n n nnS           1 11 2 1 11 2 n nS      1 12(1 ) 1 2nnS     11 2 2 n n n T    2 1n nT   The trick of dividing both-side by 2n in Tower of Hanoi recurrence to get fromn nS T is a special case of a general technique that can reduce virtually any recurrence of the form 1n n n n na T b T c   (3) to a sum. The idea is to multiple both sides by a summation faction, ns : 1n n n n n n n ns a T s b T s c  This factor ns is clearly chosen to make 1 1n n n ns b s a  Then if we write n n n nS s a T , we have a sum-recurrence 1 1 1 1 1n n n n n n n n n n n n n nS s b T s c s a T s c S s c          Hence, 1 2 1 1n n n n n n n n nS S s c S s c s c         0 1 1 2 2 1 1 0 0 0 0 1 1 0 1 1 1 n n n n n n n k k k k k k k k k S s c s c s c s c S s c s a T s c s bT s c                    
  • 4. The solution of the general recurrence is 1 1 0 1 1 ( ) n n n k k kn n n n S T s bT s c s a s a       (4) For example, when n = 1, then 1 1 0 1 1 1 0 1 1 1 1 1 ( ) ( )s bT s c bT c T s a a     . The value of 1s cancels out, so it can be anything but zero. To find out the right summation factor, ns we can unfold the relation 1 1 2 2 1 1 1 2 1 1 2 1 n n n n n n n n n n n n n s a s a a s a a a s b b b b b b                Thus, 1 2 1 2 1 n n n n n a a a s b b b       or any convenient constant multiple of this value, will be a suitable summation factor. To understand the whole process, we are going to apply these ideas to solve the average number of comparison steps required by quick-sort when it is applied to n items 0 0C  1 0 2 ( 1) n n k k C n C n       , for 0n   (5) We can find out some small cases from the above sum to guess the solution. 1 0(1 1) 2 2C C    2 0 1 2 (2 1) ( ) 3 2 5 2 C C C       With the intent to simplify the equation (5), we can multiply both sides by n 1 1 2 0 0 ( 1) 2 2 n n n k k k k nC n n C n n C            , for 0n   (6) hence, if we replace n by (n-1), we get 2 2 1 0 ( 1) ( 1) ( 1) 2 n n k k n C n n C           , for 1 0n    (7) Now, we can subtract equation (7) from equation (6) to get rid of  sign 1 2 2 2 1 0 0 ( 1) 2 ( 2 1) ( 1) 2 n n n n k k k k nC n C n n C n n n C                  , for 1n  2 2 2 2 1 0 0 2 2 2 1 1 2 n n k n k k k n n C C n n n C      Now, we are going to find out a suitable summation faction for the above recurrence. Here, na n , 1nb n  and 2nc n . Thus the summation faction, 1 2 2 1 1 3 2 ( 1) ( 2) 2 1 2 ( 1) 4 3 ( 1) n n n n n a a a a n n s b b b b n n n n                   . The solution to our recurrence according to equation (4), is therefore 0 1 1 ( 1) 2 2 1 [ (1 1) 2 ] 2( 1) 2 (1 1) 1 ( 1) 1 n n n k k n n C C k n n k k k               (8)             , for n 1  2n  2Cn1 , for n 11
  • 5. We can represent nC using Harmonic number, 1 1 1 1 1 1 1 2 3 1 n n k H n n k          To find out the closed form of quick-sort recurrence, we have to find out the summation portion of the equation. 1 1 1 1 1 1 1 1 1 1 1 1 1 1 (1 ) 1 1 2 3 1 2 3 1 1 1 n n n k k n n H k n n n n k n n                             Putting the value of summation in equation (8), we get 2( 1)[ ] 2( 1) 2 1 n n n n C n H n H n n        . We can check small cases to verify our solution 1 12(1 1) 2 1 4(1) 2 4 2 2C H         2 2 1 3 2(2 1) 2 2 6(1 ) 4 6 4 5 2 2 C H           3 3 1 1 11 44 26 2(3 1) 2 3 8(1 ) 6 8 6 6 2 3 6 3 3 C H              ☺Good Luck☺
  • 6. Sums Manipulation of Sums: Let P be any finite set of integers. Sums over the elements of P can be transformed by using three simple rules: Distributive Law: k k k P k P ca c a      (1) Associative Law: ( )k k k k k P k P k P a b a b          (2) Commutative Law: k m k P m P a a      (3) For example, if { 1,0,1}K   and m k  these three laws tell us respectively that 1 0 1 1 0 1( )ca ca ca c a a a       [Distributive Law] 1 1 0 0 1 1 1 0 1 1 0 1( ) ( ) ( ) ( ) ( )a b a b a b a a a b b b              [Associative Law] 1 0 1 1 0 1a a a a a a      [Commutative Law] Suppose, we want to compute the general sum, 0 ( ) k n S a bk     By using commutative law, we can replace k by n k , obtaining 0 ( ) 0 ( ( )) ( ) n k n k n S a b n k a bn bk             These two equations can be added by using associative law: 0 0 0 0 2 ( ) ( ) ( ) (2 ) k n k n k n k n S a bk a bn bk a bk a bn bk a bn                        Now, we can apply distributive law to evaluate the sum. 0 0 2 (2 ) (2 ) 1 (2 )( 1) (2 )( 1) ( )( 1) 2 2 k n k n S a bn a bn a bn n a bn n bn S a n                     Perturbation Method: This method is used to evaluate a sum in closed form. The operation of splitting off a term is the basis of this method. The idea is to start with an unknown sum and call it nS . 0 n k k n S a     Then, we rewrite 1nS  in two ways, by splitting off both its last term and its first term: 1 0 0 1 0 1 0 1 1 1 1 1 1 0 n n k k k k k n k n k n k n S a a a a a a a a                          Now, we try to represent the last in terms of nS and if we succeed then we obtain an equation whose solution is the sum we seek. For example, let’s use this technique to find out the sum, 0 k n k n S ax     . 1 0 1 1 1 1 1 1 0 n k k k n n k n k n k n S ax ax ax a ax a x ax a xS                     
  • 7. 1n n nS xS a ax      1 (1 ) 1 n n a x S x      , for 1x  Let’s try perturbation technique for another example. Evaluate 0 2k k n k    . Let, 0 2k n k n S k     1 0 1 1 1 0 0 0 0 0 ( 1) 2 0 2 ( 1) 2 2 2 2 2 2 2n k k k k k n k n k n k n k n k n S n k k k                                Let, 0 2k n k n R    . Now, first we find out the sum of nR , using the result we get nS finally. 1 0 1 0 0 2 2 2 1 2 2 1 2n k k n n k n k n R R              1 1 2 1 2 2 1 n n n n n R R R          Now, 1 1 2 0 0 ( 1) 2 2 2 2 2 2 2(2 1) 2 2 2n k k n n n n n k n k n S n k S S                    1 1 2 1 1 1 1 1 2 2 2 2 2 2 (1 2) 2 2 2 2 2 ( 1)2n n n n n n n n nS n n n n                       Try to prove that 1 2 2 0 ( 1) (1 ) n nn k k x n x nx kx x          using perturbation technique. ☺Good Luck☺