-
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
-
vc案例原代码3
这是VC++精彩案例一书的随书光盘(三),里面包含了很多具有代表性的代码,可用于初学VC者参考的好资料(This is a wonderful case with the CD (3), which contains a lot of representative code that can be used when a person VC good reference information)
- 2005-04-13 08:45:54下载
- 积分:1
-
FreeHandDraw
实现地图符号的定制与开发
有一定的参考价值(achieve map symbol customization and the development of certain reference value)
- 2007-05-15 22:21:24下载
- 积分:1
-
VCComm
VC从串口读取数据并实时绘制曲线图,非常好用。(VC data from the serial port to read real-time rendering curve is very useful.)
- 2010-07-30 12:32:16下载
- 积分:1
-
DisWinLynn
说明: 自己写的一个可以屏蔽系统键的程序,可以屏蔽WIN键,当然你可以修改其他屏蔽键!(玩魔兽时防止按错退出写的一个自己用的辅助工具)(himself in a system can shield key procedures, shielding WIN button, of course, you can modify other shielding keys! (Barry wrong by preventing the withdrawal was made with one of his aids))
- 2005-10-08 13:21:56下载
- 积分:1
-
Skinmesh
实现骨骼动画类,实现简单骨骼动画载入鸡演示(Category to achieve skeletal animation, skeleton animation simple loading)
- 2009-07-09 19:56:44下载
- 积分:1
-
BKR__hamming
说明: 7,4汉明码及未编码和多种译码方法误码率性能的对比(Comparison of BER performance between 7,4 hamming codes and uncoded and multiple Decoding methods)
- 2019-04-03 00:14:31下载
- 积分:1
-
Lesson20Code
数据库访问,能帮助解决很多问题的!大家可以好好学习学习。(Database access, can help solve many problems! We can learn to learn.)
- 2013-07-04 11:34:58下载
- 积分:1
-
myspy
迷你间谍程序,一个文件系统的过来驱动程序,侦听捕获所有的读写操作。(Mini spy program, a file system over the driver listens to catch all read and write operations.)
- 2014-07-29 12:04:56下载
- 积分:1
-
gettime
一个记录开关机时间的软件,可以实现开机自运行(a record time for the switch software can be run in Flint)
- 2005-04-14 17:48:56下载
- 积分:1