- Proof for author
Ten divisions to Easter
Ray Polivka (firstname.lastname@example.org)
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. 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.
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.
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
easterthat, 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 ∇