-
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
-
7756
感应双馈发电机系统的仿真,基于分段非线性权重值的Pso算法,计算多重分形非趋势波动分析matlab程序。( Simulation of doubly fed induction generator system, Based on piecewise nonlinear weight value Pso algorithm, Calculation multifractal detrended fluctuation analysis matlab program.)
- 2017-05-12 16:30:34下载
- 积分:1
-
C++关于向量、继承等学习资料
C++关于向量、继承、友元函数、重载、等学习资料,另附上一份C++习题集
- 2022-07-24 23:45:21下载
- 积分:1
-
使用极光推送(www.jpush.cn)向安卓手机推送消息【服务端向客户端主送推送】C#语言
使用极光推送(www.jpush.cn)向安卓手机推送消息【服务端向客户端主送推送】C#语言
- 2022-12-09 06:30:03下载
- 积分:1
-
Pauloq.show.PicApi
说明: udp持久化 mvc图片上传后使用udp通知wpf文件上传路径及文件名(Use UDP to inform WPF file upload path and file name after uploading persistent MVC picture)
- 2020-06-20 10:21:14下载
- 积分:1
-
main
DS12B887,T6963C等芯片集成电路与程序,其中还有一个通信块,在下一个RAR文件中,请查(DS12B887, T6963C and procedures, such as integrated circuit chips, which also has a communications block, the next a RAR file, please check)
- 2009-06-30 16:10:31下载
- 积分:1
-
EEE
说明: MATLAB中Simulink 的方向阻抗继电器的电路仿真,设置不同的过渡电阻进行仿真(Circuit simulation of Simulink directional impedance relay in MATLAB, setting different transition resistors for simulation)
- 2019-06-18 14:31:15下载
- 积分:1
-
C_sharp_Matrix_class
文件为C#矩阵运算类,包含了多种形式的矩阵定义,能够进行多种矩阵运算,如矩阵四则运算、求逆、转置等,十分方便用于实际开发。(File for the C# matrix operations class, contains the definition of various forms of matrix, to carry out a variety of matrix operations, such as matrix arithmetic, inversion, transpose, etc., is very convenient for actual development.)
- 2010-07-10 19:40:51下载
- 积分:1
-
Lab0504-Convolve
说明: 这个代码实现的功能是输入两个波形,让两个波形进行卷积计算,最后输出到缓冲区,送到输出口(This code implements the function is to enter two waveforms so that the two waveform convolution calculation, the final output to the buffer and sent to the output port)
- 2020-11-03 15:09:52下载
- 积分:1
-
Protues-jiaocheng
protues的教程,初学者的必备,可以学习很多东西,对自己收益很大(study protues)
- 2013-11-28 11:53:19下载
- 积分:1