Question: 1 . 2 : Suppose you are given integers a , b , c , and d , and you must compute the two quantities

1.2: Suppose you are given integers a, b, c, and d, and you must compute
the two quantities
x = ab-cc+bd
and
y = bb-cc+ad.
As written, the equations suggest doing six multiplications, though clearly
if cc is computed and stored in an intermediate variable, then only five
multiplications are needed. This could be expressed algorithmically as:
temp1= c*c
x = a*b - temp1+ b*d
y = b*b - temp1+ a*d
which clearly illustrates how to compute the result with five multiplications.
That still is not very efficient, though.

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!