-
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
-
vibrationSprumCapture
使用陀螺仪采集车辆振动信号。示范使用LabVisual示波器控件使用(开发工具visual studion 2008 C#) (capture vibration by AHRS and Xbow )
- 2012-03-25 07:04:40下载
- 积分:1
-
VCOpenDDS
ACE+TAO windows环境下编译ACE编译OpenDDS(ACE+ TAO windows environment compiler ACE source)
- 2013-08-01 23:03:26下载
- 积分:1
-
GraphColorPage
GraphColorPage.cpp the ClassWizard will add member initialization here(the ClassWizard will GraphColorPage.cpp add member initialization here)
- 2007-03-16 22:45:32下载
- 积分:1
-
Thumbnail_demo
应用程序中使用Thumbnail(applications using Thumbnail)
- 2004-10-05 11:22:49下载
- 积分:1
-
project1
定时闹铃系统,可后台操作
功能很好,一键停止(Regular alarm system, background operation)
- 2014-03-31 21:03:07下载
- 积分:1
-
xuaualgveterminegdraw
这是用VC++环境做成的一个图形编程的练习,是一个旋转的风车,()
- 2018-02-20 11:51:23下载
- 积分:1
-
zgy-server
说明: 用VC6写的简单控制台服务器端程序,学习用。(with VC6 write a simple console server software, to study.)
- 2006-04-12 14:39:50下载
- 积分:1
-
DICSO
一个元胞传输模型(CTM)的经典使用软件,解压后可使用。(one yuan cellular transmission model (CTM) of the classic use of software can be used unpacked.)
- 2007-03-21 16:35:12下载
- 积分:1
-
InvertedPd4_final
DSP program for control inverted pendulm.
- 2011-08-02 16:13:57下载
- 积分:1