# Coarse-Grained Drift Fields and Attractor-Basin Entropy in Kaprekar’s Routine

**Authors:** Christoph D. Dahl

PMC · DOI: 10.3390/e28010092 · Entropy · 2026-01-12

## TL;DR

This paper analyzes the dynamics of Kaprekar’s routine using entropy and drift fields, revealing patterns in digit-length-dependent behavior.

## Contribution

The paper introduces entropy funnels and drift fields to describe the global structure of Kaprekar’s routine for digit lengths 3 to 6.

## Key findings

- Entropy decays rapidly before entering a slow tail despite combinatorial state space growth.
- Drift fields and stationary distributions are computed numerically for low-dimensional digit-gap features.
- Permutation symmetry reduces complexity, enabling analysis of large state spaces.

## Abstract

Kaprekar’s routine, i.e., sorting the digits of an integer in ascending and descending order and subtracting the two, defines a finite deterministic map on the state space of fixed-length digit strings. While its attractors (such as 495 for D=3 and 6174 for D=4) are classical, the global information-theoretic structure of the induced dynamics and its dependence on the digit length D have received little attention. Here an exhaustive analysis is carried out for D∈{3,4,5,6}. For each D, all states are enumerated and the transition structure is computed numerically; attractors and convergence distances are obtained, and the induced distribution over attractors across iterations is used to construct “entropy funnels”. Despite the combinatorial growth of the state space, average distances remain small and entropy decays rapidly before entering a slow tail. Permutation symmetry is then exploited by grouping states into digit multisets and, in a further reduction, into low-dimensional digit-gap features. On this gap space, a first-order Markov approximation is empirically estimated by counting one-step transitions induced by the exhaustively enumerated deterministic map. From the resulting empirical transition matrix, drift fields and the stationary distribution are computed numerically. These quantities serve as descriptive summaries of the projected dynamics and are not derived in closed form.

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/PMC12839880/full.md

## Figures

12 figures with captions in the complete paper: https://tomesphere.com/paper/PMC12839880/full.md

## References

23 references — full list in the complete paper: https://tomesphere.com/paper/PMC12839880/full.md

---
Source: https://tomesphere.com/paper/PMC12839880