Jumping Jiving GCD Summary Resources 1 Jumping Jiving GCD 1. Motivation: Simplifying Fractions We know that there are many different ways of writing the same number as a fraction, for example: 2 50 = 3 75 Which means that carving out 2 thirds of a pie is the same as carving out the pie in 75 little pieces and picking 50 of them ... hard work! Based on this, we say that there is a βbestβ or easiest way to write a fraction, when it is impossible to cancel out anything between the numerator and the denominator. The fraction is said to be reduced, or in simplest form, in this case. To bring a fraction to its simplest form one may do successive simplifications: 50 50 ÷ 5 10 ÷ 5 2 = = = 75 75 ÷ 5 15 ÷ 5 3 Or one can do it in one strike like this: 50 50 ÷ 25 2 = = 75 50 ÷ 25 3 In both cases one simplifies by numbers that divide both the numerator and denominator. The Greatest Common Divisor (GCD) a.k.a. Highest Common Factor (HCF) Question: What is special about the number 25 above? (think in relation to 50 and 75). Answer: 25 is the largest natural number which divides both 50 and 75. The greatest common divisor of two numbers is the largest number that divides them both. The greatest common divisor of π and π is usually denoted by gcd(π, π). For example, gcd(50, 75) = 25. Co-prime numbers Question: π Suppose that π is the simplest form of a fraction. What is gcd(π, π) ? Answer: gcd(π, π) = 1. If gcd(π, π) = 1 then π and π are said to be co-prime. In other words, they have no other common divisors except 1. Question: Can you find a number which is co-prime with all numbers except multiples of itself? 2 Can you name all such numbers? Answer: The prime numbers. Simplifying fractions, finding π ππ(π, π). Take any two numbers π and π. Next weβll look at different methods for finding gcd(π, π), π that is, of bringing a fraction π to its simplest form. Method I: Successive simplification. Looking back at our first example 50 50 ÷ 5 10 ÷ 5 2 = = = 75 75 ÷ 5 15 ÷ 5 3 How can gcd(50, 75) be extracted from this calculation? Answer: gcd(50,75) = 25 = 5 × 5, the product of the numbers by which we simplified. Thatβs because 50 ÷ 5 ÷ 5 = 50 ÷ (5 × 5) = 50 ÷ 25 = 2 and 75 ÷ 5 ÷ 5 = 75 ÷ (5 × 5) = 70 ÷ 25 = 3 and 2 and 3 clearly have no other common divisors. Practice exercise: Use successive simplification to find gcd(60,84). Answer: (in its goriest form): 60 60 ÷ 2 30 ÷ 2 15 ÷ 3 5 = = = = 84 84 ÷ 2 42 ÷ 2 21 ÷ 3 7 We simplified by 2, 2, and 3 so gcd(60,84) = 2 × 2 × 3 = 12. Method II: Prime factorization. This worked well and good, but what if we canβt easily find any common divisors? Example: Find gcd(345, 184). Solution: We canβt find a number that divides both 345 and 184 right away, but we can find some divisors for each of them at a time. So letβs just prime factorize the numbers. The hidden common factors will surely reveal themselves: πππ = π × π × ππ and πππ = ππ × ππ. And gcd(345,184) = 23. Now suppose we have prime factorized two numbers. Letβs derive some basic rules for finding their gcd. Example: Find gcd(π, π) for π = 23 × 32 × 7 × 135 , and π = 2 × 33 × 5 × 74 . Solution: gcd(π, π) = 2 × 32 × 7 = 126. Rule: gcd(π, π) = the product of all common primes, each chosen with its smallest index between the prime factorizations of π and π . Explanation: The prime 2 comes up with index 3 in π and index 1 in π, so in gcd(π, π) it will come up with index 1= min( 3, 1). Recall that 2 = 21 . 3 Indeed, 2 divides both a and b but 22 wouldnβt divide b so it canβt be a factor of gcd(π, π). We can generalize to as many numbers we want. Practice exercise: Find gcd(π, π, π) when for π = 2 × 3 × 4 × 5, and π = 6 × 7 × 8 × 9 and for π = 10 × 11 × 12 × 13. Solution: Prime factorisation Method III: Euclidβs algorithm. What if even prime factorization fails with numbers π and π: what if π and π are too large to factorize, or what if they are written as sums with terms depending of an unknown number π? Strategy: reduce our numbers to manageable proportions, using these simple Simplifying principles: π 1) If a fraction π can be simplified by a number, then π π + 1, π π π π π π π β 1, π β 2, π β3, ... as well as + 2, π + 3 ... can be simplified by the same number. 2) If a fraction number. π π can be simplified by a number, then π π can be simplified by the same Proof of the principles: Point 2) Is pretty clear, as in both cases π and π are divisible by that same number. π πβπ π For 1), π β 1 = π . Letβs assume π can be simplified by a number π. That is, π| π and π|π. But then π|(π β π). So both numerator and denominator of We can adapt this argument for all the other fractions. πβπ π are divisible by π. Application: Euclidβs algorithm for finding gcd(π, π), the magic simplifying factor of the π fraction π : Letβs suppose that the fraction is what you call improper, so the denominator (bottom) is smaller than the numerator (top). Then 1) We divide the numerator by the denominator to get a mixed number, then discard the integer parts. 2) We turn the resulting fraction upside down, to get its reciprocal. 3) The resulting fraction will have the same simplifying factors as the original one, but smaller numbers. We apply steps 1) and 2) again as many times as necessary until the fraction becomes manageable. Memo Note: Euclidβs algorithm closely resembles Greco-Roman wrestling between the numerator and the denominator: 1) First the denominator knocks a few units off the numerator. 2) Then it topples the numerator down and gets on top. 3) They start all over again. This analogy seems quite appropriate because Euclid founded a famous Greek school of mathematics. 4 Example: Find gcd(π, π) in each of the following two cases: i) π = 23456, and π = 34567. ii) π = 6π + 10 and π = 8π + 11 where π is some unknown natural number. Solutions: i) Since 34567 > 23456, letβs start with 34567 11111 34567 : 23456 = 1 + 23456 has the same simplifying factors as 23456 23456 11111 11111 1234 1234 = 2 + 11111 has the same simplifying factors as =9+ 5 1234 has the same simplifying factors as 5 11111 23456 1234 11111 , and so also as 11111. 23456 , and so also as 11111 5 1234 . . 1234 But 5 clearly doesnβt divide 1234 so 1234 is in reduced form, 5 and 1234 are co-prime. 34567 This means that 23456 was in reduced form in the first place, so 34567 and 23456 are coprime. In terms of gsd-s we can write: gcd(34567,23456)=gcd(23456,11111)=gcd(11111,1234)=gcd(1234,5)=1. ii) Solution I π = 6π + 10 and π = 8π + 11 where π is some unknown natural number. We write 8π + 11 = 6π + 10 + 2π + 1 so 8π + 11 2π + 1 =1+ 6π + 10 6π + 10 Then 6π + 10 = 3(2π + 1) + 7 so 6π + 10 7 =3+ 2π + 1 2π + 1 We could even go on one more time like this: 2π + 1 = 7 + 2π β 6 so 2π + 1 2π β 6 =1+ 7 7 Now we have two cases: - For some values of n like 1, 2, 4, 5, 6, 7, 8, 9, 11,..., the number 2π + 6 is not divisible by 7, so 2π β 6 and 7 are co-prime. This makes π and π co-prime also. - For other values of n like 3, 10, 17, 24, ... the number 2π β 6 is divisible by 7, so gcd(2π β 6,7)= gcd(π, π)=7. How do we recognize these values of π? Well, because 2π β 6 = 2(π β 3) and 7 is a prime, so if 7| 2(π β 3) then 7|(π β 3), so π β 3 = 7π where π can take the values 1,2,3,... Solution II We could have saved ourselves a lot of trouble if we decided to eliminate π right away: π = 6π + 10 and π = 8π + 11 . There are 6 π-s in π and 8 π-s in π). (6 and 8 are called coefficients of π). We notice that 6 × 4 = 8 × 3 and so 4π β 3π = 4(6π + 10) β 3(8π + 11) = 24π + 40 β 24π β 33 = 7 no more π-s! Letβs denote gcd(π, π) by π. Now if π|π and π|π then π|(4π β 3π), (prove this!) 5 so π|7 so π can only be 7 or 1. It remains to check that either of these values can occur, like in the first solution we used. A surprising property of the GCD. A flea problem Two fleas, one red and one blue, are jumping happily along a straight line. The red fleaβs jump length is π = 17 cm and the blue fleaβs jump length is π = 13 cm. They both start up from the same point 0 and jump at various speeds, sometimes even stopping and waiting for each other. a) Find all the spots on the line where the two fleas can land in their first 5 steps, if they jump Eastward. b) What is the closest from each other they can ever be on their line, without having to be both on the same spot? c) Repeat the problem in the case when π = 34 cm and π = 26 cm. d) Repeat the problem in the case when π = 51 cm and π = 39 cm. boing Solutions: a) Since the red flea can land every 17 cm, the spots it lands on are 1 × 17 = 17, 2 × 17 = 34, 3 × 17 = 51, 4 × 17 = 68, 5 × 17 = 85. Since the blue flea can land every 13 cm, the spots it lands on are 1 × 13 = 13, 2 × 13 = 26, 3 × 13 = 39, 4 × 13 = 52, 5 × 13 = 65. b) From the table above we see that 4π β 3π = 4 × 13 β 3 × 17 = 1, so the fleas can get within 1 cm of each other. They cannot get any closer without bumping into each other, because the places they land in are natural numbers and their smallest positive difference can only be 1. c) In the case when π = 34 = 17 × 2 cm and π = 26 = 13 × 2 cm, all the measures of the landing spots above get doubled. Now 4π β 3π = 4 × 26 β 3 × 34 = 2, so the fleas can get within 2 cm of each other. They can never get any closer than that without bumping into each other. Indeed, in this case the landing spots of the two fleas are all even, so the distances between them will be even. d) In the case when π = 51 = 17 × 3 cm and π = 39 = 13 × 3 cm, all the distances will be multiples of 3. Now 4π β 3π = 4 × 39 β 3 × 51 = 3, so the fleas can get within 3 cm of each other, but they can never get any closer without bumping into each other. The flea problem, mathematical formulation: 6 Letβs discuss the case when π = 17 cm and π = 13 cm. Then the red fleas landing spots are all the multiples of 17 cm. The blue fleas landing spots are all the multiples of 13 cm. Let π’ and π£ be two natural numbers. Suppose that the red flea has made π’ jumps and the blue flea has made π£ jumps. Letβs write an algebraic formula for the distance between the fleas, then rewrite the conclusion of our problem b) mathematically. The red flea has made π’ jumps, it is at π’ × 17 cm from the origin. The blue flea has made π£ jumps, it is at π£ × 13 cm from the origin. The distance could be either π’ × 17 β π£ × 13 or βπ’ × 17 + π£ × 13 depending on who is closest to the origin. Our problem b) proves: 1 is the smallest positive distance between any two multiples of 17 and 13. 2 is the smallest positive distance between any two multiples of 34 and 26. 1 is the smallest positive number of the form π’ × 17 β π£ × 13 or βπ’ × 17 + π£ × 13, where u and v are random natural numbers. Itβs annoying to have two formulas so letβs choose two new symbols π₯ and π¦ and set π₯ = π’, π¦ = βπ£ if the distance is π’ × 17 β π£ × 13 π₯ = βπ’, π¦ = βπ£ if the distance is βπ’ × 17 + π£ × 13 In either case the distance now reads 17π₯ + 13π¦, but π₯ and π¦ are now random integers. (The multiplication sign between the numbers and the symbols are implied). 1 is the smallest positive number of the form π₯17 + π¦13 where x and y are random integers. Question: i) What is gcd(17,13)? ii) If rather than 17 and 13 we work with two unknown natural numbers π and π, can you guess how close the fleas can get from each other without being on the same spot? Answer: i) 1; ii) π = gcd(π, π). Property of the GCD: gcd(π, π) is the smallest positive number of the form π₯π + π¦π where π₯ and π¦ are random integers! To prove this, letβs look at A generalized flea problem Mummy fleaβs jump is π cm long, Daddyβs jump is π cm long, and Babyβs jump is π cm long. Mummy and Daddy start up from the same point and jump on a straight line at various 7 speeds. At the exact moment when Mummy and Daddy are the closest they can ever be on their line, (but not on the same spot), Baby flea, whoβs piggybacking on Daddyβs back, can jump onto Mummyβs back, and hence on happily away. If Mummy or Daddy take one more jump each and then wait for Baby, prove that Baby can reach any of them if it wants to. a) Question: How can we formulate the question mathematically in terms of π, π and π? Answer: Prove that π divides both π and π. Letβs focus on π divides . So we want Mummy and Babyβs jumps to look like this: b) Strategy: Proof by Contradiction. We know: π is the closest that Daddy can get to Mummy. To prove: π divides π. Idea of proof: Assume π doesnβt divide π. Then Baby could only reach within π cm of Mummy, where π < π: If we prove that Daddy can also get within π cm of Mummy, where π < π then we contradict the info that π is the closest that Daddy can get to Mummy! So our assumption was wrong: π actually divides π. c) Main step: Assuming π = ππ + π and π < π, to prove that Mummy and Daddy can get within π cm of each other: i) Letβs say that it took 1 hour for Mummy and Daddy to get within distance π of each other. Letβs assume they keep jumping at same speeds. How far away from each other will they be after π hours? ii) Can Mummy then get within distance π of Daddy? Answers: i) ππ; ii) Yes if Mummy just takes another step in the right direction: π β ππ = π 8 d) Mathematical formulation of the proof: We know: d is the smallest positive number of the form π₯π + π¦π where π₯ and π¦ are random integers. To prove: π divides π. Proof: Assume π divides into π with remainder r. Then π = ππ + π and π < π. But then π = π β ππ = π β π(π₯π + π¦π) = π β ππ₯π β ππ¦π = (1 β ππ₯)π β ππ¦π. ............................... ............................................................................................................ Left out for lcm and co-prime purposes: c) Are there any spots on the line, except for 0, that both fleas can reach? Can you describe all these spots? c) The red flea lands on multiples of 17, which we can write as 17k. The blue flea lands on multiples of 13, which we can write as 13h. The spots where they both land have to be multiples of both 13 and 17. The smallest would be 13 × 17 and then all multiples of that. 9
© Copyright 2026 Paperzz