In computational number theory and computational algebra, Pollard's kangaroo algorithm (also Pollard's lambda algorithm, see Naming below) is an algorithm for solving the discrete logarithm problem. The algorithm was introduced in 1978 by the number theorist John M. Pollard, in the same paper as his better-known Pollard's rho algorithm for solving the same problem. Although Pollard described the application of his algorithm to the discrete logarithm problem in the multiplicative group of units modulo a prime p, it is in fact a generic discrete logarithm algorithm—it will work in any finite cyclic group.
Suppose
G
n
\alpha
x
\beta
\alpha
x\inZn
\alphax=\beta
x
[a,\ldots,b]\subsetZn
a=0
b=n-1
1. Choose a set
S
\sqrt{b-a}
f:G → S
2. Choose an integer
N
\{x0,x1,\ldots,xN\}
x0=\alphab
xi+1=
f(xi) | |
x | |
i\alpha |
fori=0,1,\ldots,N-1
d=
N-1 | |
\sum | |
i=0 |
f(xi).
xN=
d | |
x | |
0\alpha |
=\alphab+d.
\{y0,y1,\ldots\}
y0=\beta
yi+1=
f(yi) | |
y | |
i\alpha |
fori=0,1,\ldots,N-1
\{d0,d1,\ldots\}
dn=
n-1 | |
\sum | |
i=0 |
f(yi)
yi=
di | |
y | |
0\alpha |
=
di | |
\beta\alpha |
fori=0,1,\ldots,N-1
\{yi\}
\{di\}
A)
yj=xN
j
\{xi\}
\{yj\}
xN=yj ⇒ \alphab+d=
dj | |
\beta\alpha |
⇒ \beta=
b+d-dj | |
\alpha |
⇒ x\equivb+d-dj\pmod{n}
and so we are done.
B)
di>b-a+d
x
S
f
Pollard gives the time complexity of the algorithm as
O(\sqrt{b-a})
f
a,b
O(logb)
O(b-a)
The algorithm is well known by two names.
The first is "Pollard's kangaroo algorithm". This name is a reference to an analogy used in the paper presenting the algorithm, where the algorithm is explained in terms of using a tame kangaroo to trap a wild kangaroo. Pollard has explained that this analogy was inspired by a "fascinating" article published in the same issue of Scientific American as an exposition of the RSA public key cryptosystem. The article described an experiment in which a kangaroo's "energetic cost of locomotion, measured in terms of oxygen consumption at various speeds, was determined by placing kangaroos on a treadmill".
The second is "Pollard's lambda algorithm". Much like the name of another of Pollard's discrete logarithm algorithms, Pollard's rho algorithm, this name refers to the similarity between a visualisation of the algorithm and the Greek letter lambda (
λ
\{xi\}
\{yi\}
Pollard has expressed a preference for the name "kangaroo algorithm", as this avoids confusion with some parallel versions of his rho algorithm, which have also been called "lambda algorithms".
d:Q102271025
. Prasad V. . Tetali . Prasad V. Tetali . 2010-11-07 . 2009-05-31 . Proceedings of the forty-first annual ACM symposium on Theory of computing (STOC 2009) . 10.1145/1536414.1536490 . 12797847 . 0812.0789 . 553–560 . 2023-08-20 . live . https://web.archive.org/web/20230820105311/https://faculty.uml.edu/rmontenegro/research/kangaroo-journal.pdf . 2023-08-20.