[理工] [軟體] 99-台大資工-軟體設計第四題

看板Grad-ProbAsk作者 (好看你)時間14年前 (2010/08/13 17:40), 編輯推噓3(303)
留言6則, 5人參與, 最新討論串1/2 (看更多)
Given is a chain(A1,A2,A3,A4,A5) of five matrices whose dimensions are 40*20,20*50,50*30,30*60,and 60*40,respectively. You are asked to fully parenthesize the product A1A2A3A4A5 in a way that minimizes the number of scalar multiplications. (a) What is your parenthesization?(10%) (b) What is the number of its scalar multiplications?(5%) 對不起我真的無法領會parenthesize,parenthesization的意思 所以整題就看不懂了。 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.119.72.56

08/13 20:10, , 1F
這應該可以用DP解 可以看cormen演算法
08/13 20:10, 1F

08/13 20:10, , 2F
畫出表格 再倒退追蹤
08/13 20:10, 2F

08/13 20:11, , 3F
口氣可以更強烈些...就是要你用DP解XD
08/13 20:11, 3F

08/13 21:54, , 4F
1.怎麼乘最少次 2.最少幾次
08/13 21:54, 4F

08/13 22:12, , 5F
原來這題是考演算法阿 哈哈哈 還沒讀到 謝謝大家
08/13 22:12, 5F

08/19 09:19, , 6F
Matrix chain
08/19 09:19, 6F
文章代碼(AID): #1CPHBtLx (Grad-ProbAsk)
文章代碼(AID): #1CPHBtLx (Grad-ProbAsk)