Chapter 9.2: Matrix-chain Multiplication A5 A6 10 × 20 20 × 25 matrix imension 1 2 0 A j 3 A₁ A2 30 × 35 35 × 15 4 0 6 15,750 2,625 A₂ 7,875 4,375 m 5 2 11,875 10,500 0 15,125 A₂ 1 9,375 7,125 5,375 4 2,500 3,500 750 A3 15 × 5 А₁ 3 m[2,2]+m[3,5],+p, P₂P = 0 + 2,500 + 35·15-20 = 13,00C m[2,5] = min m[2,3]+m[4,5],+p₁ p²p² = 2,625 + 1,000 + 35.5.20 = 7,1 m[2,4]+m[5,5],+p₁P₁P² = 4,375 + 0 + 35∙10-20 = 11,375 i 0 A4 5 × 10 1,000 5,000 As 5 0 A 6 Definitions n Want: A, A₂...A (costs m[1, Dimensions: {P. P} A₁ =A₁A₁A₁+2A, "i+1 m[i, j] = min cost for A i:j =7,125 ..... This approach gives us the minimum cost (minimum number of pairwise matrix element multiplications), but not the parenthecization itself. As with CUT-ROD, we can track this separately in a matrix we'll call S.

icon
Related questions
Question

Can someone explain this to me?

matrix
dimension
Chapter 9.2: Matrix-chain Multiplication
A5
A6
10 × 20 20 × 25
1
0
j
A₁
3
A₁
A2
30 × 35 35 × 15
4
6
0
A₂
2
15,750 2,625 750
m
15.125
5
11,875 10,500
1
0
A3
9,375 7,125 5,375
4
7,875 4,375 2,500 3,500
A4
A3
15 x 5 5 × 10
2
0
A4
1,000
m[2,2]+m[3,5],+p₁p₂P = 0 +2,500 + 35.15.20 = 13,000
m[2,5] = min m[2,3]+m[4,5],+p₁ p²p = 2,625 + 1,000 + 35·5·20 = 7,125
m[2,4]+m[5,5],+Pp, PP = 4,375 + 0 + 35.10.20= 11,375
=7,125
3
0
i
A5
5,000
5
0
A6
Definitions
6
Want: A₁A₂A (costs m[1,n])
Dimensions: {P,
P}
A₁ = ÂÃ₁+₁A₁+2¨
.... A
i+1
m[i, j] = min cost for A i:j
This approach gives us the minimum
cost (minimum number of pairwise
matrix element multiplications), but
not the parenthecization itself.
As with CUT-ROD, we can track this
separately in a matrix we'll call S.
Transcribed Image Text:matrix dimension Chapter 9.2: Matrix-chain Multiplication A5 A6 10 × 20 20 × 25 1 0 j A₁ 3 A₁ A2 30 × 35 35 × 15 4 6 0 A₂ 2 15,750 2,625 750 m 15.125 5 11,875 10,500 1 0 A3 9,375 7,125 5,375 4 7,875 4,375 2,500 3,500 A4 A3 15 x 5 5 × 10 2 0 A4 1,000 m[2,2]+m[3,5],+p₁p₂P = 0 +2,500 + 35.15.20 = 13,000 m[2,5] = min m[2,3]+m[4,5],+p₁ p²p = 2,625 + 1,000 + 35·5·20 = 7,125 m[2,4]+m[5,5],+Pp, PP = 4,375 + 0 + 35.10.20= 11,375 =7,125 3 0 i A5 5,000 5 0 A6 Definitions 6 Want: A₁A₂A (costs m[1,n]) Dimensions: {P, P} A₁ = ÂÃ₁+₁A₁+2¨ .... A i+1 m[i, j] = min cost for A i:j This approach gives us the minimum cost (minimum number of pairwise matrix element multiplications), but not the parenthecization itself. As with CUT-ROD, we can track this separately in a matrix we'll call S.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer