ArticleslgStudy

computer science

Pollard's kangaroo algorithm

Pollard's kangaroo algorithm is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Pollard's kangaroo algorithm rather than just read about it. In short: 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.

Key takeaways

  • Pollard's kangaroo algorithm belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Pollard's kangaroo algorithm to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Pollard's kangaroo algorithm from memory before moving on to harder problems.

Reference excerpt

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.

Algorithm Suppose G is a finite cyclic group of order n which is generated by the element α, and we seek to find the discrete logarithm x of the element β to the base α. In other words, one seeks x∈ℤn such that αx=β. The lambda algorithm allows one to search for x in some interval [a,…,b]⊂ℤn. One may search the entire range of possible logarithms by setting a=0 and b=n−1. 1. Choose a set S of positive integers of mean roughly b−a and define a pseudorandom map f:G→S. 2. Choose an integer N and compute a sequence of group elements {x0,x1,…,xN} according to:

x0=αb xi+1=xiαf(xi) for i=0,1,…,N−1 3. Compute

d=∑i=0N−1f(xi). Observe that:

xN=x0αd=αb+d. 4. Begin computing a second sequence of group elements {y0,y1,…} according to:

y0=β yi+1=yiαf(yi) for i=0,1,…,N−1 and a corresponding sequence of integers {d0,d1,…} according to:

dn=∑i=0n−1f(yi). Observe that:

yi=y0αdi=βαdi for i=0,1,…,N−1 5. Stop computing terms of {yi} and {di} when either of the following conditions are met:

A) yj=xN for some j. If the sequences {xi} and {yj} "collide" in this manner, then we have: xN=yj⇒αb+d=βαdj⇒β=αb+d−dj⇒x≡b+d−dj(modn) and so we are done. B) di>b−a+d. If this occurs, then the algorithm has failed to find x. Subsequent attempts can be made by changing the choice of S and/or f.

Complexity Pollard gives the time complexity of the algorithm as O(b−a), using a probabilistic argument based on the assumption that f acts pseudorandomly. Since a,b can be represented using O(log⁡b) bits, this is exponential in the problem size (though still a significant improvement over the trivial brute-force algorithm that takes time O(b−a)). For an example of a subexponential time discrete logarithm algorithm, see the index calculus algorithm.

Naming 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 (λ). The shorter stroke of the letter lambda corresponds to the sequence {xi}, since it starts from the position b to the right of x. Accordingly, the longer stroke corresponds to the sequence {yi}, which "collides with" the first sequence (just like the strokes of a lambda intersect) and then follows it subsequently. 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".

See also Dynkin's card trick Kruskal count Rainbow table

References

Further reading Montenegro, Ravi [at Wikidata]; Tetali, Prasad V. (2010-11-07) [2009-05-31]. How Long Does it Take to Catch a Wild Kangaroo? (PDF). Proceedings of the forty-first annual ACM symposium on Theory of computing (STOC 2009). pp. 553–560. arXiv:0812.0789. doi:10.1145/1536414.1536490. S2CID 12797847. Archived (PDF) from the original on 2023-08-20. Retrieved 2023-08-20.

Worked examples

Example 1 — a first encounter with Pollard's kangaroo algorithm

Start with the simplest possible case. Write down what Pollard's kangaroo algorithm claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Pollard's kangaroo algorithm before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Pollard's kangaroo algorithm ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Pollard's kangaroo algorithm

In research
Pollard's kangaroo algorithm appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Pollard's kangaroo algorithm in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Pollard's kangaroo algorithm is common in secondary-school and first-year university syllabi. It links to neighbouring topics Computer algebra, Logarithms, Number theoretic algorithms, so understanding it makes those chapters shorter.
In everyday life
Look for Pollard's kangaroo algorithm outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Pollard's kangaroo algorithm” →

How to study Pollard's kangaroo algorithm in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Pollard's kangaroo algorithm means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Pollard's kangaroo algorithm out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Pollard's kangaroo algorithm in simple terms?

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.

Why does Pollard's kangaroo algorithm matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Pollard's kangaroo algorithm?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Pollard's kangaroo algorithm.

Tags

  • Computer algebra
  • Logarithms
  • Number theoretic algorithms

Keep exploring