Week 87 of 145 · TAOCP Vol 2: Seminumerical Algorithms

TAOCP 4.6.3 Evaluation of Powers

1 task, 3 steps. Open a task's steps to see exactly what to do; each guide has the detail.

Sign up or sign in to tick these off and give this week a due date.

By the end of this week you can

  • Trace right-to-left and left-to-right binary exponentiation, counting multiplications.
  • Compute short addition chains for small exponents by hand.
  • Recognize exponents where the binary method is not optimal.

Week 87 · Self-check

Three quick questions

Ungraded, and it never holds anything up. Pick an answer to see why.

  1. How many multiplications does the left-to-right binary method use for x^23 (23 = 10111 in binary)?
  2. Which is a valid addition chain for 9 (each entry the sum of two earlier entries, repeats allowed)?
  3. The right-to-left binary method computes x^13 (13 = 1101). Which partial results does Y take?

Nothing is saved while signed out.

Discussion

0 posts

Stuck on week 87, or finished early? Say what you tried and what happened. Hints over answers: full solutions go in a spoiler.

No posts yet. Ask a question or share a tip.

Sign in to postAnyone can read. Posting needs an account with a confirmed email.

Spot a mistake? Report it