-
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
-
communication
使用VC.NET编写串口通信程序,是很好的串口调试软件(Use VC.NET write serial communication program is a very good serial debugging software)
- 2020-11-22 13:59:35下载
- 积分:1
-
xtremetoolkitPro15.3.1
大名鼎鼎的界面库Toolkit.Pro.v15.3.1完整源代码(SHELL PROGRAMMING Toolkit.Pro.v15.3.1)
- 2018-08-04 20:08:21下载
- 积分:1
-
Visual C++ 工程应用与项目开发实践
说明: 一个Visual C++ 工程应用与项目开发实践中的图形图象编程例子!供大家参考,有什么不正之处望大家不吝赐教!(a Visual C application and project development in the practice of graphic images Programming example! For your reference, what is unjust Office, we hope the wing!)
- 2005-12-24 15:50:10下载
- 积分:1
-
PondWater
directx 下实现的shader water(directx under the shader water)
- 2008-01-10 11:30:17下载
- 积分:1
-
1
说明: vc ++学习源码,对大家有很大的帮助。希望大家喜欢(the vc++ learning source, and a great help to everyone)
- 2012-08-06 23:19:08下载
- 积分:1
-
ADO-And-Access
这是一个基本的数据库编程实例,里面最特别的地方是即使出数据库里面出现多条完全相同的记录,它也能操作,而不会出错。(This is a basic database programming examples, there is the most special place inside the database even if there is more of the same record, which can operate without error.)
- 2013-11-15 06:37:48下载
- 积分:1
-
Head-First-Design-mode
你将学到为何利用其他开发人员的经验与智慧解决问题,我们会看看设计模式的用途与优点,并通过实例来了解模式是如何运作。(You will learn why to use the experience and wisdom of other developers to solve the problem, we will look at the uses and benefits of design patterns, and an example to understand the model is how it works.)
- 2012-05-02 12:48:33下载
- 积分:1
-
2014-12-01 窗口切换
使用MFC实现多个窗口切换,同一个窗口可以同时4、6、9个小窗口同时显示(MFC implementation of multiple window switching)
- 2018-07-03 14:33:45下载
- 积分:1
-
BMPtoAVI最终版
基于visual c++开发,实现有bmp图像序列向avi视频信号转化(Based on Visual C + + development, the conversion from BMP image sequence to avi video signal is realized)
- 2020-06-16 11:00:02下载
- 积分:1