
Why is division so much more complex than other arithmetic operations? scicomp.stackexchange.com/qu…

Daily tweets about computer science and related stuff @JohnDCook.

Why is division so much more complex than other arithmetic operations? scicomp.stackexchange.com/qu…

Before someone brings it up, yes I know about the Curry-Howard isomorphism and the idea that proofs and programs are ultimately the same thing. But in practice the kinds of proofs and programs that people care about are substantially different.

Until recently there was more interest in formally verifying software than formally verifying math. Now the tables have turned. Why is that? AI has made it easier to formally verify math, but hasn't it done the same for software?

Why does quicksort work so well in practice? cs.stackexchange.com/questio…

Shannon's theorem on channel capacity johndcook.com/blog/2024/10/1…

The term 'trie' came from 'retrieval.' Was intended to be pronounced like 'tree' but now is pronounced like 'try.'

'About 1,000 instructions is a reasonable upper limit for the complexity of problems now envisioned.' -- John von Neumann, 1946

New post: Taxis and Hash Functions johndcook.com/blog/2026/11/1…

Secure hashing algorithms that have been broken are only broken with respect to collision attacks. It's still infeasible to infer the original input, or any input, to a hash like MD5 from the output. (Unless the input coes from a small enough set to attack by brute force.)

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.

Unix as literature theody.net/elements.html

Preprocessing text to make it more compressible using the Burrows-Wheeler transform johndcook.com/blog/2024/10/1…

'The idea that people knew a thing or two in the '70s is strange to a lot of young programmers.' -- Donald Knuth

Numerical computing tip: If something goes wrong in theory *at* 0, expect difficulty in practice *near* 0.

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.

'Life as we know it would be very different without the FFT.' -- Charles Van Loan