Question: We have two algorithms A and B . Algorithm A breaks a problem into three ( 3 ) problems of size n / / 2

We have two algorithms A and B. Algorithm A breaks a problem into three(3) problems of size n//2. Algorithm B breaks the same problem into four problems of size n/3. Which algorithm should you prefer, and why, when:
a) The cost of decomposition and composition of the individual solutions is n
b) The cost of splitting and composing the individual solutions is n^2

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!