Browse Prior Art Database

# Mapping N Tuple Integers into a Single Integer

IP.com Disclosure Number: IPCOM000077491D
Original Publication Date: 1972-Aug-01
Included in the Prior Art Database: 2005-Feb-25
Document File: 2 page(s) / 47K

IBM

## Related People

Rothstein, GR: AUTHOR

## Abstract

In a data-processing system two or more integers (of different bit length), stored in different locations, can be mapped into a single integer in one storage location by using an algorithm that treats the single integer as a number to be located by Cartesian coordinates, represented by the respective pair of integers to be mapped. The process can be reversed, so that given a single integer, it can be broken down into two or more integers.

This text was extracted from a PDF file.
At least one non-text object (such as an image or picture) has been suppressed.
This is the abbreviated version, containing approximately 53% of the total text.

Page 1 of 2

Mapping N Tuple Integers into a Single Integer

In a data-processing system two or more integers (of different bit length), stored in different locations, can be mapped into a single integer in one storage location by using an algorithm that treats the single integer as a number to be located by Cartesian coordinates, represented by the respective pair of integers to be mapped. The process can be reversed, so that given a single integer, it can be broken down into two or more integers.

In Fig. 1 successive numbers 1-49 are arranged in spiral-like fashion in an X- Y coordinate system, beginning at the origin and extending outwardly in a clockwise direction. Two integers, set out as coordinates in this Cartesian system, define one unique number, and conversely each number of the table is assigned to a unique combination of two integers. For example, the inters -2, 3 define number 44, and conversely, number 44 can be broken down into -2, 3. The table can be extended to any desired format. N-tuple a1, a2. a3 . . . an is converted into a single integer by first converting a1, a2 into an intermediate integer n1 with the aid of the table, then converting n1, a2 into n2 etc. until an has been processed, resulting in a final single integer N. This process also is reversible.

Programming techniques can be used for the same conversion without reference to the table. Fig. 2 shows a flow chart to convert integers I, J into single integer N. Step 10 determines the largest absolute value S of I and J. step 11 sets T to I + J, step 12 defines MID = 4S/2/ + 1, which corresponds to the midway of t...