# 1 Lehmer GCD 五個停止條件 張圻毓. 2 Outline Lehmer[1938] Collins[1980] Jebelean[1993] Vallee[2004] Wang[2003]

## Presentation on theme: "1 Lehmer GCD 五個停止條件 張圻毓. 2 Outline Lehmer[1938] Collins[1980] Jebelean[1993] Vallee[2004] Wang[2003]"— Presentation transcript:

1 1 Lehmer GCD 五個停止條件 張圻毓

2 2 Outline Lehmer[1938] Collins[1980] Jebelean[1993] Vallee[2004] Wang[2003]

3 3 Lehmer[1938] q= q’= If q ≠ q’ stop

4 4 Example U = 768,454,923 V = 542,167,814 b = 10 3 New U = 89,593,596 V = 47,099,917 x’y’x”y”ax 0 +by 0 cx 0 +dy 0 q’q” 7695427685431x 0 +0y 0 0x 0 +1y 0 11 5422275432250x 0 +1y 0 1x 0 -1y 0 22 22788225931x 0 -1y 0 -2x 0 +3y 0 22 88519339-2x 0 +3y 0 5x 0 -7y 0 12

5 5 Collins[1980] & Jebelean[1993] v i < |b i+1 | or u i - v i < |b i+1 - b i | If i 為奇數 : v i < - b i+1 or u i – v i < a i+1 - a i If i 為偶數 : v i < - a i+1 or u i – v i < b i+1 - b i

6 6 Example U = 768,454,923 V = 542,167,814 q 1 = 768/542 = 1 (a 0,b 0 ) = (1,0) (a 1,b 1 ) = (0,1) (a 2,b 2 ) = (1,0) – (0,1) = (1,-1) New (u,v) = (542, 226) 判斷 odd v i < - b i+1 or u i – v i < a i+1 – a i 不合 q 2 = 542/226 = 2 (a 3,b 3 ) = (0,1) – 2(1,-1) = (-2,3) New (u,v) = (226, 90) 判斷 even v i < - a i+1 or u i – v i < b i+1 – b i 不合

7 7 Example q 3 = 226/90= 2 (a 4,b 4 ) = (1,-1) – 2(-2,3) = (5,-7) New (u,v) = (90, 46) 判斷 odd v i < - b i+1 or u i – v i < a i+1 – a i 不合 q 4 = 90/46 = 1 (a 5,b 5 ) = (-2,3) – 1(5,-7) = (-7,10) New (u,v) = (46, 44) 判斷 even v i < - a i+1 or u i – v i < b i+1 – b i 合

8 8 Vallee[2004] If a j > then Q i =q i for all i ≦ j-2 Example: u = 768 v = 542 (a 0,b 0 ) = (1,0) (a 1,b 1 ) = (0,1) While 542 > √ 768( ≒ 27) do q 1 = u div v = 1 new u = u mod v = 226 a 2 = -a 1 q 1 +a 0 = 1 b 2 = -b 1 q 1 +b 0 = -1 i+1=2

9 9 Example u = 542 v = 226 While 226 > √ 768 do q 2 = u div v = 2 new u = 90 a 3 = -2 b 3 = 3 u = 226 v = 90 While 90 > √ 768 do q 3 = u div v = 2 new u = 46 a 4 = 5 b 4 = -7

10 10 Example u = 90 v = 46 While 46 > √ 768 do q 4 = u div v = 1 new u = 44 a 5 = -7 b 5 = 10 u = 46 v = 44 While 44 > √ 768 do q 5 = u div v = 1 new u = 2 a 6 = 12 b 6 = -17 while 2 < √ 768 stop

11 11 Wang[2003] New u i+2 ≧ |q i+1 | or New U i+2 ≧ λ|Q i+1 | New u ≧ 2|q i+2 |*|q i+1 | or m ≧ 2λ|Q i+2 |*|Q i+1 |

12 12 Wang[2003]

Similar presentations