Kodama's home / tips

An implementation of AKS primality test (ruby script)

Agrawal-Kayal-Saxena(AKS) primality test is deterministic polynomial time prime test algorithm.

To get implementation of the algorithm as ruby script, download the file "prime_test.(version).tar.gz" from FTP server ftp://ftp.math.kobe-u.ac.jp/pub/knot. And see script "aks_prime_test.rb". Also, Ruby polynomial class is needed.

This algorithm is defined by Manindra Agrawal, Neeraj Kayal and Nitin Saxena in "PRIMES in P"

Related topics


(Introduction in Japanese)

多項式時間素数判定. AKS 法による ruby スクリプト

多項式時間の確定的(確率的ではない)素数性の判定アルゴリズムです.

FTP サーバから "prime_test.(version).tar.gz" をダウンロードしてください. スクリプトは "aks_prime_test.rb" です. ftp://ftp.math.kobe-u.ac.jp/pub/knot. また, Ruby polynomial class も必要です.


Kodama's home / tips