recategorized
3,452 views
0 votes
0 votes

The minimum number of scalar multiplication required, for parenthesization of a matrix-chain product whose sequence of dimensions for four matrices is $< 5,10,3,12,5> $ is

  1. $630$  
  2. $580$ 
  3. $480$  
  4. $405$
recategorized

5 Answers

1 votes
1 votes
The question is incomplete

The given dimensions are <5, 10, 3, 12, 5>

now we have 4 matrices

1st matrix size 5X10

2nd matrix size 10X3

3rd matrix 3X12

4th matrix 12X 5

let the matrices be A ,B,C and D since we have to parenthesize the matrix chain following cases are possible

Case 1:

(A*B)*(C*D)

Case 2:

(A*(B*C))*D

case 3:

A*(B*(C*D))

case 4:

A*((B*C)*D)

case 5:

((A*B)*C)*D

 

we have to evaluate each case find the case with minimum scalar multiplications

Case 1:

first we multiply first and second matrices so total number of scalar multiplications are 5*10*3=150

the resultant matrix size is 5X3 let it be T1

then by multiplying C and D matrices total number of scalar multiplications possible are 3*12*5=180

the resultant matrix size is 3X5 let it be T2

finally by multiplying T1 and T2  the total number of scalar multiplications possible are 5*3*5=75

hence total number of scalar multiplications possible are 150+180+75=405

similarly evaluate all the cases and the case with minimum number of scalar multiplications will be the answer
0 votes
0 votes

option D 405

((5x10 . 10x3). (3x12 . 12x5))

5x10x3 + 3x12x5 +5x3x5=405

0 votes
0 votes
The question is incomplete

The given dimensions are <5, 10, 3, 12, 5>

now we have 4 matrices

1st matrix size 5X10

2nd matrix size 10X3

3rd matrix 3X12

4th matrix 12X 5

let the matrices be A ,B,C and D since we have to parenthesize the matrix chain following cases are possible

Case 1:

(A*B)*(C*D)

Case 2:

(A*(B*C))*D

case 3:

A*(B*(C*D))

case 4:

A*((B*C)*D)

case 5:

((A*B)*C)*D

 

we have to evaluate each case find the case with minimum scalar multiplications

Case 1:

first we multiply first and second matrices so total number of scalar multiplications are 5*10*3=150

the resultant matrix size is 5X3 let it be T1

then by multiplying C and D matrices total number of scalar multiplications possible are 3*12*5=180

the resultant matrix size is 3X5 let it be T2

finally by multiplying T1 and T2  the total number of scalar multiplications possible are 5*3*5=75

hence total number of scalar multiplications possible are 150+180+75=405

similarly evaluate all the cases and the case with minimum number of scalar multiplications will be the answer
Answer:

Related questions

0 votes
0 votes
4 answers
1
go_editor asked Mar 24, 2020
2,096 views
Dijkstra’s algorithm is based onDivide and conquer paradigmDynamic programmingGreedy approachBacktracking paradigm
0 votes
0 votes
6 answers
2
go_editor asked Mar 24, 2020
1,502 views
Match the following with respect to algorithm paradigms :$\begin{array}{clcl} & \textbf{List-I} & {} & \textbf{List-II} \\ \text{a.} & \text{Merge sort} & \text{i.} & \te...
0 votes
0 votes
4 answers
3
go_editor asked Jan 31, 2017
2,285 views
Red-black trees are one of many search tree schemes that are “balanced” in order to guarantee that basic dynamic-set operations take _____ time in the worst case.$O(1...
2 votes
2 votes
7 answers
4
go_editor asked Jan 31, 2017
7,511 views
Any decision tree that sorts n elements has height ____$\Omega (\lg \: n)$$\Omega (n)$$\Omega (n \: \lg \: n)$$\Omega (n^2)$