【期末复习】高级计算机英语(1)

【期末复习】高级计算机英语(1)

广外计英 课文翻译 P1-P12
姚老师的口语考试…

In this preliminary chapter we consider the scope of computer science, develop a historical perspective, and establish a foundation from which to launch our study.

在这第一章中,我们顾及了计算机科学的范畴,从历史角度进行了阐述,并为我们的研究奠定了基础。

Computer science is the discipline that seeks to build a scientific foundation for such topics as computer design, computer programming, information processing, algorithmic solutions of problems, and the algorithmic process itself. It provides the underpinnings for today’s computer applications as well as the foundations for tomorrow’s computing infrastructure.

计算机科学是一门旨在为计算机设计、计算机编程、信息处理、算法解决问题以及算法过程本身等主题奠定科学基础的学科。它为当今的计算机应用及未来的计算基础设施奠定了基础。

This book provides a comprehensive introduction to this science. We will investigate a wide range of topics including most of those that constitute a typical university computer science curriculum. We want to appreciate the full scope and dynamics of the field. Thus, in addition to the topics themselves, we will be interested in their historical development, the current state of research, and prospects for the future. Our goal is to establish a functional understanding of computer science—one that will support those who wish to pursue more specialized studies in the science as well as one that will enable those in other fields to flourish in an increasingly technical society.

本书全面介绍了这门科学。我们将研究广泛的主题,包括那些大多数构成典型大学计算机科学课程。我们希望了解该领域的全部范畴和动态。因此,除了主题本身,我们还将对其历史发展、研究现状和未来前景感兴趣。我们的目标是建立对计算机科学的功能性理解–既能支持那些希望在计算机科学领域进行更专业学习的人,又能使其他领域的人在技术性日益增强的社会中茁壮成长。

0.1 The Role of Algorithms

We begin with the most fundamental concept of computer science—that of an algorithm. Informally, an algorithm is a set of steps that defines how a task is performed. (We will be more precise later in Chapter 5.) For example, there are algorithms for cooking (called recipes), for finding your way through a strange city (more commonly called directions), for operating washing machines (usually displayed on the inside of the washer’s lid or perhaps on the wall of a laundromat), for playing music (expressed in the form of sheet music), and for performing magic tricks (Figure 0.1).

我们从计算机科学最基本的概念–算法开始。通俗点说,算法是一组定义任务如何执行的步骤(我们将在第 5 章中进一步阐述)。例如,有烹饪的算法(称为食谱)、在陌生城市中找路线的算法(通常称为方向)、操作洗衣机的算法(通常显示在洗衣机盖子的内侧或洗衣店的墙上)、演奏音乐的算法(以乐谱的形式表示)以及表演魔术的算法(图 0.1)。

Before a machine such as a computer can perform a task, an algorithm for performing that task must be discovered and represented in a form that is compatible with the machine. A representation of an algorithm is called a program. For the convenience of humans, computer programs are usually printed on paper or displayed on computer screens. For the convenience of machines, programs are encoded in a manner compatible with the technology of the machine. The process of developing a program, encoding it in machine-compatible form,and inserting it into a machine is called programming. Programs, and the algorithms they represent, are collectively referred to as software, in contrast to the machinery itself, which is known as hardware.

在计算机等机器执行任务之前,必须找到执行该任务的算法,并以与机器兼容的形式表示出来。算法的表示形式称为程序。为了方便人类,计算机程序通常打印在纸上或显示在计算机屏幕上。为了方便机器,程序会以与机器技术兼容的方式进行编码。开发程序将其编码为与机器兼容的形式,并将其插入机器的过程称为编程。程序及其所代表的算法统称为软件,而机器本身则称为硬件。

The study of algorithms began as a subject in mathematics. Indeed, the search for algorithms was a significant activity of mathematicians long before the development of today’s computers. The goal was to find a single set of directions that described how all problems of a particular type could be solved. One of the best known examples of this early research is the long division algorithm for finding the quotient of two multiple-digit numbers. Another example is the Euclidean algorithm, discovered by the ancient Greek mathematician Euclid, for finding the greatest common divisor of two positive integers (Figure 0.2).

算法的研究始于数学学科。事实上,早在如今计算机发展之前,寻找算法就是数学家的一项重要活动。数学家们的目标是找到一套描述如何解决所有特定类型问题的方法。这一早期研究最著名的例子之一是求两个多位数之商的长除法算法。另一个例子是古希腊数学家欧几里得发现的欧几里得算法,用于求两个正整数的最大公约数(图 0.2)。

Once an algorithm for performing a task has been found, the performance of that task no longer requires an understanding of the principles on which the algorithm is based. Instead, the performance of the task is reduced to the process of merely following directions. (We can follow the long division algorithm to find a quotient or the Euclidean algorithm to find a greatest common divisor without understanding why the algorithm works.) In a sense, the intelligence required to solve the problem at hand is encoded in the algorithm.

一旦找到了执行任务的算法,执行任务时就不再需要理解算法所依据的原理。取而代之的是,执行任务的过程被简化为仅仅遵循指令的过程。(我们可以按照长除法算法求商,也可以按照欧几里得算法求最大公约数,而无需理解算法的原理)。从某种意义上说,解决手头问题所需的智慧已被编码在算法中。

It is through this ability to capture and convey intelligence (or at least intelligent behavior) by means of algorithms that we are able to build machines that perform useful tasks. Consequently, the level of intelligence displayed by machines is limited by the intelligence that can be conveyed through algorithms. We can construct a machine to perform a task only if an algorithm exists for performing that task. In turn, if no algorithm exists for solving a problem, then the solution of that problem lies beyond the capabilities of machines.

正是凭借这种通过算法捕捉和传递智能(或至少是智能行为)的能力,我们才能制造出执行有用任务的机器。因此,机器所表现出的智能水平受限于通过算法所能传达的智能。只有执行任务的算法存在时,我们才能制造出执行任务的机器。反过来,如果不存在解决问题的算法,那么该问题的解决就超出了机器的能力范围。

Identifying the limitations of algorithmic capabilities solidified as a subject in mathematics in the 1930s with the publication of Kurt Gödel’s incompleteness theorem. This theorem essentially states that in any mathematical theory encompassing our traditional arithmetic system, there are statements whose truth or falseness cannot be established by algorithmic means. In short, any complete study of our arithmetic system lies beyond the capabilities of algorithmic activities.

20 世纪 30 年代,库尔特-哥德尔(Kurt Gödel)的不完备性定理(incompleteness theorem)发表后,识别算法能力的局限性成为数学界的一个重要课题。该定理主要指出,在任何包含我们传统算术体系的数学理论中,都有一些语句无法通过算法手段确定其真伪。简而言之,对任何算术体系的完整研究都超出了算法活动的能力范围。

This realization shook the foundations of mathematics, and the study of algorithmic capabilities that ensued was the beginning of the field known today as computer science. Indeed, it is the study of algorithms that forms the core of computer science.

这一认识动摇了数学的基础,随后对算法能力的研究成为如今计算机科学领域的开端。事实上,正是对算法的研究构成了计算机科学的核心。

0.2 The History of Computing

Today’s computers have an extensive genealogy. One of the earlier computing devices was the abacus. History tells us that it most likely had its roots in ancient China and was used in the early Greek and Roman civilizations. The machine is quite simple, consisting of beads strung on rods that are in turn mounted in a rectangular frame (Figure 0.3). As the beads are moved back and forth on the rods, their positions represent stored values. It is in the positions of the beads that this “computer” represents and stores data. For control of an algorithm’s execution, the machine relies on the human operator. Thus the abacus alone is merely a data storage system; it must be combined with a human to create a complete computational machine.

如今的计算机有着悠久的历史。早期的计算设备之一是算盘。历史告诉我们,算盘很可能起源于古代中国,并在早期的希腊和罗马文明中使用。算盘的构造非常简单,它由串在杆上的珠子组成,杆又安装在一个矩形框架中(图 0.3)。当珠子在杆上来回移动时,它们的位置就代表了存储的数值。这台 "计算机 "正是通过珠子的位置来表示和存储数据的。要控制算法的执行,机器需要依靠人的操作。因此,算盘本身只是一个数据存储系统;它必须与人结合才能形成一个完整的计算机器。

In the time period after the Middle Ages and before the Modern Era the quest for more sophisticated computing machines was seeded. A few inventors began to experiment with the technology of gears. Among these were Blaise Pascal (1623–1662) of France, Gottfried Wilhelm Leibniz (1646–1716) of Germany, and Charles Babbage (1792–1871) of England. These machines represented data through gear positioning, with data being input mechanically by establishing initial gear positions. Output from Pascal’s and Leibniz’s machines was achieved by observing the final gear positions. Babbage, on the other hand, envisioned machines that would print results of computations on paper so that the possibility of transcription errors would be eliminated.

在中世纪之后、近代之前的时期,人们开始追求更精密的计算机。一些发明家开始尝试齿轮技术。其中包括法国的布莱斯-帕斯卡(1623-1662 年)、德国的戈特弗里德-威廉-莱布尼兹(1646-1716 年)和英国的查尔斯-巴贝奇(1792-1871 年)。这些机器通过齿轮定位来表示数据,通过建立初始齿轮位置来机械地输入数据。帕斯卡和莱布尼茨的机器通过观察最终齿轮位置实现输出。另一方面,巴贝奇设想的机器可以将计算结果打印在纸上,从而消除了转录错误的可能性。

As for the ability to follow an algorithm, we can see a progression of flexibility in these machines. Pascal’s machine was built to perform only addition. Consequently, the appropriate sequence of steps was embedded into the structure of the machine itself. In a similar manner, Leibniz’s machine had its algorithms firmly embedded in its architecture, although it offered a variety of arithmetic operations from which the operator could select. Babbage’s Difference Engine (of which only a demonstration model was constructed) could be modified to perform a variety of calculations, but his Analytical Engine (the construction for which he never received funding) was designed to read instructions in the form of holes in paper cards. Thus Babbage’s Analytical Engine was programmable. In fact, Augusta Ada Byron (Ada Lovelace), who published a paper in which she demonstrated how Babbage’s Analytical Engine could be programmed to perform various computations, is often identified today as the world’s first programmer.

至于遵循算法的能力,我们可以看到这些机器在灵活性方面的进步。帕斯卡尔的机器只能进行加法运算。因此,适当的步骤顺序被嵌入机器本身的结构中。类似地,莱布尼茨的机器虽然提供了多种算术运算给操作者选择,但其算法已牢牢嵌入机器结构中。巴贝奇的 “差分引擎”(只制作了一个演示模型)可以改装以执行各种计算,但他的 “分析引擎”(他从未获得过建造资金)则是为了读取纸卡上的孔洞形式的指令。因此,巴贝奇的分析引擎是可编程的。事实上,奥古斯塔-阿达-拜伦(Ada Lovelace)曾发表过一篇论文,展示了如何通过编程让巴贝奇的分析引擎执行各种计算,如今她常常被认为是世界上第一位程序员。

The idea of communicating an algorithm via holes in paper was not originated by Babbage. He got the idea from Joseph Jacquard (1752–1834), who, in 1801, had developed a weaving loom in which the steps to be performed during the weaving process were determined by patterns of holes in large thick cards made of wood (or cardboard). In this manner, the algorithm followed by the loom could be changed easily to produce different woven designs. Another beneficiary of Jacquard’s idea was Herman Hollerith (1860–1929), who applied the concept of representing information as holes in paper cards to speed up the tabulation process in the 1890 U.S. census. (It was this work by Hollerith that led to the creation of IBM.) Such cards ultimately came to be known as punched cards and survived as a popular means of communicating with computers well into the 1970s. Indeed, the technique lives on today, as witnessed by the voting issues raised in the 2000 U.S. presidential election.

通过纸张上的孔来传递算法的想法并非由巴贝奇提出。他的想法来自约瑟夫-雅克(Joseph Jacquard,1752-1834 年),他在 1801 年发明了一种织布机,织布过程中需要执行的步骤是由木头(或纸板)制成的厚大卡片上的孔洞图案决定的。通过这种方式,织布机所遵循的算法可以很容易地修改,从而织出不同的图案。雅克的思想的另一位受益者是赫尔曼-霍勒思(Herman Hollerith,1860-1929 年),他在 1890 年美国人口普查中应用了以纸卡上的孔来表示信息的概念,从而加快了制表过程。(正是 Hollerith 的这项工作促成了 IBM 的诞生)。这种卡片最终被称为打孔卡,并作为一种流行的计算机通信手段一直延续到 20 世纪 70 年代。事实上,这种技术一直沿用至今,2000 年美国总统大选中出现的投票问题就证明了这一点。

The technology of the time was unable to produce the complex gear-driven machines of Pascal, Leibniz, and Babbage in a financially feasible manner. But with the advances in electronics in the early 1900s, this barrier was overcome. Examples of this progress include the electromechanical machine of George Stibitz, completed in 1940 at Bell Laboratories, and the Mark I, completed in 1944 at Harvard University by Howard Aiken and a group of IBM engineers (Figure 0.4).

当时的技术无法以经济上可行的方式生产帕斯卡、莱布尼兹和巴贝奇的复杂齿轮驱动机器。但随着 20 世纪初电子技术的进步,这一障碍被克服了。这一进步的例子包括乔治-斯特彼兹于 1940 年在贝尔实验室完成的机电机器,以及霍华德-艾肯和一群 IBM 工程师于 1944 年在哈佛大学完成的马克一号(图 0.4)。

These machines made heavy use of electronically controlled mechanical relays. In this sense they were obsolete almost as soon as they were built, because other researchers were applying the technology of vacuum tubes to construct totally electronic computers. The first of these machines was apparently the Atanasoff-Berry machine, constructed during the period from 1937 to 1941 at Iowa State College (now Iowa State University) by John Atanasoff and his assistant, Clifford Berry. 这些机器大量使用电子控制的机械继电器。从这个意义上说,这些机器几乎在制造出来后就被淘汰了,因为其他研究人员正在应用真空管技术制造完全电子化的计算机。这些机器中的第一台显然是阿塔纳索夫-贝里(Atanasoff-Berry)机器,由约翰-阿塔纳索夫(John Atanasoff)和他的助手克利福德-贝里(Clifford Berry)于 1937 年至 1941 年期间在爱荷华州立学院(现爱荷华州立大学)制造。

Another was a machine called Colossus, built under the direction of Tommy Flowers in England to decode German messages during the latter part of World War II.

(Actually, as many as ten of these machines were apparently built, but military secrecy and issues of national security kept their existence from becoming part of the “computer family tree.”) Other, more flexible machines, such as the ENIAC (electronic numerical integrator and calculator) developed by John Mauchly and J. Presper Eckert at the Moore School of Electrical Engineering, University of Pennsylvania, soon followed. 另一台机器名为 “巨像”(Colossus),由英国的汤米-弗劳尔斯(Tommy Flowers)指导制造,用于在二战后期解码德国信息。

(实际上,这种机器显然制造了多达 10 台,但由于军事机密和国家安全问题,它们的存在未能成为 "计算机家族树 "的一部分)。很快,宾夕法尼亚大学摩尔电子工程学院的约翰-毛克利(John Mauchly)和J-普雷斯佩尔-埃克特(J. Presper Eckert)开发出了其他更灵活的机器,如ENIAC(电子数字积分器和计算器)。

​ From that point on, the history of computing machines has been closely linked to advancing technology, including the invention of transistors (for which physicists William Shockley, John Bardeen, and Walter Brattain were awarded a Nobel Prize) and the subsequent development of complete circuits constructed as single units, called integrated circuits (for which Jack Kilby also won a Nobel Prize in physics). With these developments, the room-sized machines of the 1940s were reduced over the decades to the size of single cabinets. At the same time, the processing power of computing machines began to double every two years (a trend that has continued to this day). As work on integrated circuitry progressed, many of the circuits within a computer became readily available on the open market as integrated circuits encased in toy-sized blocks of plastic called chips.

从那时起,计算机的历史就与不断进步的技术紧密相连,包括晶体管的发明(物理学家威廉-肖克利、约翰-巴丁和沃尔特-布拉坦因此获得诺贝尔奖),以及随后以单个单元构建的完整电路(称为集成电路)的发展(杰克-基尔比也因此获得诺贝尔物理学奖)。随着这些技术的发展,20 世纪 40 年代房间大小的机器在几十年间缩小到单个机柜大小。与此同时,计算机的处理能力开始每两年翻一番(这一趋势一直持续至今)。随着集成电路工作的进展,计算机中的许多电路都可以在公开市场上买到,集成电路封装在玩具大小的塑料块中,称为芯片。

A major step toward popularizing computing was the development of desktop computers. The origins of these machines can be traced to the computer hobbyists who built homemade computers from combinations of chips. It was within this “underground” of hobby activity that Steve Jobs and Stephen Wozniak built a commercially viable home computer and, in 1976, established Apple Computer, Inc. (now Apple Inc.) to manufacture and market their products. Other companies that marketed similar products were Commodore, Heathkit, and Radio Shack. Although these products were popular among computer hobbyists, they were not widely accepted by the business community, which continued to look to the well-established IBM for the majority of its computing needs.

台式电脑的发展是计算机普及化的重要一步。这些计算机的起源可以追溯到计算机爱好者,他们用芯片组合自制计算机。史蒂夫-乔布斯和斯蒂芬-沃兹尼亚克就是在这种业余活动的 "地下 "制造出了具有商业价值的家用电脑,并于 1976 年成立了苹果电脑公司(即现在的苹果公司),负责生产和销售他们的产品。其他销售类似产品的公司还有柯摩多尔、幸福牌和无线电器材公司。虽然这些产品在电脑爱好者中很受欢迎,但它们并没有被商业界广泛接受,商业界的大部分计算需求仍然要依靠历史悠久的 IBM。

In 1981, IBM introduced its first desktop computer, called the personal computer, or PC, whose underlying software was developed by a newly formed company known as Microsoft. The PC was an instant success and legitimized the desktop computer as an established commodity in the minds of the business community. Today, the term PC is widely used to refer to all those machines (from various manufacturers) whose design has evolved from IBM’s initial desktop computer, most of which continue to be marketed with software from Microsoft. At times, however, the term PC is used interchangeably with the generic terms desktop or laptop.

1981 年,IBM 推出第一台台式电脑,称为个人电脑,其基础软件由新成立的微软公司开发。个人电脑一炮而红,并使台式电脑在商业界心目中合法化,成为一种成熟的商品。如今,PC 一词被广泛用于指代所有那些(来自不同制造商的)从 IBM 最初的台式电脑设计演变而来的机器,其中大多数仍在市场上销售微软公司的软件。不过,有时 PC 一词也与台式机或笔记本电脑等通用术语交替使用。

As the twentieth century drew to a close, the ability to connect individual computers in a world-wide system called the Internet was revolutionizing communication. In this context, Tim Berners-Lee (a British scientist) proposed a system by which documents stored on computers throughout the Internet could be linked together producing a maze of linked information called the World Wide Web (often shortened to “Web”). To make the information on the Web accessible, software systems, called search engines, were developed to “sift through” the Web “categorize” their findings, and then use the results to assist users researching particular topics. Major players in this field are Google, Yahoo, and Microsoft. These companies continue to expand their Web-related activities, often in directions that challenge our traditional way of thinking.

在二十世纪即将结束之际,将单个计算机连接成一个世界性系统–互联网–的能力给通信带来了革命性的变化。在此背景下,英国科学家蒂姆-伯纳斯-李(Tim Berners-Lee)提出了一个系统,通过该系统可以将整个互联网中存储在计算机上的文档连接在一起,形成一个名为万维网(World Wide Web,通常简称为 “Web”)的信息链接迷宫。为了使万维网上的信息能够被访问,人们开发了被称为搜索引擎的软件系统来 "筛选 "万维网上的信息,并对其结果进行 “分类”,然后利用这些结果来帮助用户寻找特定的主题。这一领域的主要公司有谷歌、雅虎和微软。这些公司继续扩大与网络有关的活动,其方向往往挑战我们的传统思维方式。

At the same time that desktop computers (and the newer mobile laptop computers) were being accepted and used in homes, the miniaturization of computing machines continued. Today, tiny computers are embedded within various devices. For example, automobiles now contain small computers running Global Positioning Systems (GPS), monitoring the function of the engine, and providing voice command services for controlling the car’s audio and phone communication systems.

在台式电脑(以及较新的移动笔记本电脑)被家庭接受和使用的同时,计算机的微型化也在继续。如今,微型计算机被嵌入到各种设备中。例如,现在的汽车中就有运行全球定位系统(GPS)、监测发动机功能、提供语音命令服务以控制汽车音响和电话通信系统的小型计算机。

Perhaps the most potentially revolutionary application of computer miniaturization is found in the expanding capabilities of portable telephones. Indeed, what was recently merely a telephone has evolved into a small hand-held generalpurpose computer known as a smartphone on which telephony is only one of many applications. These “phones” are equipped with a rich array of sensors and interfaces including cameras, microphones, compasses, touch screens, accelerometers (to detect the phone’s orientation and motion), and a number of wireless technologies to communicate with other smartphones and computers. The potential is enormous. Indeed, many argue that the smartphone will have a greater effect on society than the PC.

计算机微型化最具潜在革命性的应用可能是便携式电话功能的不断扩展。事实上,不久前还只是电话的智能手机已经发展成为一种小型的手持式通用计算机,电话只是它的众多应用之一。这些 "手机 "配备了丰富的传感器和接口,包括摄像头、麦克风、指南针、触摸屏、加速计(用于检测手机的方向和运动),以及用于与其他智能手机和计算机通信的多种无线技术。其潜力是巨大的。事实上,许多人认为智能手机对社会的影响将超过个人电脑。

The miniaturization of computers and their expanding capabilities have brought computer technology to the forefront of today’s society. Computer technology is so prevalent now that familiarity with it is fundamental to being a member of modern society. Computing technology has altered the ability of governments to exert control; had enormous impact on global economics; led to startling advances in scientific research; revolutionized the role of data collection, storage, and applications; provided new means for people to communicate and interact; and has repeatedly challenged society’s status quo. The result is a proliferation of subjects surrounding computer science, each of which is now a significant field of study in its own right. Moreover, as with mechanical engineering and physics, it is often difficult to draw a line between these fields and computer science itself. Thus, to gain a proper perspective, our study will not only cover topics central to the core of computer science but will also explore a variety of disciplines dealing with both applications and consequences of the science. Indeed, an introduction to computer science is an interdisciplinary undertaking.

计算机的微型化及其不断扩展的功能使计算机技术成为当今社会的前沿技术。现在,计算机技术如此普遍,熟悉计算机技术已成为现代社会成员的基本要求。计算机技术改变了政府的控制能力,对全球经济产生了巨大影响,使科学研究取得了惊人的进步,彻底改变了数据收集、存储和应用的作用,为人们提供了新的交流和互动方式,并一再挑战社会现状。因此,围绕计算机科学的学科层出不穷,每一个学科本身都已成为一个重要的研究领域。此外,与机械工程和物理学一样,这些领域与计算机科学本身之间往往很难划清界限。因此,为了获得一个正确的视角,我们的研究将不仅涵盖计算机科学核心的中心主题,还将探索涉及计算机科学应用和后果的各种学科。事实上,计算机科学导论是一项跨学科的工作。

0.3 The Science of Algorithms

Conditions such as limited data storage capabilities and intricate, time-consuming programming procedures restricted the complexity of the algorithms utilized in early computing machines. However, as these limitations began to disappear, machines were applied to increasingly larger and more complex tasks. As attempts to express the composition of these tasks in algorithmic form began to tax the abilities of the human mind, more and more research efforts were directed toward the study of algorithms and the programming process.

有限的数据存储能力和复杂耗时的编程程序等条件限制了早期计算机使用的算法的复杂性。然而,随着这些限制开始消失,机器开始应用于越来越大、越来越复杂的任务。由于试图用算法的形式来表达这些任务的组成开始对人类的思维能力造成挑战,越来越多的研究工作开始转向对算法和编程过程的研究。

It was in this context that the theoretical work of mathematicians began to pay dividends. As a consequence of Gödel’s incompleteness theorem, mathematicians had already been investigating those questions regarding algorithmic processes that advancing technology was now raising. With that, the stage was set for the emergence of a new discipline known as computer science.

正是在这种情况下,数学家的理论工作开始获得回报。由于哥德尔不完备性定理的出现,数学家们已经开始研究有关算法过程的问题,而这些问题正是不断进步的技术所提出的。因此,计算机科学这门新学科的出现也由此拉开了序幕。

Today, computer science has established itself as the science of algorithms. The scope of this science is broad, drawing from such diverse subjects as mathematics, engineering, psychology, biology, business administration, and linguistics. Indeed, researchers in different branches of computer science may have very distinct definitions of the science. For example, a researcher in the field of computer architecture may focus on the task of miniaturizing circuitry and thus view computer science as the advancement and application of technology. But, a researcher in the field of database systems may see computer science as seeking ways to make information systems more useful. And, a researcher in the field of artificial intelligence may regard computer science as the study of intelligence and intelligent behavior.

如今,计算机科学已成为一门算法科学。这门科学的范围非常广泛,涉及数学、工程学、心理学、生物学、工商管理学和语言学等多个学科。事实上,计算机科学不同分支的研究人员可能对这门科学有着截然不同的定义。例如,计算机架构领域的研究人员可能专注于电路微型化任务,因此将计算机科学视为技术的进步和应用。但是,数据库系统领域的研究人员可能会将计算机科学视为寻求使信息系统更加有用的方法。而人工智能领域的研究人员可能会将计算机科学视为对智能和智能行为的研究。

Thus, an introduction to computer science must include a variety of topics, which is a task that we will pursue in the following chapters. In each case, our goal will be to introduce the central ideas in the subject, the current topics of research, and some of the techniques being applied to advance knowledge in the area. With such a variety of topics, it is easy to lose track of the overall picture. We therefore pause to collect our thoughts by identifying some questions that provide a focus for its study.

因此,计算机科学导论必须包括各种主题,这也是我们将在接下来的章节中努力完成的任务。在每种情况下,我们的目标都是介绍该学科的中心思想、当前的研究课题以及一些用于推动该领域知识发展的技术。面对如此繁多的主题,我们很容易迷失方向。因此,我们将通过确定一些问题来集思广益,为研究提供一个重点。

• Which problems can be solved by algorithmic processes?

哪些问题可以通过算法过程解决?

• How can the discovery of algorithms be made easier?

如何使发现算法变得更容易?

• How can the techniques of representing and communicating algorithms be improved?

如何改进表示和交流算法的技术?

• How can the characteristics of different algorithms be analyzed and compared?

如何分析和比较不同算法的特点?

• How can algorithms be used to manipulate information?

如何利用算法处理信息?

• How can algorithms be applied to produce intelligent behavior?

如何应用算法来产生智能行为?

• How does the application of algorithms affect society?

算法的应用对社会有何影响?

Note that the theme common to all these questions is the study of algorithms (Figure 0.5).

请注意,所有这些问题的共同主题是研究算法(图 0.5)

0.4 Abstraction

The concept of abstraction so permeates the study of computer science and the design of computer systems that it behooves us to address it in this preliminary chapter. The term abstraction, as we are using it here, refers to the distinction between the external properties of an entity and the details of the entity’s internal composition. It is abstraction that allows us to ignore the internal details of a complex device such as a computer, automobile, or microwave oven and use it as a single, comprehensible unit. Moreover, it is by means of abstraction that such complex systems are designed and manufactured in the first place. Computers, automobiles, and microwave ovens are constructed from components, each of which is constructed from smaller components. Each component represents a level of abstraction at which the use of the component is isolated from the details of the component’s internal composition.

抽象概念贯穿于计算机科学研究和计算机系统设计的始终,因此我们有必要在本章初步介绍这一概念。我们在此使用的 "抽象 "一词是指实体的外部属性与实体内部构成细节之间的区别。正是由于抽象,我们才能忽略计算机、汽车或微波炉等复杂设备的内部细节,而将其作为一个单一的、可理解的单元来使用。此外,正是通过抽象,这些复杂系统才得以设计和制造。计算机、汽车和微波炉都是由组件构成的,而每个组件又是由更小的组件构成的。每个组件都代表了一个抽象的层次,在这个层次上,组件的使用与组件内部构成的细节是分离的。

It is by applying abstraction, then, that we are able to construct, analyze, and manage large, complex computer systems, which would be overwhelming if viewed in their entirety at a detailed level. At each level of abstraction, we view the system in terms of components, called abstract tools, whose internal composition we ignore. This allows us to concentrate on how each component interacts with other components at the same level and how the collection as a whole forms a higher-level component. Thus we are able to comprehend the part of the system that is relevant to the task at hand rather than being lost in a sea of details.

正是通过抽象,我们才能够构建、分析和管理大型复杂计算机系统。在每个抽象层级,我们都以称为抽象工具的组件来看待系统,而忽略其内部构成。如果要详细了解其全部内容,会让人目不暇接。在每个抽象层级,我们都以组件的形式来看待系统,这些组件被称为抽象工具,我们忽略了它们的内部构成。这样,我们就能专注于每个组件如何与同级别的其他组件交互,以及整个组件集合如何构成更高级别的组件。这样,我们就能理解系统中与当前任务相关的部分,而不是迷失在细节的海洋中。

We emphasize that abstraction is not limited to science and technology. It is an important simplification technique with which our society has created a lifestyle that would otherwise be impossible. Few of us understand how the various conveniences of daily life are actually implemented. We eat food and wear clothes that we cannot produce by ourselves. We use electrical devices and communication systems without understanding the underlying technology. We use the services of others without knowing the details of their professions. With each new advancement, a small part of society chooses to specialize in its implementation while the rest of us learn to use the results as abstract tools. In this manner, society’s warehouse of abstract tools expands, and society’s ability to progress increases.

我们强调,抽象并不局限于科学和技术。抽象是一种重要的简化技术,我们的社会正是利用这种技术创造了一种生活方式,否则这种生活方式是不可能实现的。我们中很少有人了解日常生活中的各种便利实际上是如何实现的。我们吃的食物和穿的衣服都是自己无法生产的。我们使用电器设备和通信系统,却不了解其背后的技术。我们使用他人的服务,却不了解他们职业的细节。每当有新的进步,社会中的一小部分人就会选择专门从事其实施工作,而我们其他人则学会将其成果作为抽象的工具来使用。通过这种方式,社会的抽象工具库不断扩大,社会进步的能力也随之增强。

Abstraction is a recurring theme in our study. We will learn that computing equipment is constructed in levels of abstract tools. We will also see that the development of large software systems is accomplished in a modular fashion in which each module is used as an abstract tool in larger modules. Moreover, abstraction plays an important role in the task of advancing computer science itself, allowing researchers to focus attention on particular areas within a complex field. In fact, the organization of this text reflects this characteristic of the science. Each chapter, which focuses on a particular area within the science, is often surprisingly independent of the others, yet together the chapters form a comprehensive overview of a vast field of study.

抽象是我们学习中反复出现的主题。我们将了解到,计算机设备是按抽象工具的层次构建的。我们还将看到,大型软件系统的开发是以模块化方式完成的,其中每个模块都被用作更大模块中的抽象工具。此外,抽象在推进计算机科学本身的任务中发挥着重要作用,使研究人员能够将注意力集中在复杂领域中的特定领域。事实上,这本书的编排就反映了这门科学的这一特点。每一章都侧重于科学中的某一特定领域,往往出人意料地独立于其他章节,但这些章节共同构成了对庞大研究领域的全面概述。

0.5 An Outline of Our Study

This text follows a bottom up approach to the study of computer science, beginning with such hands-on topics as computer hardware and leading to the more abstract topics such as algorithm complexity and computability. The result is that our study follows a pattern of building larger and larger abstract tools as our understanding of the subject expands.

这本教材采用自下而上的方法来研究计算机科学,从计算机硬件等实践性课题入手,引出算法复杂性和可计算性等较为抽象的课题。其结果是,随着我们对这门学科的理解不断深入,我们的研究遵循的模式是建立越来越大的抽象工具。

We begin by considering topics dealing with the design and construction of machines for executing algorithms. In Chapter 1 (Data Storage) we look at how information is encoded and stored within modern computers, and in Chapter 2 (Data Manipulation) we investigate the basic internal operation of a simple computer. Although part of this study involves technology, the general theme is technology independent. That is, such topics as digital circuit design, data encoding and compression systems, and computer architecture are relevant over a wide range of technology and promise to remain relevant regardless of the direction of future technology.

首先,我们将探讨如何设计和制造用于执行算法的机器。在第 1 章(数据存储)中,我们将探讨现代计算机如何编码和存储信息;在第 2 章(数据处理)中,我们将研究简单计算机的基本内部操作。虽然本研究的部分内容涉及技术,但总体主题与技术无关。也就是说,数字电路设计、数据编码和压缩系统以及计算机体系结构等主题与广泛的技术息息相关,而且无论未来技术的发展方向如何,这些主题都将保持其相关性。

In Chapter 3 (Operating Systems) we study the software that controls the overall operation of a computer. This software is called an operating system. It is a computer’s operating system that controls the interface between the machine and its outside world, protecting the machine and the data stored within from unauthorized access, allowing a computer user to request the execution of various programs, and coordinating the internal activities required to fulfill the user’s requests.

在第 3 章(操作系统)中,我们将学习控制计算机整体运行的软件。这种软件被称为操作系统。计算机的操作系统控制着计算机与外部世界的接口,保护计算机及其内部存储的数据免遭未经授权的访问,允许计算机用户请求执行各种程序,并协调满足用户请求所需的内部活动。

In Chapter 4 (Networking and the Internet) we study how computers are connected to each other to form computer networks and how networks are connected to form internets. This study leads to topics such as network protocols, the Internet’s structure and internal operation, the World Wide Web, and numerous issues of security.

在第 4 章(网络和互联网)中,我们将学习计算机如何相互连接形成计算机网络,以及网络如何相互连接形成互联网。学习内容包括网络协议、互联网的结构和内部运行、万维网以及众多安全问题。

Chapter 5 (Algorithms) introduces the study of algorithms from a more formal perspective. We investigate how algorithms are discovered, identify several fundamental algorithmic structures, develop elementary techniques for representing algorithms, and introduce the subjects of algorithm efficiency and correctness.

第5章(算法)从更正式的角度介绍算法研究。我们研究了算法是如何被发现的,确定了几种基本的算法结构,开发了表示算法的基本技术,并介绍了算法效率和正确性的主题。

In Chapter 6 (Programming Languages) we consider the subject of algorithm representation and the program development process. Here we find that the search for better programming techniques has led to a variety of programming methodologies or paradigms, each with its own set of programming languages. We investigate these paradigms and languages as well as consider issues of grammar and language translation.

在第 6 章(编程语言)中,我们将讨论算法表示和程序开发过程。在这里,我们发现对更好的编程技术的探索导致了各种编程方法或范式,每种方法或范式都有自己的一套编程语言。我们将研究这些范式和语言,并考虑语法和语言翻译的问题。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Java之弟

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值