Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2. (8 pts) In some applications (such as cryptography), we need to use very long integers. These integers cannot be stored in an int type

image text in transcribed

2. (8 pts) In some applications (such as cryptography), we need to use very long integers. These integers cannot be stored in an int type variable. So we must use an array A[1..n] to represent such long integers. (For simplicity, each element in A is used for 1 digit, and A[n] is the most significant digit.) (For example, in the Crypto++ library widely used in cryptography applications, a special class is defined for such integers.) The basic arithmetic operations for such long integers can no longer be computed in constant time. Let A[1..n] and B[1..n] be two n-digit integers. It is easy to see the sum of A and B can be computed in (n) time. The multiplication procedure (you learned from elementary school) takes (n2) time. Describe an algorithm for multiplication, with O(nlog23)=O(n1.585) run time. (The algorithm is similar to Strassen's algorithm in nature. But much simpler.)

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

Databases Illuminated

Authors: Catherine M Ricardo, Susan D Urban

3rd Edition

1284056945, 9781284056945

More Books

Students also viewed these Databases questions

Question

1. How will you, as city manager, handle these requests?

Answered: 1 week ago