Algorithmic complexity of primes

  • Context: Graduate 
  • Thread starter Thread starter DavidK
  • Start date Start date
  • Tags Tags
    Complexity Primes
Click For Summary
SUMMARY

The discussion focuses on the algorithmic complexity of prime numbers compared to composite numbers, emphasizing that every number can be represented as a bit string. It establishes that there are approximately (2^n / (n log 2)) primes of bit length n or less, and the optimal compression scheme for primes involves representing each prime by its index. Despite this compression, the complexity remains asymptotically equivalent to Θ(n), indicating no significant savings in terms of bit representation for primes.

PREREQUISITES
  • Understanding of algorithmic complexity and bit strings
  • Familiarity with prime number distribution and the prime counting function π(x)
  • Knowledge of logarithmic functions and their properties
  • Basic concepts of data compression techniques
NEXT STEPS
  • Research the prime counting function π(x) and its implications in number theory
  • Explore advanced data compression algorithms and their efficiency
  • Learn about the relationship between algorithmic complexity and information theory
  • Investigate the implications of bit string representations in computational mathematics
USEFUL FOR

Mathematicians, computer scientists, and data compression specialists interested in the theoretical aspects of prime numbers and their algorithmic representations.

DavidK
Messages
31
Reaction score
0
Every number can be considered a bit string. For a bit string one can define some algorithmic complexity (the shortest algorithm/program that reproduces the desired bit string). Can something be said, in general, about difference in complexity for primes as compared to composites?
 
Physics news on Phys.org
There are roughly (2^n / (n log 2)) primes of bit length n or less. (Since [itex]\pi(x) \approx x / \log x[/itex])

The best possible compression scheme is to represent each prime by its index, so that we use the positive integers less than roughly (2^n / (n log 2)) to represent the primes. It takes roughly (n - lg n - lg log 2) bits to denote such numbers.

(A good descriptive complexity scheme will be worse than this by some fixed additive constant)

However, [itex]n - \mathop{\mathrm{lg}} n - \mathop{\mathrm{lg}} \log 2 \in \Theta(n)[/itex], so asymptotically, we haven't saved anything.
 
Last edited:

Similar threads

  • · Replies 13 ·
Replies
13
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 0 ·
Replies
0
Views
3K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 10 ·
Replies
10
Views
4K
  • · Replies 4 ·
Replies
4
Views
4K
Replies
14
Views
3K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 3 ·
Replies
3
Views
1K