SlideShare ist ein Scribd-Unternehmen logo
1 von 7
Downloaden Sie, um offline zu lesen
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☺

Weitere ähnliche Inhalte

Was ist angesagt?

Data Representation
Data RepresentationData Representation
Data Representation
Rick Jamil
 
Cmp104 lec 2 number system
Cmp104 lec 2 number systemCmp104 lec 2 number system
Cmp104 lec 2 number system
kapil078
 
Binary Arithmetic
Binary ArithmeticBinary Arithmetic
Binary Arithmetic
gavhays
 

Was ist angesagt? (20)

Representation of Real Numbers
Representation of Real NumbersRepresentation of Real Numbers
Representation of Real Numbers
 
Data Representation
Data RepresentationData Representation
Data Representation
 
Cmp104 lec 2 number system
Cmp104 lec 2 number systemCmp104 lec 2 number system
Cmp104 lec 2 number system
 
Gauss jordan and Guass elimination method
Gauss jordan and Guass elimination methodGauss jordan and Guass elimination method
Gauss jordan and Guass elimination method
 
Number System
Number SystemNumber System
Number System
 
Solving linear homogeneous recurrence relations
Solving linear homogeneous recurrence relationsSolving linear homogeneous recurrence relations
Solving linear homogeneous recurrence relations
 
Number System
Number SystemNumber System
Number System
 
Volumes of solids of revolution dfs
Volumes of solids of revolution dfsVolumes of solids of revolution dfs
Volumes of solids of revolution dfs
 
K map
K map K map
K map
 
Cubic Spline Interpolation
Cubic Spline InterpolationCubic Spline Interpolation
Cubic Spline Interpolation
 
Number system
Number systemNumber system
Number system
 
Number system
Number systemNumber system
Number system
 
Distance Between Two Points.pptx
Distance Between Two Points.pptxDistance Between Two Points.pptx
Distance Between Two Points.pptx
 
binary number system
 binary number system binary number system
binary number system
 
Section 10: Lagrange's Theorem
Section 10: Lagrange's TheoremSection 10: Lagrange's Theorem
Section 10: Lagrange's Theorem
 
20 sequences x
20 sequences x20 sequences x
20 sequences x
 
Initial value problems
Initial value problemsInitial value problems
Initial value problems
 
Coordinates (Mathematics 5)
Coordinates (Mathematics 5)Coordinates (Mathematics 5)
Coordinates (Mathematics 5)
 
Number system conversion
Number system conversionNumber system conversion
Number system conversion
 
Binary Arithmetic
Binary ArithmeticBinary Arithmetic
Binary Arithmetic
 

Ähnlich wie Summation Series

Analysis Of Algorithms Ii
Analysis Of Algorithms IiAnalysis Of Algorithms Ii
Analysis Of Algorithms Ii
Sri Prasanna
 
Binomial Theorem
Binomial TheoremBinomial Theorem
Binomial Theorem
itutor
 
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
amnahnura
 
Catalan number edit
Catalan number editCatalan number edit
Catalan number edit
susuksak
 

Ähnlich wie 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
 
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
 
Sol80
Sol80Sol80
Sol80
 

Mehr von 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
 

Kürzlich hochgeladen

AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
ankushspencer015
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
rknatarajan
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Christo Ananth
 

Kürzlich hochgeladen (20)

MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
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...
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGMANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
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
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and Properties
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 

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☺