N
Nick Drozd
nickdrozd.github.io · Personal blog · on HN since 2018
Nick Drozd writes about Turing machines, busy beavers, Lisp, Emacs, and a formal theory of spaghetti code.
What HN saysHN commenters call his writeups great and link his Turing machine notation post and spaghetti code conjecture work as interesting, if not beginner-friendly, reading.
25HN people shared it
12linked it in comments
80stories submitted
2.0Kstory points
5 months agolast shared
2018people per year2026
Most-shared posts
- 1Turing Machine Notation and Normal Form4 people · 28 points · first shared 2020 · 3 comments on HN
- 2Signed Char Lotte3 people · 682 points · first shared 2021 · 79 comments on HN
- 3I Got a Knuth Check for 0x$3.003 people · 469 points · first shared 2019 · 140 comments on HN
- 4The most evil Lisp macro3 people · 5 points · first shared 2019 · discussion on HN
- 5A New Record in Self-Cleaning Turing Machines3 people · 4 points · first shared 2021 · 1 comments on HN
- 6Maybe the spaghetti code conjecture is false2 people · 111 points · first shared 2021 · 47 comments on HN
- 7A Formal Theory of Spaghetti Code2 people · 99 points · first shared 2022 · 42 comments on HN
- 8Basic Web Scraping with Emacs2 people · 62 points · first shared 2018 · 6 comments on HN
- 9Are Turing Machines Programmable?2 people · 4 points · first shared 2020 · discussion on HN
- 10The Spaghetti Code Conjecture2 people · 3 points · first shared 2021 · discussion on HN
- 11A (Partial) Solution to the Halting Problem (2022)2 people · 3 points · first shared 2022 · 1 comments on HN
- 12Halt, Quasihalt, Recur2 people · 2 points · first shared 2021 · discussion on HN
- 13Brady's Algorithm for Program Generation2 people · 2 points · first shared 2022 · discussion on HN
- 14Beeping Busy Beavers2 people · 1 points · first shared 2020 · discussion on HN
- 15New Ways to Be Told That Your Python Code Is Bad1 people · 102 points · first shared 2021 · 249 comments on HN
What HN people wrote when they linked it
jakear · 2021-11-17
Great writeup! I ended up following a few of the links and came across perhaps my favorite hand waving of all time for the validity of "The Spaghetti Code Conjecture"[1]. Basically:
For N=0,1: the problem is trivaial/degenerate.
For N=2: the Turing machine must go back and forth between states or else it'd just be stuck in one state forever, which wouldn't be very busy beaverish.
For N=n+1: well we just proved it up till n, so it seems pretty unlikely that n+1 would be different, things don't really just suddenly change like that y'know?
QED
So I'm not too surprised that this conjecture is being called into question.
[1]: https://nickdrozd.github.io/2021/01/26/spaghetti-code-conjecture.html
nickdrozd · 2021-04-18
The OEIS is an amazing tool. I recently came across a sequence from an unusual source and then made the shocking discovery that the sequence already existed. It turned out to be a wild coincidence.
Write-up here: https://nickdrozd.github.io/2021/04/12/math-fact-busy-beaver.html
svat · 2019-05-22
To know whether you'd enjoy it (which is the only measure of “worth it” I can think of in relation to this book), you could start with one of the recent sections on combinatorial algorithms (Volume 4A and part of Volume 4B have been published so far): http://www.cs.utsa.edu/~wagner/knuth/
For example, 7.2.1.2 on generating all permutations (http://www.cs.utsa.edu/~wagner/knuth/fasc2b.pdf) has a lot of cool mathematics, some low-language programs, some alphametic puzzles, .... Or 7.1.4 on Binary Decision Diagrams (http://www.cs.utsa.edu/~wagner/knuth/fasc1b.pdf) is on a little-known (IMO) data-structure presented in Knuth's unique way, which can solve many counting problems.
Stepping back a little, there are two ways you could read this book:
• Try to engage with the mathematics, try each exercise for at least half an hour before giving up and looking at the solution, etc. (Doing it this way can definitely be a massive time investment.) If you'd like to do this, and find the mathematics difficult, you should read Concrete Mathematics which Knuth co-wrote with Ron Graham and Oren Patashnik, which is a highly enjoyable book in itself.
• As mentioned in a recent post (https://nickdrozd.github.io/2019/05/17/knuth-check.html):
> By the way, if you’ve ever thought about reading TAOCP, give it a try. A lot of people will tell you that it’s a reference work, and it’s not meant to be read straight through, but that isn’t true. The author has a clear point of view and a narrative…
grimgrin · 2025-12-13
this is a cool link, not an ELI5, but https://nickdrozd.github.io/2020/10/04/turing-machine-notation-and-nor…
317070 · 2024-07-03
Ha, the funny thing is, there are conjectures both ways! Some people think winners get noisier and noisier, the spaghetti code conjecture. Others actually think the winners get cleaner and cleaner, the clean code conjecture.
Personally, I am slightly leaning towards clean code being more powerful. Chaos is hard to control.
https://nickdrozd.github.io/2022/03/12/formal-theory-of-spaghetti-code…
wwalexander · 2024-05-24
I found this quite helpful: https://nickdrozd.github.io/2020/10/04/turing-machine-notation-and-nor…
Despite a CS undergrad I don’t recall really learning any of these canonical representations of TMs before.
sligocki · 2024-05-23
Counting the number of distinct TMs is not a simple task. The way you count it is the most broad (the count of all tables of values where each cell can have any (symbol, direction, state) combination). But this is a significant overcount of the bits needed to describe an arbitrary TM. for the BB(3, 4) case, there are only about 600B distinct TMs using the Tree Normal Form aka Brady's algorithm (https://nickdrozd.github.io/2022/01/14/bradys-algorithm.html) which comes out to <40 bits.
diziet · 2023-10-17
kzrdude · 2022-01-12
It turns out that a different post has a good answer!
https://nickdrozd.github.io/2021/09/25/spaghetti-code-conjecture-false…
actually_a_dog · 2021-07-28
This should help: https://nickdrozd.github.io/2020/10/04/turing-machine-notation-and-nor…
JorgeGT · 2020-02-18
He is still working on it and the latest check I know about was from a few months ago: https://nickdrozd.github.io/2019/05/17/knuth-check.html but I still agree with your first sentence.
Kranar · 2021-11-18
The machines used in the article don't have to halt whereas the busy beaver only admits Turing machines that halt. For the purpose of this article the Turing machine either has to halt or has to enter some kind of degenerate state where it can still technically run forever but is in some sense stuck in a trivial infinite loop. The precise details of this degenerate state are explained in this article:
https://nickdrozd.github.io/2021/01/14/halt-quasihalt-recur.html
This degenerate state is known as quasihalting. The author points out that for the traditional busy beaver function, let's call it BB, then BB(4) = 107. For this modified busy beaver function, let's call it, QQ, QQ(4) ~= 33 million.
The article goes into some detail why considering Turing machines that quasi halt instead of strictly halting provides some insight into some interesting questions, notably the spaghetti code conjecture.