#separator:tab
#html:true
#notetype:Basic
#tags column:3
#deck:cracked.guide::TAOCP Vol 2::4.3.3 How Fast Can We Multiply?
#columns:Front	Back	Tags
TAOCP §4.3.3 How Fast Can We Multiply?: what does it cover?	Faster-than-schoolbook multiplication: splitting numbers in halves to trade a multiplication for additions (Karatsuba-style), Toom-Cook generalizations, and the Fourier transform approach that leads to Schonhage-Strassen.	cracked.guide cracked.guide::phase::taocp-2 cracked.guide::section::4.3.3 cracked.guide::kind::about
TAOCP §4.3.3: why does it matter?	These ideas are behind every fast bignum library and are a beautiful example of divide and conquer and of how the FFT connects to arithmetic.	cracked.guide cracked.guide::phase::taocp-2 cracked.guide::section::4.3.3 cracked.guide::kind::why
TAOCP §4.3.3, a common trap: “Recursing all the way down to single digits.” What's the catch?	Switch to schoolbook below a threshold.	cracked.guide cracked.guide::phase::taocp-2 cracked.guide::section::4.3.3 cracked.guide::kind::trap
TAOCP §4.3.3, exercise 1 (rated 22): what is it asking?	Karatsuba in decimal, by hand, on four-digit numbers.	cracked.guide cracked.guide::phase::taocp-2 cracked.guide::section::4.3.3 cracked.guide::kind::exercise
TAOCP §4.3.3, exercise 8 (rated M20): what is it asking?	Can you skip the bit reversal in the FFT? A common shortcut question.	cracked.guide cracked.guide::phase::taocp-2 cracked.guide::section::4.3.3 cracked.guide::kind::exercise
TAOCP §4.3.3, exercise 9 (rated M15): what is it asking?	Replacing the root of unity by a power of it. Checks you understand the transform.	cracked.guide cracked.guide::phase::taocp-2 cracked.guide::section::4.3.3 cracked.guide::kind::exercise
TAOCP §4.3.3, exercise 17 (rated M26): what is it asking?	Count exactly how many small products Karatsuba does.	cracked.guide cracked.guide::phase::taocp-2 cracked.guide::section::4.3.3 cracked.guide::kind::exercise
TAOCP §4.3.3, exercise 4 (rated 28, recommended): what is it asking?	Evaluate at symmetric points to speed up Toom-Cook.	cracked.guide cracked.guide::phase::taocp-2 cracked.guide::section::4.3.3 cracked.guide::kind::exercise
TAOCP §4.3.3, exercise 16 (rated 25, recommended): what is it asking?	A discrete Fourier transform of any length in n log n operations.	cracked.guide cracked.guide::phase::taocp-2 cracked.guide::section::4.3.3 cracked.guide::kind::exercise
TAOCP §4.3.3, exercise 19 (rated M23, recommended): what is it asking?	Compute u*v mod m with a bounded number of safe operations.	cracked.guide cracked.guide::phase::taocp-2 cracked.guide::section::4.3.3 cracked.guide::kind::exercise
TAOCP §4.3.3, exercise 18 (rated M30, recommended): what is it asking?	Schedule memory for recursive Karatsuba. The stretch, and a real implementation issue.	cracked.guide cracked.guide::phase::taocp-2 cracked.guide::section::4.3.3 cracked.guide::kind::exercise
TAOCP §4.3.3: how many exercises, and how are they rated?	19 exercises, rated M15 to M49.	cracked.guide cracked.guide::phase::taocp-2 cracked.guide::section::4.3.3 cracked.guide::kind::exercises
TAOCP §4.3.3: what should you be comfortable with first?	<ul><li>4.3.1 The Classical Algorithms</li><li>Divide and conquer, recursion</li></ul>	cracked.guide cracked.guide::phase::taocp-2 cracked.guide::section::4.3.3 cracked.guide::kind::prereqs
TAOCP §4.3.3: how should you work through it?	Implement the half-splitting method on top of your 4.3.1 bignums and find the crossover size where it beats schoolbook. Read the FFT part for ideas; implementing an FFT multiply is a stretch goal.	cracked.guide cracked.guide::phase::taocp-2 cracked.guide::section::4.3.3 cracked.guide::kind::approach
