Posts

Showing posts from 2010

Methods for Accelerating Conway's Doomsday Algorithm

Image
updated arXiv version of this document: http://arxiv.org/abs/1006.3913 and part 2 http://arxiv.org/abs/1010.0765 Abstract We propose a simplification of a key component in the Doomsday Algorithm for calculating the day-of-the-week of any given date. In particular, we propose to replace the calculation of the required term: floor(x/12) + x mod 12 + floor((x mod 12)/4) with 2 y + 3(y mod 2) + z + leap where x is an input two-digit year; y is the tens digit of x; z is the ones digit of x; leap is the number of leap years in the y decade less than or equal to x excluding the start of the decade; We argue that this simplification makes the algorithm simpler and easier to calculate mentally. Introduction The Doomsday rule is an algorithm for calculating the day of the week for any given calendar date. It was invented by John Horton Conway in 1982. It was designed to be simple enough that, with practice, one can do the calculation in his head without paper or penc