Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

( 1 0 % ) The following procedure is a bottom - up method for matrix chain order. This procedure assumes that matrix A i

(10%) The following procedure is a bottom-up method for matrix chain order. This procedure assumes that
matrix Ai has dimensions pi-1pi for i=1,2,dots,n. Its input is a sequence p=(:p0,p1,dots,pn:), where
p. length =n+1. Let m[i,j] be the minimum number of scalar multiplications needed to compute the
matrix AiAi+1cdotsAj. The procedure uses an auxiliary table m[1..n,1..n] for storing the m[i,j] costs
and another auxiliary table s[1..n-1,2..n] that records which index of k achieved the optimal cost in
computing m[i,j]. Please fill in the empty statements.
n=p. length -1
let m[1..n,1..n] and s[1..n-1,2..n] be new tables
For i=1 to n
m[i,i]=0
For l=2 to n??l is the chain length
For i=1 to n-l+1
j=
(a)(3%)
m[i,j]=
For k=itoj-1
q=
(b)(4%)
Ifq
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advanced Database Systems For Integration Of Media And User Environments 98

Authors: Yahiko Kambayashi, Akifumi Makinouchi, Shunsuke Uemura, Katsumi Tanaka, Yoshifumi Masunaga

1st Edition

9810234368, 978-9810234362

More Books

Students also viewed these Databases questions

Question

Analyse the various techniques of training and learning.

Answered: 1 week ago