HackerPapers

arXiv:1010.0765cs.DS

Methods for Accelerating Conway's Doomsday Algorithm (part 2)

Chamberlain Fong, Michael K. Walters

Abstract

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.

arXiv comments
7th International Congress of Industrial and Applied Mathematics (2011)
Journal reference
DOI
Subjects
cs.DSData Structures and Algorithms cs.DMDiscrete Mathematics

On Hacker News

Linked by 2 identifiable commenters in 2 comments across 2 threads, from May 2024 to Aug 2026.

Comments linking this paper, per year.

Discussed in comments2 threads

    • For figuring the doomsday of a particular year, you can use the Odd+11 rule. Let X be the last two digits of a year. If X is odd, add 11. Divide X by 2. If X is odd, add 11. Let Y = 7 − (X mod 7). Count forward Y days from that century's anchor day to get the year's doomsday.…

      phpdave11View on HNParent context

    • Carroll's algorithm has evolved over the years. The First Sunday Doomsday Algorithm (https://firstsundaydoomsday.blogspot.com/2009/12/quick-start...) includes all the improvements published as of 2023, including Fong & Walters' nifty "odd+11" rule for calculating the year code…

      bumbledravenView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.