Suppose you wish to develop a matrix-multiplication algorithm that is asymptotically faster than Strassen’s algorithm. Your algorithm will use divide-and-conquer, dividing each matrix into pieces of size n/8 × n/8, and the divide and combine steps together will take Θ(n2) time. You need to determine how many subproblems your algorithm has to create in order to beat Strassen’s algorithm. If your algorithm creates a subproblems, what is the largest integer value of a for which your algorithm would be asymptotically faster than Strassen’s algorithm?

Answer :

danialamin

Answer:

The number of subproblems are given as [tex]T(n)=a*T(n/8)+\theta(n^2)[/tex] while the value of T(n) to be less than S(n) is for 342.

Explanation:

The number of subproblems are given as

[tex]T(n)=a*T(n/8)+\theta(n^2)[/tex]

Asymptotic running time for Strassen’s algorithm is [tex]S(n)=\theta(n^{log(7)})[/tex]

Now, when a increases, number of subproblems determines the asymptotic running time of the problem and case 1 of master theorem applies. So, in worst case, asymptotic running time of the algorithm will be

[tex]T(n)=\theta(n^{logb(a)})=\theta(n^{log8(a)})=\theta(n^{log_{2}(a^{1/3})})[/tex]

Now, for T(n) to be smaller than S(n)

[tex]n^{loga^{1/3}}<n^{log 7}[/tex]

So,

[tex]log(a^{(1/3)})<log(7)\\a(1/3)<7\\a<343[/tex]

So,

a=342

Other Questions