Successfully reported this slideshow.
Upcoming SlideShare
×

# 大きな数の素因数分解がしたいっ！！！ #日曜数学会 in 札幌

1,804 views

Published on

2016年2月21日に開催の 第１回日曜数学会 in 札幌 で発表したスライドです。
「二次ふるい法」を用いて、大きな数の素因数分解をするための方法について紹介しました。

ソースコード（Ruby）：
mpqs.rb
https://gist.github.com/junpeitsuji/5b515578941a23686953

https://gist.github.com/junpeitsuji/b371dce4b402e550085c

Published in: Education
• Full Name
Comment goes here.

Are you sure you want to Yes No

Are you sure you want to  Yes  No

Are you sure you want to  Yes  No

Are you sure you want to  Yes  No

### 大きな数の素因数分解がしたいっ！！！ #日曜数学会 in 札幌

1. 1. ＠tsujimotter
2. 2. 391961320150251294647
3. 3. Simple is best!!!
4. 4. 391961320150251294647 / 2 = 391961320150251294647 / 3 = 391961320150251294647 / 5 = 391961320150251294647 / 7 = 391961320150251294647 / 11 = …
5. 5. 391961320150251294647 / 2 = 391961320150251294647 / 3 = 391961320150251294647 / 5 = 391961320150251294647 / 7 = 391961320150251294647 / 11 = …
7. 7. X2 – Y2 n (X – Y), (X – Y) n n X2 – Y2 = (X – Y)(X + Y)
8. 8. X2 – Y2 = n ∴ X2 – n = Y2
9. 9. X X2 – Y2 = n ∴ X2 – n = Y2 X2 – n = ( )
10. 10. n = 112373 X2 – n = ( ) 3362 – 112373 = 5231 3372 – 112373 = 22 x 131 x 231 3382 – 112373 = 18711
11. 11. n = 112373 X2 – n = ( ) 3362 – 112373 = 5231 3372 – 112373 = 22 x 131 x 231 3382 – 112373 = 18711
12. 12. # 2 3372 – 112373 = 22 x 131 x 231 　 # 4 3392 – 112373 = 22 x 72 x 131 # 18 3532 – 112373 = 22 x 71 x 191 x 231 # 84 4172 – 112373 = 22 x 71 x 133 #112 4452 – 112373 = 22 x 72 x 191 x 231
13. 13. # 2 3372 – 112373 = 22 x 131 x 231 　 # 4 3392 – 112373 = 22 x 72 x 131 # 18 3532 – 112373 = 22 x 71 x 191 x 231 # 84 4172 – 112373 = 22 x 71 x 133 #112 4452 – 112373 = 22 x 72 x 191 x 231 = 28 x 76 x 134 x 192 x 232 =(24 x 73 x 132 x 191 x 23)2 = 4053052642
14. 14. x1 2 – n = p1p2 x2 2 – n = p2p3 x3 2 – n = p1 p3 (x1 2–n) (x2 2–n) (x3 2–n) = (p1 2p2 2p3 2) (x1x2x3)2 + n ( ) = (p1p2p3)2 Y2 X2
15. 15. x1 2 – n = p1p2 x2 2 – n = p2p3 x3 2 – n = p1 p3 (x1 2–n) (x2 2–n) (x3 2–n) = (p1 2p2 2p3 2) (x1x2x3)2 + n ( ) = (p1p2p3)2 Y2 X2
16. 16. x1 2 – n = p1p2 x2 2 – n = p2p3 x3 2 – n = p1 p3 (x1 2–n) (x2 2–n) (x3 2–n) = (p1 2p2 2p3 2) (x1x2x3)2 + n ( ) = (p1p2p3)2 Y2 X2
17. 17. x1 2 – n = p1p2 x2 2 – n = p2p3 x3 2 – n = p1 p3 (x1 2–n) (x2 2–n) (x3 2–n) = (p1 2p2 2p3 2) (x1x2x3)2 + n ( ) = (p1p2p3)2 X2 Y2
18. 18. x1 2 – n = p1p2 x2 2 – n = p2p3 x3 2 – n = p1 p3 (x1 2–n) (x2 2–n) (x3 2–n) = (p1 2p2 2p3 2) (x1x2x3)2 + n ( ) = (p1p2p3)2 X2 Y2 X2 – Y2 = n ( )
19. 19. 222060068552 – 4053052642 = 112373 ( ) (22206006855 – 405305264) x (22206006855 + 405305264) 21800701591 x 22611312119 = = n
20. 20. 222060068552 – 4053052642 = 112373 ( ) (22206006855 – 405305264) x (22206006855 + 405305264) 21800701591 x 22611312119 = = n
21. 21. 222060068552 – 4053052642 = 112373 ( ) (22206006855 – 405305264) x (22206006855 + 405305264) 21800701591 x 22611312119 = = 112373
22. 22. 21800701591 112373 21800701591 = 194003 x 112373 + 2472 112373 = 45 x 2472 + 1133 2472 = 2 x 1133 + 206 1133 = 5 x 206 + 103
23. 23. 21800701591 112373 21800701591 = 194003 x 112373 + 2472 112373 = 45 x 2472 + 1133 2472 = 2 x 1133 + 206 1133 = 5 x 206 + 103
24. 24. 21800701591 112373 21800701591 = 194003 x 112373 + 2472 112373 = 45 x 2472 + 1133 2472 = 2 x 1133 + 206 1133 = 5 x 206 + 103
25. 25. 21800701591 112373 21800701591 = 194003 x 112373 + 2472 112373 = 45 x 2472 + 1133 2472 = 2 x 1133 + 206 1133 = 5 x 206 + 103
26. 26. 112373 103
27. 27. p-1
28. 28. 391961320150251294647
29. 29. 391961320150251294647 = 182521213001 x 2147483647
30. 30. Script is here! GitHub Gist https://gist.github.com/junpeitsuji/ 5b515578941a23686953
31. 31. x2 - n = kp ✓ n p ◆ = 1 p X X2 – n = ( )
32. 32. n = 15347 X2 – n = ( ) 1242 – 15347 = 291 1252 – 15347 = 21 x 1391 1262 – 15347 = 232
33. 33. 1262 – 232 = 15347 (126 - 23)(126 + 23) = 15347 103 x 149 = 15347