The Gateway to Computer Science Excellence
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
in Others by Veteran (105k points) | 2.9k views
could anyone plz explain this method more clearly?

2 Answers

+1 vote
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:


Case 2:


case 3:


case 4:


case 5:



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
by Active (3.4k points)
0 votes

option D 405

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

5x10x3 + 3x12x5 +5x3x5=405

by Active (3.9k points)
how to do you calculate  to get 405.. could you please explain...? thanks

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,737 questions
57,309 answers
105,023 users