900字范文,内容丰富有趣,生活中的好帮手!
900字范文 > C语言的实现的程序算法 算法:C语言实现(Algorithms In C)的学习

C语言的实现的程序算法 算法:C语言实现(Algorithms In C)的学习

时间:2022-03-31 12:27:25

相关推荐

C语言的实现的程序算法 算法:C语言实现(Algorithms In C)的学习

这是chapter 1的Introduce部分

原文:Readers of thisbook are expected to have at least a year's experience programming in high andlow-level languages. Also, some exposure to elementary algorithms on simpledata structures such as arrays, stacks, queues, and trees might be helpful,though this material is reviewed in some detail in Chapters 3 and 4. An elementaryacquaintance with machine organization, programming languages, and other basiccomputer science concepts is also assumed. (We’ll review such material brieflywhen appropriate, but always within the context of solving particularproblems.) A few of the application areas we deal with require knowledge ofelementary calculus. We’ll also be using some very basic material involvinglinear algebra, geometry, and discrete mathematics, but previous knowledge ofthese topics is not necessary.

理解:阅读这本书的读者最好是有一年以上的高级和低级语言的编程经验。懂得如,数组,堆,队列和树的这些基本的数据结构。要熟悉计算机结构,编程语言和其它一些基础的计算机概念。在某些地方会要到微积分,线性代数,几何学和离散数学的知识。

原文:In writing acomputer program, one is generally implementing a method of solving a problemthat has been devised previously. This method is often independent of theparticular computer to be used: it’s equally appropriate for many computers. Inany case, it is the method, not the computer program itself, which must bestudied to learn how the problem is being attacked.

The term algorithm is used in computer science to describe a problem-solvingmethod suitable for implementation as computer programs. Algorithms are the “stuff”of computer science: they are central objects of study in many, if not most,areas of the field.

理解:算法就是解决问题的方法,是计算机科学的原料

原文:Most algorithmsof interest involve complicated methods of organizing the data involved in thecomputation. Objects created in this way are calleddata structures, and they also are central objects of study incomputer science. Thus algorithms and data structures go hand in hand; in thisbook we take the view that data structures exist as the byproducts or end-productsof algorithms, and thus need to be studied in order to understand thealgorithms. Simple algorithms can use simple data structures. We will study theproperties of many data structures in this book; indeed, it might well havebeen called Algorithms and Data structures in this book; indeed, it might wellhave been calledAlgorithmsand Data Structures in C.

理解:数据结构指在利用算法解决问题的过程中的数据的组织方式,研究数据结构是为了更好的研究算法。这本书改名为《算法与数据结构的C语言实现》更好。

原文:When avery large computer program is to be developed, a great deal of effort must gointo understanding and defining the problem to be solved, managing itscomplexity, and decomposing it into smaller subtasks that can be easilyimplemented. It is often true that many of the algorithms required after thedecomposition are trivial to implement. However, in most cases there are a fewalgorithms whose choice is critical because most of the system resources willbe spent running those algorithms. In this book we will study a variety offundamental algorithms basic to large programs in many applications areas.

理解:对于复杂的问题,采取的解决方式通常是将问题细化成很多的小问题,这些小问题的算法往往更容易实现,所以本书讨论的是各种各样基本的算法。

原文:The sharing ofprograms in computer systems is becoming more widespread, so that while seriouscomputer user will use a large fraction of the algorithms in this book, theymay need to implement only a somewhat smaller fraction of them. However, implementingsimple versions of basic algorithms helps us to understand them better and thususe advanced versions more effectively. Also, mechanisms for sharing softwareon many computer systems often make it difficult to tailor standard programs toperform effectively on specific tasks, so that the opportunity to re-implementbasic algorithms frequently arises.

理解:还是在说明基本算法的重要性和实用性

原文:Computer programsare often over-optimized. It may not be worthwhile to take pains to ensure thatan implementation is the most efficient possible unless an algorithm is to beused for a very large task or is to be used many times. Otherwise, a careful,relatively simple implementation will suffice: one can have some confidence that it will work, and it is likely to run perhaps five or ten times slowerthan the best possible version, which means that it may run for an extra fewseconds. By contrast, the proper choice of algorithm in the first place can makea difference of a factor of a hundred or a thousand or more, which mighttranslate to minutes, hours, or even more in running time. In this book, weconcentrate on the simplest reasonable implementations of the best algorithms.

理解:大多数人可能这样觉得——程序不必过分优化,除非程序很繁琐或者使用的次数很频繁;一个一般的算法就能实现功能,只是比最好的算法慢5倍10倍而已。作者的建议一开始就用合适的算法,这样程序运行的时候效率就更好了,因此在这本里他用最简单地方式讲述最好的算法怎样合理的实现的。也就是说通俗的告诉你为什么这是最优算法。

原文:Often severaldifferent algorithms (or implementations) are available to solve the sameproblem. The choice of the very best algorithm for a particular task can be avery complicated process, often involving sophisticated mathematical analysis. Thebranch of computer science which studies such questions is called analysis of algorithms. Many of the algorithms that we will study have been shown throughanalysis to have very good performance, while others are simply known to workwell through experience. We will not dwell on comparative performance issues:our goal is to learn some reasonable algorithms for important tasks. But oneshould not use an algorithm without having some idea of what resources it mightconsume, so we will be aware of how our algorithms might be expected toperform.

理解:从多种可行性的算法中选出最优算法很伤脑筋,需要你精通数学。但是懂得算法分析让我们更好理解算法是怎么实现的。

总结:1. 有哪些基础之后,可以更好的学习这门课

2. 什么是算法和数据结构

3. 学习最优的基本算法,并要知道是怎么实现的

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。