Question: Use Algorithm prod2(x, y) for large integer multiplication to find the product 2506 and 69309. How many multiplication are needed to find the product of

 Use Algorithm prod2(x, y) for large integer multiplication to find the

Use Algorithm prod2(x, y) for large integer multiplication to find the product 2506 and 69309. How many multiplication are needed to find the product of the two integers if prob2(x, y) is used.

Algorithm prod2(a, b) //Multiply two large integers a and b Input: Output: prod, the product of a and t n- maximum(number of digits of a, number of digits of b); if(a 0 or b 0) then return 0 else if(n threshold) return a * b in the usual way large integers a and b; else 2 x_ a divide 10m- y= a rem I w b divide 10m, z = b rem 10m. r- prod2(x + y, w + z); m. q prod2(y, z); return p *102m+ (r-p-q) * 10m+ 9

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!