-
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
-
jiaowu
MFC实现的一个简单的教务管理系统, 数据库使用的是access数据库(a simple system use MFC)
- 2015-04-15 15:06:38下载
- 积分:1
-
face-detection
Thermal Infrared Face Recognition –
a Biometric Identification Technique
for Robust Security System
- 2013-10-14 21:09:15下载
- 积分:1
-
MonitorCreateProcessEvent
利用WMI监视进程的创建
Private Sub StartMonitorCreateProcessEvent()
Set CreateProcessEvent = New SWbemSink
Set objSWbemServices = GetObject("winmgmts:\.
ootcimv2")
objSWbemServices.ExecNotificationQueryAsync CreateProcessEvent, "SELECT * FROM __InstanceCreationEvent WITHIN 1 WHERE TargetInstance ISA Win32_Process "
End Sub(Use WMI to monitor process creation Private Sub StartMonitorCreateProcessEvent () Set CreateProcessEvent = New SWbemSink Set objSWbemServices = GetObject ( )
- 2007-09-07 09:22:06下载
- 积分:1
-
遗传算法
说明: 新安江模型,应用遗传算法用于参数的自动率定(The Xin'An river model with genetic algorithm)
- 2017-12-26 10:33:42下载
- 积分:1
-
TomWatch_demo
这是VC的一个addin的源代码,将其复制到vc下面的addin目录,然后加载后,可以用它来查看调试中的CDC。(This is an addin VC's source code, copies of the following vc addin directory, loaded, can be used to check the CDC debugging.)
- 2007-02-05 21:42:42下载
- 积分:1
-
block-adjustment
光束法区域网平差,解算教学楼上用照相机测得、并在计算机上处理的17个控制点的坐标和内外方位元素。(Beam method adjustment with regional network,The solution with the teaching building on camera and computer processing in the 17 control point coordinates and the internal and external position elements.
)
- 2012-04-15 16:11:11下载
- 积分:1
-
myPlaneDisplay
VC++编写的飞机仪表显示,可以直接修改使用,显示为一个可以飞行的3D飞机(VC++ Prepared aircraft instrument display, you can directly modify the use, appears as a 3D plane can fly)
- 2021-04-05 17:19:03下载
- 积分:1
-
ParallelPortTest
利用DriverLINX Port IO Driver实现的计算机并口端口位输入输出测试程序。(DriverLINX Port IO Driver using computer parallel port to achieve digital input and output test procedure.)
- 2008-12-26 10:41:20下载
- 积分:1
-
YouTube-Downloader
用C#開發的YouTube Downloader,只要貼上YouTube URL,就可以把Download YouTube影片(C# development of YouTube Downloader, as long as the paste YouTube URL, you can put Download YouTube Videos)
- 2013-12-01 19:53:05下载
- 积分:1