retagged by
447 views
0 votes
0 votes
Let B1, B2, B3, B4, B5 be five matrices of dimensions 15 x 20, 20 x 17, 17 x 22, 22 x 16, 16 x 23 respectively. The minimum number of scalar multiplications required to find the product B1 B2 B3 B4 B5 using the Matrix Chain Multiplication method _____
retagged by

1 Answer

0 votes
0 votes
B1             B2               B3              B4                B5                            B1B2             B3B4            B5                             B1B2B3B4        B5

                                                                                                ==>      say C1            say C2                          ==>           say C3

15X20       20X17        17X22        22X16         16X23                      15X17            17X16             16X23                    15X16        16X23

              B1B2B3B4B5

==>

             15X23

Now ,

No of multiplications in B1 * B2 (C1) = 15*20*17 = 5100

No of multiplications in B3 * B4 (C2) = 17*22*16 = 5984

No of multiplications in C1 * C2 (C3) = 15*17*16 = 4080

No of multiplications in C3* B5 = 15*16*23 = 5520

Total no of multiplications = 20684