edited by
533 views
0 votes
0 votes
Matrix multiplication is associative and MCS ( matrix chain multiplication ) uses the following matrices:

$\begin{array} \text{M1} & 10^* 100 \\ M2 & 100^* 5 \\ M3 &  5^* 50 \\ M4 & 50^* 1 \end{array}$

The number of orderings that are possible to compute $M1 \ M2 \ M3 \ M4$ are _________.
edited by

2 Answers

Best answer
4 votes
4 votes

Given  M1  M2  M3  M4

  1. M1  ( M2 ( M3  M4) )
  2. M1 ( ( M2 M3)  M4 ) 
  3. (M1 M2)  (M3 M4)
  4. ( (M1 M2) M3 ) M4
  5. ( M1 (M2 M3) ) M4

Hence total number of orderings are 5 .

selected by
0 votes
0 votes
For n+1 matrices  no of parenthesis Pattern possible is Cn where C-Catlan no

Cn=(2n)Cn / n+1

Here n+1=4
Answer:

Related questions

2 votes
2 votes
2 answers
2
Bikram asked May 26, 2017
341 views
Assume Dijkstra's Algorithm is used to find the shortest paths from node G in the above graph. The total number of edges which are not included in any of the shortest pat...
1 votes
1 votes
2 answers
3
Bikram asked May 26, 2017
454 views
The total number of LCS (Longest Common Subsequences) of $P = abcd123$ and $Q= badc321$ that can be formed are ______.
0 votes
0 votes
1 answer
4
Bikram asked May 26, 2017
303 views
Consider the following instance of the knapsack problem :$\begin{array}{|c|c|c|c|c|c|} \hline \text{Item} & a & b & c & d & e \\ \hline \text{Benefit} & 15 & 12 & 9 & 16 ...