![第4章 计算机专业英语 孙建忠_第1页](http://file4.renrendoc.com/view/0ae232dc88ac52dc248d1367b71a10a2/0ae232dc88ac52dc248d1367b71a10a21.gif)
![第4章 计算机专业英语 孙建忠_第2页](http://file4.renrendoc.com/view/0ae232dc88ac52dc248d1367b71a10a2/0ae232dc88ac52dc248d1367b71a10a22.gif)
![第4章 计算机专业英语 孙建忠_第3页](http://file4.renrendoc.com/view/0ae232dc88ac52dc248d1367b71a10a2/0ae232dc88ac52dc248d1367b71a10a23.gif)
![第4章 计算机专业英语 孙建忠_第4页](http://file4.renrendoc.com/view/0ae232dc88ac52dc248d1367b71a10a2/0ae232dc88ac52dc248d1367b71a10a24.gif)
![第4章 计算机专业英语 孙建忠_第5页](http://file4.renrendoc.com/view/0ae232dc88ac52dc248d1367b71a10a2/0ae232dc88ac52dc248d1367b71a10a25.gif)
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
ComputerEnglishChapter4DataStructure1Keypoints:
usefultermsanddefinitionsofdatastructure
Difficultpoints:
Stack,queue,tree2计算机专业英语Requirements:1.Threereasonsforusingdatastructuresareefficiency,abstraction,andreusability.2.ThepropertiesofStack,Queue,andTree3.掌握常用英汉互译技巧
3计算机专业英语NewWords&Expressions:hashtable杂凑(哈希)表 priorityqueues优先队列reusabilityn.复用性 binarytree二叉树traversing遍历,走过 context-free与上下文无关4.1AnIntroductiontoDataStructures
4计算机专业英语Datacomesinallshapesandsizes,butoftenitcanbeorganizedinthesameway.Forexample,consideralistofthingstodo,alistofingredientsinarecipe,orareadinglistforaclass.Althougheachcontainsadifferenttypeofdata,theyallcontaindataorganizedinasimilarway:alist.Alistisonesimpleexampleofadatastructure.Ofcourse,therearemanyothercommonwaystoorganizedataaswell.Incomputing,someofthemostcommonorganizationsarelinkedlists,stacks,queues,sets,hashtables,trees,heaps,priorityqueues,andgraphs.Threereasonsforusingdatastructuresareefficiency,abstraction,andreusability.数据以各种形状和大小出现,但是它常常可以用同样的方式来组织。例如,考虑要做事情的列表、处方成份的清单或一个班级的阅读目录。虽然它们包含不同类型的数据,但他们都包含以一种相似方式组织的数据:一个列表。列表是数据结构的一个简单例子。当然,还有许多其他组织数据通用方法。在计算机技术中,一些最常用的组织方式是链接表、堆栈、队列、集合、哈希表、树、堆、优先队列和图。使用数据结构的三个原因是效率、抽象性和复用性。4.1AnIntroductiontoDataStructures
5计算机专业英语Efficiency
Datastructuresorganizedatainwaysthatmakealgorithmsmoreefficient.Forexample,considersomeofthewayswecanorganizedataforsearchingit.Onesimplisticapproachistoplacethedatainanarrayandsearchthedatabytraversingelementbyelementuntilthedesiredelementisfound.However,thismethodisinefficientbecauseinmanycasesweenduptraversingeveryelement.Byusinganothertypeofdatastructure,suchasahashtableorabinarytreewecansearchthedataconsiderablyfaster.效率数据结构使用令算法更有效率的方法组织数据。例如,考虑一些我们用来查找数据的组织方式。一种过分简单的方式是将数据放置到数组中,并用遍历的方法找到需要的元素。然而,这种方法是低效率的,因为在许多情况下,我们需要遍历所有元素才能完成。使用其他类型的数据结构,如哈希表和二叉数,我们能够相当快速地搜寻数据。4.1AnIntroductiontoDataStructures
6计算机专业英语Abstraction
Datastructuresprovideamoreunderstandablewaytolookatdata;thus,theyofferalevelofabstractioninsolvingproblems.Forexample,bystoringdatainastack,wecanfocusonthingsthatwedowithstacks,suchaspushingandpoppingelements,ratherthanthedetailsofhowtoimplementeachoperation.Inotherwords,datastructuresletustalkaboutprogramsinalessprogrammaticway.抽象化数据结构提供一个更好理解的方法查看数据;因此,它们在解决问题中提供一定的抽象化水平。例如,通过把数据储存在堆栈中,我们可以将重点集中在对堆栈的操作上,如使元素进栈和出栈,而不是集中在实现操作的细节上。换句话说,数据结构使我们以较少的编程方式谈论程序。4.1AnIntroductiontoDataStructures
7计算机专业英语Reusability
Datastructuresarereusablebecausetheytendtobemodularandcontext-free.Theyaremodularbecauseeachhasaprescribedinterfacethroughwhichaccesstodatastoredinthedatastructureisrestricted.Thatis,weaccessthedatausingonlythoseoperationstheinterfacedefines.Datastructuresarecontext-freebecausetheycanbeusedwithanytypeofdataandinavarietyofsituationsorcontexts.InC,wemakeadatastructurestoredataofanytypebyusingvoidpointerstothedataratherthanbymaintainingprivatecopiesofthedatainthedatastructureitself.复用性:因为数据结构趋向于模块化并和环境无关,所以数据结构是可以复用的。因为每种结构有一个预定的接口,通过该接口限制访问存储在数据结构中的数据,所以它们是模块化的。也就是说,我们只能使用接口定义的那些操作来访问数据。因为数据结构能用于任何类型的数据,并用于多种环境中,所以数据结构与使用环境无关。在C语言中,我们通过使用空指针,而不是通过维护非公开的数据备份,使数据结构存储任何类型的数据。4.1AnIntroductiontoDataStructures
8计算机专业英语NewWords&Expressionsinvitingadj.引人动心的 contiguousadj.邻近的,接近的stackn.堆栈 insertionn.插入deletionn.删除,删除部分 pop退栈push进栈 backtrackv.回溯pseudocoden.[计]伪代码 retrievev.重新得到;n.找回pointern.指针 pertinentadj.有关的,相干的,中肯的extractvt.取,引 backout返回entailvt.使承担,带来 traversev.遍历shrinkv.收缩 allotvt.分配,充当,依靠predecessorn.前辈,前任 backandforthadv.来来往往地,来回地vacancyn.空,空白,空缺 stuffvt.填充,塞满AbbreviationsLIFO(last-in,first-out)后进先出 FIFO(first-in,first-out)先进先出4.2Stacks
9计算机专业英语Oneofthepropertiesofalistthatmakesalinkedstructuremoreinvitingthanacontiguousoneistheneedtoinsertanddeleteentriesinsidethelist.Recallthatitwassuchoperationsthathadthepotentialofforcingthemassivemovementofnamestofillorcreateholesinthecaseofacontiguouslist.Ifwerestrictsuchoperationstotheendsofthestructure,wefindthattheuseofacontiguousstructurebecomesamoreconvenientsystem.Anexampleofthisphenomenonisastack,whichisalistinwhichallinsertionsanddeletionsareperformedatthesameendofthestructure.Aconsequenceofthisrestrictionisthatthelastentryenteredwillalwaysbethefirstentryremoved--anobservationthatleadstostacksbeingknownaslast-in,first-out(LIFO)structures.插入和删除记录的需求是使链接表结构比邻接表结构更诱人的原因之一。让我们回想一下在邻接表中具有填补和创建存储空缺能力的操作。如果我们限制这种操作只可以在结构的尾部进行,则邻接表就是一种比较方便的系统。这种现象的一个例子就是堆栈。在堆栈中,插入和删除操作都在结构的相同末端进行。如此限制的结果就是最后一个进入表的记录也就是第一个从表中删除的记录。这种结构称为后进先出结构。4.2Stacks
10计算机专业英语Theendofastackatwhichentriesareinsertedanddeletediscalledthetopofthestack.Theotherendissometimescalledthestack'sbase.Toreflectthefactthataccesstoastackisrestrictedtothetopmostentry,weusespecialterminologywhenreferringtotheinsertionanddeletionoperations.Theprocessofinsertinganobjectonthestackiscalledapushoperation,andtheprocessofdeletinganobjectiscalledapopoperation.Thuswespeakofpushinganentryontoastackandpoppinganentryoffastack.堆栈尾部可以进行插入和删除操作的记录称为堆栈的栈顶,另一端叫做栈底。为了表示如何限制堆栈只能从栈顶访问,我们用一种特殊的术语来表示插入和删除操作。把一个对象插入堆栈的操作称为进栈操作,而从堆栈中删除一个对象的操作称为出栈操作,所以我们常说将一个条目进栈或者将其出栈。4.2Stacks
11计算机专业英语BacktrackingAclassicapplicationofastackinvolvestheexecutionofaprograminvolvingproceduresasfoundinourpseudocode.Whentheexecutionofaprocedureisrequested,themachinemusttransferitsattentiontotheprocedure;yetlater,whentheprocedureiscompleted,themachinemustreturntotheoriginallocationbeforecontinuing.Thismeansthat,whentheinitialtransferismade,theremustbeamechanismforrememberingthelocationtowhichexecutionultimatelyreturns.回溯堆栈的一个典型应用发生在一个程序单元调用一个过程的操作中。为了完成这个调用,机器必须将它的注意力转移到这个过程上;当过程调用结束后,机器必须返回到程序块进行调用时所处的位置。这就意味着必须有一种用来记录操作结束后返回的位置的机制。4.2Stacks
12计算机专业英语Thesituationiscomplicatedbythefactthattheproceduremayitselfrequesttheexecutionofanotherprocedure,whichmayrequeststillanother,andsoon(Figure7.9).Consequently,thereturnlocationsbeingrememberedbegintopileup.Later,aseachoftheseproceduresiscompleted,executionmustbereturnedtotheproperplacewithintheprogramunitthatcalledthecompletedprocedure.Asystemisthereforeneededtosavethereturnlocationsandlaterretrievethemintheproperorder.如果一个被调用的过程本身还要调用其他过程,而那些过程同样也需要调用另外的过程,这样一来整个情形就会很复杂。因此,返回地址的记忆就开始堆积。然后,当每一个过程都结束后,操作必须返回到被称为完成过程的程序块中的合适位置。因此,系统需要按照适当的顺序存储和找回返回地址。4.2Stacks
13计算机专业英语Astackisanidealstructureforsuchasystem.Aseachprocedureiscalled,apointertothepertinentreturnLocationispushedonastack,andaseachprocedureiscompleted,thetopentryfromthestackisextractedwiththeassuranceofobtainingapointertotheproperreturnlocation.Thisexampleisrepresentativeofstackapplicationsingeneralinthatitdemonstratestherelationshipbetweenstacksandtheprocessofbacktracking.Indeed,theconceptofastackisinherentinanyprocessthatentailsbackingoutofasystemintheoppositeorderfromwhichitwasentered.堆栈是满足这种需要的理想结构。当一个过程被调用时,将指向返回地址的指针进栈。然后,当一个过程完成时,将栈顶条目出栈,程序就可以准确得到返回地址。这是应用栈的一个典型例子,它表明了栈和回溯过程的关系。在任何可以从进入端反向返回系统的过程中,堆栈的概念是与生俱来的。4.2Stacks
14计算机专业英语Asanotherexampleofbacktracking,supposewewanttoprintthenamesinalinkedlistinreverseorder--thatis,lastnamefirst.Ourproblemisthattheonlywaywecanaccessthenamesisbyfollowingthelinkedstructure.Thusweneedawayofholdingeachnameretrieveduntilallofthenamesthatfollowhavebeenretrievedandprinted.Oursolutionistotraversethelistfromitsbeginningtoitsendwhilepushingthenameswefindontoastack.Afterreachingtheendofthelist,weprintthenamesaswepopthemoffthestack.我们在来举另一个例子,假设反向输出一张链接表中的姓名,也就是把最后一个名字第一个输出。问题是我们只能跟着链接结构访问姓名。因此,我们需要一种方式,通过这种方式,我们可以保持每一个姓名能被检索,直到排列在这个姓名之后的姓名被得到并输出。我们的方案是从链接表的开始顺序遍历到结尾,与此同时把每一个姓名按照遍历顺序进栈。当到达链接表的末尾后,我们通过出栈操作来输出姓名。4.2Stacks
15计算机专业英语StackImplementationToimplementastackstructureinacomputer'smemory,itiscustomarytoreserveablockofcontiguousmemorycellslargeenoughtoaccommodatethestackasitgrowsandshrinks.(Determiningthesizeofthisblockcanoftenbeacriticaldecision.Iftoolittleroomisreserved,thestackultimatelyexceedstheallottedstoragespace;iftoomuchroomisreserved,memoryspacewillbewasted.)Oneendofthisblockisdesignatedasthestack'sbase.Itisherethatthefirstentrypushedonthestackisstored,witheachadditionalentrybeingplacednexttoitspredecessorasthestackgrowstowardtheotherendofthereservedblock.栈的实现为了在计算机存储中实现栈结构,一般采取的方法是保留一块足够容纳栈大小变化的内存单元。(通常来说,确定块的大小是一个很重要的任务。如果保留的空间过小,那么栈最后可能从所分配的存储空间中溢出;而如果保留的空间过大,又是一种浪费。)块的一端作为栈底,栈的第一条数据会被存储在这里,以后的条目被依次放置在它之后的存储单元中,也就是堆栈向另外一端增加。4.2Stacks
16计算机专业英语Thus,asentriesarepushedandpopped,thetopofthestackmovesbackandforthwithinthereservedblockofmemorycells.Ameansisthereforeneededtomaintainarecordofthelocationofthetopentry.Forthispurpose,theaddressofthetopentryisstoredinanadditionalmemorycellknownasthestackpointer.Thatis,thestackpointerpointstothetopofthestack.因此,在条目进栈和出栈的时候,栈顶的位置就在存储单元块中前后移动。为了保存这个位置的轨迹,栈顶条目的地址被存储在一个附加的存储单元中,这个附加的存储单元被被称为堆栈指针。也就是说,堆栈指针就是一个指向栈顶的指针。4.2Stacks
17计算机专业英语Thecompletesystem,asillustratedinFigure4-1,worksasfollows:Topushanewentryonthestack,wefirstadjustthestackpointertopointtothevacancyjustbeyondthetopofthestackandthenplacethenewentryatthislocation.Topopanentryfromthestack,wereadthedatapointedtobythestackpointerandthenadjustthepointertopointtothenextentrydownonthestack.一个完整的系统(如图4-1所示)是这样工作的:为了把一条新的数据压入堆栈,我们首先调整堆栈指针,使之指向当前栈顶之前的空白。然后将新的条目置于此处。为了将条目从堆栈中弹出,我们首先读出堆栈指针所指向的数据,然后调整此指针指向堆栈中的下一条数据所在的存储单元。4.2Stacks
18计算机专业英语Asweobservedinthecaseoflists,aprogrammerwouldprobablyfinditadvantageoustowriteproceduresthatperformthesepushandpopoperationssothatthestackcouldbeusedasanabstracttool.Notethattheseproceduresshouldhandlesuchspecialcasesasattemptstopopentriesfromanemptystackandtopushentriesontoafullstack.Inparticular,acompletestacksystemwouldprobablycontainproceduresforpushingentries,poppingentries,testingforanemptystack,andtestingforafullstack.同我们观察到表中的情况一样,程序员也可以将堆栈编写成一个可以进行进栈和出栈操作的抽象工具。注意,这些过程应该可以处理诸如试图从空栈中弹出数据,或者将数据压入一个已经填满的堆栈等特殊情况。所以一个完整的堆栈系统应该包括进栈、出栈、测试堆栈是否空或满的功能。4.2Stacks
19计算机专业英语Astackorganizedinacontiguousblockofmemorycellsexhibitslittledifferencebetweentheconceptualstructureandtheactualstructureinmainmemory.Suppose,however,thatwecannotreserveafixedblockofmemoryandbeassuredthatthestackwillalwaysfit.Asolutionistoimplementthestackasalinkedstructuresimilartothatofalist.Thisavoidsthelimitationsofrestrictingthestacktoafixed-sizeblock,sinceitallowstheentriesinthestacktobestuffedintosmallpiecesofavailablespaceanywhereinmemory.Insuchasituation,theconceptualstackstructurewillbequitedifferentfromtheactualarrangementofthedatainmemory.存储在存储单元连续块中的栈展现出主存储器中概念结构与实际之间的一定差异。假设我们不能预测栈的大小,我们就不能保留一个总能满足堆栈的固定大小的存储块。一种解决方法就是实现一种与表结构相似的链接结构栈。这种方法避免了将堆栈限定在一块固定块中的局限性,因为它允许将新的条目插入存储器中任何一块足够大的空闲空间中。在这种情况下,概念上的堆栈结构与其在存储器中实际的数据组织方式就大不相同了。
4.2Stacks
20计算机专业英语NewWords&Expressionsqueuen.行列,队列;vi.排队 cafeterian.自助餐厅rearn.后面,背后,后方 setaside留出,拨出headpointer头指针 tailpointer尾指针crawlvi.&n.爬行,蠕动,徐徐行进egocentricadj.自我中心的 consumptionn.消费,消费量 sideeffect副作用migratevi.移动,移植;vt.使移居,使移植 circularqueue循环队列 envisionvt.想象,预想bridgevt.跨接,接通4.3Queues21计算机专业英语Incontrasttoastackinwhichbothinsertionsanddeletionsareperformedatthesameend,aqueueisalistinwhichallinsertionsareperformedatoneendwhilealldeletionsaremadeattheother.Wehavealreadymetthisstructureinrelationtowaitinglines,wherewerecognizeditasbeingafirst-in,first-out(FIFO)storagesystem.Actually,theconceptofaqueueisinherentinanysysteminwhichobjectsareservedinthesameorderinwhichtheyarrive.4.3Queues栈的插入与删除操作都是在表的相同端进行的。而与此不同,队列是插入和删除操作分别在两端进行的表。我们已经遇到过这种与等待队列相关的结构,在此种情况中,我们把它当作是一种先进先出的存储系统。实际上,在那些对象输入与输出顺序相同的系统中,队列的概念是与生俱来的。队列的结尾从等待队列的关联中得到名字。22计算机专业英语Theendsofaqueuegettheirnamesfromthiswaiting-linerelationship.Theendatwhichentriesareremovediscalledthehead(orsometimesthefront)ofthequeuejustaswesaythatthenextpersontobeservedinacafeteriaisatthehead(orfront)oftheline.Similarly,theendofthequeueatwhichnewentriesareaddediscalledthetail(orrear).4.3Queues结尾处,也就是条目被移出队列的地方,被称为队列的队首(有时候也称为队前),这就好像我们在快餐厅中下一个将点餐的顾客为一队的队首一样。同样,队列的尾部,也就是条目被添加的地方,被称为队尾(或者队后)。23计算机专业英语Wecanimplementaqueueinacomputer'smemorywithinablockofcontiguouscellsinawaysimilartoourstorageofastack.Sinceweneedtoperformoperationsatbothendsofthestructure,wesetasidetwomemorycellstouseaspointersinsteadofjustone,aswedidforastack.Oneofthesepointers,calledtheheadpointerskeepstrackoftheheadofthequeue;theother,calledthetailpointer,keepstrackofthetail.
4.3Queues我们可以像存储栈那样通过连续单元组成的存储块在计算机主存储器中实现队列。因为我们需要在此结构的两端都进行操作,我们分配出两个存储单元用来当作指针,而非栈中那样仅仅需要一个单元来存储指针。其中的一个指针被称为头指针,用来保持队列头的轨迹;另一个指针被称为尾指针,用来保持队尾的轨迹。24计算机专业英语Whenthequeueisempty,bothofthesepointerspointtothesamelocation.Eachtimeanentryisinserted,itisplacedinthelocationpointedtobythetailpointerandthenthetailpointerisadjustedtopointtowardthenextunusedlocation.Inthismanner,thetailpointerisalwayspointingtothefirstvacancyatthetailofthequeue.Removinganentryfromthequeueinvolvesextractingtheentrypointedtobytheheadpointerandthenadjustingtheheadpointertopointtowardtheentrythatfollowedtheremovedentry.4.3Queues如果一个队列为空,那么两个指针应该指向相同的位置。每当新的条目被插入时,均会被置于尾指针所指向的位置,同时修改尾指针,使之指向下一个未使用的位置。这样,尾指针总是指向队尾后的第一空闲存储单元。将一条数据移出队列的操作包括将头指针指向的条目取出,同时调整头指针使之指向排在被移出条目之后的位置。25计算机专业英语Aproblemremainswiththestoragesystemasdescribedthusfar.Ifleftunchecked,thequeuecrawlsslowlythroughmemorylikeaglacier,destroyinganyotherdatainitspath(Figure4.2).Thismovementistheresultoftheratheregocentricpolicyofinsertingeachnewentrybymerelyplacingitnexttothepreviousoneandrepositioningthetailpointeraccordingly.Ifweaddenoughentries,thetailofthequeueultimatelyextendsallthewaytotheendofthemachine'smemory.
4.3Queues以上描述的存储系统仍然存在着问题。如果剩余的存储器未被检查,队列会像冰河一样在存储器中增长,同时将在此道路上的所有其他数据破坏(如图所示)。造成这种移动的相当一部分原因在于插入新条目时使用的“利己”策略,即在插入是仅仅将新数据置于当前队尾之后,同时重置尾指针。如果我们添加足够的条目,那么队尾最后就会从计算机存储器中溢出。26计算机专业英语Thisconsumptionofmemoryisnottheresultofthequeue'ssizebutisasideeffectofthequeue'saccessprocedure.(Asmallyetactivequeuecaneasilyrequiremoreofamachine'smemoryresourcesthanalarge,inactiveone.)Onesolutiontothismemoryspaceproblemmightbetomovetheentriesinaqueueforwardastheleadingonesareremoved,inthesamemanneraspeoplewaitingtobuytheaterticketsstepforwardeachtimeapersonhasbeenserved.However,thismassmovementofdatawouldbeveryinefficient.Whatweneedisawayofconfiningthequeuetooneareaofmemorywithoutbeingforcedtoperformmajorrearrangementsofdata.4.3Queues存储器的消耗问题并不是因队列的大小而生的,其真正原因在于队列的实现问题。(一个小而动态变化的队列比一个大而保持不变的队列需要更多的机器存储资源。)解决存储器空间问题的一个可能方法是:当最前面的条目被移出时,前移队列中的其他条目,就好像人们在购买戏票时所采用的方法一样,每当一个人买到票后,就前移一人。然而这种方法在计算机中运行的效率很低,因为它将需要对数据进行大量的移动。27计算机专业英语Acommonsolutionistosetasideablockofmemoryforthequeue,startthequeueatoneendoftheblock,andletthequeuemigratetowardtheotherendoftheblock.Then,whenthetailofthequeuereachestheendoftheblock,wemerelystartinsertingadditionalentriesbackattheoriginalendoftheblock,whichbythistimeisvacant.Likewise,whenthelastentryintheblockfinallybecomestheheadofthequeueandisremoved,theheadpointerisadjustedbacktothebeginningoftheblockwhereotherentriesare,bythistime,waiting.Inthismanner,thequeuechasesitselfaroundwithintheblockratherthanwanderingoffthroughmemory.4.3Queues用来在计算机中控制队列的最一般的方法是为队列分配一块存储器,从存储块的末端开始存储队列,并且让队列向另一端增长。然而当队尾到达块的末端,即队列为空时,我们开始将新的条目反向于末端的方向插入。同样,当队列的最后一条成为队头并被移出时,调整头指针回到块的开端,同时在此等待。在此方法下,队列在一块区域内循环而不会出现内存溢出情况。
28计算机专业英语Suchatechniqueresultsinanimplementationthatiscalledacircularqueuebecausetheeffectisthatofformingaloopoutoftheblockofmemorycellsallottedtothequeue.Asfarasthequeueisconcerned,thelastcellintheblockisadjacenttothefirstcell.4.3Queues采用此技术的实现方法称为循环队列,因为分配给队列的一块存储单元组成了一个环。就一个队列而言,存储块的最后一个单元与它的第一个单元相邻。29计算机专业英语Onceagain,weshouldrecognizethedifferencebetweentheconceptualstructureenvisionedbytheuserofaqueueandtheactualcyclicstructureimplementedinthemachine'smemory.Asinthecaseofthepreviousstructures,thesedifferencesarenormallybridgedbysoftware.Thatisalongwiththecollectionofmemorycellsusedfordatastorage,aqueueimplementationshouldincludeacollectionofproceduresthatinsertandremoveentriesfromthequeueaswellasdetectwhetherthequeueisemptyorfull.
4.3Queues我们应该再次认识到队列使用者使用的概念结构与实际在计算机存储器中实现的循环结构之间的差异。在前一个结构的例子中,这些差异通常是通过软件来衔接的。也就是说,连同存储数据需要的一组存储单元,队列的实现应该包括一组用来插入和移出队列条目和探测队列是否为空或满的过程函数。然后,开发软件其他单元的程序员可以通过这些方法来实现队列的插入和移出操作,而不用关心其在存储器中的实际实现。30计算机专业英语常用英汉互译技巧一、增译法根据英汉两种语言不同的思维方式、语言习惯和表达方式,在翻译时增添一些词、短句或句子,以便更准确地表达出原文所包含的意义。这种方式多半用在汉译英里。1、汉语无主句较多,而英语句子一般都要有主语,所以在翻译汉语无主句的时候,除了少数可用英语无主句、被动语态或“Therebe…”结构来翻译以外,一般都要根据语境补出主语,使句子完整。2、英汉两种语言在名词、代词、连词、介词和冠词的使用方法上也存在很大差别。英语中代词使用频率较高,凡说到人的器官和归某人所有的或与某人有关的事物时,必须在前面加上物主代词。因此,在汉译英时需要增补物主代词,而在英译汉时又需要根据情况适当地删减。3、英语词与词、词组与词组以及句子与句子的逻辑关系一般用连词来表示,而汉语则往往通过上下文和语序来表示这种关系。因此,在汉译英时常常需要增补连词。英语句子离不开介词和冠词。4、在汉译英时还要注意增补一些原文中暗含而没有明言的词语和一些概括性、注释性的词语,以确保译文意思的完整。
31计算机专业英语常用英汉互译技巧一、增译法例1.Indeed,thereverseistrue实际情况恰好相反。(增译名词)例2.这是这两代计算机之间的又一个共同点。Thisisyetanothercommonpointbetweenthecomputersofthetwogenerations.(增译介词)例3.Individualmathematiciansoftenhavetheirownwayofpronouncingmathematicalexpressionsandinmanycasesthereisnogenerallyaccepted“correct”pronunciation.每个数学家对数学公式常常有各自的读法,在许多情况下,并不存在一个普遍接受的所谓“正确”读法。(增加隐含意义的词)例4.只有在可能发生混淆、或要强调其观点时,数学家才使用较长的读法Itisonlywhenconfusionmayoccur,orwherehe/shewishestoemphasisthepoint,thatthemathematicianwillusethelongerforms.(增加主语)
32计算机专业英语常用英汉互译技巧二、省译法这是与增译法相对应的一种翻译方法,即删去不符合目标语思维习惯、语言习惯和表达方式的词,以避免译文累赘。增译法的例句反之即可。又如:例1.YouwillbestayinginthishotelduringyourvisitinBeijing.你在北京访问期间就住在这家饭店里。(省译物主代词)例2.Ihopeyouwillenjoyyourstayhere.希望您在这儿过得愉快。(省译主语)例3.中国政府历来重视环境保护工作。TheChinesegovernmenthasalwaysattachedgreatimportancetoenvironmentalprotection.(省译名词)例4.ThedevelopmentofICmadeitpossibleforelectronicdevicestobecomesmallerandsmaller.集成电路的发展是电子器件可以做得越来越小。(省译形式主语it)
33计算机专业英语常用英汉互译技巧三、转换法
在翻译过程中,为了使译文符合目标语的表述方式、方法和习惯,对原句中的词类、句型和语态等进行转换:1、在词性方面,把名词转换为代词、形容词、动词;把动词转换成名词、形容词、副词、介词;把形容词转换成副词和短语。2、在句子成分方面,把主语变成状语、定语、宾语、表语;把谓语变成主语、定语、表语;把定语变成状语、主语;把宾语变成主语。3、在句型方面,把并列句变成复合句,把复合句变成并列句,把状语从句变成定语从句。4、在语态方面,可以把主动语态变为被动语态。
34计算机专业英语常用英汉互译技巧三、转换法
例1.ToomuchexposuretoTVprogramswilldogreatharmtotheeyesightofchildren.孩子们看电视过多会大大地损坏视力。(名词转动词)例2.由于我们实行了改革开放政策,我国的综合国力有了明显的增强。Thankstotheintroductionofourreformandopeningpolicy,ourcomprehensivenationalstrengthhasgreatlyimproved.(动词转名词)例3.时间不早了,我们回去吧!Wedon’thavemuchtimeleft.Let’sgoback.(句型转换)35计算机专业英语常用英汉互译技巧四、拆句法和合并法例1.IncreasedcooperationwithChinaisintheinterestsoftheUnitedStates.同中国加强合作,符合美国的利益。(在主谓连接处拆译)例3.中国是个大国,百分之八十的人口从事农业,但耕地只占土地面积的十分之一,其余为山脉、森林、城镇和其他用地。Chinaisalargecountrywithfour-fifthsofthepopulationengagedinagriculture,butonlyonetenthofthelandisfarmland,therestbeingmountains,forestsandplacesforurbanandotheruses.(合译法)例4.Packetswitchingisamethodofslicingdigitalmessagesintoparcelscalled“packets,”sendingthepacketsalongdifferentcommunicationpathsastheybecomeavailable,andthenreassemblingthepacketsoncetheyarriveattheirdestination.分组交换是传输数据的一种方法,它先将数据信息分割成许多称为“分组”的数据信息包;当路径可用时,经过不同的通信路径发送;当到达目的地后,再将它们组装起来。(将长定语从句拆成几个并列的分句)36计算机专业英语常用英汉互译技巧五、正译法和反译法这两种方法通常用于汉译英,偶尔也用于英译汉。所谓正译,是指把句子按照与汉语相同的语序或表达方式译成英语。所谓反译则是指把句子按照与汉语相反的语序或表达方式译成英语。正译与反译常常具有同义的效果,但反译往往更符合英语的思维方式和表达习惯。因此比较地道。例1.你可以从因特网上获得这一信息。YoucanobtainthisinformationontheInternet.(正译)Thisinformationisaccessible/availableontheInternet.(反译)例2.他突然想到了一个新主意。Suddenlyhehadanewidea.(正译)Hesuddenlythoughtoutanewidea.(正译)Anewideasuddenlyoccurredto/struck
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025-2030全球电池保护板行业调研及趋势分析报告
- 2025年全球及中国桁架式门式起重机行业头部企业市场占有率及排名调研报告
- 2025年全球及中国工业绝热冷却器行业头部企业市场占有率及排名调研报告
- 2025-2030全球重馏分轮胎热解油行业调研及趋势分析报告
- 2025-2030全球消费电子注塑机行业调研及趋势分析报告
- 2025年全球及中国静脉注射袋和血袋标签行业头部企业市场占有率及排名调研报告
- 室外装修合同
- 采购及安装合同范本
- 彩钢房工程合同
- 家教服务合同与家教服务合同范本
- 福建省泉州市晋江市2024-2025学年七年级上学期期末生物学试题(含答案)
- 2025年春新人教版物理八年级下册课件 第十章 浮力 第4节 跨学科实践:制作微型密度计
- 货运车辆驾驶员服务标准化培训考核试卷
- 财务BP经营分析报告
- 三年级上册体育课教案
- 2024高考物理二轮复习电学实验专项训练含解析
- 2024年全国统一高考英语试卷(新课标Ⅰ卷)含答案
- 高中英语:倒装句专项练习(附答案)
- 肝脏炎性假瘤的影像学表现培训课件
- 业务员回款考核办法
- 急性心梗的护理业务学习课件
评论
0/150
提交评论