Math 2.0

Computer science Definition

Random-access machine

Builds on Register machineNatural numbers

Definition

A random-access machine has registers r0,r1,r2,…r_0, r_1, r_2, \dots, indexed by the natural numbers, each holding a natural number. A program is a finite sequence I1,…,ImI_1, \dots, I_m of instructions of the following kinds, where i,j,k,c∈ℕi, j, k, c \in \N and 1≤l≤m1 \le l \le m.

  1. ri←cr_i \leftarrow c, which loads a constant.
  2. ri←rj+rkr_i \leftarrow r_j + r_k and ri←rj−˙rkr_i \leftarrow r_j \mathbin{\dot-} r_k, where a−˙b=max⁡(a−b,0)a \mathbin{\dot-} b = \max(a - b, 0).
  3. ri←rrjr_i \leftarrow r_{r_j} and rri←rjr_{r_i} \leftarrow r_j, the indirect load and store.
  4. JZ(i,l)\mathrm{JZ}(i, l), which goes to instruction ll if ri=0r_i = 0.
  5. HALT\mathrm{HALT}.

Every instruction other than a taken jump or HALT\mathrm{HALT} is followed by the next one in the list. A run starts at I1I_1 with the input in finitely many registers and all other registers 00. When the run halts, the output is read from a fixed register. In the unit cost measure each instruction costs 11. In the logarithmic cost measure an instruction costs the total number of bits of the addresses and values it uses.

Remarks

Example: the program I1=r3←rr1I_1 = r_3 \leftarrow r_{r_1}, I2=HALTI_2 = \mathrm{HALT} copies into r3r_3 the content of the register whose number is stored in r1r_1. With r1=100r_1 = 100 it reads r100r_{100} in one step. A register machine program names only finitely many registers, so it cannot read a register whose number is computed during the run. Non-example: a program with the instruction ri←rj⋅rkr_i \leftarrow r_j \cdot r_k is not a program of this machine. Adding unit-cost multiplication changes the model, since repeated squaring then builds numbers with exponentially many bits in polynomially many steps. Many variants are in use, for example with an accumulator or with integer registers; they have the same computing power.

Reading path

To understand this page from the ground up, read these 3 pages in order. The foundations come first.

Show the path as a graph
Each page uses the pages above it. The colour of the bar on a box shows how strong the evidence is, and the box also gives it as text. The list has the same pages.
  • no evidence level
  1. Natural numbers object
  2. Register machine concept
  3. Random-access machine definition

Further reading

  1. Web https://en.wikipedia.org/wiki/Random-access_machine
About this page
TagC5VD1V0RYD
URIm2://C5VD1V0RYD
Kinddefinition
WritingW0 stub
MSC68Q04, 68Q25
DefinesRandom-access machine
UsesRegister machine, Natural numbers
Changed3 November 2026

Markdown · JSON · Edit on GitHub

What this page needs for W1

  • an inventory row: the row of the inventory that the node accounts for (0 of 1)
  • a source with a locator (0 of 1)

The writing levels say how complete the text of a page is. They do not measure its truth.

What links here

No page links to this page yet.