O'Reilly logo

Art of Computer Programming, The: Volume 1: Fundamental Algorithms by Donald E. Knuth

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Exercises

1. [02] Consider the transformation of {0, 1, 2, 3, 4, 5, 6} that replaces x by 2x mod 7. Show that this transformation is a permutation, and write it in cycle form.

2. [10] The text shows how we might set (a, b, c, d, e, f) ← (c, d, f, b, e, a) by using a series of replacement operations (xy) and one auxiliary variable t. Show how to do the job by using a series of exchange operations (x ↔ y) and no auxiliary variables.

3. [03] Compute the product Image, and express the answer in two-line notation. (Compare with Eq. (4).)

4. [10] Express (a b d)(e f) (a c f) (b d) as a product of disjoint cycles.

    5. [M10] Equation (3) shows several ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required