Page 1 of 1

5. The recursive algorithm given below can be used to compute ged(a, b) where a and b are non-negative integer, not both

Posted: Tue Nov 16, 2021 6:56 am
by answerhappygod
5 The Recursive Algorithm Given Below Can Be Used To Compute Ged A B Where A And B Are Non Negative Integer Not Both 1
5 The Recursive Algorithm Given Below Can Be Used To Compute Ged A B Where A And B Are Non Negative Integer Not Both 1 (56.69 KiB) Viewed 90 times
5. The recursive algorithm given below can be used to compute ged(a, b) where a and b are non-negative integer, not both zero. procedure ged(a, b) if a > b then ged(a,b) := ged(b, a) else if a =0 then ged(a,b) := b else if a = 1 then ged(a, b) :=1 else if a and b are even then ged(a, b) := 2gcd (a/2,6/2) else if a is odd and b is even then ged(a,b) := ged(a, b/2) else ged(a, b) := ged(a, b - a) Use this algorithm to compute (a) gcd(124, 244) (b) god (4424, 2111).