5 Motivos de cambio de servicio
5.2 Descripción del motivo de cambio de servicio
Congruences can be used to determine on which day of the week a given date falls. For example, on what day of the week was July 4, 1776?
A year is the amount of time it takes the Earth to make one complete orbit around the Sun; a day is the amount of time it takes the Earth to make a complete rotation about the axis through its north and south poles. There is no reason why the number of days in a year should be an integer, and it is not; a year is approximately 365.2422 days long. In 46B.C., Julius Caesar (and his scientific advisors) compensated for this by creating the Julian calendar, containing a leap year every 4 years; that is, every fourth year has an extra day, namely, February 29, and so it contains 366 days (a common year is a year that is not a leap year). This would be fine if the year were exactly 365.25 days long, but it has the effect of making the year 365.25− 365.2422 = .0078 days (about 11 minutes and 14 seconds) too long. After 128 years, a full day was added to the calendar; that is, the Julian calendar overcounted the number of days. In the year 1582, the vernal equinox (the Spring day on which there are exactly 12 hours of daylight and 12 hours of night) occurred on March 11 instead of on March 21. Pope Gregory XIII (and his scientific advisors) then installed the Gregorian calendar by erasing 10 days that year; the day after October 4, 1582 was October 15, 1582, and this caused confusion and fear among the people. The Gregorian calendar modified the Julian calendar as follows. Call a year y ending in 00 a century year. If a year y is not a century year, then it is a leap year if it is divisible by 4; if y is a century year, it is a leap year only if it is divisible by 400. For example, 1900 is not a leap year, but 2000 is a leap year. The Gregorian calendar is the one in common use today, but it was not uniformly adopted throughout Europe. For example, the British did not accept it until 1752, when 11 days were erased, and the Russians did not accept it until 1918, when 13 days were erased (thus, the Russians called their 1917 revolution the October Revolution, even though it occurred in November of the Gregorian calendar).
The true number of days in 400 years is about
400× 365.2422 = 146096.88 days. In this period, the Julian calendar has
while the Gregorian calendar has 146,097 days (it eliminated 3 leap years from this time period). Thus, the Julian calendar gains about 3.12 days every 400 years, while the Gregorian calendar gains only 0.12 days (about 2 hours and 53 minutes).
A little arithmetic shows that there are 1628 years from 46 B.C. to 1582. The Julian calendar overcounts one day every 128 years, and so it overcounted 13 days in this period (for 13× 128 = 1662). Why didn’t Gregory have to erase 13 days? The Council of Nicaea, meeting in the year 325, defined Easter as the first Sunday strictly after the Paschal full moon, which is the first full moon on or after the vernal equinox. The vernal equinox in 325 fell on March 21, and the Synod of Whitby, in 664, officially defined the vernal equinox to be March 21. The discrepancy observed in 1582 was thus the result of only 1257= 1582−325 years of the Julian calendar: approximately 10 days.
Let us now seek a calendar formula. For easier calculation, we choose 0000 as our reference year, even though there was no year zero! Assign a number to each day of the week, according to the following scheme:
Sun Mon Tues Wed Thurs Fri Sat
0 1 2 3 4 5 6
In particular, March 1, 0000, has some number a, where 0≤ a ≤ 6. In the next year 0001, March 1 has number a+ 1 (mod 7), for 365 days have elapsed from March 1, 0000, to March 1, 0001, and
365= 52 × 7 + 1 ≡ 1 mod 7.
Similarly, March 1, 0002, has number a+ 2, and March 1, 0003, has number a+ 3. However, March 1, 0004, has number a + 5, for February 29, 0004, fell between March 1, 0003, and March 1, 0004, and so 366 ≡ 2 mod 7 days had elapsed since the previous March 1. We see, therefore, that every common year adds 1 to the previous number for March 1, while each leap year adds 2. Thus, if March 1, 0000, has number a, then the number a0of March 1, year y, is
a0≡ a + y + L mod 7,
where L is the number of leap years from year 0000 to year y. To compute L, count all those years divisible by 4, then throw away all the century years, and then put back those century years that are leap years. Thus,
L= b y/4c − b y/100c + by/400c, wherebxc denotes the greatest integer in x. Therefore, we have
a0≡ a + y + L
We can actually find a0by looking at a calendar. Since March 1, 1994, fell on a Tuesday, 2≡ a + 1994 + b1994/4c − b1994/100c + b1994/400c ≡ a + 1994 + 498 − 19 + 4 mod 7, and so a≡ −2475 ≡ −4 ≡ 3 mod 7
(that is, March 1, year 0000, fell on Wednesday). One can now determine the day of the week on which March 1 will fall in any year y > 0, namely, the day corresponding to
3+ y + b y/4c − b y/100c + by/400c mod 7.
There is a reason we have been discussing March 1. Had Julius Caesar de- creed that the extra day of a leap year be December 32 instead of February 29, life would have been simpler.22 Let us now analyze February 28. For example, suppose that February 28, 1600, has number b. As 1600 is a leap year, February 29, 1600, occurs between February 28, 1600, and February 28, 1601; hence, 366 days have elapsed between these two February 28’s, so that February 28, 1601, has number b+ 2. February 28, 1602, has number b + 3, February 28, 1603, has number b+ 4, February 28, 1604, has number b + 5, but February 28, 1605, has number b+ 7 (for there was a February 29 in 1604).
Let us compare the pattern of behavior of February 28, 1600, namely, b, b+ 2, b + 3, b + 4, b + 5, b + 7, . . . , with that of some date in 1599. If May 26, 1599, has number c, then May 26, 1600, has number c+ 2, for February 29, 1600, comes between these two May 26’s, and so there are 366≡ 2 mod 7 intervening days. The numbers of the next few May 26’s, beginning with May 26, 1601, are c+ 3, c + 4, c + 5, c + 7. We see that the pattern of the days for February 28, starting in 1600, is exactly the same as the pattern of the days for May 26, starting in 1599; indeed, the same is true for any date in January or February. Thus, the pattern of the days for any date in January or February of a year y is the same as the pattern for a date occurring in the preceding year y− 1: 22Actually, March 1 was the first day of the year in the old Roman calendar. This explains
why the leap day was added onto February and not onto some other month. It also explains why months 9, 10, 11, and 12, namely, September, October, November, and December, are so named; originally, they were months 7, 8, 9, and 10.
George Washington’s birthday, in the Gregorian calendar, is February 22, 1732. But the Gregorian calendar was not introduced in the British colonies until 1752. Thus, his original birthday was February 11. But New Year’s Day was also changed from March 1 to January 1, so that February, which had been in 1731, was regarded, after the calendar change, as being in 1732. George Washington used to joke that not only did his birthday change, but so did his birth year.
a year preceding a leap year adds 2 to the number for such a date, whereas all other years add 1. Therefore, we revert to the ancient calendar by making New Year’s Day fall on March 1; any date in January or February is treated as if it had occurred in the previous year.
How do we find the day corresponding to a date other than March 1? Since March 1, 0000, has number 3 (as we have seen above), April 1, 0000, has number 6, for March has 31 days and 3+ 31 ≡ 6 mod 7. Since April has 30 days, May 1, 0000, has number 6+ 30 ≡ 1 mod 7. Here is the table giving the number of the first day of each month in year 0000:
March 1, 0000, has number 3
April 1 6 May 1 1 June 1 4 July 1 6 August 1 2 September 1 5 October 1 0 November 1 3 December 1 5 January 1 1 February 1 4
Remember that we are pretending that March is month 1, April is month 2, etc. Let us denote these numbers by 1+ j (m), where j (m), for m = 1, 2, . . . , 12, is defined by
j (m): 2, 5, 0, 3, 5, 1, 4, 6, 2, 4, 0, 3. It follows that month m, day 1, year y, has number
1+ j (m) + g(y) mod 7, where
g(y)= y + b y/4c − b y/100c + by/400c.
Proposition 1.74 (Calendar23 Formula). The date with month m, day d, year y has number
d+ j (m) + g(y) mod 7, where
j (m)= 2, 5, 0, 3, 5, 1, 4, 6, 2, 4, 0, 3,
23The word calendar comes from the Greek “to call,” which evolved into the Latin for the
(March corresponds to m = 1, April to m = 2,. . . , February to m = 12) and g(y)= y + b y/4c − b y/100c + by/400c,
provided that dates in January and February are treated as having occurred in the previous year.
Proof. The number mod 7 corresponding to month m, day 1, year y, is 1+ j (m) + g(y). It follows that 2 + j (m) + g(y) corresponds to month m, day 2, year y, and, more generally, that d+ j (m) + g(y) corresponds to month m, day d, year y. •
Example 1.75.
Let us use the calendar formula to find the day of the week on which July 4, 1776, fell. Here m = 5, d = 4, and y = 1776. Substituting in the formula, we obtain the number
4+ 5 + 1776 + 444 − 17 + 4 = 2216 ≡ 4 mod 7; therefore, July 4, 1776, fell on a Thursday.
Most of us need paper and pencil (or a calculator) to use the calendar formula in the theorem. Here are some ways to simplify the formula so that one can do the calculation in one’s head and amaze one’s friends.
One mnemonic for j (m) is given by
j (m)= b2.6m − 0.2c, where 1 ≤ m ≤ 12. Another mnemonic for j (m) is the sentence:
My Uncle Charles has eaten a cold supper; he eats nothing hot.
2 5 (7≡ 0) 3 5 1 4 6 2 4 (7≡ 0) 3
Corollary 1.76. The date with month m, day d, year y = 100C + N, where 0≤ N ≤ 99, has number
d+ j (m) + N + bN/4c + bC/4c − 2C mod 7,
provided that dates in January and February are treated as having occurred in the previous year.
Proof. If we write a year y= 100C + N, where 0 ≤ N ≤ 99, then y= 100C + N ≡ 2C + N mod 7,
b y/4c = 25C + bN/4c ≡ 4C + bN/4c mod 7,
b y/100c = C, and b y/400c = bC/4c. Therefore,
y+ b y/4c − b y/100c + by/400c ≡ N + 5C + bN/4c + bC/4c mod 7 ≡ N + bN/4c + bC/4c − 2C mod 7. • This formula is simpler than the first one. For example, the number corre- sponding to July 4, 1776, is now obtained as
4+ 5 + 76 + 19 + 4 − 34 = 74 ≡ 4 mod 7,
agreeing with our previous calculation in Example 1.75. The reader may now discover the day of his or her birth.
Example 1.77.
The birthday of Amalia, the grandmother of Danny and Ella, is December 5, 1906; on what day of the week was she born?
If A is the number of the day, then
A≡ 5 + 4 + 6 + b6/4c + b19/4c − 38 ≡ −18 mod 7
≡ 3 mod 7. Amalia was born on a Wednesday.
Does every year y contain a Friday 13? We have 5≡ 13 + j (m) + g(y) mod 7.
The question is answered positively if the numbers j (m), as m varies from 1 through 12, give all the remainders 0 through 6 mod 7. And this is what happens. The sequence of remainders mod 7 is
2, 5, 0 , 3 , 5 , 1 , 4 , 6 , 2 , 4, 0, 3.
Indeed, we see that there must be a Friday 13 occurring between May and November. No number occurs three times on the list, but it is possible that there
are three Friday 13’s in a year because January and February are viewed as hav- ing occurred in the previous year; for example, there were three Friday 13s in 1987 (see Exercise 1.91 on page 79). Of course, we may replace Friday by any other day of the week, and we may replace 13 by any number between 1 and 28. J. H. Conway has found an even simpler calendar formula. In his system, he calls doomsday of a year that day of the week on which the last day of February occurs. For example, doomsday 1900, corresponding to February 28, 1900 (1900 is not a leap year), is Wednesday = 3, while doomsday 2000, corresponding to February 29, 2000, is Tuesday = 2, as we know from Corollary 1.76.
Knowing the doomsday of a century year 100C, one can find the doomsday of any other year y = 100C + N in that century, as follows. Since 100C is a century year, the number of leap years from 100C to y does not involve the Gregorian alteration. Thus, if D is doomsday 100C (of course, 0 ≤ D ≤ 6), then doomsday 100C+ N is congruent to
D+ N + bN/4c mod 7.
For example, since doomsday 1900 is Wednesday = 3, we see that doomsday 1994 is Monday = 1, for
3+ 94 + 23 = 120 ≡ 1 mod 7.
Proposition 1.78 (Conway). Let D be doomsday 100C, and let 0≤ N ≤ 99. If N = 12q + r, where 0 ≤ r < 12, then the formula for doomsday 100C + N is
D+ q + r + br/4c mod 7. Proof. Doomsday (100C+ N) ≡ D + N + bN/4c ≡ D + 12q + r + b(12q + r)/4c ≡ D + 15q + r + br/4c ≡ D + q + r + br/4c mod 7. •
For example, 94= 12 × 7 + 10, so that doomsday 1994 is 3 + 7 + 10 + 2 ≡ 1 mod 7; that is, doomsday 1994 is Monday, as we saw above.
Once one knows doomsday of a particular year, one can use various tricks (e.g., my Uncle Charles) to pass from doomsday to any other day in the year. Conway observes that some other dates falling on the same day of the week as the doomsday are
April 4, June 6, August 8, October 10, December 12, May 9, July 11, September 5, and November 7;
it is easier to remember these dates using the notation
4/4, 6/6, 8/8, 10/10, 12/12, and 5/9, 7/11, 9/5, and 11/7,
where m/d denotes month/day (we now return to the usual counting having Jan- uary as the first month: 1 = January). Since doomsday corresponds to the last day of February, we are now within a few weeks of any date in the calendar, and we can easily interpolate to find the desired day.
E
XERCISES1.88 A suspect said that he had spent the Easter holiday April 21, 1893, with his ailing