Lecture 8: Dynamic Programming
Ordering Matrix Multiplications
Example: 计算矩阵乘法
两个矩阵
Problem: 以何种计算顺序时计算时间最少
Exhaustive seaerch
令
那么就可以得到关于b的递推式:
hint: 对于每一种分割只需将两边的计算方法相乘即可
最终得到:
Recurrence equations
令
- Title: Lecture 8: Dynamic Programming
- Author: zcyzzz
- Created at : 2024-11-03 19:06:00
- Updated at : 2024-11-05 22:06:23
- Link: https://rockissleeping.github.io/2024/11/03/ads_lec8/
- License: This work is licensed under CC BY-NC-SA 4.0.