Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
126 views22 pages

L. Gaceta Division Algorithm

This document provides information and examples about the division algorithm. It begins with four examples of using the division algorithm to find the quotient and remainder when dividing integers. It then presents the division algorithm theorem for non-negative integers and works through an example. Next, it discusses the division algorithm for negative integers and an example. Finally, it states the division algorithm can also be used to divide polynomials and provides an example.

Uploaded by

Lowie D Gaceta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
126 views22 pages

L. Gaceta Division Algorithm

This document provides information and examples about the division algorithm. It begins with four examples of using the division algorithm to find the quotient and remainder when dividing integers. It then presents the division algorithm theorem for non-negative integers and works through an example. Next, it discusses the division algorithm for negative integers and an example. Finally, it states the division algorithm can also be used to divide polynomials and provides an example.

Uploaded by

Lowie D Gaceta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 22

LAGUNA STATE POLYTECHNIC UNIVERSITY

Main Campus
COLLEGE OF TEACHER EDUCATION
Graduate Studies & Applied Research
MATH 501: NUMBER THEORY

DIVISION ALGORITHM
LOWIE D. GACETA
Teacher III
Pedro Guevara MNHS
PRE-ACTIVITY

https://classpoint.app/join

Class Code: 97638


Find the quotient q and remainder r .
1.
68 divided by 7
Format of the answer to be submitted in classpoint:
q,r
9,5
Find the quotient q and remainder r .
2.
92 divided by 8
Format of the answer to be submitted in classpoint:
q,r
11,4
Find the quotient q and remainder r .
3.
-36 divided by 5
Format of the answer to be submitted in classpoint:
q,r
-8,4
Find the quotient q and remainder r .
4.
-156 divided by 7
Format of the answer to be submitted in classpoint:
q,r
-23,5
DIVISION ALGORITHM
THEOREM
Given integers a and b, b>0, then there exist
unique integers q and r satisfying,
a = bq + r , 0 r b.
The integers q and r are called quotient and
remainder in the division of a and b.
Division Algorithm for non-negative integers

Input some non-negative integer a and some


natural number b, output integers q and r such
that a = bq + r , 0 r b.
Input:
A non-negative a and natural number b
Output:
Two integers q and r such that a = bq + r , 0 r b.
1. If a < b then return 0, a
2. Let q = 0
3. Let r = a
4. Repeat
a. let r = r – b
b. let q = q + 1
5. Until r < b
6. Return q,r
Consider a = 20, b = 3
a < b3 is false
1. 20
2. Let q = 0
3. Let r = 20a
4. First Fourth
a. let r = r – b = 20 - 3 = 17 a. let r = r – b = 11 - 3 = 8
b. let q = q + 1 = 0 + 1 = 1 b. let q = q + 1 = 3 + 1 = 4
Second Fifth
a. let r = r – b = 17 - 3 = 14 a. let r = r – b = 8 - 3 = 5
b. let q = q + 1 = 1 + 1 = 2 b. let q = q + 1 = 4 + 1 = 5
Third Sixth
a. let r = r – b = 14 - 3 = 11 a. let r = r – b = 5 - 3 = 2
b. let q = q + 1 = 2 + 1 = 3 b. let q = q + 1 = 5 + 1 = 6
Consider a = 20, b = 3
r=2 q=6

r<b q = 6, r = 2
Return q,r
a = bq + r
Therefore, 20 = 3 6 + 2
Consider a = 30, b = 8
a<8
1. 30 b is false
2. Let q = 0
3. Let r = 30
a
4. First
a. let r = r – b = 30 - 8 = 22 r=6 q=3
b. let q = q + 1 = 0 + 1 = 1
Second r<b q = 3, r = 6
a. let r = r – b = 22 - 8 = 14 Return q,r
b. let q = q + 1 = 1 + 1 = 2 a = bq + r
Third
Therefore, 30 = 8 3 + 6
a. let r = r – b = 14 - 8 = 6
b. let q = q + 1 = 2 + 1 = 3
Division Algorithm for negative integers

Input some negative integer a and some


natural number b output integers q and r such
that a = bq + r , 0 r b.
Input:
A negative number a and natural number b
Output:
Two integers q and r such that a = bq + r , 0 r b.
1. Let q = 0
2. Let r = a
3. Repeat
a. let r = r + b
b. let q = q - 1
4. Until r 0
5. Return q,r
Consider a = -27, b = 7 Fourth
1. Let q = 0 a. let r = r + b = -6 + 7 = 1
2. Let r = -27
a b. let q = q - 1 = -3 - 1 = -4
3. First
a. let r = r + b = -27 + 7 = -20 r = 1 q = -4
b. let q = q - 1 = 0 - 1 = -1
Second r 0 q = -4,r = 1
a. let r = r + b = -20 + 7 = -13 Return q,r
b. let q = q - 1 = -1 - 1 = -2 a = bq + r
Third
Therefore, -27 = 7 (-4) + 1
a. let r = r + b =-13 + 7 = -6
b. let q = q - 1 = -2 - 1 = -3
Consider a = -20, b = 7
1. Let q = 0
2. Let r = a-20
3. First
a. let r = r + b = -20 + 7 = -13 r=1 q = -3
b. let q = q - 1 = 0 - 1 = -1
Second r 0 q = -3,r = 1
a. let r = r + b = -13 + 7 = -6 Return q,r
b. let q = q - 1 = -1 - 1 = -2 a = bq + r
Third
Therefore, -20 = 7 (-3) + 1
a. let r = r + b = -6 + 7 = 1
b. let q = q - 1 = -2 - 1 = -3
Division Algorithm for Polynomials
Divide by
2 −𝟏
𝒙 +𝟐𝟐 𝒙 +𝟑 𝒙 +𝟏
𝟐

𝟐 𝒙 +𝟒 𝒙
𝟐

− 𝒙+𝟏
-
𝟑
By division algorithm we have, a = bq + r
=
Divide by
𝟐 𝟐 𝟖 𝟑 𝟏
𝟒 𝟐𝟒 𝟓𝟒
𝟐 𝟏𝟐 𝟐𝟕 𝟓𝟓 2

By division algorithm we have, a = bq + r


=
THANK YOU!!!

You might also like