原书出处
Introduction to Algorithms, Fourth Edition
31 第31章 数论算法
These coefficients will prove useful later for computing modular multiplicative inverses.
The procedure EXTENDED-EUCLID takes as input a pair of nonnegative integers and returns a triple of the form (d, x, y) that satisfies equation (31.16). As an example, Figure 31.1 traces out the call EXTENDED-EUCLID(99, 78). EXTENDED-EUCLID(a, b) 1 if b == 0 2 return (a, 1, 0) 3 else (d′, x′, y′) = EXTENDED-EUCLID(b, a
mod b) 4 (d, x, y) = (d′, y′, x′ – ⌊a/b⌋ y′) 5 return (d, x, y) The EXTENDED-EUCLID proce
原书定位详情
来源:a19c7933-4eda-4176-aebd-30fe7e1ad292
正文位置:extracted/Introduction to Algorithms, Fourth Edition/_epub-src/OEBPS/chapter031.xhtml
EPUB SHA-256:ec7ced04bb875b93983816aef7a667855a4b71c5cf53b63406b9439c74e27aea