<?xml version="1.0" encoding="UTF-8" ?>
  <resource>
  <id>5956</id>
  <path>/www/nrich/html/content/id/5956/</path>
  <resourceTypeID>1</resourceTypeID>
  <last_published>2011-02-01T00:00:01</last_published>
  <indexXML>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;mdoxml version=&quot;1.0&quot;&gt;&lt;br&gt;&lt;/br&gt;
&lt;p&gt;What day of the week were you born on? Do you know?&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
Here&amp;#39;s a way to find out.&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
For example, if your date of birth was 6 July 1989 :&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
$D = 6$ , $M = 7$ , and $Y = 1989$&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
If $M$ had been a 1 or 2, subtract 1 from $Y$ and add 12 to $M$.&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
$Y_F$ is made from the first two digits of $Y$ and $Y_L$ is made from the last two digits of $Y$.&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
To begin, work out the &lt;span style=&quot;font-weight: bold;&quot;&gt;sum&lt;/span&gt; of all the &lt;span style=&quot;font-weight: bold;&quot;&gt;integer&lt;/span&gt; parts of $2.6M - 5.39$ , of $\frac{Y_F}{4}$ , and of $\frac{Y_L}{4}$&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
Add $D$ &lt;span style=&quot;font-weight: bold;&quot;&gt;and&lt;/span&gt; $Y_L$ into that total, and then subtract 2 lots of $Y_F$&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
Divide that final answer by 7 and notice the &lt;span style=&quot;font-weight: bold;&quot;&gt;remainder&lt;/span&gt; .&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
A remainder value of 0 means the date was a Sunday, 1 means it was a Monday, 2 for a Tuesday, and so on.&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
Can you follow the method (what you actually have to do) ?&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
You could check some dates you happen to know the answer for ?&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
When you are getting good at using the method start to ask yourself how it works and why does it give the right result?&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
Why 2.6 and why 5.39?&lt;/p&gt;&lt;/mdoxml&gt;</indexXML>
  <solutionXML>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;mdoxml version=&quot;1.0&quot;&gt;&lt;br&gt;&lt;/br&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;Basic Idea&lt;/span&gt; &lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
The algorithm essentially counts the number of days that have
passed between a fixed date (this will be 1st January 0 AD) and a
chosen date (our birthday). By taking this number and finding its
remainder when divided by 7, provided we know what day of the week
it was on 1st January 0 AD we will know what day we were born
on.&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;Modular Arithmetic&lt;/span&gt; &lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
We do not need to know the exact number of days that have passed
since our fixed date and our birthday, just the remainder when this
number is divided by 7. To make our algorithm easier to work with,
then, we will be taking certain shortcuts, so that what we
calculate is not actually the exact number of days, but a smaller
number which has the same remainder when divided by 7 (if this is
confusing, don't worry, it will make sense later).&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
Consequently, we'll be using the ideas of 'modular arithmetic', or
'clock arithmetic'. If you have not encountered these ideas before,
you should read the NRICH article on &lt;a href=&quot;http://nrich.maths.org/public/viewer.php?obj_id=4350&quot;&gt;modular
arithmetic&lt;/a&gt; . We want to know the number days between 1 Jan 0
and our birthday &lt;span style=&quot;font-weight: bold;&quot;&gt;mod 7&lt;/span&gt;
.&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;The Algorithm&lt;/span&gt; &lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
A date can be divided into the following four bits information: the
number of hundreds of years, the number of additional years, the
number of months,and number of days that have passed since 1
January 0 AD. Suppose our birthday is 23rd September 1989. To count
the days that have passed since 1 Jan 0, we will use four steps:
count the days up to 1 Jan 1900, then the days between 1 Jan 1900
and 1 Jan 1989, the days between 1 Jan 1989 and 1 Sep 1989, and
finally the days between 1 Sep 1989 and 23 Sep 1989.&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
The number of days between 1 Sep 1989 and 23 Sep 1989 is obviously
23, or in general our number $D$. Years and months are a bit more
difficult.&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;Years&lt;/span&gt; &lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
$$\frac{365}{7}=52\times 7+1$$ so there are exactly 52 weeks and
one day in a year. This means that our birthday moves forward by
one day each year i.e. 1 year $=$ 365 days $\equiv$ 1 day (mod 7).
So, mod 7, is the number of days between 1 Jan 0 and 1 Jan 1989 is
just 1989? &lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
Unfortunately, we have to take leap years into account. There are
366 days in a leap year, and our birthday moves forward 2 days. We
need to add an extra 1 for each leap year on top of the total
number of years. How many leap years have passed since 1 Jan 0? You
probably know that we get a leap year every four years, in fact
precisely on those years which are divisible by 4. However, there
is one more rule you may not know: if a year is divisible by 100
but not divisible by 400 then it is &lt;span style=&quot;font-weight: bold;&quot;&gt;not&lt;/span&gt; a leap year. For example, 1900 is
divisible by 4, but not 400, so 1900 AD was not a leap year. &lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
The number of leap years between $Y_F$01 and $Y_F$99 is always 24,
so if for a moment we ignore leap years on the turn of the century,
every 100 years our birthday moves forward 100 + 24 = 124 days =
18$\times$7 - 2 $\equiv$ -2 (mod 7). Now we add 1 for the leap year
on 0 AD and an additional 1 every 400 years up to $Y_F$00 (this
number is $1+\big[ \frac{Y_F}{4}\big]$, where $[x]$ denotes the
integer part of $x$. In general, then, between 1 Jan 0 and $Y_F$00
there are: $$-2Y_F+ 1 + \Big[ \frac{Y_F}{4} \Big]$$ days mod 7. Up
to 1 Jan 1900 this number is $19\times -2 + 1 + \big[ \frac{19}{4}
\big] = -33 \equiv2$.&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
Thinking a similar way we can show that between 1 Jan $Y_F 00$ and
1 Jan $Y_F Y_L$ there are $$Y_L \Big[ \frac{Y_L}{4} \Big] - 1$$
days mod 7,the -1 coming from the fact that we have taken account
of leap years occuring on centuries in out previous formula.
Putting the two parts of the year formula together, up to 1 Jan
$Y_F Y_L$ days are given by:$$-2Y_F+ 1 + \Big[ \frac{Y_F}{4} \Big]
+ Y_L + \Big[ \frac{Y_L}{4} \Big] - 1= Y_L - 2Y_F+ \Big[
\frac{Y_L}{4} \Big] + \Big[ \frac{Y_F}{4} \Big]$$ &lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
The number of days mod 7 up to 1 Jan 1989 is $2 + 89 +\big[
\frac{89}{4}\big] - 1 = 112 = 0$ mod 7. &lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;Months&lt;/span&gt; &lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
Months are tricky because they contain different numbers of days.
Coming up with a formula for the number of days in the first $M$
months in terms of $M$ is requires some thought. This is by far the
most difficult part of the algorithm to derive. The first columns
of the chart below show the months $M$, days mod 7 in that month,
and the days mod 7 before the $M$th month.&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
We want to come up with a formula that will approximate the number
of days before $M$ months mod 7, in the hope that we can make it
exact by taking its integer part. Our problem month is February,
which at only 28 days long makes it hard to average out the
months.The average number of days mod 7 in months &lt;span style=&quot;font-weight: bold;&quot;&gt;not&lt;/span&gt; February is around 2.6. So we take
as a first approximation $2.6 \times M$. &lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
 
&lt;table border=&quot;0&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;$M$&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;$\quad$ Days mod 7 in $M
\quad$&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;days mod 7 before $M \quad$&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;$2.6M$ mod 7 $\quad$&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;$2.6M-4$ mod 7 $\quad$&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;$[2.6M-4]$ mod 7 $\quad$&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;$2.6M-4.39$ mod 7 $\quad$&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;$[2.6M-4.39]$ mod 7 $\quad$&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;1&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;3&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;0&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;2.6&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;5.6&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;5&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;5.21&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;5&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;2&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;0&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;3&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;5.2&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;1.2&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;1&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;0.81&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;3&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;3&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;3&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;0.8&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;3.8&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;3&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;3.11&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;3&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;4&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;2&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;6&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;3.4&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;6.4&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;6&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;6.01&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;6&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;5&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;3&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;1&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;6&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;2&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;3&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;1.61&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;6&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;2&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;4&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;1.6&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;4.6&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;4&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;4.21&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;4&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;7&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;3&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;6&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;4.2&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;0.2&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;0&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;6.81&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;6&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;8&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;3&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;2&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;6.8&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;2.8&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;2&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;2.41&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;2&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;9&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;2&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;5&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;2.4&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;5.4&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;5&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;5.01&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;5&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;10&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;3&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;0&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;5&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;1&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;1&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;0.61&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;11&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;2&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;3&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;0.6&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;3.6&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;3&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;3.21&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;3&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;12&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;3&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;5&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;3.2&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;6.2&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;6&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;5.81&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;5&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;13&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;3&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;1&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;5.8&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;1.8&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;1&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;1.41&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;14&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;0&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;4&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;1.4&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;4.4&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;4&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;4.01&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;4&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;br&gt;&lt;/br&gt;
If we subtract 4 from our first approximation, then the integer
part of this is very close to an exact formula. You will notice if
we subtract a further number between 0.2 and 0.4, then the integer
part of our approximation will be correct for all months apart from
Jan and Feb - months 1 and 2. However, if we extend our table and
replace months 1 and 2 by 13 and 14 then our formula is exact for
all months. Therefore, given that if $M$ is 1 or 2, it is replaced
by 13 or 14 and $Y_L$ is decreased by 1, the month part of the
algorithm is given by $[2.6M-4.39]$&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
So the number of days between 1 Jan 1989 and 1 Sep 1989 is
$[2.6\times 9 - 4.39] = [19.01] = 19 \equiv5$.&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;Putting everything together&lt;/span&gt;
&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
The final step is to calculate the sum of our individual parts. If
we work backwards it turns out that 1 Jan 0 AD was a Monday, so we
tweak our formula and subtract 1 from our sum to ensure that 0 is
Sunday instead. Our final formula, then, is $$D + [2.6M-4.38] +
\Big( Y_L - 2Y_F+ \Big[ \frac{Y_L}{4} \Big] + \Big[ \frac{Y_F}{4}
\Big] \Big) - 1 = D + Y_L -2Y_F + [2.6M-5.39] + \Big[ \frac{Y_L}{4}
\Big] + \Big[ \frac{Y_F}{4} \Big]$$ For 23 Sep 1989 we get 23 + 5 +
0 - 1 = 27 = 6 mod 7. So 23 Sep 1989 was a Saturday.&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;&lt;/mdoxml&gt;</solutionXML>
  <noteXML>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;mdoxml version=&quot;1.0&quot;&gt;&lt;br&gt;&lt;/br&gt;
&lt;h3&gt;Why do this problem?&lt;/h3&gt;
&lt;p&gt;This problem introduces students to the idea of an algorithm. We hope that the context of finding the day of the week for key dates adds a little extra interest. Beneath it all is the important idea of modulo arithmetic.&lt;/p&gt;
&lt;h3&gt;Possible approach&lt;/h3&gt;
&lt;p&gt;Start with some dates for which students feel confident they know the day of the week. It might be a recent date (Christmas last year, or a recent wedding) or something like a major sporting event which happens on a particular day (often Saturday).&lt;/p&gt;
&lt;p&gt;Ask if any student happens to know the day in the week on which they were born. Students might ask their parent or guardian in preparation for this lesson.&lt;/p&gt;
&lt;p&gt;Then invite students to try out the algorithm with some birth dates.&lt;/p&gt;
&lt;p&gt;Check that the method is understood and practised to the point of familiarity.&lt;/p&gt;
&lt;p&gt;That brings the group to the heart of the problem : how does this algorithm do its job ?&lt;/p&gt;
&lt;p&gt;One way to explore that question is to think about the procedure we would need to follow if this was a &amp;#39;one off&amp;#39; problem and for which we had no ready-made algorithm available.&lt;/p&gt;
&lt;h3&gt;Key questions&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;How does this algorithm do its job ?&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;Why 2.6 and why 5.39 ?&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;How would you find the day of the week on which you were born if there was no ready-made algorithm available ?&lt;/li&gt;
&lt;/ul&gt;
&lt;br&gt;&lt;/br&gt;
&lt;h3&gt;Possible extension&lt;/h3&gt;
&lt;p&gt;Design a spreadsheet that uses the algorithm to report the day of the week for any given birth date.&lt;br&gt;&lt;/br&gt;
 &lt;/p&gt;
&lt;h3&gt;Possible support&lt;/h3&gt;
&lt;p&gt;Students could be introduced to the idea of algorithms using a more familiar context, such as the long multiplication algorithms in &lt;a href=&quot;http://nrich.maths.org/5612&quot;&gt;this problem&lt;/a&gt;.&lt;br&gt;&lt;/br&gt;
 &lt;/p&gt;&lt;/mdoxml&gt;</noteXML>
  <clueXML>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;mdoxml version=&quot;1.0&quot;&gt;&lt;br&gt;&lt;/br&gt;
The calculation must 'count back', or 'count
forward', from
somewhere in some way. &lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
First in whole weeks, then the bit that is left (the days that
don't make a whole week) could indicate the position in the week,
ie. 'day'&lt;br&gt;&lt;/br&gt;&lt;/mdoxml&gt;</clueXML>
  <canonXML>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;mdoxml version=&quot;1.0&quot;&gt;The Day-of-Week is in essence the remainder obtained by dividing
the Day-Count by seven :- &lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
1. Day-Count rises with Day-of-Month &lt;br&gt;&lt;/br&gt;
2. For March-based years, Zeller observed that Day-Count rises
near-linearly with Month, and the length of February becomes
irrelevant, &lt;br&gt;&lt;/br&gt;
3. For March-based years, Day-Count rises by 365 per year, with
correcting terms for each applicable Leap Year Rule depending only
on the year &lt;br&gt;&lt;/br&gt;
4. If only Day-of-Week is needed, multiples of seven can be omitted
throughout. &lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
For Rule 2, Zeller used a factor of 26/10, equivalent to 30.6 days
per month, presumably the simplest to work with. It appears that
367/12 = 28 + 31/12 = 30.583 days per month, which might be
considered more logical*, can also be used. &lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
* : If February were an &amp;quot;ordinary short&amp;quot; month, the year would have
367 days. &lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
&lt;a href=&quot;http://www.merlyn.demon.co.uk/zeller-c.htm#Prs&quot;&gt;http://www.merlyn.demon.co.uk/zeller-c.htm#Prs&lt;/a&gt;&lt;br&gt;&lt;/br&gt;&lt;/mdoxml&gt;</canonXML>
  <end_user_role>2</end_user_role>
  <difficulty>4</difficulty>
  <keystage1>0</keystage1>
  <keystage2>0</keystage2>
  <keystage3>0</keystage3>
  <keystage4>1</keystage4>
  <keystage4plus>0</keystage4plus>
  <title>Zeller's Birthday</title>
  <description>What day of the week were you born on? Do you know? Here's a way to
find out.</description>
  <spec_group>Admin
    <specifier>Short problems</specifier>
  </spec_group>
  <spec_group>Information and Communications Technology
    <specifier>Spreadsheets</specifier>
  </spec_group>
  <spec_group>Decision Mathematics and Combinatorics
    <specifier>Algorithms</specifier>
  </spec_group>
  <spec_group>Numbers and the Number System
    <specifier>Modulus arithmetic</specifier>
  </spec_group>
</resource>