Methods for Accelerating Conways Doomsday Algorithm (part 2)
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 \bmod 12 + \lfloor \frac{x \bmod 12}{4} \rfloor with -[ \frac{x+11(x \bmod 2)}{2} + 11 (\frac{x+11(x \bmod 2)}{2}\bmod 2)] \bmod 7 for a 2-digit input year x; Although our expression looks daunting and complicated, we will explain why it is actually easy to calculate mentally.
💡 Research Summary
The paper addresses a well‑known bottleneck in John Conway’s Doomsday algorithm: the calculation of the “year anchor” for a two‑digit year x (00–99). The classic formula
⌊x/12⌋ + (x mod 12) + ⌊(x mod 12)/4⌋
requires integer division by 12, a remainder operation, and a second division by 4. While straightforward on paper, these steps are cumbersome to perform mentally because they involve keeping track of quotients, remainders, and an extra halving step.
The authors propose a replacement expression
‑
Comments & Academic Discussion
Loading comments...
Leave a Comment