Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2. Consider an algorithm for integer multiplication of two n-digit numbers where each number is split into three parts, each with n/3 digits. (a) Design

image text in transcribed

2. Consider an algorithm for integer multiplication of two n-digit numbers where each number is split into three parts, each with n/3 digits. (a) Design and explain such an algorithm, similar to the integer multiplication algorithm (i.e., Karatsuba's algorithm) presented in class. Your algorithm should describe how to multiply the two integers using only six multiplications on the smaller parts (instead of the straightforward nine) (b) Determine the asymptotic running time of your algorithm. Would you rather split it into two parts (with three multiplications on the smaller parts) as in Karatsuba's algorithm? (c) Suppose you could use only five multiplications instead of six. Then determine the asymptotic running time of such an algorithm. In this case, would you rather split it into two parts or three parts? (d) Challenge problem- this is optional, and not worth any points. Solving it will simply impress the in- structor. Find a way to use only five multiplications on the smaller parts. Can you generalize to when the two initial n-digit numbers are split into k parts, each with n/k digits? Hint: also consider multiplication by a constant, such as 2; note that multiplying by 2 does not count as one of the five multiplications. You may need to use some linear algebra

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

Automating Access Databases With Macros

Authors: Fish Davis

1st Edition

1797816349, 978-1797816340

More Books

Students also viewed these Databases questions