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.
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.
Related questions
Question
Can someone explain this to me?
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 3 steps