Computer Science, asked by RoshanSanjith9948, 30 days ago

Question 27). The number of operations in Matrix multiplications M1, M2, M3,M4 and M5 of sizes.5X10, 10X100, 100X2, 2X20 and 20X50​

Answers

Answered by velakshay123
5

Answer:

4600

Explanation:

Answered by mindfulmaisel
0

number of operations in Matrix multiplications is 4600

Explanation:

Here M1 = 5X10, M2 = 10X100, M3 = 100X2, M4 = 2X20, M5 = 20X50

Now optimal order will be:

1. M2*M3 = [10X100]*[100X2] = [10X2]. No. of saclar operations are 10*100*2 = 2000

2. M1*M2*M3 = [5X10]*[10X2] = [5X2]. No. of saclar operations are 5*10*2 = 100

3. M4*M5 = [2X20]*[20X50] = [2X50]. No. of scalar operations are 2*20*50 = 2000

4. M1*M2*M3*M4*M5 = [5X2]*[2X50] = [5X50]. No. of scalar operations are 5*2*50 = 500

hence, total operations required are 2000+100+2000+500 = 4600

Similar questions