-
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
-
12084247tao2
基于ICMP协议的ping程序设计实验基于ICMP协议的ping程序设计实验(Based on the ICMP protocol ping program designed experimental program designed experiments based on the ICMP protocol ping)
- 2012-10-29 10:54:54下载
- 积分:1
-
EXCEL
VC EXCEL接口:workbook worksheet 等一系列操作接口(excel interface IN vc)
- 2013-11-28 14:46:44下载
- 积分:1
-
hafuman
一 . 需求分析:
1) 输入形式和输入值范围:
输入形式是要压缩(或者要解压)的文件路径,输入范围是字符串,而且要是文件的路径。
2) 输出形式:
输出相应的编码压缩文件和解码原文件
3) 程序所能达到的功能:
利用哈夫曼对ASCII文件做不等长编码,达到压缩文件。利用哈夫曼树的遍历,达到解压文件的目的。程序的功能也就是实现压缩和解压ASCII类型文件的目的。
4)测试数据:(包括正确的输入数据及其输出结果和含有错误输入及其输出结果)
测试输入或者输出文本框是不是有空的,是不是不是有效路径。进行条件判断,实现错误处理。
比如要压缩:c:a.txt 文件路径就是:c:a.txt。如果输入框是空的,就判断,然后用MessageBox处理信息。
如果文件路径和文件的输出路径都写正确的话,就会输出相应的压缩或者解压文件,否则用函数MessageBox提示错误。然后进行更正。
二 . 概要设计:
1) 哈夫曼树的特点
a) 是二叉树的一种,而且是一种没有度数是1的二叉树
b) 一棵树有n个叶子,就会用2n-1个节点
c) 一种“最优”二叉树,由于树的带权路径(WPL)最小
d) 由于它是由下到上顺序构造的,使得分支节点和叶子节点从下到上,权值都是从小到大的顺序排列的
()
- 2007-07-16 22:04:12下载
- 积分:1
-
ChagDsplyMd
说明: 显示及设定当前显卡可用的所有分辨率与刷新率。(Display and graphics settings available in all the current resolution and refresh rate.)
- 2009-07-22 10:30:35下载
- 积分:1
-
DropExDemo
说明: 内容拖放的演示, 主要实现列表内容之间的拖放交换(Drag and drop the contents of the demonstration, list the contents of the main drag and drop between the exchange)
- 2008-10-08 09:14:25下载
- 积分:1
-
WMFJPGGIF_display
VC++程序中采用OLE技术显示GIF,JPG,WMF,BMP图片(VC++ Procedures showed that the use of OLE technology GIF, JPG, WMF, BMP picture)
- 2007-08-07 15:23:16下载
- 积分:1
-
888
3D8光立方,动画程序!可供下载,几十种动画!(3D8 cube, animation program!Available for download, dozens of animation!)
- 2020-12-25 23:19:04下载
- 积分:1
-
xueye
利用散列函数和哈希表建立一个鞋业管理系统。实现添加货物、浏览货物、查找货物、修改货物、删除货物。并且在屏幕上输出相应结果。
本程序用Visual Basic 6.0编写,共分7个模块frmMain(主窗口模块)、frmNew(新建物品窗口模块)、frmuserlook(浏览数据窗口模块)、frmsearch(查找窗口模块)、frmamend(修改窗口模块)、frmdel(删除窗口模块)和all (数据声名模块)。实现添加货物、浏览货物、查找货物、修改货物、删除货物的功能。
(The use of hash function and hash table to establish a management system for the footwear industry. Add realize goods, browse the goods, to locate the goods, modify the goods, the deletion of the goods. And output on the screen corresponding results. This procedure prepared using Visual Basic 6.0, consists of seven module frmMain (main window module), frmNew (new items window module), frmuserlook (browser window data module), frmsearch (Find window module), frmamend (modified window module), frmdel (delete window module) and all (the data module name). Add realize goods, browse the goods, to locate the goods, modify the goods, cargo delete function.)
- 2007-11-07 23:24:30下载
- 积分:1
-
Winio_8254
直接用LPT对8254 IO端口访问用winio的程序源码(Direct LPT 8254 IO port access winio program source code)
- 2013-04-29 00:41:57下载
- 积分:1