Week 82 of 145 · TAOCP Vol 2: Seminumerical Algorithms

TAOCP 4.5.1 and 4.5.2

2 tasks, 6 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

  • Use gcds of partial terms to add and multiply fractions without overflow.
  • Implement Euclid's, binary and extended gcd algorithms.
  • Compute modular inverses from extended Euclid's coefficients.

Week 82 · Self-check

Three quick questions

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

  1. What is 7/12 + 5/18 in lowest terms?
  2. Extended Euclid on 240 and 46 finds u, v with 240u + 46v = gcd(240, 46) = 2. Which pair works?
  3. The binary gcd algorithm runs on 48 and 18. How many common factors of 2 does it pull out, and what is the gcd?

Nothing is saved while signed out.

Watch along

Free talks and lectures that go with this week, on the speakers' own channels. Optional.

Discussion

0 posts

Stuck on week 82, 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