retagged by
1,001 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

6.4k
views
3 answers
0 votes
admin asked Mar 30, 2020
6,431 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 shortest paths$0-1$ Knapsack problemPrim’s Minimum Spanning Tree
507
views
1 answers
0 votes
admin asked Jul 21, 2022
507 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$ respectively will be:$5830$4600$6900$12890$
875
views
1 answers
2 votes
admin asked Mar 30, 2020
875 views
The worst case running times of Insertion sort, Merge sort and Quick sort, respectively, are$\Theta(n \log n),\Theta(n \log n) \text{ and } \Theta(n^2)$\Theta(n^2),\Theta(n ... n \log n)$\Theta(n^2),\Theta(n\log n) \text{ and } \Theta(n^2)$
1.6k
views
2 answers
0 votes
admin asked Mar 30, 2020
1,630 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 adjacency matrix?$O(n)$O(m+n)$O(n^2)$O(mn)$