Write the recurrence for the running time of strassens


Assignment

Question 1. Write the definition of θ; then prove that θ(f(n)) = n3 when f(n) = 5n3 + 2n2 - 4. Find c0, c1, n0.

Question 2. Find θ(n) for the following recurrence for the running time:

2.1 T(n) = αT(n - 1) + 1
2.2 T(n) = 3T (n/3) + 1
2.3 T(n) = T (n/2) + 1

Question 3. In Chapter 4 of our reference book (Introduction to algorithms), read Strassen's algorithm for matrix multiplication and answer the following questions.

3.1 Write the recurrence for the running time of Strassen's algorithm and find its θ.

3.2 Use the algorithm to compute the matrix product:

(7 4) (5 3)
(1 3) (2 5)

Show your work.

Programming:

1. Implement a divide and conquer algorithm for the following problem.

You have an n × n board, where n = 2k. One of the cells is black. You should fill the board with an L shape which is a 2 × 2 tile with a missing cell without any overlaps with the black or L shapes. You are allowed to rotate the L shape 90 degree multiple times. Explain your algorithm and evaluate its time complexity.

623_figure.jpg

Input: n,a,b.
n: number of cells in rows and columns, a: X index of the black cell,
b: Y index of the black cell.

For example for the above example, input is:
4,1,2. Since the board is 4 by 4 and the black cell is located at (1,2).

Output: a sequence of a,b,d for all the L shapes in the form of a0,b0,d0; a1,b1,d1;....; ak,bk,dk.
a: X index of the yellow cell in L shape,

b: Y index of the yellow cell in L shape,

d: degree of the rotation.

For example: 0,0,270; 0,3,0; 2,1,180; 3,0,180; 3,3,90; is the output for the above example.

Both output and input are given as text files.

Attachment:- Input.rar

Request for Solution File

Ask an Expert for Answer!!
Data Structure & Algorithms: Write the recurrence for the running time of strassens
Reference No:- TGS02672498

Expected delivery within 24 Hours