Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Implementation of AKS primality test in Scheme or C++

I was reading about the prime test algorithm and found the AKS primality test. Could this algorithm be implemented in Scheme or in C++?

Has anyone tried implementing the AKS test?

like image 979
Carlochess Avatar asked Jun 27 '11 18:06

Carlochess


2 Answers

Scheme and C++ (and Racket and Pascal and Logo and Modula-3 and Postscript) are all Turing equivalent, meaning that they can all be used to simulate each other, and hence that they can all compute the same things.

So: yes, you can implement this in Scheme. Or any other Turing-complete language.

like image 136
John Clements Avatar answered Sep 28 '22 15:09

John Clements


Of course it can. Google helps here.

C++ implementations

like image 29
Peter Alexander Avatar answered Sep 28 '22 14:09

Peter Alexander