Implementation of AKS primality test in Scheme or C++
Asked Answered
S

3

5

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?

Suberin answered 27/6, 2011 at 18:43 Comment(2)
google, first hit with "AKS c++"Avera
You might want to rephrase your question to: "Has anyone tried implementing the AKS test?"Villalpando
V
5

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.

Vladikavkaz answered 27/6, 2011 at 19:42 Comment(3)
Thank you. It's so frustrating when people ask if X can be implemented in language Y without realizing that the answer is always yes for any Turing-complete language.Fokos
:D Thats a good answer. Excuse me, i'm new in this kind of things, be tolerant @pg1989.Suberin
No worries. Everyone starts from 0.Fokos
G
2

Of course it can. Google helps here.

C++ implementations

Gorgonzola answered 27/6, 2011 at 18:47 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.