Prime number generator algorithm6/24/2023 If you are asking if there is a provably correct and efficient algorithm to find $n$th prime given $n$ in binary the answer is that is an open question. So I guess a better way of asking your question is asking if there is more efficient way of computing $n$th prime number than sieve-based methods. ![]() Moreover why would we care? What we care about in practice is not that the algorithm computes all previous primes, but rather time and space efficiency. It is probably one of the most common mistakes that people make when thinking about algorithms because they look at obvious cases and think it is simple to formalize the concept that algorithms for a problem does performs some task like computing some other things during its computation but that is not simple at all! Arguing that an algorithm doesn't do something during its computation is not a nice well-defined concept (when that something is a semantic condition). What do you mean by "directly"? This is not well-defined.
0 Comments
Leave a Reply. |