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

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

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

Post 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 88 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).
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply