
Daily tweets about computer science and related stuff @JohnDCook.
Joined November 2010
- Tweets13.4K
- Following17
- Followers25K
- Likes270
Computer Science retweeted
If the Generalized Riemann Hypothesis (the stronger version of the Riemann Hypothesis) is proven, these become proven facts:
Algorithms that no longer need randomness
- Primality testing: Miller's fast test becomes proven correct with no randomness
- Square roots mod a prime: becomes solvable fast and with no coin flips (today that's an open problem)
- Cube roots and other roots mod a prime: same.
- Factoring polynomials over finite fields: almost fast (quasi-polynomial) with no randomness, instead of needing randomness
- Building finite fields: you can construct any finite field directly, with no random search
- Factoring vs. φ(n): factoring a number becomes provably as easy as computing φ(n), even without randomness
- Primes with a given remainder: a prime with any allowed remainder mod q exists that's at most about q², so searching for one is fast
Complexity theory
- Polynomial equations: "does this system of equations have a solution?" drops from PSPACE to a much lower class (AM)
- Algebraic P vs NP: Valiant's algebraic version of P vs NP gets tied to the normal P vs NP over the complex numbers
- Turing machines: a known 744-state Turing machine is proven to run forever
Number theory software
- Math libraries: PARI/GP and Magma results computed "assuming GRH" become fully proven
- Class groups: algorithms that compute these number-field structures get guaranteed running times
- Elliptic curve generation: the algorithms used to create curves for crypto get guaranteed running times
Cryptography (no new attacks, only proofs)
- Elliptic curves: proven that if discrete log is hard on one curve, it's hard on almost all similar curves
- Lattice crypto: known quantum attacks on some lattice schemes become proven to work
- Isogeny crypto: known quantum attacks on some isogeny schemes get proven speeds
- Code-based crypto: schemes like BIKE get the guarantee that the special primes they need exist
Prime gaps
- Next prime: there's always one within about √p·log p of p, so "find the next prime" has a guaranteed worst case
What it does NOT do
- It doesn't solve P vs NP
- It doesn't make factoring easy, so RSA and elliptic-curve crypto stay safe
- It doesn't make anything faster in practice, because randomized versions already work today
- Ramanujan graphs, expanders and AG codes are unaffected: they use a finite-field version of RH that was proven decades ago
Computer Science retweeted
We can all relax now that the PHP security holes, the certificate authority spewing bad certificates, the Microsoft mail outage, and the FAA network failure have been fixed.
Now we won’t have any more problems and things will go back to normal.
Computer Science retweeted
If you remove different representations, you find out that many algorithms are either the same, or almost the same.
Shortest path is semiring based computation.
More here: sciencedirect.com/science/ar…
I realized this when I was writing my book on OR algorighms. There are hundreds of algos I went through. Sometimes, you could find 40-50 algorithms, that are different only in one parameter, or one function in the function composition.
---
I am 100% sure, there are abstract algorithms in space search + reduction, that could simplify what already exist and provide dozens of real world useful algos for thousands of various usecases.
Computer Science retweeted
🤖 Made with AI
Turns out we could have just written 6 million lines of Lean to verify Signal instead of messing with these papers and symbolic models this whole time deepmind.google/blog/introdu…
Computer Science retweeted
Decades ago, people tried to formally verify code. Essentially, you prove that the code is correct using math. It was an approach promoted by people like Dijkstra, who observed that “program testing can be used to show the presence of bugs, but never to show their absence” (1970).
It did not work. It was too difficult.
You can do it for a function, maybe a small piece of code… but for anything useful, it was just too much work, and the result was too weak. Classic examples include the seL4 microkernel, about 8,700 lines of C requiring ~200,000 lines of Isabelle proof and roughly 20 person-years of verification effort.
But times are changing.
So it appears that we can formally verify code these days. Or, at least, there is now a ton of startups and academic initiatives that say it is possible and maybe practical.
Take your C code, have your AI prove that it is a correct implementation of the specification. Among other things, it would prove that the code is correct with respect to memory usage, but that’s the least of what it could do.
The most obvious application is cryptography and anything that must be unbreakable. Have your AI prove that the system cannot be hacked.
You should not get too excited. These will remain mathematical models. They have to make assumptions all over.
But I am pretty excited about what this could enable. I'd love to have more formal analysis of my code. In fact, I have a few projects in mind right now, to formally verify heuristics that I have been using.
Recent examples of startups:
•&Truth (launched Oct 2026, ~$70M seed): Building a “universal verification machine” for any language.
•Harmonic (Aristotle): Announced support (late Oct 2026) for formal verification of C software and Verilog hardware.
Computer Science retweeted
It's Halloween season again and as a mathematician I'm obliged to post this. I don't make the rules
Computer Science retweeted
Cryptography: turning every problem into a key management problem, since 1400 BC.
Computer Science retweeted
“Combinators … continue to seem exotic and abstruse—and somehow fundamentally unsuitable for human consumption.” — Stephen Wolfram
Computer Science retweeted
"Java is pass-by-value."
"But when I pass an object, it modifies the original object!"
"Yes, because the value being passed is the pointer to the object."
"So it's pass-by-reference?"
"No, the pointer is passed by value."
[C programmer laughing in the distance]
Computer Science retweeted
“My main point, however, is that I don't believe that the equality P=NP will turn out to be helpful even if it is proved, because such a proof will almost surely be nonconstructive.”
— Donald Knuth
Computer Science retweeted
How NASA used Hadamard matrices to transmit photos from Mars.
johndcook.com/blog/2026/08/1…
Computer Science retweeted
Constructing Hadamard matrices
Bootstrapping yesterday's announcement
johndcook.com/blog/2026/08/1…
Computer Science retweeted
References to Unix and Linux over time, according to Google's ngram viewer
Computer Science retweeted
New post: A simple range reduction algorithm
johndcook.com/blog/2026/08/0…
Computer Science retweeted
Someday I’d like to teach a short course in retro computing, doing scientific calculations with a slide rule and set of tables.
It’s not as easy as it sounds, and students would learn things applicable to modern computing.
Suppose it’s 1964. You don’t have a computer, or even a calculator, but you do have a book of math tables.
How would you compute the natural log of 1000 factorial?
johndcook.com/blog/2026/08/0…




























