Starnge Recursion algorithm definition

In summary, the karatsuba algorithm is a faster way to multiply 2 numbers by splitting them into halves and using the equation: XY = ac2^n + (ad + bc)2^n/2 + bd. The recurrence for this algorithm is T(n) = 3T(n/2) + cn, which is strange because 3T(n/2) is bigger than the set. However, this is related to the problem and leads to a faster solution.
  • #1
xeon123
90
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
  • #2
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
 

Related to Starnge Recursion algorithm definition

What is the definition of a Strange Recursion algorithm?

A Strange Recursion algorithm is a type of algorithm that involves breaking down a problem into smaller subproblems and then solving each subproblem recursively. What makes it "strange" is that the subproblems are not always smaller, and may even be larger than the original problem. This can make it more complex than traditional recursive algorithms.

How does a Strange Recursion algorithm work?

A Strange Recursion algorithm typically involves three steps: breaking down the problem into subproblems, solving each subproblem recursively, and combining the solutions of the subproblems to solve the original problem. The key difference from traditional recursion is that the subproblems may not always be smaller, which can make it more difficult to determine an optimal solution.

What are the advantages of using a Strange Recursion algorithm?

One advantage of using a Strange Recursion algorithm is that it can sometimes lead to more efficient solutions for certain types of problems. It can also be useful for solving complex problems that cannot be easily solved using traditional recursion or other algorithms.

What are the limitations of using a Strange Recursion algorithm?

One limitation of using a Strange Recursion algorithm is that it can be more difficult to analyze and understand than traditional recursive algorithms. It can also be more challenging to implement, as it requires careful consideration of the subproblems and their solutions.

What types of problems are best suited for a Strange Recursion algorithm?

A Strange Recursion algorithm is best suited for problems that can be broken down into smaller subproblems, but where the subproblems may not always be smaller than the original problem. This can include problems involving complex data structures, optimization problems, and problems with multiple possible solutions.

Similar threads

  • General Math
Replies
11
Views
1K
  • Materials and Chemical Engineering
Replies
0
Views
386
Replies
31
Views
3K
  • Electrical Engineering
Replies
5
Views
1K
  • Beyond the Standard Models
Replies
10
Views
2K
  • Differential Equations
Replies
2
Views
1K
  • Introductory Physics Homework Help
Replies
12
Views
2K
  • Thermodynamics
Replies
8
Views
2K
  • Introductory Physics Homework Help
Replies
2
Views
1K
Replies
4
Views
2K
Back
Top