CS435 Extra-credit Assignment

Question # 00822399 Posted By: wildcraft Updated on: 04/08/2022 11:41 PM Due on: 04/09/2022
Subject Education Topic General Education Tutorials:
Question
Dot Image

CS435

Extra-credit Assignment 

Late submissions not accepted

Multiply two 3-digit integers with 6 single-digit multiplications

In class, we discussed a divide-and-conquer algorithm (attributed to Karatsuba) to multiply two long integers by dividing the numbers into two halves and using only 3 half-size multiplications, with time complexity ????(????????????????????????) = ????(????????.????????????). In this exercise, we explore dividing the integers into three.

(a) Consider two 3-digit decimal integers ???? = ???????????????????????? and ???? = ????????????????????????. The standard elementary-school method of multiplication requires ???? × ???? = ???? single digit multiply.

???????? ???????? ????????

× ???????? ???????? ????????

________________________________________________________________________

???????????????? ???????????????? ????????????????

???????????????? ???????????????? ????????????????

???????????????? ???????????????? ????????????????

________________________________________________________________________ ???????????????? (???????????????? + ????????????????) (???????????????? + ???????????????? + ????????????????) (???????????????? + ???????????????? ) ????????????????

 

Let us call the 5 sum terms as (????????, ????????, ????????, ????????, ????????), from left-to-right.

Show how it can be done with only six single-digit multiplications, and some additions/subtractions. Show clearly your 6 multiplication steps, and then show how the sum terms are computed by some additions/subtractions.

(b) Illustrate your algorithm for the example (???????????? × ????????????). (c) Analyze the time complexity of a divide-and-conquer algorithm based on this technique. (The time complexity is worse than Karatsuba algorithm.)

Dot Image
Tutorials for this Question
  1. Tutorial # 00817800 Posted By: wildcraft Posted on: 04/08/2022 11:42 PM
    Puchased By: 2
    Tutorial Preview
    The solution of CS435 Extra-credit Assignment...
    Attachments
    CS435_Extra-credit_Assignment.ZIP (18.96 KB)

Great! We have found the solution of this question!

Whatsapp Lisa