Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Bonus Question (for additional 20%) Write MMaple procedure SQbase that inputs integers (a, 1,m) and returns the value b-a mod m, implementing the agorithm of

image text in transcribed

Bonus Question (for additional 20%) Write MMaple procedure SQbase that inputs integers (a, 1,m) and returns the value b-a mod m, implementing the agorithm of squaring the base a modulo m. Check that your procedure is working correctly by comparing your results with the Maple calculations for a_ 976431,n-8742 193,m= 2247431 that is, with > tme) 8742193 mod 2247431 b = MapleTime time)-11 b = 2057776 MapleTime:-4.282 Calculate the processor time (use Maple's time) command as above) for calculations of this number by your procedure and compare with the MapleTime. (HINT: this procedure would corespond to wrapping the method of calculations used in Question 2 into the envelope of Maple's Procedure where the calculations are done in the loop up to the length of the binary representation of the exponent n. For an example of a procedure with the loop see SplitBin in the Lecture 6 Notes.) Bonus Question (for additional 20%) Write MMaple procedure SQbase that inputs integers (a, 1,m) and returns the value b-a mod m, implementing the agorithm of squaring the base a modulo m. Check that your procedure is working correctly by comparing your results with the Maple calculations for a_ 976431,n-8742 193,m= 2247431 that is, with > tme) 8742193 mod 2247431 b = MapleTime time)-11 b = 2057776 MapleTime:-4.282 Calculate the processor time (use Maple's time) command as above) for calculations of this number by your procedure and compare with the MapleTime. (HINT: this procedure would corespond to wrapping the method of calculations used in Question 2 into the envelope of Maple's Procedure where the calculations are done in the loop up to the length of the binary representation of the exponent n. For an example of a procedure with the loop see SplitBin in the Lecture 6 Notes.)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2014 Nancy France September 15 19 2014 Proceedings Part 2 Lnai 8725

Authors: Toon Calders ,Floriana Esposito ,Eyke Hullermeier ,Rosa Meo

2014th Edition

3662448505, 978-3662448502

More Books

Students also viewed these Databases questions