Starnge Recursion algorithm definition

Click For Summary
SUMMARY

The discussion centers on the definition and application of recursion algorithms, specifically in the context of Karatsuba's Algorithm. The recurrence relation for Karatsuba's Algorithm is defined as T(n) = 3T(n/2) + O(n), which simplifies to O(nlog23). This formulation is justified as it effectively captures the algorithm's efficiency in multiplying two numbers by dividing the problem into three subproblems. The confusion arises from the perception that 3T(n/2) exceeds the defined bounds, but this is clarified through the relationship to the problem being solved.

PREREQUISITES
  • Understanding of recursion algorithms
  • Familiarity with Karatsuba's Algorithm
  • Knowledge of Big O notation
  • Basic concepts of divide-and-conquer strategies
NEXT STEPS
  • Study the derivation of the Master Theorem for analyzing recurrences
  • Explore advanced multiplication algorithms beyond Karatsuba's, such as Toom-Cook multiplication
  • Learn about the implications of recursion depth on algorithm performance
  • Investigate the use of recursion in other algorithmic contexts, such as sorting and searching
USEFUL FOR

Computer science students, algorithm designers, and software engineers interested in optimizing multiplication algorithms and understanding recursion in algorithm design.

xeon123
Messages
90
Reaction score
0
I'm reading the book "Algorithms Design" and a recursion algorithm is defined as:

T(n)[itex]\leq[/itex]qT(n/q)+cn

But in the Karatsuba’s Algorithm, the recurrence for this algorithm is
T (n) = 3T (n/2) + O(n) = O(nlog2 3).

The last equation is strange, since 3T(n/2) is bigger than the set. Why they define like that?

(see pdf https://www.google.pt/url?sa=t&rct=...FrwVhGb_q1zQv1J8g&sig2=tNHJR-cfgZQBnihc7wckJQ)
 
Last edited:
Mathematics news on Phys.org
I get the solution. The solution is related to the problem.

The karatsuba algorithm is a faster way to multiply 2 numbers. It splits the numbers in 2 halves.

The halves of the numbers is composed in the following equation:

XY = ac2^n + (ad + bc)2^n/2 + bd.

This equation is split in 3 subproblems: ac, bd, (a − b)(c − d).

So, the recurrence of the algorithm will become

T(n) = 3T(n/2) + cn
 

Similar threads

  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 0 ·
Replies
0
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
31
Views
4K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 12 ·
Replies
12
Views
4K