Cryptography Reference
In-Depth Information
Thursday'. We could write this in a pseudo-mathematical way as follows:
Tuesday
+
2
=
Thursday
.
When such a calculation takes us beyond the end of a particular week then we
will make statements such as 'three days after Friday is Monday'. Although this is
actually Monday of the following week, this does not cause us any problem since
we are treating all Mondays as 'the same' for this purpose. So:
Friday + 3 = Monday .
Similarly we can make statements such as:
Thursday 2 = Tuesday ,
and
Friday
+
7
=
Friday
.
We can restate this simple idea by now replacing the days of the week, starting
with Monday, by the numbers 0 to 6 (so Monday is 0, Tuesday is 1, and Sunday
is 6). It is now possible to write all our previous pseudo-mathematical equations
as mathematical equations. In other words:
1
+
2
=
3
4 + 3 = 0
3 2 = 1
4 + 7 = 4 .
Computing the days of the week in this manner is an example of modulo 7 (often
abbreviated to mod 7) arithmetic . It is just like normal arithmetic except that we
'wrap back around' when we reach the number 7 by treating 7 as beginning again
at 0.
MONTHS OF THE YEAR
Another example of modular arithmetic is when we calculate the months of the
year. When we try to work out what month of the year something will happen in,
we often make calculations such as 'three months after January is April'. We can
write this as:
+
=
.
January
3
April
Similarly, 'four months after October is February' is:
October + 4 = February .
 
Search WWH ::




Custom Search