HOME

TheInfoList



OR:

Petkovšek's algorithm (also Hyper) is a
computer algebra In mathematics and computer science, computer algebra, also called symbolic computation or algebraic computation, is a scientific area that refers to the study and development of algorithms and software for manipulating mathematical expression ...
algorithm that computes a basis of hypergeometric terms solution of its input linear recurrence equation with polynomial coefficients. Equivalently, it computes a first order right factor of linear
difference operator In mathematics, a recurrence relation is an equation according to which the nth term of a sequence of numbers is equal to some combination of the previous terms. Often, only k previous terms of the sequence appear in the equation, for a paramete ...
s with polynomial coefficients. This algorithm was developed by
Marko Petkovšek Marko Petkovšek is a Slovenian mathematician, born: 1955, working mainly in symbolic computation. He is a professor of discrete and computational mathematics at the University of Ljubljana. He completed his Ph.D. at Carnegie Mellon University u ...
in his PhD-thesis 1992. The algorithm is implemented in all the major computer algebra systems.


Gosper-Petkovšek representation

Let \mathbb be a
field Field may refer to: Expanses of open ground * Field (agriculture), an area of land used for agricultural purposes * Airfield, an aerodrome that lacks the infrastructure of an airport * Battlefield * Lawn, an area of mowed grass * Meadow, a grass ...
of characteristic zero. A nonzero sequence y(n) is called hypergeometric if the ratio of two consecutive terms is
rational Rationality is the quality of being guided by or based on reasons. In this regard, a person acts rationally if they have a good reason for what they do or a belief is rational if it is based on strong evidence. This quality can apply to an abil ...
, i.e. y (n+1) /y(n) \in \mathbb(n). The Petkovšek algorithm uses as key concept that this rational function has a specific representation, namely the ''Gosper-Petkovšek normal form''. Let r(n) \in \mathbb /math> be a nonzero rational function. Then there exist monic
polynomials In mathematics, a polynomial is an expression consisting of indeterminates (also called variables) and coefficients, that involves only the operations of addition, subtraction, multiplication, and positive-integer powers of variables. An example ...
a, b, c \in \mathbb /math> and 0 \neq z \in \mathbb such that r(n) = z \frac \frac and #\gcd (a(n), b(n+k)) = 1 for every nonnegative integer k \in \N, #\gcd (a(n), c(n))=1 and #\gcd ( b(n), c(n+1))=1. This representation of r(n) is called Gosper-Petkovšek normal form. These polynomials can be computed explicitly. This construction of the representation is an essential part of
Gosper's algorithm In mathematics, Gosper's algorithm, due to Bill Gosper, is a procedure for finding sums of hypergeometric terms that are themselves hypergeometric terms. That is: suppose one has ''a''(1) + ... + ''a''(''n'') = ''S''(''n'')& ...
. Petkovšek added the conditions 2. and 3. of this representation which makes this normal form unique.


Algorithm

Using the Gosper-Petkovšek representation one can transform the original recurrence equation into a recurrence equation for a polynomial sequence c(n). The other polynomials a(n),b(n) can be taken as the monic factors of the first coefficient polynomial p_0 (n) resp. the last coefficient polynomial shifted p_r(n-r+1). Then z has to fulfill a certain
algebraic equation In mathematics, an algebraic equation or polynomial equation is an equation of the form :P = 0 where ''P'' is a polynomial with coefficients in some field, often the field of the rational numbers. For many authors, the term ''algebraic equation ...
. Taking all the possible finitely many triples (a(n), b(n), z) and computing the corresponding polynomial solution of the transformed recurrence equation c(n) gives a hypergeometric solution if one exists. In the following pseudocode the degree of a polynomial p(n) \in \mathbb /math> is denoted by \deg (p (n)) and the coefficient of n^d is denoted by \text ( p(n), n^d ). algorithm petkovsek is input: Linear recurrence equation \sum_^r p_k(n) \, y (n+k) = 0, p_k \in \mathbb p_0, p_r \neq 0. output: A hypergeometric solution y if there are any hypergeometric solutions. for each monic divisor a(n) of p_0(n) do for each monic divisor b(n) of p_r(n-r+1) do for each k=0,\dots,r do \tilde_k (n)= p_k (n) \prod_^ a(n+j) \prod_^ b(n+i) d = \max_ \deg (\tilde_k (n)) for each root z of \sum_^r \text (\tilde_k (n), n^d ) z^k do Find non-zero polynomial solution c(n) of \sum_^r z^k \,\tilde_k(n) \, c(n+k)=0 if such a non-zero solution c(n) exists then r(n)=z \, a(n)/b(n) \, c(n+1)/c(n) return a non-zero solution y (n) of y (n+1) = r(n) \, y (n) If one does not end if a solution is found it is possible to combine all hypergeometric solutions to get a general hypergeometric solution of the recurrence equation, i.e. a generating set for the kernel of the recurrence equation in the linear span of hypergeometric sequences. Petkovšek also showed how the inhomogeneous problem can be solved. He considered the case where the right-hand side of the recurrence equation is a sum of hypergeometric sequences. After grouping together certain hypergeometric sequences of the right-hand side, for each of those groups a certain recurrence equation is solved for a rational solution. These rational solutions can be combined to get a particular solution of the inhomogeneous equation. Together with the general solution of the homogeneous problem this gives the general solution of the inhomogeneous problem.


Examples


Signed permutation matrices

The number of
signed permutation matrices In mathematics, a generalized permutation matrix (or monomial matrix) is a matrix with the same nonzero pattern as a permutation matrix, i.e. there is exactly one nonzero entry in each row and each column. Unlike a permutation matrix, where the no ...
of size n \times n can be described by the sequence y(n) which is determined by the recurrence equation4 (n+1)^2 \, y(n) + 2 \, y(n+1) + (-1) \, y(n+2) = 0over \Q. Taking a(n) = n+1,b(n)=1 as monic divisors of p_0 (n) = 4(n+1)^2, p_2(n) = -1 respectively, one gets z = \pm 2. For z=2 the corresponding recurrence equation which is solved in Petkovšek's algorithm is4(n+1)^2 \, c(n) + 4(n+1)\, c(n+1) - 4(n+1)(n+2) \, c(n+2) = 0.This recurrence equation has the polynomial solution c(n) = c_0 for an arbitrary c_0 \in \Q. Hence r(n)=2 (n+1) and y(n) = 2^n \, n! is a hypergeometric solution. In fact it is (up to a constant) the only hypergeometric solution and describes the number of signed permutation matrices.


Irrationality of \zeta(3)

Given the sum : a(n)=\sum_^n, coming from Apéry's proof of the irrationality of \zeta(3), Zeilberger's algorithm computes the linear recurrence : (n+2)^3 \, a(n+2)-(17n^2+51n+39)(2n+3) \, a(n+1)+(n+1)^3 \, a(n)=0. Given this recurrence, the algorithm does not return any hypergeometric solution, which proves that a(n) does not simplify to a hypergeometric term.


References

{{DEFAULTSORT:Petkovsek's algorithm Combinatorics