-
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
-
64845777
袖珍文件分割器,VC++经典编程源码,很好的参考资料。(Pocket file splitter, VC++ classic programming source code, a good reference.)
- 2013-11-16 10:58:27下载
- 积分:1
-
6790966
Winamp样式的自动停靠对话框,VC++经典编程源码,很好的参考资料。(Winamp style automatic berth dialog, VC++ classic programming source code, a good reference.)
- 2013-11-15 09:09:59下载
- 积分:1
-
diagnosa-hardisk
CHOICE FORWARD CHAINING
- 2014-05-29 16:11:16下载
- 积分:1
-
7141865
How to use VB to watch the keyboard in the background
- 2018-08-20 16:14:46下载
- 积分:1
-
ContactMS
MFC做的通讯录,利用ODBC连接access数据库,能够对数据进行写入、读出和修改。适合初学者参考。[注:需要自己配置数据源,也可以不配置,运行程序两次就行,第一次相当于是配置](MFC to do the book, using ODBC to connect access database, the data can be written to, read and modify. Suitable for beginners reference.)
- 2013-11-03 11:31:35下载
- 积分:1
-
ChainShop
连锁店指纹考勤系统,每次考勤成功都会显示被考勤人员的照片。数据库是基于XML小型数据库。界面友好,操作方便!(Chain fingerprint attendance system, each successful attendance will show pictures of attendance officers. Database is based on the small XML database. User-friendly, easy to operate!)
- 2007-09-04 21:34:49下载
- 积分:1
-
VB6diqu
说明: 今天给大家带来使用文本文件作为数据源的 ComboBox中国城市三级联动的代码。
1.地区库更新非常方便,不会影响到其他功能(区划代码是唯一的)。
2.文本文件读取来速度很快。(n the past, I used VB6 to write an example of three-level linkage of ComboBox in Chinese cities, using MDB database. A few years ago, the code, the regional database is not the latest. Today we bring you the code of ComboBox, which uses text files as data sources, for three-level linkage of Chinese cities.
1. The regionalization library updates are very convenient and will not affect other functions (regionalization code is the only one).
2. Text files are read very fast.)
- 2019-06-05 09:34:04下载
- 积分:1
-
1097317117
大理石晶化作業流程改善與標準工時量測
改善工作流程,並訂定標準工時(Marble crystallization processes to improve the measurement and standard working hours to improve the work flow, and set the standard working hours)
- 2010-11-03 09:06:18下载
- 积分:1
-
helpsvm
自控应用svm的介绍文档,方便下载传看。(mysvm is used to train a SVM on a given example set and testing the results.it is very conveninent to learn about it by u self.)
- 2016-04-26 11:19:24下载
- 积分:1