-
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
-
jzw
经过多家家政公司实际运作,并参照目前市面上流行的家政管理软件精心打造的一套管理平台,专业化的后台管理能让您处理繁琐的小事更加轻松,前台和后台的无缝链接处处体现网络的巨大威力,全国首创的多人在线预订系统,系统首次提供候选名额,让您一次预订,多人受约,成交概率大幅提高,首次使用网络蜘蛛技术,定时搜集全国各地及时发布的家政信息,智能化处理后即时加入系统数据库(After a number of domestic companies in actual operation, and in the light of prevailing on the market at present domestic management software carefully crafted a set of management platform and professional management background can let you handle trival things more easily, the seamless link of the foreground and background reflected everywhere in the network the magnitude of the threat of force, the first multiplayer online booking system, the system provides, for the first time candidate places, let you a reservation, subject to many people about, the turnover probability is greatly improved, the network spider technology is used for the first time regularly collect all over the country timely release of the domestic information and intelligent processing immediately add system)
- 2016-05-12 10:01:22下载
- 积分:1
-
NONBI
说明: ldpc simulation matlab non-binary
- 2019-12-23 23:50:00下载
- 积分:1
-
rtp协议实现代码
rtp协议实现代码-rtp protocol code
- 2023-06-04 16:15:02下载
- 积分:1
-
CD_Player
Cd player control for visual C
- 2009-03-08 10:27:56下载
- 积分:1
-
52+报警
说明: 用51单片机完美地解决凝露现象。防止元件老化(The dew phenomenon can be perfectly solved by 51 single chip computer. Preventing component ageing)
- 2020-06-18 11:00:01下载
- 积分:1
-
crecttracker_demo
This program demonstrates how to draw on the client area, it also demonstrates how to use the mouse messages. I think the best way to learn programming is programming, so, let s begin our program now.(This program demonstrates how to draw on th e client area, it also demonstrates how to use the mouse messag es. I think the best way to learn programming is p rogramming, so, let s begin our program now.)
- 2006-06-28 15:49:14下载
- 积分:1
-
dztponent
说明: opnet学习过程中可能遇到的一些常见问题的解答,第二部分(Answers to some common questions that may arise during opnet learning, part 2)
- 2019-01-04 05:30:01下载
- 积分:1
-
3dterrainDEMO
说明: 3d 地形渲染DEMO lod
采用lod技术 多层渲染(3d terrain rendering using DEMO lod multi-lod rendering technology)
- 2009-08-01 22:30:54下载
- 积分:1
-
一个聊天室程序,分为服务器与客户端两部分,更重要的是,附带开发文档,很不错的。
一个聊天室程序,分为服务器与客户端两部分,更重要的是,附带开发文档,很不错的。-A chat room procedures, server and client into two parts and, more importantly, with the development of the document, it is good.
- 2022-09-29 00:55:04下载
- 积分:1