# 2.6 Division Algorithm

- Page ID
- 7554

\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

Theorem \(\PageIndex{1}\) Well ordering principle

Every non-empty subset of \(\bf N\) has a smallest element.

**Proof**-
Add proof here and it will automatically be hidden if you have a "AutoNum" template active on the page.

Theorem \(\PageIndex{1}\): Division Algorithm

Let \(n\) and \(d\) be integers. Then there exist unique integers \(q\) and \(r\) such that \(n=dq+r, 0\leq r <|d|\), where \(q\) is the quotient and \(r\) is the reminder, and the absolute value of \(d\) is defined as:

$$|d|= \left\{ \begin{array}{c}

d, \mbox{if } d \geq 0\\

\\

-d, \mbox{if } d<0.

\end{array}

\right.$$

**Proof**-
Add proof here and it will automatically be hidden if you have a "AutoNum" template active on the page.

Let \(n\) and \(d\) be integers. Then there exist unique integers \(q\) and \(r\) such that \(n=dq+r, 0\leq r <|d|\), where \(q\) is the quotient and \(r\) is the reminder, and the absolute value of \(d\) is defined as:

$$|d|= \left\{ \begin{array}{c}

d, \mbox{if } d \geq 0\\

\\

-d, \mbox{if } d<0.

\end{array}

\right.$$

Example \(\PageIndex{1}\):

|2|=2,|-2|=2

Example \(\PageIndex{2}\):

Find the \(q\) is the quotient and \(r\) is the reminder for the following values of \(n\) and \(d\).

- \(n=2018\) and \(d=343\).

Thus \(2018=(5)(343)+303\).

2. \(n=-2018\) and \(d=343\).

Thus \(-2018=(-6)(343)+40\).-

3, . \(n=2018\) and \(d=-343\).

Thus \(2018=(6)(-343)+40\).

4.

\(n=-2018\) and \(d=-343\).

Thus \(-2018=(6)(-343)+ 40\).

Example \(\PageIndex{3}\):

Today is March 3, 2018, and it is Friday. What day will it be on March 3, 2019?

At first, note that 2019 is not a leap year. Therefore, there are \(365\) days in between March 3, 2018, and March 3, 2019. Also \(365=(52)(7)+1\). There are seven days in a week and keeping Friday as 0, we can conclude that March 3, 2019, will be a Saturday.

Leap Year

The Gregorian calendar is the calendar we most commonly use today throughout the world. The Gregorian calendar consists of both common years with 365 days and Leap years consisting of 366 days due to the intercalary day added on February 29th.Leap years are necessary in order to keep the Gregorian calendar aligned with the Earth’s revolution around the sun.

Following our modern day Gregorian calendar there are three rules to take into consideration to identify leap years:

- The year must be evenly divided by 4.
- If the year is evenly divided by 100, it is not a leap year unless:
- The year is also evenly divided by 400.

For example: year 1600, 1800, 2000 are all leap years, but year 1700 and 1900 aren’t leap years.