Computer Science (@CompSciFact) header
Computer Science (@CompSciFact) profile picture

Daily tweets about computer science and related stuff @JohnDCook.

Joined November 2010
Photo by Computer Science (@CompSciFact)Photo by Computer Science (@CompSciFact)Photo by Computer Science (@CompSciFact)Photo by Computer Science (@CompSciFact)Photo by Computer Science (@CompSciFact)Photo by Computer Science (@CompSciFact)Photo by Computer Science (@CompSciFact)Photo by Computer Science (@CompSciFact)Photo by Computer Science (@CompSciFact)Photo by Computer Science (@CompSciFact)
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
80
605
62
4,734
494,862
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.
9
11
4
122
7,252
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.
29
86
20
1,050
140,282
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.
45
42
11
508
65,942
Computer Science retweeted
An ad for an expensive computer in 1951
18
82
26
870
37,775
Computer Science retweeted
It's Halloween season again and as a mathematician I'm obliged to post this. I don't make the rules
65
4,830
179
19,997
415,211
Computer Science retweeted
Cryptography: turning every problem into a key management problem, since 1400 BC.
11
57
4
449
26,071
Computer Science retweeted
“Combinators … continue to seem exotic and abstruse—and somehow fundamentally unsuitable for human consumption.” — Stephen Wolfram
1
2
16
2,634
Computer Science retweeted
23
101
7
1,312
36,140
Computer Science retweeted
BREAKING: Google launching TPUs in space NEXT WEEK on SpaceX falcon 9 to test AI data centers orbit ITS HAPPENING
361
1,128
498
9,727
6,642,419
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]
80
234
69
4,555
220,383
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
10
18
4
395
97,788
Computer Science retweeted
It already is.
154
132
54
1,865
54,036
Computer Science retweeted
How NASA used Hadamard matrices to transmit photos from Mars. johndcook.com/blog/2026/08/1…
1
12
1
68
8,233
Computer Science retweeted
References to Unix and Linux over time, according to Google's ngram viewer
2
22
3,267
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…
15
11
120
9,000
Computer Science retweeted
the year is 2036 C++36 has just been released it's now considered a dialect of APL
C++26 reflection syntax looks abhorrent
11
12
1
304
18,887