Question: P 1 . [ 3 pts ] Use the method illustrated in class ( recursion trees in the textbook ) to derive the solution to

P 1.[3 pts] Use the method illustrated in class (recursion trees in the textbook) to derive
the solution to the following recurrence. Show your work.
T(n)=2T(n4)+n2.
P2. pts] Describe a divide and conquer algorithm to compute the square of an n-digit
integer in O(nlog23) time, by reducing to the squaring of three |~n2~|-digit integers.
Adding two numbers with k digits, and shifting a number with k digits take O(k)
time.
Your submission should include the following points:
Problem statement. You need not provide an example.
The main idea of the algorithm. Argue the correctness of your algorithm here,
by showing how the algebraic derivations are used by your algorithm.
Algorithm pseudo-code.
Running time analysis. You can directly use the solution of the recurrence
relation worked in class (aka Master Theorem / recursion trees section in the
text).
Hint: use the identity xy=x2+y2-(x-y)22.
P 3.[3 pts] Describe a divide and conquer algorithm to compute the square of an n-digit
integer in O(nlog36) time, by reducing to the squaring of six |~n3~|-digit integers.
Include the same points in your submission as for Problem P 2.. Is this algorithm
asymptotically faster that your algorithm from P2.?
Hint: use the expression for (x+y+z)2.
 P 1.[3 pts] Use the method illustrated in class (recursion trees

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!