CS Paper Radar

The Prime Clockwork: A Dynamic Representation of Modular and Multiplicative Arithmetic

Michael T. M. Emmerich

cs.DM math.HOmath.DSmath.NTnlin.CG ·submitted 2026-09-03 14:16 UTC · v1
theoryunusual

Abstract

The way numbers are represented strongly influences which arithmetic structures are easy to see. The \emph{prime clockwork} is a recursively growing discrete dynamical system: a list of autonomous two-hand clocks driven by one common $+1$ signal. No primes or primality labels are supplied. Starting empty, the process appends a clock of period $n$ whenever none already present rings; the primes are generated internally as its growth times. For each installed prime $p$, the seconds reading $R_p$ advances through $0,\ldots,p-1$, and each return to zero increments the minutes reading $M_p$, which counts completed $p$-cycles. The hands use only increment, comparison, reset, and carry, without explicit \texttt{mod} or \texttt{div} operations. At time $n$, $n=pM_p(n)+R_p(n)$. The valuation readout $V_p(n)=ν_p(n)$ is generated locally: it is zero when the seconds counter is non-zero (silent state) and otherwise (when the p-clock rings) one plus the earlier valuation addressed by the current minutes reading. The valuation vector gives the integer in unique prime-factorized form. Its coordinates add and subtract under multiplication and division, representing every positive rational uniquely; divisibility becomes weak componentwise order, and unique factorization is natural in this representation. Finite seconds arrays form Cartesian-product state spaces whose common orbit visits every joint state once before repeating; this \emph{grand cycle} is the order-sensitive dynamical counterpart of the Chinese remainder theorem. The same coordinates expose gcd, lcm, perfect powers, Bézout's identity, and Euler's totient. Rational valuation levels reach certain positive algebraic irrationalities, but not algebraic numbers in general.

Comment
This manuscript develops a discrete dynamical-system representation of elementary number theory and uses it to give alternative proofs of classical results; it does not claim new theorems. We therefore selected History and Overview (math.HO) as the primary classification and Number Theory (math.NT) as a cross-list

Closest papers

Nearest neighbours by meaning across the whole index.

The Price of Remembering: A Calibrated Energy Law for Computation

cs.PF cs.ARcs.LO ·2026-09-01 ·Mohamed Amine Bergach
theory similarity 0.48
Abstract

Where does a computer's energy go? Mostly into keeping, not into computing. A bit held in fast storage draws power for every second it stays there, and it costs energy again each time it moves between storage levels. We call the first cost \emph{rent} and the second \emph{fare}, and we state one law: the energy of a computation is at least its operations, plus rent on every live bit for as long as it lives, plus fare on every bit moved. The model under the law prices control as well as data. There is no free clock, and any unpriced register would make the theorems false. One lemma does most of the work: every use of a value is paid for by rent, by fare, or by computing the value again. Three things follow. Exact attention brings every past token back for every new one, so its energy grows with the square of the context length, while a recurrent model with a fixed state grows linearly. The square is a theorem for machines that never re-read past tokens. Under a stated serving hypothesis it is the fare on every past token, which passes the model's own arithmetic near ten thousand tokens, the point where long-context serving becomes bandwidth-bound today. Known bounds on memory over time become joule floors: on any sequential machine with volatile working storage, sorting $n$ items pays rent proportional to $n^2/\log n$ bit-steps on most inputs, and the bound for scrypt makes every password guess cost joules that no amount of parallel hardware reduces.

0.46

Removing $m$ from $m$-pile Divisor Nim

cs.DM math.CO ·2026-10-03 ·Satyam Tyagi
theory similarity 0.46
Abstract · 23 pages, 15 tables

In Divisor Nim, a player removes from one heap a positive number of stones that divides the size of every other heap. We prove that the Sprague--Grundy (SG) value satisfies $g(P)\le 2h_{\min}+\lfloor\log_2h_{\min}\rfloor$, where $h_{\min}$ is the smallest nonempty heap, independently of the number and sizes of the other heaps. The proof starts with odd heaps and classifies removals by their factors of $2$. The largest heap in a starting board then supplies an SG bound valid throughout every successor chain. When one heap varies, we sharpen Morisawa's eventual-period bound: the smallest fixed heap controls the SG value range, the number of consecutive values compared, and an increase in the varying heap that repeats legal moves. The remaining dependence on the fixed board lies in the SG periods of direct successors. Using the largest fixed heap, we derive an explicit common period for all these recursive layers. Its possible prime divisors belong to a fixed finite set, independent of heap count; their exponents remain controlled by the total fixed stones. Finally, joining boards under one shared divisor rule preserves and can tighten the SG ceiling. Minimum 2-adic depth and its count parity determine every joined outcome, and a join with at least two odd heaps has exact SG value $0$ or $1$. We close with two conjectures: $g(P)\le2h_{\min}$, and that the least eventual SG period, when one heap varies, divides $2\operatorname{lcm}(1,\ldots,h_{\max})$. Here $h_{\max}$ is the largest fixed heap, excluding the varying heap. The second claim would remove heap-count dependence from the period bound as well.

0.30

Computation with Backward Feedback: Power, Observation, and Cost

cs.CC ·2026-11-12 ·Saman Farhat, Farzad Didehvar
similarity 0.43
Abstract

How much can a computation gain by passing information back to an earlier stage, and how soon can an observer obtain the answer? We study deterministic programs whose runs are accessed at randomly selected stages. A program keeps a register, a finite block of memory. A random clock selects the current stage; each tick takes a random step, with a law fixed independently of input, program and register. When the clock moves backward, the register contents at the stage it leaves start a new run, and the clock continues where it lands. Equilibrium readout requires a distribution of clock position and register that one tick leaves unchanged, and a correct final answer under every such distribution. For bounded steps in both directions with negative average, we obtain an exact classification at each polynomial scale s. If running time and register length are both O(s), feedback gives exactly nondeterministic space O(s); without transmission the class is deterministic time O(s), which is strictly smaller. An observer that starts at stage zero with an all-zero register, reads sequentially and never accepts a nonmember sees, with fewer ticks than any exponential, only languages fixed by a bounded input prefix. Exponentially many ticks reveal every linear-time language. For a clock moving one step up or down, we bound the wait for useful backward moves and the rate of random erasures a stored counter tolerates. The results separate the power of feedback at equilibrium, observation from a fixed start, and the cost of obtaining and keeping information.

0.21

Random Clocks on Computation Paths]{Random Clocks on Computation Paths: How Far Can They Reach, and When Does Stepping Back Help?

cs.CC math.PR ·2026-10-19 ·Farzad Didehvar, Saman Farhat
similarity 0.43
Abstract

We watch a computation only at moments chosen by a random clock that can leap ahead, pause, or step back, and we count looks rather than steps. How far can such a clock reliably see with polynomially many looks, and does stepping back help? Rare long leaps reach exponential and doubly exponential time, with infinitely many levels between polynomial and exponential time. A clock that tends to fall back sees only the start of the input, and below polynomial time we find infinitely many incomparable levels. Stepping back can help decisively. For clocks whose long leaps occur only at rare positions, no forward-only clock goes beyond polynomial time, while even single steps back raise the reach to exponential time. Stepping back cannot help, however, when the clock's leaps ignore its position.

0.50

Deterministic Linear-Time Modular Subset Sum

cs.DS ·2026-09-25 ·Phuoc Dinh Le, Kha Le
theory similarity 0.43
Abstract · 13 pages, 4 figures

We give a deterministic $O(m)$-time algorithm for exact modular subset sum over every modulus $m$. The input gives distinct residues and their multiplicities. The algorithm reports all reachable residues and answers one target query. It returns a witness when the target is reachable. The algorithm uses $O(m)$ auxiliary words on an arithmetic word-RAM. This improves Potępa's deterministic $O(m\log m\,α(m))$-time bound under the same input convention. The running time matches the cost of returning a length-$m$ Boolean array. We represent reachable residues as runs along cycles of repeated addition. Newly reached residues pay for scans of partial runs. Packed cycle flags make rebuilding take linear total time at the original modulus. A theorem on subset sums of distinct units limits the number of adaptive boundary batches to $O(m^{3/4})$. Radix sorting their $O(m)$ total keys also takes $O(m)$ time.

0.28

Simulating Nondeterministic Turing Machines in Subexponential Deterministic Time

cs.CC ·2026-11-09 ·Carmen Strassle, Bernardo Subercaseaux
similarity 0.41
Abstract

We show that every multitape nondeterministic Turing machine can be simulated deterministically in subexponential time. Specifically, we show that the recent algorithms for $3$-$\mathsf{SAT}$ presented by OpenAI and Anthropic imply $\mathsf{NTIME}[t]\subseteq\mathsf{DTIME}[2^{O(t \log \log t/\sqrt{\log t})}]$, and that a stronger consequence of their proof yields \[\mathsf{NTIME}[t] \subseteq\mathsf{DTIME}[2^{O(t /\sqrt{\log t})}]. \] More generally, we show that any subexponential time algorithm for solving circuit-CSPs transfers to a deterministic simulation of $\mathsf{NTIME}$ with the same savings. Our results follow from new generalizations of Cook--Levin, which may be of independent interest.

0.15

The Value of a Prompt: An LLM-Relative Kolmogorov-Complexity Approach

cs.AI cs.CCcs.IT ·2026-08-17 ·Rafael Pass
similarity 0.41
Abstract

In a world where valuable artifacts are increasingly created, completed, or processed by LLMs, the central economic question is not only what the LLM can produce, but what \emph{value} remains in the inputs (i.e., the prompts) we provide to it. Given a prompt, hint, critique, problem statement, or partial solution that helps an LLM produce an artifact $z$---a proof, program, design, or scientific hypothesis---how should we measure the value of that input? Intuitively, an input is valuable when it makes the target artifact easier for the model to generate: either by increasing its sampling probability, or by reducing the thinking time needed to find it. We propose a computational Levin--Kolmogorov complexity approach to this problem, by appropriately replacing the universal Turing machine in the classical definitions by the LLM itself. Concretely, we introduce an LLM-relative notion of \emph{probabilistic Levin--Kolmogorov complexity} $pKt$---treating the model's thinking as the random tape of the program, and charging logarithmically for it in Levin's manner---and define prompt value as algorithmic mutual information with respect to $pKt$. This captures the intuition above: a prompt having $b$ bits of value for an artifact $z$ makes $z$ $2^b$ times ``easier to obtain'', by multiplying the success probability by $2^b$, by dividing the required computation by $2^b$, or by any corresponding tradeoff between probability and computation. In contrast to the classical notion of algorithmic mutual information, ours is efficiently estimable. We additionally show that, under a natural reproduction experiment, a prompt value of \(b\) bits means that reproducing \(z\) without the prompt has median token cost \(2^b\) times that of reproducing it with the prompt.

0.35

Optimal single-track Gray codes from Gray-ordered necklaces

cs.DM math.COcs.IT ·2026-10-17 ·Chris Dzoba
code/data similarity 0.41
Abstract · 7 pages, 1 table. Ancillary files: Lean 4 formalization, construction and verification programs, the codes for n <= 23, and verification log…

A single-track Gray code of length $n$ is a cyclic Gray code of $n$-bit words in which every column is a cyclic shift of the first. For prime $n$ the longest possible period is $2^n-2$. Whether it is attained for every prime has been open since Hiltgen, Paterson and Brandestini introduced these codes in 1996, and optimal codes were known for primes $n\le 19$. We show that a conjecture of Degni and Drisko (2007) on the reflected Gray code order of necklaces implies optimal single-track Gray codes for every prime. Their list of necklaces, conjecturally a Gray path for prime $n$, closes into a Hamilton cycle of the necklace graph after $(n-3)/2$ explicit Pósa rotations, and such a cycle lifts to an optimal code. This implication is formalized in Lean 4. Together with computation it gives optimal single-track Gray codes for every odd prime $n\le 47$: for $n\le 37$ explicit codes checked word by word by a program independent of the generator, and for $n=41$, $43$ and $47$ codes obtained from the implication after the Degni-Drisko property was verified at these lengths by two independently written programs.

0.28