大学计算机专业英语(第二版)-孙建忠-大学教学资料课件PPT
收藏
资源目录
压缩包内文档预览:
编号:21835875
类型:共享资源
大小:12.23MB
格式:ZIP
上传时间:2019-09-06
上传人:QQ24****1780
认证信息
个人认证
王**(实名认证)
浙江
IP属地:浙江
25
积分
- 关 键 词:
-
大学计算机
专业
英语
第二
孙建忠
大学
教学
资料
课件
ppt
- 资源描述:
-
大学计算机专业英语(第二版)-孙建忠-大学教学资料课件PPT,大学计算机,专业,英语,第二,孙建忠,大学,教学,资料,课件,ppt
- 内容简介:
-
Computer English Chapter 4 Elementary Data Structures Key points: useful terms and definitions of data structureDifficult points: Stack, queue, treeRequirements:The properties of Stack, Queue, and Linked lists 掌握常用英汉互译技巧 New Words & Expressions:stack n. 栈,堆栈queue n. 队列attribute n. 属性,性质underflow n. 下溢overflow n. 上溢pseudocode n. 伪码 4.1 Stacks and queuesAbbreviations:LIFO(last in first out)后进先出FIFO(fisrt in first out)先进先出 4.1 Stacks and queuesStacks and queues are dynamic sets in which the element removed from the set by the DELETE operation is prespecified. In a stack, the element deleted from the set is the one most recently inserted: the stack implements a last-in, first-out, or LIFO, policy. Similarly, in a queue, the element deleted is always the one that has been in the set for the longest time: the queue implements a first-in, first out, or FIFO, policy. There are several efficient ways to implement stacks and queues on a computer. In this section we show how to use a simple array to implement each.栈和队列都是动态的集合,其中的元素由预先定义的删除操作可将其去除。在栈中,最近被插入的元素最先被删除,即栈是按后进先出(LIFO)的原则进行的;类似的,在队列里,被删除的元素是最早进入队列的,即队列是以先进先出(FIFO)的原则进行的。在计算机上,对于栈和队列有几种有效的实现方法,这一节我们给出如何用简单的数组来实现它们。 4.1 Stacks and queues4.1.1 StacksThe INSERT operation on a stack is often called PUSH, and the DELETE operation, which does not take an element argument, is often called POP. These names are allusions to physical stacks, such as the spring-loaded stacks of plates used in cafeterias. The order in which plates are popped from the stack is the reverse of the order in which they were pushed onto the stack, since only the top plate is accessible.栈中插入元素的操作通常称为入栈(PUSH),删除操作称为出栈(POP),这里不考虑删除的那个元素。这些名字来源于实际的堆栈,就像餐厅里使用的带有弹簧座的一叠盘子:因为只有顶部的盘子是方便取用,所以盘子从这一叠中取出的顺序与其被放入的顺序是相反的。4.1 Stacks and queues4.1.2 QueuesWe call the INSERT operation on a queue ENQUEUE, and we call the DELETE operation DEQUEUE; like the stack operation POP, DEQUEUE takes no element argument. The FIFO property of a queue causes it to operate like a line of people in the registrars office. The queue has a head and a tail. When an element is enqueued, it takes its place at the tail of the queue, just as a newly arriving student takes a place at the end of the line. The element dequeued is always the one at the head of the queue, like the student at the head of the line who has waited the longest. (Fortunately, we dont have to worry about computational elements cutting into line.)我们称对队列进行的插入操作为入队 (ENQUEUE),删除操作为出队(DEQUEUE);同栈中的出栈操作一样,出队操作不考虑其中的元素。队列的先进先出原则就像排队等待注册的一行人群。队列有一个头部和一个尾部。当一个元素入队,它就成为队列的尾部,就像一个新来的学生成为队尾一样;出队的元素总是队列头部的元素,像是站在队列最前的学生是排队最久的人一样。(庆幸的是,对于计算机元素,我们不必担心插队的情况。) 4.2 Linked listsA linked list is a data structure in which the objects are arranged in a linear order. Unlike an array, though, in which the linear order is determined by the array indices, the order in a linked list is determined by a pointer in each object. Linked lists provide a simple, flexible representation for dynamic sets.链表这个数据结构中的对象都以线性顺序排列的,但不同于数组的顺序是由数组下标确定,链表的顺序是由每个对象的指针确定。链表为动态集合提供了一个简单、灵活的表示形式。4.2 Linked listsFig.4-3 A doubly linked list 4.2 Linked listsAs shown in Fig.4-3, each element of a doubly linked list L is an object with a key field and two other pointer fields: next and prev. The object may also contain other satellite data. Given an element x in the list, nextx points to its successor in the linked list, and prevx points to its predecessor. If prevx = NIL, the element x has no predecessor and is therefore the first element, or head, of the list. If nextx = NIL, the element x has no successor and is therefore the last element, or tail, of the list. An attribute headL points to the first element of the list. If headL = NIL, the list is empty. 如图4-3所示,双向链表L中的每个元素都是一个实体,由一个数值域和两个指针域组成,其中两个指针分别是:next和prev,实体也可以包含子数据。给定表中一个元素x,nextx指出它在链表中的后继,prevx指出它的前趋。prevx = NIL表示元素x没有前趋,因此x是第一个元素,即队头元素;如果nextx = NIL,表示x没有后继,也就是最后一个元素,队尾元素。指针headL指向队列中的第一个元素,如果headL = NIL表示队列为空。4.2 Linked listsA list may have one of several forms. It may be either singly linked or doubly linked, it may be sorted or not, and it may be circular or not. If a list is singly linked, we omit the prev pointer in each element. If a list is sorted, the linear order of the list corresponds to the linear order of keys stored in elements of the list; the minimum element is the head of the list, and the maximum element is the tail. If the list is unsorted, the elements can appear in any order. 一个链表可以是下面几种形式之一:单向链表或双向链表,有序的或无序的,循环的或非循环的。对于单向链表,我们就不必对每个元素使用prev指针了。如果一个表是有序的,表的线序和表中存储的元素值的线序是一致的,即:最小值的元素是队列的头部元素,最大值的元素是队尾元素。如果一个表是无序的,其中的元素可以以任何顺序出现。4.2 Linked listsIn a circular list, the prev pointer of the head of the list points to the tail, and the next pointer of the tail of the list points to the head. The list may thus be viewed as a ring of elements. In the remainder of this section, we assume that the lists with which we are working are unsorted and doubly linked. 在一个循环表中,队头的prev指针指向队尾元素,队尾的next指针指向队头的元素,整个链表的元素组成一个环。在这一节的以后内容中,我们假定,我们所讨论的都是无序的双向列表。 4.2 Linked lists4.2.1 Searching a linked listThe procedure LIST-SEARCH(L, k) finds the first element with key k in list L by a simple linear search, returning a pointer to this element. If no object with key k appears in the list, then NIL is returned. For the linked list in Fig.4-3(a), the call LIST-SEARCH(L, 4) returns a pointer to the third element, and the call LIST-SEARCH(L, 7) returns NIL. 通过一个简单的线性查询,操作LIST-SEARCH(L, k)找出表L中第一个值为k的元素,并返回它的指针。如果表中没有值为k的对象,那就返回空值(NIL)。如图4-3(a)中的链表,操作LIST-SEARCH(L, 4)返回第三个元素的指针,而LIST-SEARCH(L, 7)返回空值。 4.2.2 Inserting into a linked listGiven an element x whose key field has already been set, the LIST-INSERT procedure splices x onto the front of the linked list, as shown in Fig.4-3(b). 给定一个元素x,它的值域已经设定,操作LIST-INSERT将x插入链表的头部,如图4-3(b)所示。4.2 Linked lists4.2 Linked lists4.2.3 Deleting from a linked listThe procedure LIST-DELETE removes an element x from a linked list L. It must be given a pointer to x, and it then splices x out of the list by updating pointers. If we wish to delete an element with a given key, we must first call LIST-SEARCH to retrieve a pointer to the element.执行LIST-DELETE操作,可将元素x从链表L中去除。必须先给定指向x的指针,通过更新指针将x从链表中删除。如果需要删除给定值的元素,我们必须先执行LIST-SEARCH操作,检索指向元素的指针。4.2 Linked lists4.2.4 SentinelsThe code for LIST-DELETE would be simpler if we could ignore the boundary conditions at the head and tail of the list.如果我们不考虑链表头部和尾部的边界情况,对操作LIST-DELETE的编码会更简单。4.2 Linked lists4.2.4 SentinelsFig.4-4 A circular, doubly linked list with a sentinel 4.2 Linked lists4.2.4 SentinelsA sentinel is a dummy object that allows us to simplify boundary conditions. For example, suppose that we provide with list L an object nilL that represents NIL but has all the fields of the other list elements. Wherever we have a reference to NIL in list code, we replace it by a reference to the sentinel nilL. As shown in Fig.4-4, this turns a regular doubly linked list into a circular, doubly linked list with a sentinel, in which the sentinel nilL is placed between the head and tail; the field nextnilL points to the head of the list, and prevnilL points to the tail.利用标志这样的哑元实体,我们可以简化边界条件的判定。例如,假设我们为链表L设置一个实体nilL,它的值域为空,但是它却指向链表中所有其它的元素。我们在代码行中,所使用到NIL之处,都可以由标志nilL代替。如图4-4所示,这将一个普通的双向链表变成一个带标志的双向链表,其中标志于表头和表尾之间,即:指针域nextnilL指向表头,prevnilL指向表尾。4.2 Linked lists4.2.4 SentinelsSimilarly, both the next field of the tail and the prev field of the head point to nilL. Since nextnilL points to the head, we can eliminate the attribute headL altogether, replacing references to it by references to nextnilL. An empty list consists of just the sentinel, since both nextnilL and prevnilL can be set to nilL. 类似地,队尾的next域和队头的prev域都指向nilL。由于nextnilL指向表头,我们可以完全去掉指针headL,取而代之是使用nextnilL。一个空表只包含有标志,因为指针域nextnilL和prevnilL都指向nilL。常用英汉互译技巧一、增译法根据英汉两种语言不同的思维方式、语言习惯和表达方式,在翻译时增添一些词、短句或句子,以便更准确地表达出原文所包含的意义。这种方式多半用在汉译英里。1、汉语无主句较多,而英语句子一般都要有主语。所以在翻译汉语无主句的时候,除了少数可用英语无主句、被动语态或“There be”结构来翻译以外,一般都要根据语境补出主语,使句子完整。2、英汉两种语言在名词、代词、连词、介词和冠词的使用方法上也存在很大差别。英语中代词使用频率较高,凡说到人的器官和归某人所有的或与某人有关的事物时,必须在前面加上物主代词。因此,在汉译英时需要增补物主代词,而在英译汉时又需要根据情况适当地删减。3、英语词与词、词组与词组以及句子与句子的逻辑关系一般用连词来表示,而汉语则往往通过上下文和语序来表示这种关系。因此,在汉译英时常常需要增补连词。英语句子离不开介词和冠词。4、在汉译英时还要注意增补一些原文中暗含而没有明言的词语和一些概括性、注释性的词语,以确保译文意思的完整。 常用英汉互译技巧一、增译法1.Indeed, the reverse is true 实际情况恰好相反。(增译名词)2.这是这两代计算机之间的又一个共同点。This is yet another common point between the computers of the two generations.(增译介词)3.Individual mathematicians often have their own way of pronouncing mathematical expressions and in many cases there is no generally accepted “correct” pronunciation.每个数学家对数学公式常常有各自的读法,在许多情况下,并不存在一个普遍接受的所谓“正确”读法。(增加隐含意义的词)4.只有在可能发生混淆、或要强调其观点时,数学家才使用较长的读法It is only when confusion may occur, or where he/she wishes to emphasis the point, that the mathematician will use the longer forms. (增加主语)常用英汉互译技巧二、省译法这是与增译法相对应的一种翻译方法,即删去不符合目标语思维习惯、语言习惯和表达方式的词,以避免译文累赘。增译法的例句反之即可。又如:1.You will be staying in this hotel during your visit in Beijing.你在北京访问期间就住在这家饭店里。(省译物主代词)2.I hope you will enjoy your stay here.希望您在这儿过得愉快。(省译主语)3.中国政府历来重视环境保护工作。The Chinese government has always attached great importance to environmental protection. (省译名词)4.The development of IC made it possible for electronic devices to become smaller and smaller.集成电路的发展是电子器件可以做得越来越小。(省译形式主语it)常用英汉互译技巧三、转换法 在翻译过程中,为了使译文符合目标语的表述方式、方法和习惯,对原句中的词类、句型和语态等进行转换:1、在词性方面,把名词转换为代词、形容词、动词;把动词转换成名词、形容词、副词、介词;把形容词转换成副词和短语。2、在句子成分方面,把主语变成状语、定语、宾语、表语;把谓语变成主语、定语、表语;把定语变成状语、主语;把宾语变成主语。3、在句型方面,把并列句变成复合句,把复合句变成并列句,把状语从句变成定语从句。4、在语态方面,可以把主动语态变为被动语态。 常用英汉互译技巧三、转换法 1. Too much exposure to TV programs will do great harm to the eyesight of children.孩子们看电视过多会大大地损坏视力。(名词转动词)2. 由于我们实行了改革开放政策,我国的综合国力有了明显的增强。Thanks to the introduction of our reform and opening policy, our comprehensive national strength has greatly improved. (动词转名词)3. 时间不早了,我们回去吧!We dont have much time left. Lets go back. (句型转换)常用英汉互译技巧四、拆句法和合并法 1.Increased cooperation with China is in the interests of the United States.同中国加强合作,符合美国的利益。(在主谓连接处拆译)3. 中国是个大国,百分之八十的人口从事农业,但耕地只占土地面积的十分之一,其余为山脉、森林、城镇和其他用地。China is a large country with four-fifths of the population engaged in agriculture, but only one tenth of the land is farmland, the rest being mountains, forests and places for urban and other uses.(合译法)4. Packet switching is a method of slicing digital messages into parcels called “packets,” sending the packets along different communication paths as they become available, and then reassembling the packets once they arrive at their destination.分组交换是传输数据的一种方法,它先将数据信息分割成许多称为“分组”的数据信息包;当路径可用时,经过不同的通信路径发送;当到达目的地后,再将它们组装起来。(将长定语从句拆成几个并列的分句)常用英汉互译技巧五、正译法和反译法这两种方法通常用于汉译英,偶尔也用于英译汉。所谓正译,是指把句子按照与汉语相同的语序或表达方式译成英语。所谓反译则是指把句子按照与汉语相反的语序或表达方式译成英语。正译与反译常常具有同义的效果,但反译往往更符合英语的思维方式和表达习惯,因此比较地道 。1.你可以从因特网上获得这一信息。You can obtain this information on the Internet. (正译)This information is accessible/available on the Internet. (反译)2.他突然想到了一个新主意。Suddenly he had a new idea. (正译)He suddenly thought out a new idea. (正译)A new idea suddenly occurred to/struck him. (反译)常用英汉互译技巧六、倒置法在汉语中,定语修饰语和状语修饰语往往位于被修饰语之前;在英语中,许多修饰语常常位于被修饰语之后,因此翻译时往往要把原文的语序颠倒过来。倒置法通常用于英译汉, 即对英语长句按照汉语的习惯表达法进行前后调换,按意群或进行全部倒置,原则是使汉语译句安排符合现代汉语论理叙事的一般逻辑顺序。有时倒置法也用于汉译英。如:1.At this moment, through the wonder of telecommunications, more people are seeing and hearing what we say than on any other occasions in the whole history of the world.此时此刻,通过现代通信手段的奇迹,看到和听到我们讲话的人比整个世界历史上任何其他这样的场合都要多。(部分倒置)2.改革开放以来,中国发生了巨大的变化。Great changes have taken place in China since the introduction of the reform and opening policy.(全部倒置)常用英汉互译技巧七、包孕法 这种方法多用于英译汉。所谓包孕是指在把英语长句译成汉语时,把英语后置成分按照汉语的正常语序放在中心词之前,使修饰成分在汉语句中形成前置包孕。但修饰成分不宜过长,否则会形成拖沓或造成汉语句子成分在连接上的纠葛。如:1.IP multicasting is a set of technologies that enables efficient delivery of data to many locations on a network.IP多信道广播是使数据向网络中许多位置高效传送的一组技术。2.What brings us together is that we have common interests which transcend those differences. 使我们走到一起的,是我们有超越这些分歧的共同利益。 常用英汉互译技巧八、插入法 指把难以处理的句子成分用破折号、括号或前后逗号插入译句中。这种方法主要
- 温馨提示:
1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
2: 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
3.本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

人人文库网所有资源均是用户自行上传分享,仅供网友学习交流,未经上传用户书面授权,请勿作他用。