Related papers: Methods for Accelerating Conway's Doomsday Algorit…
We propose a modification of a key component in the Doomsday Algorithm for calculating the day of the week of any calendar date. In particular, we propose to replace the calculation of the required term: \lfloor \frac{x}{12} \rfloor + x…
Conway's Doomsday Algorithm (1973) determines the day of the week for any date in the Gregorian calendar via three additive components: a century anchor, a year offset, and a month-day offset. The century anchor is a fixed four-entry table.…
The dominant part in the mental calculation of the day of the week for any given date is to determine the year share, that is, the contribution of the two-digit year part of the date. This paper describes a number of year share computation…
In this paper, we propose a new algorithm of calculating the day of the week for any given century, year, month and day in Gregorian calendar. We provide two simple formulas to convert the century and the year into two integers. Then we…
Counting distinct permutations with replacement, especially when involving multiple subwords, is a longstanding challenge in combinatorial analysis, with critical applications in cryptography, bioinformatics, and statistical modeling. This…
We have been working in many aspects of the problem of analyzing, understanding and solving ordinary differential equations (first and second order). As we have extensively mentioned, while working in the Darboux type methods, the most…
The Gregorian calendar -- first established for daily use on Friday, October 15th, 1582 by Pope Gregory XIII in Catholic countries -- is presently the most pervasive calendar in the world. As such, algorithms for performing various…
In this recreative piece of work, we present Gauss' calendar formula with some examples to demonstrate how it is applied. Then, based on it, we give a formula for determining dates of particular week days of a given month, and some examples…
This paper presents an algorithm for the integer multiplicative inverse (mod $2^w$) which completes in the fewest cycles known for modern microprocessors, when using the native bit width $w$ for the modulus $2^w$. The algorithm is a…
The classical division algorithm for polynomials requires $O(n^2)$ operations for inputs of size $n$. Using reversal technique and Newton iteration, it can be improved to $O({M}(n))$, where ${M}$ is a multiplication time. But the method…
We improve the "sieve" part of the number field sieve used in factoring integer and computing discrete logarithm. The runtime of our method is shorter than that of existing methods. Under some reasonable assumptions, we prove that it is…
The Doomsday Argument (DA) has sparked a variety of opinions. Here I address a key question posed by F. Simpson (2016) that confronts the views of DA proponents and those who, like me, oppose the DA. I agree that typical locations within a…
We consider a recently introduced fair repetitive scheduling problem involving a set of clients, each asking for their associated job to be daily scheduled on a single machine across a finite planning horizon. The goal is to determine a job…
We consider a version of Shor's quantum factoring algorithm such that the quantum Fourier transform is replaced by an extremely simple one where decomposition coefficients take only the values of $1,i,-1,-i$. In numerous calculations which…
Let $f$ be a fixed (holomorphic or Maass) modular cusp form. Let $\cq$ be a Dirichlet character mod $q$. We describe a fast algorithm that computes the value $L(1/2,f\times\chi_q)$ up to any specified precision. In the case when $q$ is…
We present a simple and fast algorithm for computing the $N$-th term of a given linearly recurrent sequence. Our new algorithm uses $O(\mathsf{M}(d) \log N)$ arithmetic operations, where $d$ is the order of the recurrence, and…
Loop acceleration can be used to prove safety, reachability, runtime bounds, and (non-)termination of programs operating on integers. To this end, a variety of acceleration techniques has been proposed. However, all of them are monolithic:…
This paper shows that it is possible to improve the computational cost, the memory requirements and the accuracy of Quick Fourier Transform (QFT) algorithm for power-of-two FFT (Fast Fourier Transform) just introducing a slight modification…
Given n=p*q with p and q prim and y in Z_{p*q}^*. Shor's Algorithm computes the order r of y, i.e. y^r=1 (mod n). If r=2k is even and y^k \ne -1 (mod n) we can easily compute a non trivial factor of n: gcd(y^k-1,n). In the original paper it…
We propose a new method to accelerate the convergence of optimization algorithms. This method simply adds a power coefficient $\gamma\in[0,1)$ to the gradient during optimization. We call this the Powerball method and analyze the…