Summary of Lecture 5
Complexity of arithmetic operations:
- : bit operations
- : bit operations
- : bit operations
Complexity of arithmetic operations modulo
- : bit operations
- : bit operations
Modular exponentiation:
- Square:
- Multiply:
- : bit operations
Time-lock puzzle: intrinsically sequential computations
- The puzzle:
// is the product of two unequal primes - The solution: $$
- The computing process:
- Solved in << 35 years
- There have been hardware and software advances beyond what I predicted in 1999
- The resources required to do a single squaring have been reduced by much more
- underestimated how fast computing technology would become
Encrypting to the future:
- Given and , find
Euclidean Algorithm (EA)
ALGORITHM: compute
- Input: ()
- Output:
- Observation: if , then
- output
Correctness:
| | |
|---|
| 0 | 12345 | |
| 1 | 123 | 000 |
| 2 | 45 | 2 |
| 3 | 33 | 1 |
| 4 | 12 | 2 |
| 5 | 9 | 1 |
| 6 | 3 | 3 |
| 7 | 0 | |
Extended Euclidean Algorithm (EEA)
ALGORITHM:
- Input: ()
- Output:, integers such that
- output
EXAMPLE: Execution of the EEA on input
| | | | |
|---|
| 0 | 12345 | | 1 | 0 |
| 1 | 123 | 100 | 0 | 1 |
| 2 | 45 | 2 | 1 | -100 |
| 3 | 33 | 1 | -2 | 201 |
| 4 | 12 | 2 | 3 | -301 |
| 5 | 9 | 1 | -8 | 803 |
| 6 | 3 | 3 | 11 | -1104 |
| 7 | 0 | | | |
Correctness: We have that for
Complexity
THEOREM: Let . Then in EA and EEA.
- We show that for
- :
- Suppose that for
Complexity of EA and EEA: bit operations // divisions
RSA Implementation
Randomly choose an integer from the interval and test if this integer is a prime.
How many primes in ?
Chebyshev’s Theorem
DEFINITION: For , : the number of primes
// sum over primes
Notations: Big O, Big Omega, and Big Theta. For a positive function , define
THEOREM (Chebyshev, 1850).
LEMMA: Suppose that . Then and .
: the exponent of in the prime factorization of
// , e.g.,
LEMMA: Suppose that is a prime and . Then
- proof: see hw1, question 3 (2)
- Example:
//
THEOREM: Let and . Then $$.
- : consider the number
// 0,1
// there are terms:
- :
is increasing when
这个算法例子里的数字有点大
模运算复杂度这块没太懂,有人能讲讲吗
时间锁谜题这概念有点酷啊
切比雪夫定理证明部分看晕了
欧几里得算法例子讲得还行。
例子确实挺直观的
复杂度分析这块还是有点抽象
同感,这块确实绕
EEA的例子表格列得蛮清楚
那个表格确实直观
这个欧几里得算法例子举得挺直观的
时间锁谜题这概念挺酷的
我也觉得这个概念很酷
切比雪夫定理这块有点懵,回头再看一遍。
欧几里得算法这个复杂度推导太绕了,看了三遍才懂😵