Example 7-4: If today is Friday, what day of the week is 6 days after today?
Solution: Since Friday is associated with number 5, we need to add 6 to 5. Thus, we have 11. But since there are only 7 days in a week we need to subtract 7 from 11. Thus, we have 4. Hence, the desired answer is Thursday.
Situations similar to examples 7-1 to 7-4 can be represented mathematically using modular arithmetic or arithmetic modulo n.
Definition 7-1:
Two integers a and b are said to be congruent modulo n, where n is a natural number, if (a-b)/n is an integer. In this case, we write a≡b mod