Random Access

In computer science, random access (sometimes called direct access) is the ability to access an element at an arbitrary position in a sequence in equal time, independent of sequence size. The position is arbitrary in the sense that it is unpredictable, thus the use of the term "random" in "random access". The opposite is sequential access, where a remote element takes longer time to access. A typical illustration of this distinction is to compare an ancient scroll (sequential; all material prior to the data needed must be unrolled) and the book (random: can be immediately flipped open to any random page). A more modern example is a cassette tape (sequential—you have to fast-forward through earlier songs to get to later ones) and a CD (random access—you can skip to the track you want).

In data structures, random access implies the ability to access any entry in a list in constant (i.e. independent of its position in the list and of list's size, i.e. ) time. Very few data structures can guarantee this, other than arrays (and related structures like dynamic arrays). Random access is critical, or at least valuable, to many algorithms such as binary search, integer sorting or certain versions of sieve of Eratosthenes. Other data structures, such as linked lists, sacrifice random access to make for efficient inserts, deletes, or reordering of data. Self-balancing binary search trees may provide an acceptable compromise, where access time is equal for any member of a collection and only grows logarithmically with its size.

Famous quotes containing the words random and/or access:

    There is a potential 4-6 percentage point net gain for the President [George Bush] by replacing Dan Quayle on the ticket with someone of neutral stature.
    Mary Matalin, U.S. Republican political advisor, author, and James Carville b. 1946, U.S. Democratic political advisor, author. All’s Fair: Love, War, and Running for President, p. 205, Random House (1994)

    The last publicized center of American writing was Manhattan. Its writers became known as the New York Intellectuals. With important connections to publishing, and universities, with access to the major book reviews, they were able to pose as the vanguard of American culture when they were so obsessed with the two Joes—McCarthy and Stalin—that they were to produce only two artists, Saul Bellow and Philip Roth, who left town.
    Ishmael Reed (b. 1938)