retagged by
969 views
0 votes
0 votes

Four Matrices $M_1, M_2, M_3$ and $M_4$ of dimensions $ p \times q$, $q \times r$, $r \times s$ and $s \times t$ respectively can be multiplied in several ways with different number of total scalar multiplications. For example, when multiplied as $((M_1 \times M_2) \times (M_3 \times M_4))$, the total number of multiplications is $pqr + rst + prt$. When multiplied as $(((M_1 \times M_2) \times M_3) \times M_4)$, the total number of scalar multiplications is $pqr + prs + pst$.

If $p=10, q=100, r=20, s=5$ and $t=80$, then the number of scalar multiplications needed is

  1.  $248000$
  2.  $44000$
  3.  $19000$
  4.  $25000$
retagged by

Please log in or register to answer this question.

Answer:

Related questions

0 votes
0 votes
3 answers
1
admin asked Mar 30, 2020
6,239 views
Which of the following standard algorithms is not Dynamic Programming based?Bellman-Ford Algorithm for single source shortest pathFloyd Warshall Algorithm for all pairs s...
0 votes
0 votes
1 answer
2
admin asked Jul 21, 2022
438 views
The number of operations in matrix multiplication $\text{M1, M2, M3, M4}$ and $\text{M5}$ of sizes $5\times 10, 10\times 100, 100\times 2, 2\times 20$ and $20\times 50$ r...
0 votes
0 votes
2 answers
4
admin asked Mar 30, 2020
1,515 views
Let $G$ be a graph with $n$ vertices and $m$ edges.What is the tightest upper bound on the running time of Depth First Search of $G$, when $G$ is represented using adjace...