• :00Days
  • :00Hours
  • :00Mins
  • 00Seconds
A new era for learning is coming soonSign up for free
Log In Start studying!

Select your language

Suggested languages for you:
Answers without the blur. Sign up and see all textbooks for free! Illustration

Q9RE

Expert-verified
Discrete Mathematics and its Applications
Found in: Page 307
Discrete Mathematics and its Applications

Discrete Mathematics and its Applications

Book edition 7th
Author(s) Kenneth H. Rosen
Pages 808 pages
ISBN 9780073383095

Answers without the blur.

Just sign up for free and you're in.

Illustration

Short Answer

a) Define the greatest common divisor of two integers.

b) Describe at least three different ways to find the greatest common divisor of two integers. When does each method work best?

c) Find the greatest common divisor of 1,234,567 and 7,654,321 .

d) Find the greatest common divisor of 2335577911 and 2937557313.

(a)The greatest common divisor of a and b is the integer that satisfies the following two properties:

  • d|a and d|b
  • For all integer c , if c|a and c|b , then cd.

(b) Using prime factorizations, Euclidean algorithm, exhaustive method.

(c) 1.

(d) 23355573 or 2,083,725,000

See the step by step solution

Step by Step Solution

Step 1

(a) The greatest common divisor of a and b is the integer that satisfies the following two properties:

  • d|a and d|b .
  • For all integer c , if c|a and c|b, then cd.

Step 2

(b)

First method: using prime factorizations.

Determine the greatest common divisor by determining the prime factorization of each integer.

If the prime factorizations are a=p1a1p2a12...pnan and b=p1b1p2b2...pnbn with p1,p2,...pn prime numbers, a1,a2,...an,b1,b2,...bn non-negative integers, then the greatest common divisor of a1,a2,...an,b1,b2,...bn are:

gcd(a,b)=p1mina1,b1p2mina2,b2pnminan,bn

Obviously, this method will work best when the prime factorizations have been given or when the integers are small and easy to factorize.

Second method: Euclidean algorithm.

Determine the greatest common divisor by using gcd( a,b)=gcd( b,a modb) until gcd( a,b)=gcd( c,d)

with that c mod d=0 and this would then imply gcd( a,b)=gcd( c,d)=d.

This method is best used when the integers are large and hard to factorize.

Third method: Exhaustive method.

Determine all divisors of the two integers a and b. Their greatest common divisor is then the largest possible integer q such that q divides a and q divides b.

This method is the least effective and only works best when both integers are prime numbers (as then we know that the greatest common divisor is 1 ).

Step 3

(c)

gcd( 1234567,7654321)

To determine gcd( a,b), we let c=a modb. We return b if c=0 and we return 0.

1234567mod7654321=1234567gcd(1234567,7654321)=gcd(7654321,1234567)7654321mod1234567=246919gcd(1234567,7654321)=gcd(1234567,246919)1234567mod246919=246891gcd(1234567,7654321)=gcd(246919,246891)246919mod246891=28gcd(1234567,7654321)=gcd(246891,28)246891mod28=15gcd(1234567,7654321)=gcd(28,15)28mod15=13gcd(1234567,7654321)=gcd(15,13)15mod13=2gcd(1234567,7654321)=gcd(13,2)13mod2=1gcd(1234567,7654321)=gcd(2,1)2mod1=0gcd(1234567,7654321)=gcd(1)

Step 4

(d)

gcd(2335577911,2937557313)

The prime factorization of the greatest common divisors then has the same primes as the two integers, while the powers are the minimum of the powers in the prime factorizations of the two integers.

gcd(2335577911,2937557313)

role="math" localid="1668500714009" =2min(3,9)3min(5,7)5min(7,5)7min(9,3)11min(1,0)13min(1,0)=23355779111130=23355573=2,083,725,000

Recommended explanations on Math Textbooks

94% of StudySmarter users get better grades.

Sign up for free
94% of StudySmarter users get better grades.