Write down the recursive equation

160 views 10:11 am 0 Comments August 8, 2023


1. Write down the recursive equation for the matrix-chain multiplication problem, and find an optimal parenthesizationofamatrix-chainproduct whosesequenceofdimensionsis

,i.e.,A1hasdimensions5×10,A2dimension10×4, …

2. Assumingmatching ofA givesascore of 1and matchingofC givesa score of2, determinea commonsubsequencewiththehighestmatchingscoreforand

.Pleasewritedowntherecursiveequationforthedynamic programming and show the table/steps.

3. Create the optimal binary search tree for the following items, where the probability occurrence of each word is given in parentheses: CASE (.05), ELSE (.15), END (.05), IF (.35), OF (.05), THEN (.35). Assume search keys are only from this set, i.e. probabilities of dummy keys are 0. Show the tables/steps.

Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,