加速Conway末日算法的方法(第二部分)
数据结构与算法
2011-08-09 v4 离散数学
摘要
我们提出对用于计算任意日历日期星期几的末日算法中一个关键组件的修改。具体来说,我们建议将所需项的计算:⌊x/12⌋ + x mod 12 + ⌊(x mod 12)/4⌋ 替换为 -[ (x+11(x mod 2))/2 + 11( (x+11(x mod 2))/2 mod 2)] mod 7,其中x是两位数的输入年份;尽管我们的表达式看起来令人生畏且复杂,但我们将解释为什么它实际上易于心算。
引用
@article{arxiv.1010.0765,
title = {Methods for Accelerating Conway's Doomsday Algorithm (part 2)},
author = {Chamberlain Fong and Michael K. Walters},
journal= {arXiv preprint arXiv:1010.0765},
year = {2011}
}
备注
7th International Congress of Industrial and Applied Mathematics (2011)