Question: 1 . 2 : Suppose you are given integers a , b , c , and d , and you must compute the two quantities
: Suppose you are given integers a b c and d and you must compute
the two quantities
x abccbd
and
y bbccad
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:
temp cc
x ab temp bd
y bb temp ad
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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
