没有合适的资源?快使用搜索试试~ 我知道了~
Analysis of Algorithms
需积分: 5 0 下载量 51 浏览量
2024-01-08
14:15:41
上传
评论
收藏 4.38MB PDF 举报
温馨提示
试读
46页
Analysis of Algorithms
资源推荐
资源详情
资源评论
1. Analysis of Algorithms
•History and motivation
•A scientific approach
•Examples
Why Analyze an Algorithm?
2. Predict performance, compare algorithms, tune parameters.
3
1. Classify problems and algorithms by difficulty.
3. Better understand and improve implementations and algorithms.
Intellectual challenge: AofA is even more interesting than programming!
Analysis of Algorithms (Babbage, 1860s)
4
“As soon as an Analytic Engine exists, it will necessarily guide the future course of the science.
Whenever any result is sought by its aid, the question will arise—By what course of
calculation can these results be arrived at by the machine in the shortest time?”
— Charles Babbage (1864)
Analytic Engine
how many times do you
have to turn the crank?
Analysis of Algorithms (Turing (!), 1940s)
5
“It is convenient to have a measure of the amount of work involved in a computing
process, even though it be a very crude one. We may count up the number of times
that various elementary operations are applied in the whole process . . .”
— Alan Turing (1947)
ROUNDING-OFF ERRORS IN MATRIX PROCESSES
By A. M. TURING
{National Physical Laboratory, Teddington, Middlesex)
[Received 4 November 1947]
SUMMARY
A number of methods of solving sets of linear equations and inverting matrices
are discussed. The theory of the rounding-off errors involved is investigated for
some of the methods. In all cases examined, including the well-known 'Gauss
elimination process', it is found that the errors are normally quite moderate: no
exponential build-up need occur.
Included amongst the methods considered is a generalization of Choleski's method
which appears to have advantages over other known methods both as regards
accuracy and convenience. This method may also be regarded as a rearrangement
of the elimination process.
THIS paper contains descriptions of a number of methods for solving sets
of linear simultaneous equations and for inverting matrices, but its main
concern is with the theoretical limits of accuracy that may be obtained in
the application of these methods, due to rounding-off errors.
The best known method for the solution of linear equations is Gauss's
elimination method. This is the method almost universally taught in
schools. It has, unfortunately, recently come into disrepute on the ground
that rounding off will give rise to very large errors. It has, for instance,
been argued
by HoteUing (ref. 5) that in solving a set of n equations we
should keep nlog
10
4 extra or 'guarding' figures. Actually, although
examples can be constructed where as many as «log
10
2 extra figures
would be required, these are exceptional. In the present paper the
magnitude of the error is described in terms of quantities not considered
in HoteUing's analysis; from the inequalities proved here it can imme-
diately be seen that in all normal cases the Hotelling estimate is far too
pessimistic.
The belief that the elimination method and other 'direct' methods of
solution lead to large errors has been responsible for a recent search for
other methods which would be free from this weakness. These were
mainly methods of successive approximation and considerably more
laborious than the direct
ones.
There now appears to be no real advantage
in the indirect methods, except in connexion with matrices having special
properties, for example, where the vast majority of the coefficients are
very small, but there is at least one large one in each row.
The writer was prompted to cany out this research largely by the
practical work of L. Fox in applying the elimination method (ref. 2). Fox
at Princeton University Library on September 20, 2011qjmam.oxfordjournals.orgDownloaded from
Analysis of Algorithms (Knuth, 1960s)
6
To analyze an algorithm:
•
Develop a good implementation.
•
Identify unknown quantities representing the basic operations.
•
Determine the cost of each basic operation.
•
Develop a realistic model for the input.
•
Analyze the frequency of execution of the unknown quantities.
•
Calculate the total running time:
DRAWBACKS:
Model may be unrealistic.
Too much detail in analysis.
BENEFITS:
Scientific foundation for AofA.
Can predict performance and compare algorithms.
(
)
(
)
D. E. Knuth
剩余45页未读,继续阅读
资源评论
归忆_AC
- 粉丝: 1820
- 资源: 16
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功