We call the natural number $n$ a partition number $\iff$
$$
\exists d | n: \gcd\left(d,\frac{n}{d}\right)=1 \text{ and } \Omega(d) = \Omega\left(\frac{n}{d}\right)\;,
$$
where $\Omega$ counts the prime divisors with multiplicities.


Then we have:
$n= p\_1^{a\_1} \cdots p\_r^{a\_r}$ is a partition number $\iff S = (a\_1,\cdots,a\_r)$ has a solution to the [partition problem](https://en.wikipedia.org/wiki/Partition_problem) which is known to be [NP-complete](https://en.wikipedia.org/wiki/NP-completeness).


I wanted to test the following heuristic idea:


1.) Space $\equiv$ Time. (for computations)


2.) Most strings are incompressible, because only finitely many space below.


$\rightarrow$ Most problems should not be solved faster (in time) than some boundary determined by the Kolmogorov complexity (=space).


To make this idea more precise I decided to test it for the following three problems:


Determine if a number $n$ is even. Determine if a number $n$ is prime. Determine if a number $n$ is a partition number.


For each of this problem I wrote a computer program to output a bit $=1$ if the number $n$ is even/prime/partition number, or $0$ otherwise.


Intuitively, if it was easy or if there was a pattern to these bits, then it should be exploited by an algorithm to be fast on this problem. To measure how easy these problems are, I suggest to use the Kolmogorov complexity or a zip program. We get in increasing order:


Result:


Even numbers are compressible to nearly 100%.


Prime numbers are compressible to about 59%.


Partition numbers are compressible to about 4%.


(Random bits are compressible to about 0%.)


Here is some Sagemath code which does the computation. I have zipped the files by hand afterwards and compared the file size.



```
def Omega(n):
    return sum([valuation(n,p) for p in prime_divisors(n)])

def omega(n):
    return len(prime_divisors(n))

def checkIfPartitionNumber(x):
    return any([Omega(d)==Omega(x/d) for d in divisors(x) if gcd(d,x/d)==1])

def isPrime(x):
    return is_prime(x)

def getWordUpTo(n,func=checkIfPartitionNumber):
    s = ''
    for x in range(1,n+1):
        if func(x):
            s+="1"
        else:
            s+="0"
    return s        

def toFile(n,func=isPrime,fname="is_prime.bin"):
    from bitarray import bitarray
    ba = bitarray(getWordUpTo(n,func))
    print(ba)
    #rint(dir(ba))
    with open(fname,"wb") as f:
        ba.tofile(f)
        
toFile(n=100000,func=lambda x: x%2, fname="is_even.bin")        
toFile(n=100000,func=is_prime, fname="is_prime.bin")        
toFile(n=100000,func=checkIfPartitionNumber, fname="is_partition_number.bin")        
toFile(n=100000,func=lambda x: randint(0,1), fname="random_bits.bin")        

```

I am interested if this idea is being pursued in the literature and if so a reference would be nice to share. Or maybe this idea is not pursued because you can think of some problem which violates the hypothesis of this heuristic? (That would also be nice to share.) Or maybe you would like me to test a problem you can think of if it fits the hypothesis of this question?


**Update**:
What does "Space $\equiv$ Time" mean?


What I try to do is to measure the "search space" of an algorithm considered and if the resulting string can be compressed by gzip or zip. For instance, in each time step $t$ we have for a Turing machine a configuration $c\_t$, which we could encode as a string $s\_t$ and write down all those strings $s\_1,\cdots,s\_T$ to a different tape. Later these "string of configurations" s:=$s\_1 \cdot s\_2 \cdots \cdot s\_T$ (concatenated) , will be compressed with gzip or zip to give a compressed string $s\_c$. Intuitively, if $s$ it is strongly compressible $|s\_c|<<|s|$, then (?) it means that the algorithm / the Turing machine could be improved, because it considers repetetive configurations. If the string $s$ appears random because $|s\_c| \equiv |s|$, then intuitively there can not be much done to improve the runtime of the algorithm / Turing machine on this input.
Since this is just a heuristic it is difficult to get more formal or concrete. I hope this clarifies the idea. (It is slightly different from the implementation described above, but [here you can find some SAGEMATH implementation of this idea](https://sagecell.sagemath.org/?z=eJyVGGtv2zbwe4H-By5BENJRHNt9YAuqAtuaGCmGtqi7DKhhGJJFK0wkShVlx-mv3x0pSpSsNG0-tNK933dyxNckLDYlv8yKFZ9lyZbPNqHi5WyT0hk7f_6MwN8V8QnAaBHImNOES0AxZnDrrCDviZDE8Cl6ZbnwT6yJQknz24WmvEXK98z3DVQYqEAoKrhiw0is17zgcsUpQt6DIkce_hW83BSSfCk23CAqwGWQKE7I82fPn0XgVszltAjyG0Wl_8LKuAZP5ovGcq3ZuDX25MnY1VXba_Cii9fyhkGecxlRQN_akOSFkCW9ZpbIQKdTrbsNRB0XbvSuXQ3IoX2gSZblykeXWdvALTJfd6yaDoMoWm55UfId3c5HC_ZD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YSOhniao0gbwpiKSMiB3p5KHbemvSGa4ZyyNkZLJhTIg3sM8BoqsdO2lrVUq_qFKXN2kMHFz7eISu9YGaad4W8f2cpNI--TBT9zJxDs1kgjb_tdezofczpeguqThRUs4x1DEi1QhV7agv3RaRWY93GEM2dENnlAor0lq0WcdpYYKL22D2vl8xnppn7lrzonL09sfWI6J78kV1FK9ZGqBU6qfPV5bDx7GLw82ilk9tR4gTSXgd7sY10vg_tAvJhMMOfmblJkIZRQHbnZHc08UgzevmWSzN5m6LpF2HntMvtDO6n2PuP2pYwi1pKjfs5uY1nkOYIl9PIG7NaLgKzdAnDWjnynhYG9qhvm6DAm8s10gB_1TRK6emYDQbVjc7w_maDcTcRy0Rkm62AJn0kBHUza2rcLnzlnNfQCXUz6d5ZHFZXTloV2rY54Mz1m76tOudo4vvuzYqy0rOzSU-fpIx05WrZJ_7Y-f6L6hNrWxF9A5Hb6lCBx28n42ac_OZPBgOaY5QoPOFDX4vuEbFHBk3VIBye9-9Qe07nzFXRd1FWMkM9uOz1M-8mwP02mr_2Jr97L_94vVg4H72txO19Z0kdfK_5NLL_Qj8k-lCY19124NlqaZ6sIQfAjpWnOeyZVdF4HdoFOaw7ujUdtCVPl27dC3uCwYb25MWxq82qf7rBt-p7QM1F5XRZ6rMJPa5heQ7fn6W7k1H2nTvVX7U_NXpvgtYp0r5JoWMHgzvTsPrEa7rNPpmsJ1lMGzkno-GIeZWyszG8oZQG79TQDjd9HzfpsGuo-wuK1ut-L1XhsN1gUTQREqrZID0dQr8sWfu3F5hS-leT3h9WXjF3iGHC4pi1ppg8JwY8l6fjxTANytWNkDEcbm9H9Ry7CZQtg6WlMDPsfzvRoDs=&lang=sage&interacts=eJyLjgUAARUAuQ==).)



Using Kolmogorov complexity to measure difficulty of problems?
It is worth mentioning that *variants of* Kolmogorov complexity have been investigated in the context of the study of pseudorandomness.
See [On One-Way Functions from NP-Complete Problems by Yanyi Liu and Rafael Pass](https://drops.dagstuhl.de/opus/volltexte/2022/16598/) ([arXiv link](https://arxiv.org/abs/2009.11514)).
It is probably worth mentioning as well that Quanta magazine has [written a popular science article on the paper](https://www.quantamagazine.org/researchers-identify-master-problem-underlying-all-cryptography-20220406/).


