| STUDIO KAMADA | Japanese to English by @nifty |
| Msieveの使い方 |
|---|
MsieveはMPQS法(the self-initializing Multiple Polynomial Quadratic Sieve;自己初期化複数多項式二次ふるい法)とGNFS法(the General Number Field Sieve;一般数体ふるい法)を用いる素因数分解プログラムです。前処理としてP-1法、P+1法、ECM(Elliptic Curve Method; 楕円曲線法)なども実装しており、さまざまな数に柔軟に対応します。作者はJason Papadopoulosさんです。
GMP-ECMの使い方を参照してCygwinとGMPとGMP-ECMをインストールしておきます。
これを書いている時点でMsieveの最新版は1.43です。
MsieveはソースコードとWin32用バイナリの形で配布されています。
Msieve | Get Msieve at SourceForge.netからソースコードのアーカイブmsieve143.tar.gzをダウンロードしてきて展開します。
~> tar zxf msieve143.tar.gz ~> cd msieve-1.43 ~/msieve-1.43>
makeします。Intel/AMDの32ビット環境は「make x86 ECM=1」、64ビット環境は「make x86_64 ECM=1」、その他は「make generic ECM=1」です。
~/msieve-1.43> make x86 ECM=1(Intel/AMDの32ビット環境のとき)またはmake x86_64 ECM=1(Intel/AMDの64ビット環境のとき)
できた実行ファイルmsieveまたはmsieve.exeをカレントディレクトリかパスの通っているディレクトリにコピーして使います。
Msieveは分解したい数(を表す式)をコマンドラインに書くだけで分解してくれます。式を書くときは"〜"で囲みます。
~/msieve-1.43> ./msieve オプション "分解したい数を表す式"
-s 中間ファイル名-l ログファイル名-i 入力ファイル名-m-q-d デッドライン(分)-r relationの数の上限-p-v-t スレッド数の上限-e-c-n-nf factor baseファイル名-np [X,Y]-ns [X,Y]-nc-nc1 [X,Y]-nc2-ncr-nc3 [X,Y]Ctrl-Cで中断できます。中間ファイルmsieve.datが残っていると直前に中断した分解を途中から再開できます。
オプションを指定しなければ結果はログファイルmsieve.logに追記されます。
~/msieve-1.42> ./msieve -e -p -q -v "10^63-9"
Msieve v. 1.42
Mon Jul 20 14:32:24 2009
random seeds: a5a155c4 f087f017
factoring 999999999999999999999999999999999999999999999999999999999999991 (63 digits)
searching for 15-digit factors
commencing quadratic sieve (63-digit input)
using multiplier of 1
using 64kb Opteron sieve core
sieve interval: 6 blocks of size 65536
processing polynomials in batches of 17
using a sieve bound of 105107 (5000 primes)
using large prime bound of 5255350 (22 bits)
using trial factoring cutoff of 22 bits
polynomial 'A' values have 8 factors
sieving in progress (press Ctrl-C to pause)
5171 relations (2308 full + 2863 combined from 24157 partial), need 5096
5171 relations (2308 full + 2863 combined from 24157 partial), need 5096
sieving complete, commencing postprocessing
begin with 26465 relations
reduce to 7649 relations in 2 passes
attempting to read 7649 relations
recovered 7649 relations
recovered 5959 polynomials
attempting to build 5171 cycles
found 5171 cycles in 1 passes
distribution of cycle lengths:
length 1 : 2308
length 2 : 2863
largest cycle: 2 relations
matrix is 5000 x 5171 (0.6 MB) with weight 142018 (27.46/col)
sparse part has weight 142018 (27.46/col)
filtering completed in 3 passes
matrix is 4661 x 4725 (0.6 MB) with weight 128027 (27.10/col)
sparse part has weight 128027 (27.10/col)
commencing Lanczos iteration
memory use: 0.8 MB
lanczos halted after 75 iterations (dim = 4657)
recovered 62 nontrivial dependencies
prp32 factor: 14499216344898896752959323769763
prp32 factor: 68969244696581083712684424134557
elapsed time 00:00:13
~/msieve-1.42>
| Copyright (C) 1999-2009 Makoto Kamada All Rights Reserved. | Jump to mirror |