Arithmetic and Boolean Operations on Recursively Run-Length Compressed Natural Numbers
We study arithmetic properties of a new tree-based canonical num- ber representation, recursively run-length compressed natural numbers, defined by applying recursively a run-length encoding of their binary digits. We design arithmetic and boolean operations with recursively run- length compressed n...
Main Author: | |
---|---|
Format: | Article |
Language: | English |
Published: |
Alexandru Ioan Cuza University of Iasi
2014-12-01
|
Series: | Scientific Annals of Computer Science |
Online Access: | http://www.info.uaic.ro/bin/download/Annals/XXIV2/XXIV2_4.pdf |
Summary: | We study arithmetic properties of a new tree-based canonical num- ber representation, recursively run-length compressed natural numbers, defined by applying recursively a run-length encoding of their binary digits. We design arithmetic and boolean operations with recursively run- length compressed natural numbers that work a block of digits at a time and are limited only by the representation complexity of their operands, rather than their bitsizes. As a result, operations on very large numbers exhibiting a regular structure become tractable. In addition, we ensure that the average complexity of our operations is still within constant factors of the usual arithmetic operations on binary numbers. Arithmetic operations on our recursively run-length compressed are specified as pattern-directed recursive equations made executable by using a purely declarative subset of the functional language Haskell. |
---|---|
ISSN: | 1843-8121 2248-2695 |