answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
irina1246 [14]
2 years ago
11

Show how the recursive multiplication algorithm computes XY, where X = 1234 and Y = 4321. Include all recursive computations.

Computers and Technology
1 answer:
lozanna [386]2 years ago
3 0

Answer:

The result of recursive multiplication algorithm is 5332114 . Here karatsuba algorithm with recursive approach is used to compute XY where X = 1234 and Y = 4321.

Explanation:

The steps for karatsuba algorithm with recursive approach:

base case:

if(X<10) or (Y<10) then multiply X with Y

For example if X is 1 and Y is 2. Then XY = 1*2 = 2

Recursive case:

Now when the above if condition is not true then follow these steps to compute XY

Compute the size of numbers.

Notice that there are 4 digits in X i.e. 1 2 3 4 and a 4 digits in Y i.e. 4 3 2 1

So n = 4

Now divide the numbers in 2 parts as:

n/2 = 4/2 = 2

Since these are decimal numbers so we can write it as:

10^n/2

Now split the digits

X = 1234 is divided into 2 parts as:

12 and 34

Let a represent the first part and b represent the second part of X. So,

a = 12

b = 34

Y = 4321 is divided into 2 parts as:

43 and 21

Let c represent the first part and d represent the second part of Y. So,

c = 43

d = 21

Let multiplication reprsents the karatsuba recursive multiplication algorithm

Now recursively compute products of inputs of size n/2  

   multiplication (a, c)

   multiplication (b, d)

   multiplication (add(a, b), add(c, d))  

  Combine the above 3 products to compute XY  

As we know these decimal numbers have base 10 and X and Y are divided into two parts So X can be written as:

X = 10^{\frac{n}{2} }  a+b

Y can be written as:

Y = 10^{\frac{n}{2} }  c+d

Now compute XY as:

XY = (10^{\frac{n}{2} }  a+b) ( 10^{\frac{n}{2} }  c+d)

XY = 10^{\frac{2n}{2} }  ac + 10^{\frac{n}{2} }  ad +  10^{\frac{n}{2} }  bc + bd

     =  10^{n}  ac + 10^{\frac{n}{2} } (ad + bc) + bd

Now put the values of n = 4, a = 12, b = 34 , c = 43 and d = 21

      = 10⁴ (12*43) + 10² (12*21 + 34*43) + (34*21)

      = 10⁴ (516) + 10² (252 + 1462) + 714

      = 10000*516 + 100*1714 + 714

      = 5160000 + 171400 + 714

XY  = 5332114

Hence the karatsuba multiplication algorithm with recursive appraoch computes XY = 5332114

You might be interested in
Which change signaled a musical progression toward rock and roll?
postnew [5]
It is the inclusion of the bass section
7 0
2 years ago
Which are factors that go into a project plan? Choose four answers.
USPshnik [31]

Factors that go into a project plan

  • Estimate the scope of work, based on similar projects.
  • Make sure everyone takes responsibility.
  • Creating and defining team goal
  • Working to a budget

Explanation:

Project Estimating  : Every project is different, but that doesn’t mean you have to start from zero each time. The best way to make sure you’re on the right track is to approach it from every angle. Consider similar projects, talk to your team, and understand what the client is expecting and how they’d like things to go.

Managing your team size  : A smaller team is usually preferable as it puts your project in the most ideal position to be completed on time and at the quality you expect, without burning out your team members. A smaller team also reduces the number of communication channels, which means there’s less opportunity for misinterpretation or people simply missing something.  

Planning and managing your team resources  : That said, there may be a time when you don’t have the right resources in-house to do the job. Either they are fully allocated to another project or no one has the right skill set. In this situation you have two options, either bring in freelance contractors or hire a new employee to fill the role.  

Creating and defining team goals  : The planning phase is when you’ll want to work with the team to understand what their individual goals are for the project. Is there something different they’d like to try? A test or new idea they’d like the chance to prove? Or perhaps a roadblock they want to avoid?

Scheduling Tasks to a Project Timeline  : The timeline of the project will largely be determined by the client, as they often have deadlines they need to hit to meet certain business goals that are simply out of your control. However, setting clear expectations and agreeing on the timing of key deliverables is crucial.

7 0
2 years ago
Which of the following is not one of the four criteria for evaluating websites?
Flura [38]

Answer:validity

Explanation:

Because it dont sound right

5 0
2 years ago
Annabeth has been using a public cloud to store and access her documents. Which drawback of a public cloud should she be aware o
Flura [38]

<u><em>i just to the test on Plato and it said that A. accessibility is wrong  the correct answer is d  security #homeschoolrocks</em></u>

5 0
2 years ago
A summer camp offers a morning session and an afternoon session.
defon

Answer:

(A) IF (IsFound

(afternoonList, child))

{

APPEND (lunchList, child)

}

Hope this helps!

5 0
2 years ago
Other questions:
  • The most direct way for Jonathan to gain on-the-job experience and earn money while attending school is to apply for:
    5·2 answers
  • It is an array containing information such as headers, paths and script locations wherein it is created by the web server itself
    8·1 answer
  • The major result of treating 1-butyne with 6M aqueous NaOH would be:_______.A. the production of an alkene.B. the production of
    10·1 answer
  • FTP requires confirmation that a file was successfully transmitted to a client, but it has no built-in mechanism to track this i
    5·1 answer
  • 3. Choosing a pre-formatted presentation (that already has a design in the slides) is called choosing a ?
    6·1 answer
  • The effectiveness of a(n) _____ process is essential to ensure the success of a data warehouse. Select one: a. visual basic b. e
    15·2 answers
  • Write the definition of a function printAttitude, which has an int parameter and returns nothing. The function prints a message
    14·1 answer
  • JAVA
    7·1 answer
  • A large Internet merchandise provider determines its shipping charges based on the number of items purchased. As the number incr
    6·1 answer
  • The microprogram counter (MPC) contains the address of the next microcode statement for the Mic1 emulator to execute. The MPC va
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!