- Proof for author
- 1.1
Ten divisions to Easter
Ray Polivka (polivkar@juno.com)
See also Ray Cannon’s article “When is Easter” in Vector 10.3. Ed.
No doubt many of you have heard of the problem of determining the calendar date of Easter. Perhaps you have seen a program solving this problem or have written one.
While browsing in one of my mathematical puzzle books, I found this intriguing solution. It is an unambiguous algorithm, involving only ten divisions, that produces the proper date for Easter given only an integer representing the year for which you wish it. This intriguing algorithm is described by T.H. O’Beirne in his book entitled Puzzles and Paradoxes.[1] He described the algorithm in great detail. This is preceded by a lengthy and fascinating history of the calculation of Easter. The basic difficulties in computing the date of Easter occur because of the discrepancies between the ecclesiastical needs and astronomical data.
This ten-division algorithm is organized as a table. In presenting this table, O’Beirne stated “we shall give a purely number rule – subject to no exceptions of any kind – which calculates the date of Easter from a knowledge only of the year number, with no reference to any other rules or tables.” He went on to state his tabular scheme is based on a correct procedure published in Nature in 1876 by an anonymous New York author. He then said “Based on this procedure, we have developed similar methods of our own, which are now published for the first time.” Here is the table he gave.
Step | Dividend | Divisor | Quotient | Remainder |
---|---|---|---|---|
1. | x | 19 | – | a |
2. | x | 100 | b | c |
3. | b | 4 | d | e |
4. | 8b+13 | 25 | g | – |
5. | 19a+b-d-g+15 | 30 | – | h |
6. | a+11h | 319 | u | – |
7. | c | 4 | i | k |
8. | 2e+2i-k-h+u+32 | 7 | – | q |
9. | h-u+q+90 | 25 | n | – |
10. | h-u+q+n+19 | 32 | – | p |
In the xth year A.D. of the Gregorian calendar, Easter Sunday is the pth day of the nth month. The date of the Easter full moon is obtained if -1 is substituted for q in steps 9 and 10.
O’Beirne also included a second table in which he felt computation may be easier. This is the second table.
Step | Dividend | Divisor | Quotient | Remainder |
---|---|---|---|---|
1. | x | 100 | b | c |
2. | 5b+c | 19 | – | a |
3. | 3(b+25) | 4 | d | e |
4. | 8(b+11) | 25 | m | – |
5. | 19a+d-m | 30 | – | h |
6. | a+11h | 319 | n | – |
7. | 60(5-e)+c | 4 | j | k |
8. | 2j-k-h+n | 7 | – | w |
9. | h-n+w+110 | 30 | n | q |
10. | q+5-n | 32 | – | p |
Again, in the xth year A.D. of the Gregorian calendar, Easter Sunday is the pth day of the nth month.
This is a fine problem for someone learning APL. It is a nice illustration of encode. The problem could be stated as:
Create a function
easter
that, given the year, will calculate the date of Easter using the second Ten Division Table.easter 2009 Easter is April 12, 2009
Here is a solution using the first table.
∇ z←easter y;⎕ML;a;b;c;d;e;g;h;i;k;l;m;n;p;q;u ⍝ y: year as an integer ⍝ z: date of Easter ⎕ML←3 a←19⊤y (b c)←0 100⊤y (d e)←0 4⊤b g←↑0 25⊤13+8×b h←30⊤(19×a)+b+15-d+g u←↑0 319⊤a+11×h (i k)←0 4⊤c q←7⊤(2×e+i)+u+32-k+h n←↑0 25⊤h+90+q-u p←32⊤h+q+n+19-u z←'Easter is ',(↑(n=4)⌽'March' 'April'),' ',(⍕p),', ',⍕y ∇