Algorithmic Experiments on a Random Access Machine
No public endorsements yet.
Loading review…
Sign in with ORCIDAbstract
This submission collects running-time theorems about concrete algorithms, stated on the word RAM of the archive's model submission The Word RAM — which it requires — and measured by the machine's own instruction count, including a fetched final . The programs read their counted input blocks sequentially and pay for loading them into working memory. Every statement has the same elementary shape: there are a program and a constant such that, at every word length , on every admissible input — admissibility including an explicit fitting inequality against — the machine halts within an explicit bound, having written the answer. Nothing is asymptotic: a linear-time claim is the bound , and every uniformity claim, over the input, over a parameter, over the word length, is carried by the order of the quantifiers.
Two theorems are stated. The connected components of a graph can be computed in linear time: given any graph in compressed sparse row form as a word , one program halts within steps having labelled every vertex by the least vertex of its component. Courcelle's theorem holds in the Courcelle–Makowsky–Rotics form: for every sentence of monadic second-order logic and every width bound there are a program and a constant such that, given a graph in compressed sparse row form followed by a -expression evaluating to it, the machine halts within steps having decided the sentence. The surface also fixes the encodings these are stated on: the compressed sparse row form of a graph with nothing precomputed, monadic second-order logic on graphs, -expressions, the instance encoding pairing a graph with a -expression, and the parameterized instance format that appends one parameter entry to a graph.
Both theorems are discharged through the verified pipeline of The Word RAM: algorithms are written in its structured while-language, costed by its loop rule with an invariant and a cost potential, and carried to the machine by its simulation theorem, so the derivation that yields the running time also shows that no intermediate value outgrows a word — which is where the fitting conditions come from. The components algorithm is the textbook sweep of breadth-first searches, verified against a pure model of the search state under a single global potential, so that the searches are amortized together. Courcelle's theorem is proved as on paper, with the machine kept out of the mathematics until the mathematics is finished: an Ehrenfeucht–Fraïssé type algebra with adequacy and a composition lemma for gluing along a marked, edge-free overlap handles the four operations of a -expression uniformly; the value table of the fold is extracted by finiteness and choice; and a generic bottom-up fold, verified once against a table it knows nothing about, evaluates it in a fixed number of steps per input entry after a prologue that pays for the table once. The proof package also contains the bounded search tree of Downey and Fellows, deciding vertex cover within steps over the parameterized instance format.
Concepts
- def
Lax11.CliqueExpr - thm✓
Lax11.ConnectedComponents - thm✓
Lax11.Courcelle - def
Lax11.GraphEncoding - def
Lax11.InstanceEncoding - def
Lax11.Mso - def
Lax11.VertexCover
- def
Lax67.Ram - def
Lax67.RamComputes
Concept map
Proofs
Proof networkview on GitHub
-
no assumptions
thm✓Lax11.Courcelle⊢
Lax11Proofs.Courcelle.exists_linearTime_program_modelChecking
Lean sources for these proofs: proofs/ on GitHub
Proof code is not displayed; the archive records each proof's checked relationship between claims.
Related submissions
Submission map
Cite this
@misc{lax-11,
author = {Jan Dreier and Claude Fable 5 (Anthropic)},
title = {Algorithmic Experiments on a Random Access Machine},
year = {2026},
howpublished = {Lax Archive, lax-11},
url = {https://laxarchive.org/lax-11/},
note = {draft},
}
References
- Alfred V. Aho, John E. Hopcroft and Jeffrey D. Ullman. The Design and Analysis of Computer Algorithms. Addison-Wesley, 1974.
- Stephen A. Cook and Robert A. Reckhow. Time bounded random access machines. Journal of Computer and System Sciences 7(4):354–375, 1973. doi:10.1016/S0022-0000(73)80029-7
- Bruno Courcelle. The monadic second-order logic of graphs. I. Recognizable sets of finite graphs. Information and Computation 85(1):12–75, 1990. doi:10.1016/0890-5401(90)90043-H
- Bruno Courcelle and Stephan Olariu. Upper bounds to the clique width of graphs. Discrete Applied Mathematics 101(1–3):77–114, 2000. doi:10.1016/S0166-218X(99)00184-5
- Bruno Courcelle, Johann A. Makowsky and Udi Rotics. Linear time solvable optimization problems on graphs of bounded clique-width. Theory of Computing Systems 33(2):125–150, 2000. doi:10.1007/s002249910009
- Rodney G. Downey and Michael R. Fellows. Parameterized Complexity. Springer, 1999. doi:10.1007/978-1-4612-0515-9
- Sang-il Oum and Paul Seymour. Approximating clique-width and branch-width. Journal of Combinatorial Theory, Series B 96(4):514–528, 2006. doi:10.1016/j.jctb.2005.10.006
Community review
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above; your ORCID profile must share a public name.
0 comments