Answered step by step
Verified Expert Solution
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
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started