← 返回卡片

原书出处

Introduction to Algorithms, Fourth Edition

31 第31章 数论算法

Fourth edition · 核验版本的摘录快照 · 导入于 2026-10-23T08:18:08.762Z

l for randomly chosen integers n. The following theorem presents a more precise argument.

Theorem 31.39 If n is an odd composite number, then the number of witnesses to the compositeness of n is at least (n – 1)/2. Proof The proof shows that the number of nonwitnesses is at most (n – 1)/2, which implies the theorem. We start by claiming that any nonwitness must be a member of . Why? Consider any nonwitness a. It must satisfy an–1 = 1 (mod n) or, equivalently, a · an−2 = 1 (mod n). Thus the equation ax = 1 (mod n) has a solution, namely an−2. By Corollary 31.21 on page 924, gcd(a, n) | 1, which in turn implies that gcd(a, n) = 1.

Therefore, a is a member of , and all nonwitnesses belong to . To complete the proof, we

此预览只包含定位所需的摘录和上下文。

原书定位详情

来源:a19c7933-4eda-4176-aebd-30fe7e1ad292

正文位置:extracted/Introduction to Algorithms, Fourth Edition/_epub-src/OEBPS/chapter031.xhtml

EPUB SHA-256:ec7ced04bb875b93983816aef7a667855a4b71c5cf53b63406b9439c74e27aea