The Model of Computation
Understand the theoretical running times of operations on data structures.
We can analyze the theoretical running times of operations on the data structures. To do this precisely, we need a mathematical model of computation. For this, we use the w-bit word-RAM model.
RAM stands for Random Access Machine. In this model, we have access to a random access memory consisting of cells, each of which stores a w-bit word. This implies that a memory cell can represent, for example, any integer in the set .
In the word-RAM model, basic operations on words take constant time. This includes arithmetic operations , comparisons , and bitwise boolean operations (bitwise–AND, OR, and exclusive–OR).
Any cell can be read or written in constant time. A computer’s memory is managed by a memory management system from which we can allocate or deallocate a block of memory of any size we would like. Allocating a block of memory of size takes ...