[Paper Review] Efficient Algorithms for Zeckendorf Arithmetic
This paper presents linear-time algorithms for Zeckendorf arithmetic, showing that addition and subtraction of integers represented in the Zeckendorf form (a unique sum of non-consecutive Fibonacci numbers) can be performed using combinational logic networks with O(n) size and O(log n) depth. The key contribution is a three-pass method using a sliding window to eliminate invalid digits (2s and consecutive 1s), enabling efficient parallel and serial computation with optimal resource bounds.
We study the problem of addition and subtraction using the Zeckendorf representation of integers. We show that both operations can be performed in linear time; in fact they can be performed by combinational logic networks with linear size and logarithmic depth. The implications of these results for multiplication, division and square-root extraction are also discussed.
Motivation & Objective
- To develop efficient algorithms for arithmetic operations—specifically addition and subtraction—on integers represented in the Zeckendorf form.
- To analyze the computational complexity of these operations in terms of size (number of gates) and depth (longest path), aiming for optimal bounds.
- To extend the results to multiplication, division, and square-root extraction by leveraging conversion between Zeckendorf and binary representations.
- To demonstrate that these operations can be implemented in combinational logic networks with near-optimal resource usage, matching theoretical lower bounds in terms of size and depth.
Proposed method
- The addition algorithm uses a three-pass approach: a left-to-right pass to eliminate 2s using a sliding window of four digits, followed by a right-to-left pass to resolve consecutive 1s, and a final cleanup pass.
- The window rules transform configurations like 020x → 100x′ and 030x → 110x′ to propagate carries and eliminate 2s and 3s while preserving value.
- For subtraction, the method treats signed integers by first determining the sign of the larger magnitude via left-to-right scanning, then applying the same addition algorithm to the absolute values.
- Multiplication, division, and square-root extraction are implemented by converting from Zeckendorf to binary, applying known efficient binary algorithms, and converting back to Zeckendorf representation.
- Conversion from binary to Zeckendorf representation uses a tree of Zeckendorf adders, each built from the linear-time addition algorithm, achieving O(n²) size and O((log n)²) depth.
- Conversion from Zeckendorf to binary uses carry-save adders, enabling O(n²) size and O(log n) depth, which dominates the overall complexity of the full operations.
Experimental results
Research questions
- RQ1Can addition in Zeckendorf representation be performed in linear time using combinational logic networks with optimal size and depth?
- RQ2How can subtraction be efficiently implemented in Zeckendorf representation, particularly for signed integers?
- RQ3What is the computational complexity of multiplication, division, and square-root extraction when operating directly in Zeckendorf representation?
- RQ4Can efficient conversion between binary and Zeckendorf representations be achieved with bounded resource usage to enable high-level arithmetic operations?
Key findings
- Addition of two n-digit Zeckendorf representations can be performed in O(n) time using a combinational logic network of size O(n) and depth O(log n).
- The same bounds apply to subtraction of signed integers, with the sign determined by scanning for the first non-zero digit in the input sequence.
- Multiplication, division, and square-root extraction can be implemented with combinational logic networks of size O(n²) and depth O((log n)²), using conversion to and from binary as a core component.
- The binary-to-Zeckendorf conversion step dominates the resource usage, requiring O(n²) size and O((log n)²) depth, while binary-to-Zeckendorf conversion requires O(n²) size and O(log n) depth.
- The proposed algorithms achieve optimal asymptotic bounds in terms of size and depth, matching theoretical lower bounds for any function depending on all input digits.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.