RAM Model

In the RAM Model, all functions are sequential: only one operation executes at a time.

int x = 10;
int y = 20;
printf("%d", x);

The code above executes line by line:

  1. Initialize and assign x
  2. Initialize and assign y
  3. Print x

Key assumptions of the RAM Model:

  • No parallelism: only one instruction at a time.
  • No asynchrony: tasks execute in-order, not out-of-order.
  • Deterministic: same inputs yield the same outputs.
  • Unit-cost operations: arithmetic, assignment, and memory access take $O(1)$ time.
  • Finite memory: variables fit in machine words, and only finitely many words exist.

AI Use Declaration. See AI Use Declaration