Q5 50 Create a divide and conquer algorithm for multiplication you do not need to analyze the runtime though, based on this equation. Let X be an integer with n digits. We divide X into: • XL: First [n/3] digits (approximately one-third of the digits) XR: Last n[n/3] digits (approximately two-thirds of the digits) Similarly, we break Y into: • Y: First [n/3] digits YR: Last n [n/3] digits Representing X and Y XXL 102/3 + XR Y Y 102/3 + YR Multiplying X and Y To multiply X and Y: XXY = (XL 102/3 + XR) × (YL · 102n/3+YR)

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter6: Arrays
Section: Chapter Questions
Problem 19RQ
icon
Related questions
Question

Please solve the following algorithms problem: ( show all work solve asap ) 

Q5
50
Create a divide and conquer algorithm for multiplication you do not need to analyze the
runtime though, based on this equation.
Let X be an integer with n digits. We divide X into:
•
XL: First [n/3] digits (approximately one-third of the digits)
XR: Last n[n/3] digits (approximately two-thirds of the digits)
Similarly, we break Y into:
•
Y: First [n/3] digits
YR: Last n [n/3] digits
Representing X and Y
XXL 102/3 + XR
Y Y 102/3 + YR
Multiplying X and Y
To multiply X and Y:
XXY = (XL 102/3 + XR) × (YL · 102n/3+YR)
Transcribed Image Text:Q5 50 Create a divide and conquer algorithm for multiplication you do not need to analyze the runtime though, based on this equation. Let X be an integer with n digits. We divide X into: • XL: First [n/3] digits (approximately one-third of the digits) XR: Last n[n/3] digits (approximately two-thirds of the digits) Similarly, we break Y into: • Y: First [n/3] digits YR: Last n [n/3] digits Representing X and Y XXL 102/3 + XR Y Y 102/3 + YR Multiplying X and Y To multiply X and Y: XXY = (XL 102/3 + XR) × (YL · 102n/3+YR)
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT