Repository logo
Log in(current)
Repository logoMIT Open ScholarshipDSpace@MIT
  1. Home
  2. Computer Science and Artificial Intelligence Lab (CSAIL)
  3. Artificial Intelligence Lab Publications
  4. AI Memos (1959 - 2004)
  5. Destructive Reordering of CDR-Coded Lists

Destructive Reordering of CDR-Coded Lists

Thumbnail Image
Download
Name

AIM-587.pdf

Size

3.6 MB

Format

Adobe PDF

Checksum (MD5)

2abd7ee7f250cec0e39b90707f2a0670

Thumbnail Image
Download
Name

AIM-587.ps

Size

5.08 MB

Format

PostScript

Checksum (MD5)

b9862c1a1327dc82c988c785fc33b01d

Author(s)
Steele, Guy L., Jr.
Date Issued
August 1, 1980
Series/Report no.
AIM-587
Abstract
Linked list structures can be compactly represented by encoding the CDR ("next") pointer in a two-bit field and linearizing list structures as much as possible. This "CDR-coding" technique can save up to 50% on storage for linked lists. The RPLACD (alter CDR pointer) operation can be accommodated under such a scheme by using indirect pointers. Standard destructive reordering algorithms, such as REVERSE and SORT, use RPLACD quite heavily. If these algorithms are used on CDR-coded lists, the result is a proliferation of indirect pointers. We present here algorithms for destructive reversal and sorting of CDR-coded lists which avoid creation of indirect pointers. The essential idea is to note that a general list can be viewed as a linked list of array-like "chunks". The algorithm applied to such "chunky lists" is a fusion of separate array- and list-specific algorithms; intuitively, the array-specific algorithm is applied to each chunk, and the list algorithm to the list with each chunk considered as a single element.
Persistent DSpace Link
http://hdl.handle.net/1721.1/5703
Repository logo
PrivacyPermissionsAccessibilityContact us
Repository logo
Notify us about copyright concerns.