Download - Gosper’s Algorithm
-
Gospers AlgorithmBy Zachary Vogel
-
Binomial CoefficientsBinomial Coefficients
The Binomial Theorem
-
Pascals TriangleBase identity for Pascals Triangle11 11 2 11 3 3 11 4 6 4 15 10 10 5 11 6 15 20 15 6 1
-
Binomial IdentitiesParallel Summation identity
Negation identity
-
Binomial IdentitiesThere are volumes of identities with binomial coefficients. Here is one taken from a book:
Nanjundiahs identity
-
Visual of Parallel Summation11 11 2 11 3 3 11 4 6 4 11 5 10 10 5 11 6 15 20 15 6 1n=0
-
Visual of Parallel Summation11 11 2 11 3 3 11 4 6 4 11 5 10 10 5 11 6 15 20 15 6 1n=1
-
Visual of Parallel Summation11 11 2 11 3 3 11 4 6 4 15 10 10 5 11 6 15 20 15 6 1n=2
-
Visual of Parallel Summation11 11 2 11 3 3 11 4 6 4 15 10 10 5 11 6 15 20 15 6 1n=3
-
HypergeometricsHow to find some order in all these identities with binomial coefficients?
Hypergeometric notation can be used to standardize identities.
-
Notation
-
Hypergeometric Series
-
Special CasesExponential series
Geometric series
-
Hypergeometric TermsGeneral Form of a hypergeometric term
-
Successive TermsIf you take the ratio of successive terms of a hypergeometric series, the ratio is a rational polynomial of k.
If the ratio of successive terms form a rational function of k, then the series is hypergeometric up to a constant multiple.
-
Gospers Algorithm OverviewTakes a hypergeometric term and sums it indefinitelyExample
-
Gospers Algorithm OverviewThe algorithm determines if the sum is a multiple of another hypergeometric term
OR
It determines that the sum cannot be put in this form.
-
Gospers Algorithm Step 1We will assume that some such T(k) exists.
If we get an impossible situation, then no such T(k) exists.
The first step is to work out the term ratio of the summand t(k)
-
Term RatioWrite the term ratio for t(k)
where initially p(k) = 1We will pull out some factors of q and r into p.
-
Gospers Algorithm Step 1We require that q(k) and r(k) must have no factors
such that
-
Gospers Algorithm Step 1For ifthen divide out the factors from q(k) and r(k) and absorb those terms into p(k) as follows
p(k+1)/p(k) telescopes nicely.
-
Gospers Algorithm Step 2Cleverly sets(k) is some unknown function which will be the focus of the remainder of the algorithmIf we can determine what s(k) is, we can determine the final summation T(k).
-
Gospers Algorithm Step 2By applying we get
We look to solve for s(k).
-
Unknown function s(k)In order to determine T(k) we must solve for s(k). This requires a few steps
Determine that s(k) is a rational function of k
Determine that s(k) is a polynomial in k
Determine a bound on the degree of s(k)
-
s(k) is a rational function of kBy substitution
and
With the left hand side a rational function of k, and p(k) and r(k) are polynomials, s(k) must be a rational function of k
-
s(k) is a polynomialKnowing s(k) is a rational function of k, we can write it as the quotient of polynomials
such that f(k) and g(k) have no common factor
we will also assume that g(k) has a root, then find a contradictionany polynomial without a root is just a constant, so s(k) will, itself, be a polynomial
-
s(k) is a polynomialSuppose that g(a) = g(b) = 0, and b-a is a nonnegative integer. (In particular, we might have a = b).Since
We have
-
s(k) is a polynomialSubstitute a=k+1, and separately b = k, we get:
Since f and g have no common root,
So either g(a-1)=0, or g(b+1)=0, or both r(a-1) = q(b) = 0.
The last choice is impossible by construction.
-
s(k) is a polynomialWe now know that g(b+1) or g(a-1) is a rootBy repeating this argument with a-1 and b, or a and b+1, we get infinitely many roots for g(k).Therefore, g(k) has no root, thus is a constant. So s(k) is, itself a polynomial.
-
Bounding degree of s(k)If we know a bound to the degree d of s(k), then we can solve it by a system of d+1 linear equations, as given by the equation:
-
Bounding degree of s(k)By manipulating our previous equations, it can be seen that
WithWe also Knowchange to
-
Bounding degree of s(k)Now if Then the degree of the RHS will beTherefore,
Otherwise, one of two options will occuri)
ii)remove RHS
-
Solving s(k)Knowing the degree of s(k), solve
Then simply plug the known s(k) into
-
Example of Gospers AlgorithmTo provide an example of Gospers algorithm at work we will attempt to solve the negation identity
To begin we set our t(k) to the summand
-
Negation IdentityNow by setting up a term ratio we will arrive at values for r(k), q(k) and p(k):
This satisfies the conditions on r(k) and q(k), so long as n is non-negative.
-
Negation IdentityThe next step is to determine s(k).We can bound the degree by calculating R(k) and Q(k)
-
Negation IdentitySince deg(R(k)) > deg(Q(k)), we have two options: d=0 or d=n. We will try d = 0 first.
So
-
Solution to negation identityNow we know our s(k) = -1/n, so we plug in to get T(k):
-
Solution to negation identitySo Gospers algorithm gives the identity