Greatest Common Divisor

Slides:



Advertisements
Similar presentations
For(int i = 1; i
Advertisements

GREATEST COMMON FACTOR
Remainder and Factor Theorems
MAT 320 Spring 2011 Section = 276 · = 44 · = 12 · = 8 · = 4 ·2 + 0 Start by dividing the smaller number into.
Interfaces CSC 171 FALL 2004 LECTURE 14. Project 1 review public class Rational { private int numerator, denominator; public Rational(int numerator, int.
Divisor máximo de dois inteiros. unsigned int gcd(unsigned int A, unsigned int B) { if (B > A) return gcd(B,A); else if (B==0) return A; else return gcd(B,A%B);}
Thinking Mathematically
5.1 Number Theory. The study of numbers and their properties. The numbers we use to count are called the Natural Numbers or Counting Numbers.
1 Section 2.4 The Integers and Division. 2 Number Theory Branch of mathematics that includes (among other things): –divisibility –greatest common divisor.
Chapter Primes and Greatest Common Divisors ‒Primes ‒Greatest common divisors and least common multiples 1.
Quotient-Remainder Theory, Div and Mod
Greatest Common Divisor. Definitions Let a and b be two non-zero integers. The greatest common divisor of a and b, denoted gcd(a,b) is the largest of.
Preview Warm Up California Standards Lesson Presentation.
Chapter II. THE INTEGERS
Recursion CS-240/CS341. What is recursion? a function calls itself –direct recursion a function calls its invoker –indirect recursion f f1 f2.
Codes, Ciphers, and Cryptography-RSA Encryption
How do we divide decimals?
Greatest Common Divisor Exponents Sections 1.2 & 1.3
Greatest Common Factor
NS2.4 Determine the least common multiple and the greatest common divisor of whole numbers; use them to solve problems with fractions (e.g. to find a.
1 Properties of Integers Objectives At the end of this unit, students should be able to: State the division algorithm Apply the division algorithm Find.
February 24, 2015Applied Discrete Mathematics Week 4: Number Theory 1 Modular Arithmetic Let a be an integer and m be a positive integer. We denote by.
Number Theory.  A prime number is a natural number greater than 1 that has exactly two factors (or divisors), itself and 1.  Prime numbers less than.
Numbers MST101. Number Types 1.Counting Numbers (natural numbers) 2.Whole Numbers 3.Fractions – represented by a pair of whole numbers a/b where b ≠ 0.
CP104 Introduction to Programming Recursion 2 Lecture 29 __ 1 Recursive Function for gcd Recursive formula for the greatest common divisor of m and n,
WIKIPEDIA HAS MANY MORE DIVISIBILITY RULES. EXAMPLE Since 52=13(4) is divisible by 4, is divisible by 4 Since 452=56(8)+4 is not divisible.
Lesson 5-6 Example Find 312 ÷ 8. Use short division. Step 1Look at the first digit in the dividend. Since the divisor is greater than the first digit,
5.1 Divisibility. Natural Numbers The set of natural numbers or counting numbers is {1,2,3,4,5,6,…}
Holt CA Course Equivalent Fractions and Mixed Numbers NS2.4 Determine the least common multiple and the greatest common divisor of whole numbers;
Holt CA Course Equivalent Fractions and Mixed Numbers Vocabulary equivalent fractions improper fraction mixed number.
Greatest Common Divisor Jordi Cortadella Department of Computer Science.
Fractions * Decimals * Percents The student will learn how to convert various fractions, decimals and percentages.
4-7 6th grade math Equivalent Fractions.
Here are the eight semi-regular tessellations:
Prime Factorization SWBAT find the prime factorization of a composite number.
CSE 311: Foundations of Computing Fall 2014 Lecture 12: Primes, GCD.
Holt CA Course Greatest Common Divisor Warm Up Warm Up California Standards Lesson Presentation Preview.
Google C++ Testing Framework Dr. Frank Xu Gannon University.
ALGEBRA READINESS LESSON 4-2 Warm Up Lesson 4-2 Warm Up.
Lesson #7 GCD and Factors. MULTIPLES (first 4)FACTORS Multiples you must multiply ( x ). Divisors or Factors you must divide (÷).
Application: Algorithms Lecture 20 Section 3.8 Wed, Feb 21, 2007.
CSE 311: Foundations of Computing Fall 2013 Lecture 12: Primes, GCD, modular inverse.
Holt CA Course Greatest Common Divisor Warm Up Warm Up California Standards California Standards Lesson Presentation Lesson PresentationPreview.
CSCI 125 & 161 Lecture 12 Martin van Bommel. Prime Numbers Prime number is one whose only divisors are the number 1 and itself Therefore, number is prime.
LESSON #8 LCM: Lowest Common Multiple. WHAT IS A MULTIPLE?  A multiple is what you get when you multiply by a number.  A multiple is a product of two.
Slide Copyright © 2009 Pearson Education, Inc. 5.1 Number Theory.
ALGEBRA READINESS LESSON 4-3 Warm Up Lesson 4-3 Warm Up.
Number Theory: Prime and Composite Numbers
R E C U R S I O N Legaspi, Ma. ArleneProf. Carmela Francisco MITSAT 8:00 am to 4pm.
Comparing and Ordering Integers LESSON 6-2 Compare –12 and –10. Since –12 is to the left of –10, –12 < –10. Graph –12 and –10 on the same number line.
R EDUCING F RACTIONS By, Mrs. Muller. S IMPLEST F ORM Most answers are put in the simplest form. The simplest form is when the only common divisor of.
Preview Warm Up California Standards Lesson Presentation.
Greatest Common Factor
CSCI 3333 Data Structures Recursion Exercises
Greatest Common Divisor
Reducing a Fraction to Its Simplest Form
Thinking Critically 4.1 Divisibility Of Natural Numbers
Remainder and Factor Theorems
Lesson #7 LCM and GCF.
GCD and LCM relationship
Warm - Up Review Notes… What is a Factor?
Recursive GCD Demo public class Euclid {
The Division Algorithm
Topic Past Papers –Proofs
Application: Algorithms
Greatest Common Divisor.
Factor A factor of an integer is any integer that divides the given integer with no remainder.
4-3: Remainder and Factor Theorems
Number Theory.
Greatest Common Factor
Presentation transcript:

Greatest Common Divisor

Greatest Common Divisor 385 294 = 1 R 91

Greatest Common Divisor 385 294 = 1 R 91 in other words we need gcd of 91+294 and 294

Greatest Common Divisor 385 294 = 1 R 91 in other words we need gcd of 91+294 and 294 But this is the same as the gcd of 91 and 294 since if g factors 385 and 294 then (91+294)/g is an int and 294/g is an int so (91+294)/g – 294/g is an int and g factors 91 as well.

Greatest Common Divisor 385 294 m=294 (was n) n= 91 (was R)

Greatest Common Divisor 385 294 91 = 3 R 21

Greatest Common Divisor 385 294 91 m= 91 (was n) n= 21 (was R)

Greatest Common Divisor 385 294 91 m= 91 n= 21 = 4 R 7

Greatest Common Divisor 385 294 91 21 m= 21 (was n) n= 7 (was R)

Greatest Common Divisor 385 294 91 21 m= 21 n= 7 = 3 R 0

Greatest Common Divisor Therefore, 7 is the gcd of 385 and 294! 385 294 91 21 7