-
zoj1094
zoj094
Matrix multiplication problem is a typical example of dynamical programming.
Suppose you have to evaluate an expression like A*B*C*D*E where A,B,C,D and E are matrices. Since matrix multiplication is associative, the order in which multiplications are performed is arbitrary. However, the number of elementary multiplications needed strongly depends on the evaluation order you choose.
For example, let A be a 50*10 matrix, B a 10*20 matrix and C a 20*5 matrix.
There are two different strategies to compute A*B*C, namely (A*B)*C and A*(B*C).
The first one takes 15000 elementary multiplications, but the second one only 3500.
Your job is to write a program that determines the number of elementary multiplications needed for a given evaluation strategy.
(Matrix multiplication problem is a typical example of dynamical programming.
Suppose you have to evaluate an expression like A*B*C*D*E where A,B,C,D and E are matrices. Since matrix multiplication is associative, the order in which multiplications are performed is arbitrary. However, the number of elementary multiplications needed strongly depends on the evaluation order you choose.
For example, let A be a 50*10 matrix, B a 10*20 matrix and C a 20*5 matrix.
There are two different strategies to compute A*B*C, namely (A*B)*C and A*(B*C).
The first one takes 15000 elementary multiplications, but the second one only 3500.
Your job is to write a program that determines the number of elementary multiplications needed for a given evaluation strategy.
)
- 2012-06-10 10:38:53下载
- 积分:1
-
WindowsApplication5
采用C#建立Delaunay三角网同时可以生成Voronoi图。(Using C# Establish Delaunay Triangulation Voronoi diagram can be generated at the same time.)
- 2020-12-12 16:09:15下载
- 积分:1
-
ldc1314
ldc1314的配置,读取数值并在stm32f4的开发板上显示(Ldc1314 configuration, read values and display them on stm32f4 development board)
- 2020-06-19 08:40:01下载
- 积分:1
-
ms_icmp
又一个使用ICMP.DLL实现ping的小例子 (Another example of using ICMP.DLL to implement ping)
- 2021-02-05 10:39:57下载
- 积分:1
-
SRIO_4x_DSP2FPGA
C6678开发板高速串口与FPGA之间的通信配置,应用程序(Communication Configuration between High Speed Serial Port of C6678 Development Board and FPGA, Application Program)
- 2020-10-26 15:39:59下载
- 积分:1
-
966454657
很炫的底部导航,精选ios编程学习源码,很好的参考资料。(The bottom navigation flashy, selection of learning IOS programming source code, a good reference.)
- 2013-12-06 11:37:34下载
- 积分:1
-
DSP
说明: 本文阐述了28335的引脚分配和一些编程实例(This paper describes pin assignment of 28335 and some programming examples.)
- 2020-06-23 03:20:02下载
- 积分:1
-
Tsr
DVB 能完整的解析出TS流文件中的PAT,PMT,NIT,CAT信息,并且能兼容188和204的TS流文件(DVB can be a complete parse out the TS stream file in the PAT, PMT, NIT, CAT information, and can be compatible with the 188 and 204 of the TS stream file)
- 2020-11-21 15:09:35下载
- 积分:1
-
电子秤读取小程序
电子秤读取小程序
- 2020-05-12下载
- 积分:1
-
WindowsFormsXml
.net 环境下解析xml数据的测试小例子,适合初学者(net environment analysis of XML data test small example, suitable for beginners)
- 2018-06-05 10:05:32下载
- 积分:1