An alternative to the Euclidean algorithm uses subtraction rather than division to compute greatest common divisors. (After all, division is repeated subtraction.) It is based on the following lemma.
Lemma 4.10.3
If
Algorithm 4.10.3 Computlng gcd's by Subtraction [Given two positive integers A and B, variables a and b are set equal to A and B. Then a repetitive process begins. If
After the last repetition,
Hence, after the last repetition,
Input: A, B [positive integers]
Algorithm Body:
while (
if
else
end while
if a = 0 then
else
[After execution of the if—then-else statement,
Output: gcd [a positive integer]
a. Prove Lemma 4.10.3.
b. Trace the execution of Algorithm 4.10.3 for
c. Trace the Execution of Algorithm 4.10.3 for
Want to see the full answer?
Check out a sample textbook solutionChapter 4 Solutions
Discrete Mathematics With Applications
- 2. Evaluate the following integral using cauchy integral theorem: ||=3 sin (22)+cos (22) (2-1)(2-2) -dz Don't use any Al tool show ur answer in pe n and paper then takearrow_forward18. Solve the given differential equation: y' + y = f(t), y(0) = 5, where f(t) = 0arrow_forward16. Solve the given differential equation: y" + 4y Given, = sin (t)u(t2), y(0) = 1, y'(0) = 0 1 = (x² + 1)(x²+4) 1/3 -1/3 + x²+1 x²+4 Don't use any Al tool show ur answer in pe n and paper then takearrow_forwardScrie trei multiplii comuni pentru numerele 12 și 1..arrow_forward^^ QUESTION 1. Two photos in total, I wrote the questionOnly 100% sure experts solve it correct complete solutions need to get full marks it's my quiz okkkk.take your time but solve full accurate okkk Geometry maths expert solve itarrow_forwardOnly 100% sure experts solve it correct complete solutions need to get full marks it's my quiz okkkk.take your time but solve full accurate okkk Geometry expert solve itarrow_forwardAll 6 questions in the image. Thank youarrow_forwardMinimum number of times that activity should be recorded: 9 (3 each phase) Sample calculation (Azimuth- Stars): On 05th May 2006 at 11h00m00s UTC, a vessel in position 04°30'N 010°00'W observed Canopus bearing 145° by compass. Find the compass error. If variation was 4.0° East, calculate the deviation. GHA Aries (05d 11h): 028° 10.7' Increment (00m 00s): 000° 00.0' GHA Aries: 028° 10.7' Longitude (W): (-) 010° 00.0' (minus- since longitude is westerly) LHA Aries: 018° 10.7' SHA Canopus: (+) 263° 59.0' LHA Canopus: 282° 09.7' S 052° 42.1' Declination: P=360-282° 09.7'= 77° 50.3' (If LHA>180°, P= 360-LHA) A Tan Latitude/ Tan P A Tan 04° 30' Tan 77° 50.3' A = 0.016960803 S (A is named opposite to latitude, except when hour angle is between 090° and 270°) B=Tan Declination/ Sin P B= Tan 052° 42.1/ Sin 77° 50.3' B=1.342905601 S (B is always named same as declination) C=A+B=1.359866404 S (C correction, A+/- B: If A and B have same name- add, If different name- subtract) Tan Azimuth 1/ (CX…arrow_forwardNo chatgpt pls will upvotearrow_forwardarrow_back_iosSEE MORE QUESTIONSarrow_forward_ios
- College AlgebraAlgebraISBN:9781305115545Author:James Stewart, Lothar Redlin, Saleem WatsonPublisher:Cengage LearningCollege Algebra (MindTap Course List)AlgebraISBN:9781305652231Author:R. David Gustafson, Jeff HughesPublisher:Cengage LearningLinear Algebra: A Modern IntroductionAlgebraISBN:9781285463247Author:David PoolePublisher:Cengage Learning
- Algebra & Trigonometry with Analytic GeometryAlgebraISBN:9781133382119Author:SwokowskiPublisher:CengageElements Of Modern AlgebraAlgebraISBN:9781285463230Author:Gilbert, Linda, JimmiePublisher:Cengage Learning,