How statement and proof provenance work
The first chip identifies the source of the statement or construction; the second identifies the source of its local proof or verification.
- Literature-sourced: the exact statement appears in a cited source; only wording and notation differ.
- AI-adapted: a semantically identical restatement of literature-sourced material, modulo indexing, notation, and boundary cases adopted by the library.
- AI-generated: a genuinely novel statement formulated by AI, with no source for the claim itself.
These labels describe origin, not correctness: citations and verification chips remain separate evidence.
Logarithmic Space, NL, and Reachability
1 · Prerequisites
- Construction of the Natural Numbers
- Construction of the Real Numbers via Cauchy Sequences
- Construction of the Real Numbers via Dedekind Cuts
- Countability and Uncountability
- Eulerian and Hamiltonian Graphs
- Finite Counting, Factorials and Binomial Coefficients
- Formal Languages, Encodings, and Decision Problems
- Foundations of the Real Numbers for Analysis
- Graphs, Walks and Connectivity
- Linear Recurrences and Rational Generating Functions
- Relations, Functions, and Quotients
- Resource Bounds and Machine Invariance
- Sequences and Limits
- The ZFC Axioms and the Basic Set Constructions
- Time and Space Hierarchy Theorems
- Turing Machines, Configurations, and Computation
2 · Summary
This page fixes the uncharged read-only-input convention for logarithmic work space, develops configuration-graph reductions and directed reachability, and then proves the two central closure results. It finishes with uniform circuit compilation and Circuit Value, keeping the open question separate from the proved equality .
3 · Logical flowchart
4 · Definitions, theorems and proofs
A read-only-input logarithmic-space machine
Definition
A read-only-input machine has one input tape containing , whose head may move in either direction but whose cells are never changed, and finitely many read/write work tapes. Its work space on inputs of length is the number of visited work-tape cells, not the input cells. A deterministic machine decides when it halts on every input; a nondeterministic machine decides when every branch halts and some branch accepts exactly the inputs in the language.
It is a logspace machine when its work space is . The convention also covers the empty input. This is a work-space convention, distinct from the all-tapes convention in The classes DTIME, NTIME, DSPACE, and NSPACE.
The classes L and NL
Definition
For a function , let denote the languages decided by nondeterministic read-only-input machines using work cells. Thus Here is exactly the local uncharged-input class of Read-only-input work-space classes and constructibility. The names L and NL below never silently mean the library's all-tapes and .
Logspace machines have polynomially many configurations
Statement
For a fixed read-only-input logspace machine , there is a polynomial such that on every input of length , has at most reachable configurations. Consequently, any accepting branch has an accepting branch with no repeated configuration and hence with fewer than transitions.
Facts & Assumptions
Given: a fixed read-only-input logspace machine and an input of length .
A logspace machine charges only visited work cells and has a read-only input tape (A read-only-input logarithmic-space machine).
Proof
By [L1], a configuration is specified by a state from a fixed finite set, one of input-head positions, the contents of work cells over fixed finite alphabets, and finitely many work-head positions among those cells.
The product of these choices is ; enlarge its fixed constant to obtain a polynomial bounding the reachable configurations.
If an accepting branch repeats a configuration, delete the segment between its two occurrences; the identical later configuration has the same possible continuation. Repeating this deletion yields a simple accepting path with fewer than transitions.
Logspace many-one reduction
Definition
For languages , write if a deterministic read-only-input logspace transducer computes a total function with The transducer writes once on a write-only output stream. Equivalently, it may recompute a requested output position in logarithmic work space. Since the internal configuration has only polynomially many states and the output stream is not readable, every halting such transducer has polynomial output length: otherwise a repeated internal configuration would repeat forever.
Logspace reductions compose
Statement
If and , then . In particular, L and NL are closed under inverse logspace many-one reductions: if and is in the indicated class, then is too.
Facts & Assumptions
Given: logspace reductions and .
A logspace reduction has polynomial output length and permits bitwise recomputation of its write-only output (Logspace many-one reduction).
Proof
Simulate the transducer for on a virtual input tape containing , retaining its work tape and its virtual input-head index .
Whenever the simulation reads virtual cell , rerun the transducer for on and supply its th output bit; [L1] makes this a logarithmic-work-space subroutine.
Since is polynomial in , both and the simulated work tape use space. The streamed output is , so iff it lies in .
To decide from a deterministic or nondeterministic decider for , run that decider on the same virtual input rather than the transducer for . The virtual-input access above preserves its deterministic or nondeterministic choice and its logarithmic work bound, proving the stated L or NL closure.
Directed s-t connectivity
Definition
Directed s-t connectivity (STCON) is the language of encodings in which is a finite directed graph and there is a directed path from to . Vertices are numbered in the encoding; malformed encodings are outside STCON. The word path has the directed meaning fixed in Directed walks, trails, paths and cycles, and strong connectivity.
Directed s-t connectivity is NL-complete
Statement
STCON is NL-complete under .
Facts & Assumptions
Given: an encoded digraph , or a language .
A fixed logspace machine has polynomially many configurations, and accepting branches may be made simple (Logspace machines have polynomially many configurations).
A logspace many-one reduction is a deterministic bitwise polynomial-output transduction (Logspace many-one reduction).
Proof
To decide STCON nondeterministically, retain a current vertex and a counter through moves, guessing an outgoing edge at each move and accepting on reaching . A path exists exactly when one exists with at most moves.
For , fix its machine . On input , make vertices from the valid configurations of on , add a fresh target , use legal transitions as arcs, and add an arc from every accepting configuration to .
Both stored vertex labels and the counter have bits, so step 1.1 puts STCON in NL.
By [L1], there are polynomially many configuration names of bits. A transducer enumerates candidate pairs, checks locally whether one is a legal successor of the other, and streams the encoded graph, start configuration, and using work space.
A directed path from the start to is exactly an accepting computation branch of on . Thus the transducer is an reduction, which with step 2.1 proves NL-completeness.
Savitch simulation into read-only-input deterministic work space
Statement
Every language decided by a fixed nondeterministic read-only-input machine using work cells is decided by a deterministic read-only-input machine using work cells.
Facts & Assumptions
Given: a fixed nondeterministic read-only-input logspace decider .
The local work-space convention charges work cells but not read-only input cells (Read-only-input work-space classes and constructibility).
The number of configurations reachable from the start configuration is polynomial in (Logspace machines have polynomially many configurations).
Proof
On input , encode a configuration by its state, input-head position, work contents, and work-head positions. There are only polynomially many syntactically possible encodings, by the same finite product count used in [L2]. Choose with at least that number.
Define to test whether or is one legal transition, and define by enumerating every configuration and accepting exactly if both and hold. Induction on shows that it decides reachability by a path of length at most .
A recursion frame stores and , each using work bits; there are frames. Adjacency is recomputed from and the read-only input, never stored as a graph.
Enumerate accepting configurations and run . By step 2.1 this accepts exactly when has an accepting branch, and by step 3.1 it uses charged work space.
NL is contained in read-only-input DWORKSPACE(log-squared n)
Statement
This is a read-only-input, work-cell conclusion; it does not assert the all-tapes bound or the equality .
Facts & Assumptions
Given: a language .
NL is the class decided by nondeterministic read-only-input logspace machines (The classes L and NL).
Such a machine has a deterministic read-only-input -work-space simulation (Savitch simulation into read-only-input deterministic work space).
Proof
By [L1], choose a nondeterministic read-only-input logspace decider for .
Apply [L2] to this fixed decider. Its simulator is deterministic and uses charged work cells.
The target class is exactly the local convention, so belongs to it. Since was arbitrary, the displayed inclusion follows.
Inductive counts of reachable vertices
Definition
For an -vertex digraph , source , and integer , set Thus and . Since a reachable vertex has a simple path from , is the full reachable set.
A reachable-vertex count is verifiable in NL
Statement
Given the true count , there is a nondeterministic -work-space verifier that accepts a certificate exactly when . The certificate lists all reachable vertices in strictly increasing order, each with a walk from of length at most .
Facts & Assumptions
Given: an -vertex digraph, , , the true count , and a vertex .
consists of precisely the vertices with an -to-vertex walk of length at most (Inductive counts of reachable vertices).
Proof
Guess, in strictly increasing vertex-label order, distinct vertices different from , together with for each an -to-that-vertex walk of length at most . Check each edge and count the listed vertices.
The current vertex, previous path vertex, path-length counter, list counter, and labels use space. Thus this is an NL verifier.
If it accepts, [L1] puts all listed vertices in . The given equality makes this list exhaust , so . Conversely, when , list every member of with a witnessing bounded walk; the list has exactly the given length , and the verifier accepts.
Nonreachability has an inductive counting certificate
Statement
There is a nondeterministic -work-space verifier which, on , accepts exactly when is not reachable from . It uses a polynomial-length, read-once certificate carrying the successive counts .
Facts & Assumptions
Given: an -vertex digraph with source and target .
, , and is the full set of vertices reachable from (Inductive counts of reachable vertices).
Given the true value of , nonmembership of a specified vertex in has a nondeterministic logspace certificate that lists the complete reachable layer (A reachable-vertex count is verifiable in NL).
Proof
Start with .
Assume inductively that the supplied equals . Process every vertex : either verify a positive path of length at most to , or, for every with or , invoke the [L2] certificate for . Count the vertices in the first case and require the supplied total .
The second case is sound: if , either (the test fails) or the final edge of a length-at-most- walk has a predecessor in , contradicting one of its [L2] certificates. Conversely, every is outside and has no in-neighbor in , while every has a positive bounded path. Hence an accepted layer has .
Induction from step 1.1 makes every accepted layer correct. Each nested certificate is checked by counters, vertex labels, and one bounded path at a time, so the verifier retains only work space and reads a polynomial-size certificate once. At layer , accept precisely when is absent from the certified list; by [L1] this is equivalent to nonreachability.
Immerman-Szelepcsényi theorem: NL equals coNL
Statement
Moreover, in the same read-only-input model, if is work-space constructible and , then .
Facts & Assumptions
Given: a fixed nondeterministic decider for , where has the stated constructibility and logarithmic floor.
The inductive-counting algorithm certifies nonreachability in an -vertex digraph using work space and a polynomial-length read-once certificate (Nonreachability has an inductive counting certificate).
Proof
Fix an integer bounding 's visited work cells by for all sufficiently large ; handle the finitely many exceptional input lengths separately. Run the work-space constructor for on a virtual unary input of length ; an address on the actual endmarked input provides this virtual input in space. A configuration records the fixed finite control, work symbols, work-head positions, and the endmarked input-head position. Since is fixed, choose a fixed constant so that every configuration within the cap has a padded binary description of length .
Use all binary strings as candidate vertex names and add a fresh target . Invalid configuration names are isolated. Between valid names put an edge exactly for a legal transition of on the actual input within the work cap, and add an edge from each accepting configuration to . The source is the actual initial configuration. Enumerating names, validating them, checking a transition, and recognizing an accepting state all take space by direct scans of the fixed-length records and of . Thus a path to exists exactly when accepts . This constructs a well-defined finite graph for every input string , without querying validity of any externally supplied STCON encoding.
Run the algorithm of [L2] on this implicit graph, with . Its implementation only enumerates vertices and requests adjacency tests while checking bounded paths and successive reachable counts. Supply each such test by step 2.1. The previous layer's verified count, the current layer count, the finitely many vertex/loop indices, and one bounded path at a time have bits. The certificate checks are sequential nested loops of fixed depth, not a recursion stack through all layers. All loop and path lengths are bounded by polynomials in , and each guessed certificate field has bounded length, so every branch halts. Nondeterministic choices generate the read-once certificate as needed; it is never stored. Soundness and completeness of [L2] now give an -space decider for .
This proves closure of under complement. By the definition of the co-class, closure implies equality with its co-class, since complementing twice recovers the original language. Finally is work-space constructible: count the unary input in binary and compute the bit length, treating a power of two separately for the ceiling. This uses work cells. Its class is exactly NL under The classes L and NL, so the same equality specializes to .
Read-only-input nondeterministic work space is closed under complement above logarithmic space
Statement
If is work-space constructible and , then This is the read-only-input work-space notation introduced on this page, not an unqualified assertion about the library's all-tapes NSPACE convention.
Facts & Assumptions
Given: a work-space-constructible satisfying .
The general read-only-input complement equality is established by the Immerman--Szelepcsényi theorem (Immerman-Szelepcsényi theorem: NL equals coNL).
Proof
The hypotheses here are exactly the hypotheses of the general clause in [L1].
Applying that clause gives , which is closure under complement.
A logspace-uniform Boolean circuit family
Definition
A Boolean circuit is a finite directed acyclic graph with numbered input nodes, constant nodes, and gates from the fixed basis ; AND and OR gates have two predecessors, NOT gates have one, and constants have values zero or one. Its output is one designated node. A family has exactly input nodes labeled in and polynomially many nodes as a function of . The family is logspace-uniform when a deterministic read-only-input logspace transducer, on input and a query with binary node indices of length , halts and answers the size, gate-type (including input labels and constant values), and predecessor queries for the topologically numbered encoding of , and answers which numbered gate is the designated output. In particular, it can stream that polynomial-length encoding without storing it.
P-completeness under logspace reductions
Definition
Write . A language is P-complete under logspace reductions when and every satisfies . The direction is important: a reduction maps an arbitrary P language to the proposed complete problem.
Polynomial-time computations have logspace-uniform circuit families
Statement
For every fixed deterministic Turing machine that halts in polynomial time, there is a polynomial-size logspace-uniform Boolean circuit family such that exactly when accepts .
Facts & Assumptions
Given: a fixed deterministic multitape machine and a fixed integer such that bounds its running time on every input of length .
Logspace uniformity requires logspace procedures for the indexed circuit's size, gate types, predecessor queries, and designated output (A logspace-uniform Boolean circuit family).
Proof
For , encode each configuration by one-hot state bits, head-position bits for each tape , and symbol bits . Use positions ; no head can leave this interval within steps. There are exactly input nodes labeled ; the initial row uses these, their negations, and constants for the input, blank cells, initial heads, and start state.
For each tape and symbol, compute the scanned-symbol bit with a binary OR chain. The fixed transition table applied to the state and these scanned-symbol bits gives constant-size Boolean formulas for the next state, write symbols, and movement directions. At a halting state define this circuit update to leave the entire configuration unchanged. This is an extension of the tableau update only; no transition from a halted machine is assumed.
At each cell, retain its old symbol unless its head bit is one, in which case use the computed write symbol. A new head bit is the OR of the old adjacent head bits conjoined with their computed movement directions; in a halted configuration keep its old head bit. At position zero also retain a head commanded to move left, as required by the right-infinite tape convention. Treat other out-of-range head bits as zero. These are constant-size formulas once the scanned-symbol bits are available. Induction on gives the genuine configuration until halting and its unchanged copy thereafter. Therefore the accepting-state bit at time equals one exactly when accepts .
Each layer uses gates: the tape count, alphabet, and state set are fixed, each scanned-symbol OR chain is linear, and each cell update has constant size. There are layers, so the size is , hence polynomial. All formulas use binary AND/OR and unary NOT. Designate the final accepting-state node as output.
Number nodes by initial-row order and then by time layer, with scanned-symbol chains before transition formulas and cell updates. Pad fixed formula blocks with unused constant nodes if necessary so that each block length is a fixed constant or fixed multiple of . A node is addressed by its layer, block, position, and constant-size formula slot; all are -bit integers. Fixed-degree arithmetic computes block offsets, adjacent positions, OR-chain predecessors, and the initial input label from these indices. Counting on unary input and evaluating the fixed polynomial also use logarithmic space. These procedures answer SIZE, TYPE, predecessor, and output queries and emit the topological encoding. Thus [L2] gives logspace uniformity, including where the initial row has only constants.
Circuit Value is P-complete
Statement
Let CIRCUIT-VALUE contain pairs where is a valid topologically ordered single-output Boolean circuit and its output on is one. Then CIRCUIT-VALUE is P-complete under logspace reductions.
Facts & Assumptions
Given: a circuit-value instance, or an arbitrary language .
A P-completeness proof needs membership in P and a logspace reduction from every language in P (P-completeness under logspace reductions).
Every fixed deterministic P machine has a polynomial-size logspace-uniform computation-circuit family (Polynomial-time computations have logspace-uniform circuit families).
Proof
Evaluate a valid circuit in its topological order, retaining its gate values in an array and applying the fixed basis operation at each gate. This takes time polynomial in the encoding length, so CIRCUIT-VALUE is in P.
For , choose its fixed P decider and the family supplied by [L2]. On of length , output by streaming the uniform circuit description and then copying .
The transducer keeps only an -bit circuit-query index and its output position; [L2] answers each requested gate query in logspace. Thus is a logspace reduction, and it preserves acceptance.
Step 1.1 gives membership and step 2.1 gives hardness for arbitrary ; [L1] therefore gives P-completeness.
NL equals coNL follows by swapping accepting and rejecting states
Statement
False statement. For a nondeterministic machine, swapping accepting and rejecting states recognizes the complement language; therefore it proves .
Facts & Assumptions
Given: nondeterministic acceptance means that at least one branch accepts.
NL uses the existential accepting-branch convention for nondeterministic read-only-input machines (The classes L and NL).
The actual equality follows from inductive counting, not from a terminal-label change (Immerman-Szelepcsényi theorem: NL equals coNL).
Refutation
Suppose a machine has on one input both an accepting branch and a rejecting branch. By [L1] it accepts that input.
After terminal labels are swapped, the former rejecting branch is accepting, so the swapped machine also accepts the same input. The complement language instead rejects it.
Hence state swapping expresses “there exists a rejecting branch,” not “there is no accepting branch.” [L2] identifies the additional inductive-counting argument that genuinely proves the class equality.
5 · Examples, counterexamples and false statements
None yet.
Sources
- Arora and Barak, Computational Complexity, §3.1 and §3.4.1
- Arora and Barak, Computational Complexity, Definition 3.5
- Arora and Barak, Computational Complexity, §3.1
- Arora and Barak, Computational Complexity, Definition 3.14
- Arora and Barak, Computational Complexity, Lemma 3.15
- Harvard CS 221, Lecture 5, Definition 1
- Arora and Barak, Computational Complexity, Theorem 3.16
- Harvard CS 221, Lecture 5, Theorem 2
- Arora and Barak, Computational Complexity, Theorem 3.12
- Harvard CS 221, Lecture 5, Theorem 3
- Arora and Barak, Computational Complexity, §3.4.2
- Harvard CS 221, Lecture 5, Lemma 9
- Arora and Barak, Computational Complexity, Theorem 3.18
- Harvard CS 221, Lecture 5, §3
- Arora and Barak, Computational Complexity, Corollary 3.19
- Arora and Barak, Computational Complexity, Definition 6.5
- Arora and Barak, Computational Complexity, Definition 6.25
- Arora and Barak, Computational Complexity, Theorem 6.7
- Arora and Barak, Computational Complexity, Theorem 6.27