-
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
-
COMTestCode
vc环境下COM组件编程小例子,一个文件生成COM组件,另一个文件调用该COM组件。(COM component programming small example, a file generated COM component vc environment, another file to call the COM component.)
- 2013-12-19 16:21:03下载
- 积分:1
-
creatfaststyle
演示了如何创建和删除一个应用程序的过程,使你深入了解windows系统中类似的操作过程是如何实现的(Demonstrated how to create and delete an application process, so that a deeper understanding of your windows operating system similar to the process of how to achieve the)
- 2007-12-14 19:52:09下载
- 积分:1
-
motor-qualify-GA-code
通过遗传算法将一系列以Excel格式保存的出厂试验数据区分出合格范围,本程序包含模块,数据库处理,及各类控件的应用(one range factory test dataSaved in Excel format to distinguish qualified by genetic algorithm。This program contains modules, database processing, and various types of control applications)
- 2012-12-16 16:44:47下载
- 积分:1
-
Texture-Mipmap
基于OpenSceneGraph手动构建Miapmap,实现纹理自动Miapmap加载,可以调节纹理的精细级别~(Based on OpenSceneGraph manually build Miapmap, to achieve automatic Miapmap texture loading, you can adjust the level of the fine texture ~)
- 2013-12-19 23:04:54下载
- 积分:1
-
CUDARayTracing
simple ray-tracing
- 2010-06-06 02:21:01下载
- 积分:1
-
diskinfo
Get Disk Free Space for Visual basic.
- 2013-07-21 17:29:41下载
- 积分:1
-
Selectinto
说明: 利用Select into生成临时表,使用SQL语句生成数据库中的临时表(Use Select into to generate temporary tables, use SQL statements to generate temporary tables in the database)
- 2020-06-16 11:13:54下载
- 积分:1
-
社区档案管理软件
社区档案管理软件自定义档案分类及各档案分类目录项信息,满足不同档案录入需求。支持Excel导入档案条目信息,实现大批量档案条目信息统一,减少手动录入工作量,提高工作效率及工作质量。(The community archives management software customizes the information of archives classification and catalogue items to meet the needs of different archives entry. Supporting Excel to import file entry information, realizing a large number of file entry information unification, reducing manual input workload, improving work efficiency and quality.)
- 2020-06-23 23:00:01下载
- 积分:1
-
213213
VB制作二维码图像
VB制作二维码图像(Produce two-dimensional code)
- 2013-11-08 23:55:23下载
- 积分:1