FracBits Algorithm Overview
- FracBits algorithm is a computational method defined by a real-valued Collatz-type iteration that generalizes classical integer dynamics to reveal unique cyclic behavior.
- It incorporates an entropy-efficient coin-flip protocol that simulates fair n-sided die rolls while achieving minimal per-roll entropy loss.
- The method demonstrates practical efficiency with O(1) iteration time and applications ranging from rigorous mathematical proofs to optimized FPGA implementations.
The FracBits algorithm refers to several technically distinct but nomenclaturally related approaches in computational mathematics and computer science. Most notably, "FracBits" has been used as (1) the name for a real-valued Collatz-type iterative dynamical system, (2) a practical entropy-efficient code for simulating fair die rolls with minimal entropy wastage, and (3) an FPGA-oriented binary neural network (FracBNN) design employing fractional activations. This entry provides an in-depth exposition of the first two algorithmic families—the fractional $3n+1$ iteration and the entropy-efficient coin-flip–based die simulation—explicitly following their published definitions, properties, and computational behavior.
1. Fractional Collatz-Type Iteration: Mathematical Definition and Motivation
The "FracBits" algorithm, as introduced in the context of the fractional $3n+1$ conjecture, generalizes the celebrated integer Collatz sequence to real numbers via a real-valued dynamical system defined by the map (Brier et al., 2020). For ,
where denotes the greatest integer less than or equal to . The iteration rule is
with strict branching at $1/2$ in the first clause (fractional part ) and inclusive in the second ($3n+1$0). For any initial value $3n+1$1, the sequence is given recursively by $3n+1$2.
This extension is reminiscent of the integer Collatz iteration but exhibits fundamentally different—or at least richer—cycle structures due to real-valued branching.
2. Dynamical Behavior and Main Conjecture
The main conjecture (Conjecture 2.2 in (Brier et al., 2020)) concerning the real-valued $3n+1$3-orbit is that for every real seed $3n+1$4,
- Either the trajectory $3n+1$5 converges monotonically to $3n+1$6 (i.e., after finitely many steps $3n+1$7),
- Or the orbit is eventually periodic, falling into a unique 29-cycle of real numbers, with integer parts of the repeating sequence given (listed here as a periodic sequence of length 29):
$3n+1$8
This behavior is fully proven for $3n+1$9 via a contraction argument and a constructive interval-coverage procedure (see Section 4).
3. Implementation: Explicit Iteration and Pseudocode
Given the branching rule of 0, the FracBits iteration is readily implementable with only basic arithmetic operations and a conditional:
7
This stepwise construction ensures exact reproducibility of orbits for any seed.
4. Cycle Analysis, Fixed Points, and Proof Structure
The proof of the main conjecture on 1 proceeds by the following stages (Brier et al., 2020):
- Kernel Interval and Contractivity: Define 2. The map 3 acts as a strict contraction on 4, with unique fixed point 5 such that 6.
- Backwards-Reachability: By iterative branching, construct a sequence of intervals 7 with the property that any 8 reaches 9 in finitely many 0-steps, and thus is attracted into the 29-cycle.
- Interval Covering: Computer-assisted expansion shows that all 1 eventually enter 2. For 3, repeated iterations (bounded by 6) move the orbit into 4.
- Extension: Automated interval extension (e.g., via Mathematica) confirms that 5 exceeds 100 after 3626 iterations, establishing the conjecture for all real 6.
Beyond this, the proof requires only computational resources to extend coverage further. Importantly, no new theoretical issues arise with higher 7, though plateau regions in coverage growth suggest computational bottlenecks.
5. Entropy-Efficient Coin-Flipping for Fair Random Rolls
Independently, the “FracBits algorithm” as named by Ömer & Pacher refers to a distinct entropy-recycling protocol for simulating fair 8-sided die rolls using unbiased coin flips, achieving minimal per-roll entropy loss (Ömer et al., 2014). The state is parametrized by 9:
- 0: current pool size (think 1 "faces"),
- 2: uniformly random current value.
To roll a fair 3-sided die, the procedure:
- Carves out 4 disjoint blocks of 5 faces each (with 6 faces left unused),
- Accepts 7 (majority of the pool): emits 8, sets 9,
- If 0: sets 1 ("reject"), and repeats,
- When 2, refills by shifting in 3 unbiased bits (e.g., 4, 5).
No entropy is lost except for the decision bit "accept/reject" at 6. Over many trials, total entropy loss per roll is strictly 7, where 8 and 9 denotes binary entropy. This approaches zero for large 0, achieving nearly the theoretical minimum 1 coin flips per roll.
6. Algorithmic Properties and Practical Considerations
- Time Complexity: Each iteration is 2; the number of iterations per roll is geometrically distributed with mean 3.
- Space Complexity: 4 to store the state; in practice, 5 is chosen as a machine word (e.g., 64 bits).
- Entropy Efficiency: As 6, 7, waste 8. For practical values (e.g., 9 for 0, 1), entropy waste per roll is empirically 2 bits, far below alternatives.
- Assumptions: Input bits are unbiased and independent; any bias directly propagates.
- Extensions: Vectorized draws (multiple dice from one pool), adaptive refill block sizes, and dynamic reservoir thresholds are straightforward.
Empirically, this method delivers per-roll entropy costs asymptotically indistinguishable from the theoretical minimum, with all but the acceptance test information content recycled (Ömer et al., 2014).
7. Related Algorithmic Directions and Distinctions
Although the identifier "FracBits" appears in further literature describing neural architectures with fractional activations ("FracBNN") (Zhang et al., 2020), the dynamical-iteration and entropy-coding usages are logically and technically unrelated. The fractional 3 system is a mathematical generalization of integer recurrence, while the entropy-efficient FracBits scheme is an optimal coding protocol for fair, unbiased random number drawing with minimal entropy loss and maximal reuse.
Both algorithms are characterized by provable extremal properties: the 4 real-valued system features a unique global attractor/cycle under empirically exhausted regions, and the FracBits entropy-coder achieves strictly minimal entropy waste per die roll. However, they unfold in disparate theoretical contexts and should not be conflated beyond the superficial name overlap.
References:
- Fractional 5 iteration and conjecture: "A Fractional 6 Conjecture" (Brier et al., 2020)
- Entropy-efficient die simulation: "Saving fractional bits: A practical entropy efficient code for fair die rolls" (Ömer et al., 2014)
- FPGA-efficient binary neural networks with fractional activation: "FracBNN: Accurate and FPGA-Efficient Binary Neural Networks with Fractional Activations" (Zhang et al., 2020)