Warning: foreach() argument must be of type array|object, bool given in /var/www/html/web/app/themes/studypress-core-theme/template-parts/header/mobile-offcanvas.php on line 20

The algorithm for computing abmodCby repeated squaring does not necessarily lead to the minimum number of multiplications. Give an example of b>10where the exponentiation can be performed using fewer multiplications, by some other method.

Short Answer

Expert verified

The new method is performed by using fewer multiplications than the given algorithm.

Step by step solution

01

Introduction 

Example for exponentiation:

Consider the value of b is 15

The repeated squaring algorithm calculates the value b15 by following method:

a15=a*a2*a4*a8

In the above calculation,

โ€œa2โ€ is having one multiplication (i.e.a2=aร—a ).

โ€œa4โ€ is having one multiplication (i.e.a4=a2ร—a2).

โ€œ a8โ€ is having one multiplication (i.e. a8=a4ร—a4).

The expression โ€œaร—a2ร—a4ร—a8โ€ has three multiplications.

Therefore, the above method takes totally 6 multiplications.

02

Data step

Other method for exponentiation:

Consider the value โ€œb โ€ is โ€œ15 โ€.

Split the value โ€œ 15 โ€ into โ€œ 3 6 , and 12 โ€.

Initially, find โ€œa3=a*a*a โ€.

This step contains two multiplications process.

Find โ€œa6=a3*a3 โ€.

This step contains one multiplication process.

And find โ€œa12=a6*a6 โ€.

This step contains one multiplication process.

Then finally, โ€œa15โ€ can be calculated by the following:

a15=a12*a3

The above step contains one multiplication process.

Thus, the above method takes a totally5 multiplications.

Therefore, the new method is performed by using fewer multiplications than the given algorithm.

Unlock Step-by-Step Solutions & Ace Your Exams!

  • Full Textbook Solutions

    Get detailed explanations and key concepts

  • Unlimited Al creation

    Al flashcards, explanations, exams and more...

  • Ads-free access

    To over 500 millions flashcards

  • Money-back guarantee

    We refund you if you fail your exam.

Over 30 million students worldwide already upgrade their learning with Vaia!

One App. One Place for Learning.

All the tools & learning materials you need for study success - in one app.

Get started for free

Study anywhere. Anytime. Across all devices.

Sign-up for free