3-习题参考答案.doc
第三章连接课后习题参考答案
第三章连接课后习题参考答案焊接连接参考答案一、概念题 3.1 从功能上分类,连接有哪几种根本类型? 3.2 焊缝有两种根本类型—对接坡口焊缝和贴角焊缝,二者在施工、受力、适用范围上各有哪些特点? 3.3 对接接头连接需使用对接焊缝,角接接头连接需采用角焊缝,这么说对吗? 3.4 hf和lw相同时,吊车梁上的焊缝采用正面角焊缝比采用侧面角焊缝承载力高? 3.5 为何对角焊缝焊脚尺寸有最大和最小取值的限制?对侧面角焊缝的长度有何要求?为什么?【答】(1)最小焊脚尺寸:角焊缝的焊脚尺寸不能过小,否那么焊接时产生的热量较小,致使施焊时冷却速度过快,导致母材开裂。
《标准》规定:hf≥1.5,式中: t2——较厚焊件厚度,单位为mm。
计算时,焊脚尺寸取整数。
自动焊熔深较大,所取最小焊脚尺寸可减小1mm; T形连接的单面角焊缝,应增加1mm;当焊件厚度小于或等于4mm时,那么取与焊件厚度相同。
(2)最大焊脚尺寸:为了防止焊缝区的主体金属“过热”,减小焊件的焊接剩余应力和剩余变形,角焊缝的焊脚尺寸应满足式中:t1——较薄焊件的厚度,单位为mm。
(3)侧面角焊缝的最大计算长度侧面角焊缝在弹性阶段沿长度方向受力不均匀,两端大而中间小,可能首先在焊缝的两端破坏,故规定侧面角焊缝的计算长度lw≤60hf。
假设内力沿侧面角焊缝全长分布,例如焊接梁翼缘与腹板的连接焊缝,可不受上述限制。
3.6 简述焊接剩余应力产生的实质,其最大分布特点是什么?3.7 画出焊接H形截面和焊接箱形截面的焊接剩余应力分布图。
3.8 贴角焊缝中,何为端焊缝?何为侧焊缝?二者破坏截面上的应力性质有何区别? 3.9 标准规定:侧焊缝的计算长度不得大于焊脚尺寸的某个倍数,原因何在?标准同时有焊缝最小尺寸的规定,原因何在? 3.10 标准禁止3条相互垂直的焊缝相交,为什么。
3.11 举3~5例说明焊接设计中减小应力集中的构造措施。
3.12 简述连接设计中等强度法和内力法的含义。
机械制造装备设计第3章习题答案
《机械制造装备设计》第4版第三章习题参考答案3-1 为什么对机床主轴要提出旋转精度、刚度、抗振性、温升及耐磨性要求?主轴组件的功用是缩小主运动的传动误差并将运动传递给工件或刀具进行切削,形成表面成形运动;承受切削力和传动力等载荷。
主轴组件直接参与切削,其性能影响加工精度和生产率。
末端传动组件(包括轴承)要有较高的制造精度、支承刚度,必要时采用校正机构,这样可缩小前面传动件的传动误差,且末端组件不产生或少产生传动误差。
旋转精度是主轴组件装配后,静止或低速空载状态下,刀具或工件安装基面上的全跳动值。
它取决于主轴、主轴的支承轴承、箱体孔等的制造精度,装配和调整精度。
动态刚度包括抗振性、热变形、噪声。
耐磨性是精度保持性的体现。
故机床主轴要提出旋转精度、刚度、抗振性、温升及耐磨性要求。
3-2 主轴部件采用的滚动轴承有那些类型,其特点和选用原则是什么?双列圆柱滚子轴承、双向推力角接触球轴承、角接触球轴承、双列圆锥滚子轴承。
双列圆柱滚子轴承,滚子直径小,数量多(50~60个),具有较高的刚度;两列滚子交错:1,轴向布置,减少了刚度的变化量;外圈无挡边,加工方便;主轴内孔为锥孔,锥度12移动内圈使之径向变形,调整径向间隙和预紧;黄铜实体保持架,利于轴承散热。
NN3000K 超轻系列轴承。
轴承型号为234400,接触角60ο,滚动体直径小,极限转速高;外圈和箱体孔为间隙配合,安装方便,且不承受径向载荷;与双列圆柱滚子轴承配套使用。
角接触球轴承常用的型号有7000C系列和7000AC系列,前者接触角为15ο,后者为25ο。
7000C系列多用于极限转速高,轴向负载小的机床,如内圆磨床主轴等;7000AC系列多用于极限转速高于双列滚子轴承,轴向载荷较大的机床,如车床主轴和加工中心主轴。
为提高支承刚度,可采用两个角接触球轴承组合安装。
圆锥滚子轴承,与圆锥齿轮相似,内圈滚道锥面、外圈滚道锥面及圆锥滚子轴线形成的锥面相交于一点,以保证圆锥滚子的纯滚动。
模块三合伙企业法案例分析及习题参考答案.doc
模块三:《合伙企业法》案例分析及习题参考答案4模块三《合伙企业法》案例分析及习题参考答案第一部分案例与分析【解析】答:(1)甲以合伙企业名义与B公司所签的代销合同有效。
根据《合伙企业法》的规定,合伙企业对合伙人执行合伙企业事务以及对外代表合伙企业权利的限制,不得对抗不知情的善意第三人。
在本题中,尽管合伙人甲超越了合伙企业的内部限制(即甲只可签订2万元及以下的合同),但B公司为善意第三人,因此甲以合伙企业名义与B公司签订的代销合同有效。
(2)丁和戊的主张都不成立。
对丁来说,因为根据《合伙企业法》的规定,退伙人对其退伙前已发生的合伙企业债务,与其他合伙人承担连带责任。
戊的主张不成立,根据《合伙企业法》的规定,入伙的新合伙人对入伙前合伙企业的债务承担连带责任,所以,丁和戊的主张都不成立。
如果丁向A企业偿还了全部债务,丁可以向合伙人甲、乙、丙、戊进行追偿,追偿的数额为10万元。
合伙人丁虽已退伙,但(对外)对其退伙前已发生的合伙企业债务承担连带责任,但在合伙企业(内部)对合伙企业债务不承担清偿责任。
第三部分模块实践内容(一)不定项选择题参考答案1、ACD2、A3、ACD4、A5、ABCD6、B7、BCD8、C(二)简答题:略(三)案例分析题答:(1)丁以劳务作价入伙符合法律规定。
根据规定,有限合伙人不得以劳务出资,丁对企业债务承担无限连带责任,属于有限合伙企业中的普通合伙人,允许以劳务作价入伙。
(2)合伙协议约定企业成立后第1年,丁不参加利润分配符合法律规定。
根据规定,有限合伙企业不得将全部利润分配给部分合伙人;但是,合伙协议另有约定的除外。
所以,丁不参加当年利润分配,符合约定要求。
(3)合伙协议约定由丁作为事务执行人,其他合伙人不参与合伙企业事务符合法律规定。
根据规定,有限合伙企业由普通合伙人执行合伙事务。
有限合伙人不执行合伙事务,不得对外代表有限合伙企业。
(4)甲的主张不符合法律规定。
根据规定,有限合伙人可以同本有限合伙企业进行交易;但是,合伙协议另有约定的除外。
3-SQL语句练习题参考答案
标准SQL语言一、选择题1、下面关于SQL标准的叙述中,不正确的是(B )。
A.SQL语言是集数据定义、数据操纵、数据控制功能为一体的语言。
B.SQL语言是一种高度过程化的语言。
C.SQL标准规定数据库是按三级模式结构构建。
D.SQL语言是关系型数据库的标准语言。
E.SQL语言是面向集合的语言。
2、SQL语言中,修改基本表结构的语句是( B )。
A.UPDATE B.ALTER C.DROP D.CREATE3、SQL语言中,删除基本表结构的语句是( C )。
A.DELETE B.ALTER C.DROP D.CREATE4、下面关于“视图”的叙述中,不正确的是( C )。
A.视图是一种“虚表”,它的数据被存放在基本表中。
B.视图提供了逻辑数据独立性。
C.不能通过视图来更新数据库中的数据。
D.视图能提供对数据的安全保护。
5、下面关于SELECT语句的叙述中,不正确的是(C)。
A.SELECT产生的结果是一个集合。
B.HA VING子句必须与GROUP BY子句一起使用。
C.可以省略FROM子句。
D.可以省略WHERE子句。
二、填空题1、在使用INSERT语句向一个表中插入元组时,“值列表”中值的个数、(顺序)、类型必须与“列名表”保持一致。
2、在向一个表中插入元组时,对于未指定默认值且(不能取空值)的字段必须赋值。
3、向表中插入元组时,主键的值不能取(NULL )值。
4、在使用DELETE语句时,如果不指定(where 条件)就会将整个表的数据删除。
5、视图是从一个或几个基本表或(视图)导出的表,它与基本表不同,是一个虚表。
三、判断题1、SQL语言是面向集合操作的语言。
√2、可以通过视图来查询数据,但不能通过视图来更新数据库中的数据。
×3、在SQL Server数据库系统中,向表中插入元组时,系统自动为具有标识属性的列赋值。
√4、在SQL Server数据库系统中,向表中插入元组时,对取值类型为timestamp(时间戳)的列不能赋值,系统自动赋值。
三级物业管理师习题库含参考答案
三级物业管理师习题库含参考答案一、单选题(共60题,每题1分,共60分)1、服务指标要求月走访查房率( )以上。
A、50%B、30%C、80%D、60%正确答案:A2、在新开发物业验收之前,通常由开发商行使管理权和处置权,自设或委托一家物业管理公司介入前期物业管理工作,并签订( )。
A、前期物业委托管理合同B、前期物业管理服务协议书C、永久性合作协议D、临时物业委托管理合同正确答案:B3、抵押人、抵押权人姓名变更的,当事人可以持不动产权属证书、不动产登记证明等必要材料,申请( )A、抵押权变更登记B、抵押人变更登记C、抵押变更登记D、债权变更登记正确答案:A4、( )是可以单独订立的书面合同,也可以是主债权合同中的抵押条款A、抵押合同B、债权合同C、质押物价值评估条款D、质押合同正确答案:A5、前款规定的孳息应当先充抵收取( )A、余额的费用B、孳息的押金C、孳息的费用D、利息的费用正确答案:C6、下列四项工作中,属于物业绿化管理中日常养护管理工作的是( )。
A、节日花木装饰B、绿化翻新改造C、花木种植D、浇水正确答案:D7、物业服务企业应依照( )提供物业管理服务。
A、用户手册B、物业服务合同约定C、临时公约D、物业管理条例正确答案:B8、建设部对住宅小区物业管理服务质量的具体要求有( )。
A、房屋完好率达98%以上B、居民满意率达90%以上C、房屋零修及时率达100%D、新建小区公共绿地人均3平方米以上正确答案:A9、物业消防设备设施技术档案不包括( )。
A、消防设施设备分布B、日常运行C、维修和改造D、业主投诉正确答案:D10、有配置灭火器、现场安全风险有防范,每发现一处不符合扣( )分A、0.1B、0.2C、0.3D、0.5正确答案:B11、为防止雷击时产生跨步电压,避雷接地装置与道路及建筑物的主要入口距离不得小于( )A、3米B、半米D、1米正确答案:A12、新建小区首次业主大会会议的筹备经费,由( )承担。
3 习题参考答案
高分子第三章习题参考答案思考题2、下列烯类单体适于何种机理聚合:自由基聚合,阳离子聚合或阴离子聚合?并说明理由。
CH2=CHCl,CH2=CCl2,CH2=CHCN,CH2=C(CN)2,CH2=CHCH3,CH2=C(CH3)2,CH2=CHC5H6,CF2=CF2,CH2=C(CN)COOCH3,CH2=C(CH3)-CH=CH2参考答案:CH2=CHCl:适于自由基聚合,Cl原子是吸电子基团,也有共轭效应,但较弱。
CH2=CCl2:适于自由基聚合,Cl原子是吸电子基团。
CH2=CHCN:适于自由基聚合和阴离子聚合,CN是强吸电子基团,并有共轭效应。
CH2=C(CN)2:适于自由基聚合和阴离子聚合,CN是强吸电子基团。
CH2=CHCH3:适于阳离子聚合,CH3是供电子基团,CH3是与双键有超共额轭效应。
CH2=C(CH3)2:适于阳离子聚合,CH3是供电子基团,CH3是与双键有超共轭效应。
CH2=CHC5H6和CH2=C(CH3)-CH=CH2:均可进行自由基聚合、阳离子聚合和阴离子聚合。
因为共轭体系π电子的容易极化和流动。
CF2=CF2:适于自由基聚合。
F原子体积小,结构对称。
CH2=C(CN)COOCH:适合阴离子和自由基聚合,两个吸电子基,并兼有共轭效应。
3、判别下列单体能否进行自由基聚合,并说明理由。
CH2=C(C5H6)2,ClCH=CHCl,CH2=C(CH3)C2H5,CH3CH=CHCH3,CH2=C(CH3)COOCH3,CH2=CHOCOCH3,CH3 CH=CHCOCH3参考答案:CH2=C(C5H6)2不能通过自由基聚合形成高分子量聚合物。
因为取带基空间阻碍大,形成高分子键时张力也大,故只能形成二聚体。
ClCH=CHCl不能通过自由基聚合形成高分子量聚合物。
因为单体结构对称,1,2-而取代基造成较大空间阻碍。
CH2=C(CH3)C2H5不能通过自由基聚合形成高分子量聚合物。
3. 第三章课后习题及答案
第三章1. (Q1) Suppose the network layer provides the following service. The network layer in the source host accepts a segment of maximum size 1,200 bytes and a destination host address from the transport layer. The network layer then guarantees to deliver the segment to the transport layer at the destination host. Suppose many network application processes can be running at the destination host.a. Design the simplest possible transport-layer protocol that will get application data to thedesired process at the destination host. Assume the operating system in the destination host has assigned a 4-byte port number to each running application process.b. Modify this protocol so that it provides a “return address” to the destination process.c. In your protocols, does the transport layer “have to do anything” in the core of the computernetwork.Answer:a. Call this protocol Simple Transport Protocol (STP). At the sender side, STP accepts from thesending process a chunk of data not exceeding 1196 bytes, a destination host address, and a destination port number. STP adds a four-byte header to each chunk and puts the port number of the destination process in this header. STP then gives the destination host address and the resulting segment to the network layer. The network layer delivers the segment to STP at the destination host. STP then examines the port number in the segment, extracts the data from the segment, and passes the data to the process identified by the port number.b. The segment now has two header fields: a source port field and destination port field. At thesender side, STP accepts a chunk of data not exceeding 1192 bytes, a destination host address,a source port number, and a destination port number. STP creates a segment which contains theapplication data, source port number, and destination port number. It then gives the segment and the destination host address to the network layer. After receiving the segment, STP at the receiving host gives the application process the application data and the source port number.c. No, the transport layer does not have to do anything in the core; the transport layer “lives” inthe end systems.2. (Q2) Consider a planet where everyone belongs to a family of six, every family lives in its own house, each house has a unique address, and each person in a given house has a unique name. Suppose this planet has a mail service that delivers letters form source house to destination house. The mail service requires that (i) the letter be in an envelope and that (ii) the address of the destination house (and nothing more ) be clearly written on the envelope. Suppose each family has a delegate family member who collects and distributes letters for the other family members. The letters do not necessarily provide any indication of the recipients of the letters.a. Using the solution to Problem Q1 above as inspiration, describe a protocol that thedelegates can use to deliver letters from a sending family member to a receiving family member.b. In your protocol, does the mail service ever have to open the envelope and examine theletter in order to provide its service.Answer:a.For sending a letter, the family member is required to give the delegate the letter itself, theaddress of the destination house, and the name of the recipient. The delegate clearly writes the recipient’s name on the top of the letter. The delegate then puts the letter in an e nvelope and writes the address of the destination house on the envelope. The delegate then gives the letter to the planet’s mail service. At the receiving side, the delegate receives the letter from the mail service, takes the letter out of the envelope, and takes note of the recipient name written at the top of the letter. The delegate than gives the letter to the family member with this name.b.No, the mail service does not have to open the envelope; it only examines the address on theenvelope.3. (Q3) Describe why an application developer might choose to run an application over UDP rather than TCP.Answer:An application developer may not want its application to use TCP’s congestion control, which can throttle the application’s sending rate at times of congestion. Often, designers of IP telephony and IP videoconference applications choose to run their applications over UDP because they want to avoid TCP’s congestion control. Also, some applications do not need the reliable data transfer provided by TCP.4. (P1) Suppose Client A initiates a Telnet session with Server S. At about the same time, Client B also initiates a Telnet session with Server S. Provide possible source and destination port numbers fora. The segment sent from A to B.b. The segment sent from B to S.c. The segment sent from S to A.d. The segment sent from S to B.e. If A and B are different hosts, is it possible that the source port number in the segment fromA to S is the same as that fromB to S?f. How about if they are the same host?Yes.f No.5. (P2) Consider Figure 3.5 What are the source and destination port values in the segmentsflowing form the server back to the clients’ processes? What are the IP addresses in the network-layer datagrams carrying the transport-layer segments?Answer:Suppose the IP addresses of the hosts A, B, and C are a, b, c, respectively. (Note that a,b,c aredistinct.)To host A: Source port =80, source IP address = b, dest port = 26145, dest IP address = a To host C, left process: Source port =80, source IP address = b, dest port = 7532, dest IP address = cTo host C, right process: Source port =80, source IP address = b, dest port = 26145, dest IP address = c6. (P3) UDP and TCP use 1s complement for their checksums. Suppose you have the followingthree 8-bit bytes: 01101010, 01001111, 01110011. What is the 1s complement of the sum of these 8-bit bytes? (Note that although UDP and TCP use 16-bit words in computing the checksum, for this problem you are being asked to consider 8-bit sums.) Show all work. Why is it that UDP takes the 1s complement of the sum; that is , why not just sue the sum? With the 1s complement scheme, how does the receiver detect errors? Is it possible that a 1-bit error will go undetected? How about a 2-bit error?Answer:One's complement = 1 1 1 0 1 1 1 0.To detect errors, the receiver adds the four words (the three original words and the checksum). If the sum contains a zero, the receiver knows there has been an error. All one-bit errors will be detected, but two-bit errors can be undetected (e.g., if the last digit of the first word is converted to a 0 and the last digit of the second word is converted to a 1).7. (P4) Suppose that the UDP receiver computes the Internet checksum for the received UDPsegment and finds that it matches the value carried in the checksum field. Can the receiver be absolutely certain that no bit errors have occurred? Explain.Answer:No, the receiver cannot be absolutely certain that no bit errors have occurred. This is because of the manner in which the checksum for the packet is calculated. If the corresponding bits (that would be added together) of two 16-bit words in the packet were 0 and 1 then even if these get flipped to 1 and 0 respectively, the sum still remains the same. Hence, the 1s complement the receiver calculates will also be the same. This means the checksum will verify even if there was transmission error.8. (P5) a. Suppose you have the following 2 bytes: 01001010 and 01111001. What is the 1scomplement of sum of these 2 bytes?b. Suppose you have the following 2 bytes: 11110101 and 01101110. What is the 1s complement of sum of these 2 bytes?c. For the bytes in part (a), give an example where one bit is flipped in each of the 2 bytesand yet the 1s complement doesn’t change.0 1 0 1 0 1 0 1 + 0 1 1 1 0 0 0 0 1 1 0 0 0 1 0 1 1 1 0 0 0 1 0 1 + 0 1 0 0 1 1 0 0 0 0 0 1 0 0 0 1Answer:a. Adding the two bytes gives 10011101. Taking the one’s complement gives 01100010b. Adding the two bytes gives 00011110; the one’s complement gives 11100001.c. first byte = 00110101 ; second byte = 01101000.9. (P6) Consider our motivation for correcting protocol rdt2.1. Show that the receiver, shown inthe figure on the following page, when operating with the sender show in Figure 3.11, can lead the sender and receiver to enter into a deadlock state, where each is waiting for an event that will never occur.Answer:Suppose the sender is in state “Wait for call 1 from above” and the receiver (the receiver shown in the homework problem) is in state “Wait for 1 from below.” The sender sends a packet with sequence number 1, and transitions to “Wait for ACK or NAK 1,” waiting for an ACK or NAK. Suppose now the receiver receives the packet with sequence number 1 correctly, sends an ACK, and transitions to state “Wait for 0 from below,” waiting for a data packet with sequence number 0. However, the ACK is corrupted. When the rdt2.1 sender gets the corrupted ACK, it resends the packet with sequence number 1. However, the receiver is waiting for a packet with sequence number 0 and (as shown in the home work problem) always sends a NAK when it doesn't get a packet with sequence number 0. Hence the sender will always be sending a packet with sequence number 1, and the receiver will always be NAKing that packet. Neither will progress forward from that state.10. (P7) Draw the FSM for the receiver side of protocol rdt3.0Answer:The sender side of protocol rdt3.0 differs from the sender side of protocol 2.2 in that timeouts have been added. We have seen that the introduction of timeouts adds the possibility of duplicate packets into the sender-to-receiver data stream. However, the receiver in protocol rdt.2.2 can already handle duplicate packets. (Receiver-side duplicates in rdt 2.2 would arise if the receiver sent an ACK that was lost, and the sender then retransmitted the old data). Hence the receiver in protocol rdt2.2 will also work as the receiver in protocol rdt 3.0.11. (P8) In protocol rdt3.0, the ACK packets flowing from the receiver to the sender do not havesequence numbers (although they do have an ACK field that contains the sequence number of the packet they are acknowledging). Why is it that our ACK packets do not require sequence numbers?Answer:To best Answer this question, consider why we needed sequence numbers in the first place. We saw that the sender needs sequence numbers so that the receiver can tell if a data packet is a duplicate of an already received data packet. In the case of ACKs, the sender does not need this info (i.e., a sequence number on an ACK) to tell detect a duplicate ACK. A duplicate ACK is obvious to the rdt3.0 receiver, since when it has received the original ACK it transitioned to the next state. The duplicate ACK is not the ACK that the sender needs and hence is ignored by the rdt3.0 sender.12. (P9) Give a trace of the operation of protocol rdt3.0 when data packets and acknowledgmentpackets are garbled. Your trace should be similar to that used in Figure 3.16Answer:Suppose the protocol has been in operation for some time. The sender is in state “Wait for call fro m above” (top left hand corner) and the receiver is in state “Wait for 0 from below”. The scenarios for corrupted data and corrupted ACK are shown in Figure 1.13. (P10) Consider a channel that can lose packets but has a maximum delay that is known.Modify protocol rdt2.1 to include sender timeout and retransmit. Informally argue whyyour protocol can communicate correctly over this channel.Answer:Here, we add a timer, whose value is greater than the known round-trip propagation delay. We add a timeout event to the “Wait for ACK or NAK0” and “Wait for ACK or NAK1” states. If the timeout event occurs, the most recently transmitted packet is retransmitted. Let us see why this protocol will still work with the rdt2.1 receiver.• Suppose the timeout is caused by a lost data packet, i.e., a packet on the senderto- receiver channel. In this case, the receiver never received the previous transmission and, from the receiver's viewpoint, if the timeout retransmission is received, it look exactly the same as if the original transmission is being received.• Suppose now that an ACK is lost. The receiver will eventually retransmit the packet on atimeout. But a retransmission is exactly the same action that is take if an ACK is garbled. Thus the sender's reaction is the same with a loss, as with a garbled ACK. The rdt 2.1 receiver can already handle the case of a garbled ACK.14. (P11) Consider the rdt3.0 protocol. Draw a diagram showing that if the network connectionbetween the sender and receiver can reorder messages (that is, that two messagespropagating in the medium between the sender and receiver can be reordered), thenthe alternating-bit protocol will not work correctly (make sure you clearly identify thesense in which it will not work correctly). Your diagram should have the sender on theleft and the receiver on the right, with the time axis running down the page, showingdata (D) and acknowledgement (A) message exchange. Make sure you indicate thesequence number associated with any data or acknowledgement segment.Answer:15. (P12) The sender side of rdt3.0 simply ignores (that is, takes no action on) all received packetsthat are either in error or have the wrong value in the ack-num field of anacknowledgement packet. Suppose that in such circumstances, rdt3.0 were simply toretransmit the current data packet . Would the protocol still work? (hint: Consider whatwould happen if there were only bit errors; there are no packet losses but prematuretimeout can occur. Consider how many times the nth packet is sent, in the limit as napproaches infinity.)Answer:The protocol would still work, since a retransmission would be what would happen if the packet received with errors has actually been lost (and from the receiver standpoint, it never knows which of these events, if either, will occur). To get at the more subtle issue behind this question, one has to allow for premature timeouts to occur. In this case, if each extra copy of the packet is ACKed and each received extra ACK causes another extra copy of the current packet to be sent, the number of times packet n is sent will increase without bound as n approaches infinity.16. (P13) Consider a reliable data transfer protocol that uses only negative acknowledgements.Suppose the sender sends data only infrequently. Would a NAK-only protocol bepreferable to a protocol that uses ACKs? Why? Now suppose the sender has a lot ofdata to send and the end to end connection experiences few losses. In this second case ,would a NAK-only protocol be preferable to a protocol that uses ACKs? Why?Answer:In a NAK only protocol, the loss of packet x is only detected by the receiver when packetx+1 is received. That is, the receivers receives x-1 and then x+1, only when x+1 is received does the receiver realize that x was missed. If there is a long delay between the transmission of x and the transmission of x+1, then it will be a long time until x can be recovered, under a NAK only protocol.On the other hand, if data is being sent often, then recovery under a NAK-only scheme could happen quickly. Moreover, if errors are infrequent, then NAKs are only occasionally sent (when needed), and ACK are never sent – a significant reduction in feedback in the NAK-only case over the ACK-only case.17. (P14) Consider the cross-country example shown in Figure 3.17. How big would the windowsize have to be for the channel utilization to be greater than 80 percent?Answer:It takes 8 microseconds (or 0.008 milliseconds) to send a packet. in order for the sender to be busy 90 percent of the time, we must have util = 0.9 = (0.008n) / 30.016 or n approximately 3377 packets.18. (P15) Consider a scenario in which Host A wants to simultaneously send packets to Host Band C. A is connected to B and C via a broadcast channel—a packet sent by A is carriedby the channel to both B and C. Suppose that the broadcast channel connecting A, B,and C can independently lose and corrupt packets (and so, for example, a packet sentfrom A might be correctly received by B, but not by C). Design a stop-and-wait-likeerror-control protocol for reliable transferring packets from A to B and C, such that Awill not get new data from the upper layer until it knows that B and C have correctlyreceived the current packet. Give FSM descriptions of A and C. (Hint: The FSM for Bshould be essentially be same as for C.) Also, give a description of the packet format(s)used.Answer:In our solution, the sender will wait until it receives an ACK for a pair of messages (seqnum and seqnum+1) before moving on to the next pair of messages. Data packets have a data field and carry a two-bit sequence number. That is, the valid sequence numbers are 0, 1, 2, and 3. (Note: you should think about why a 1-bit sequence number space of 0, 1 only would not work in the solution below.) ACK messages carry the sequence number of the data packet they are acknowledging.The FSM for the sender and receiver are shown in Figure 2. Note that the sender state records whether (i) no ACKs have been received for the current pair, (ii) an ACK for seqnum (only) has been received, or an ACK for seqnum+1 (only) has been received. In this figure, we assume that theseqnum is initially 0, and that the sender has sent the first two data messages (to get things going).A timeline trace for the sender and receiver recovering from a lost packet is shown below:Sender Receivermake pair (0,1)send packet 0Packet 0 dropssend packet 1receive packet 1buffer packet 1send ACK 1receive ACK 1(timeout)resend packet 0receive packet 0deliver pair (0,1)send ACK 0receive ACK 019. (P16) Consider a scenario in which Host A and Host B want to send messages to Host C. HostsA and C are connected by a channel that can lose and corrupt (but not reorder)message.Hosts B and C are connected by another channel (independent of the channelconnecting A and C) with the same properties. The transport layer at Host C shouldalternate in delivering messages from A and B to the layer above (that is, it should firstdeliver the data from a packet from A, then the data from a packet from B, and so on).Design a stop-and-wait-like error-control protocol for reliable transferring packets fromA toB and C, with alternating delivery atC as described above. Give FSM descriptionsof A and C. (Hint: The FSM for B should be essentially be same as for A.) Also, give adescription of the packet format(s) used.Answer:This problem is a variation on the simple stop and wait protocol (rdt3.0). Because the channel may lose messages and because the sender may resend a message that one of the receivers has already received (either because of a premature timeout or because the other receiver has yet to receive the data correctly), sequence numbers are needed. As in rdt3.0, a 0-bit sequence number will suffice here.The sender and receiver FSM are shown in Figure 3. In this problem, the sender state indicates whether the sender has received an ACK from B (only), from C (only) or from neither C nor B. The receiver state indicates which sequence number the receiver is waiting for.20. (P17) In the generic SR protocol that we studied in Section 3.4.4, the sender transmits amessage as soon as it is available (if it is in the window) without waiting for anacknowledgment. Suppose now that we want an SR protocol that sends messages twoat a time. That is , the sender will send a pair of messages and will send the next pairof messages only when it knows that both messages in the first pair have been receivercorrectly.Suppose that the channel may lose messages but will not corrupt or reorder messages.Design an error-control protocol for the unidirectional reliable transfer of messages.Give an FSM description of the sender and receiver. Describe the format of the packetssent between sender and receiver, and vice versa. If you use any procedure calls otherthan those in Section 3.4(for example, udt_send(), start_timer(), rdt_rcv(), and soon) ,clearly state their actions. Give an example (a timeline trace of sender and receiver)showing how your protocol recovers from a lost packet.Answer:21. (P18) Consider the GBN protocol with a sender window size of 3 and a sequence numberrange of 1024. Suppose that at time t, the next in-order packet that the receiver isexpecting has a sequence number of k. Assume that the medium does not reordermessages. Answer the following questions:a. What are the possible sets of sequence number inside the sender’s window at timet? Justify your Answer.b .What are all possible values of the ACK field in all possible messages currentlypropagating back to the sender at time t? Justify your Answer.Answer:a.Here we have a window size of N=3. Suppose the receiver has received packet k-1, and hasACKed that and all other preceeding packets. If all of these ACK's have been received by sender, then sender's window is [k, k+N-1]. Suppose next that none of the ACKs have been received at the sender. In this second case, the sender's window contains k-1 and the N packets up to and including k-1. The sender's window is thus [k- N,k-1]. By these arguments, the senders window is of size 3 and begins somewhere in the range [k-N,k].b.If the receiver is waiting for packet k, then it has received (and ACKed) packet k-1 and the N-1packets before that. If none of those N ACKs have been yet received by the sender, then ACKmessages with values of [k-N,k-1] may still be propagating back. Because the sender has sent packets [k-N, k-1], it must be the case that the sender has already received an ACK for k-N-1.Once the receiver has sent an ACK for k-N-1 it will never send an ACK that is less that k-N-1.Thus the range of in-flight ACK values can range from k-N-1 to k-1.22. (P19) Answer true or false to the following questions and briefly justify your Answer.a. With the SR protocol, it is possible for the sender to receive an ACK for a packet thatfalls outside of its current window.b. With CBN, it is possible for the sender to receiver an ACK for a packet that fallsoutside of its current window.c. The alternating-bit protocol is the same as the SR protocol with a sender and receiverwindow size of 1.d. The alternating-bit protocol is the same as the GBN protocol with a sender andreceiver window size of 1.Answer:a.True. Suppose the sender has a window size of 3 and sends packets 1, 2, 3 at t0 . At t1 (t1 > t0)the receiver ACKS 1, 2, 3. At t2 (t2 > t1) the sender times out and resends 1, 2, 3. At t3 the receiver receives the duplicates and re-acknowledges 1, 2, 3. At t4 the sender receives the ACKs that the receiver sent at t1 and advances its window to 4, 5, 6. At t5 the sender receives the ACKs 1, 2, 3 the receiver sent at t2 . These ACKs are outside its window.b.True. By essentially the same scenario as in (a).c.True.d.True. Note that with a window size of 1, SR, GBN, and the alternating bit protocol arefunctionally equivalent. The window size of 1 precludes the possibility of out-of-order packets (within the window). A cumulative ACK is just an ordinary ACK in this situation, since it can only refer to the single packet within the window.23. (Q4) Why is it that voice and video traffic is often sent over TCP rather than UDP in today’sInternet. (Hint: The Answer we are looking for has nothing to do with TCP’s congestion-control mechanism. )Answer:Since most firewalls are configured to block UDP traffic, using TCP for video and voice traffic lets the traffic though the firewalls24. (Q5) Is it possible for an application to enjoy reliable data transfer even when the applicationruns over UDP? If so, how?Answer:Yes. The application developer can put reliable data transfer into the application layer protocol. This would require a significant amount of work and debugging, however.25. (Q6) Consider a TCP connection between Host A and Host B. Suppose that the TCP segmentstraveling form Host A to Host B have source port number x and destination portnumber y. What are the source and destination port number for the segments travelingform Host B to Host A?Answer:Source port number y and destination port number x.26. (P20) Suppose we have two network entities, A and B. B has a supply of data messages thatwill be sent to A according to the following conventions. When A gets a request fromthe layer above to get the next data (D) message from B, A must send a request (R)message to B on the A-to-B channel. Only when B receives an R message can it send adata (D) message back to A on the B-to-A channel. A should deliver exactly one copy ofeach D message to the layer above. R message can be lost (but not corrupted) in the A-to-B channel; D messages, once sent, are always delivered correctly. The delay alongboth channels is unknown and variable.Design(give an FSM description of) a protocol that incorporates the appropriatemechanisms to compensate for the loss-prone A-to-B channel and implementsmessage passing to the layer above at entity A, as discussed above. Use only thosemechanisms that are absolutely necessary.Answer:Because the A-to-B channel can lose request messages, A will need to timeout and retransmit its request messages (to be able to recover from loss). Because the channel delays are variable and unknown, it is possible that A will send duplicate requests (i.e., resend a request message that has already been received by B). To be able to detect duplicate request messages, the protocol will use sequence numbers. A 1-bit sequence number will suffice for a stop-and-wait type of request/response protocol.A (the requestor) has 4 states:• “Wait for Request 0 from above.” Here the requestor is waiting for a call from above to request a unit of data. When it receives a request from above, it sends a request message, R0, to B, starts a timer and make s a transition to the “Wait for D0” state. When in the “Wait for Request 0 from above” state, A ign ores anything it receives from B.• “Wait for D0”. Here the requestor is waiting for a D0 data message from B. A timer is always running in this state. If the timer expires, A sends another R0 message, restarts the timer and remains in this state. If a D0 message is received from B, A stops the time and transits to the “Wait for Request 1 from above” state. If A receives a D1 data message while in this state, it is ignored.• “Wait for Request 1 from above.” Here the requestor is again waiting for a call from above to request a unit of data. When it receives a request from above, it sends a request message, R1, to B, starts a timer and makes a transition to the “Wait for D1” state. When in the “Wait for Request 1 from above” state, A ignores anything it receives from B.• “Wait for D1”. Here the requestor is waiting for a D1 data message from B. A timer is always running in this state. If the timer expires, A sends another R1 message, restarts the timer and remains in this state. If a D1 message is received from B, A stops the timer and transits to the “Wait for Request 0 from above” state. If A receives a D0 data message while in this state, it is ignored.The data supplier (B) has only two states:。
统编版三年级语文上册全册课文课后习题参考答案
统编版三年级语文上册全册课文课后习题参考答案第一课《大青树下的小学》一、朗读课文,在文中画出有新鲜感的词句与同学交流。
(有新鲜感的词句”是指运用比拟、比照、比喻等等修辞手法的有关词句,使用修饰限定方法写具体形象的有关词句,以及进行细致描述细节的有关词句。
而这样的词句,学生读后感到写得生动有趣、具体形象,有耳目一新的感觉。
)1、早晨,从山坡上,从坪坝里,从一条条开着绒球花和太阳花的小路上,走来了许多小学生,有傣族的,有景颇族的,有阿昌族和德昂族的,还有汉族的。
这句话告诉我们这些来自不同民族的小朋友,早早地起床,迎着朝阳,踩着露珠,高高兴兴地朝着一个共同一个地方──学校走去。
这句话描绘出众多的学生由远及近汇集而来的壮观景象了。
句子中用了三个“从……”相似的结构的词语,和“有……有……有……还有……”让我们一读就在脑海里能形成清楚具体的画面,读起来朗朗上口,形成一定的语势,给我们有身临其境、耳目一新的感觉。
这样的词句,我们叫它为“有新鲜感的词句”。
2、大家穿戴不同、语言不同,来到学校,都成了好朋友。
那鲜艳的民族服装,把学校打扮得更加绚丽多彩。
这句话告诉我们这是一所民族团结的学校。
大家虽然来自不同的家庭,来自不同的民族,穿戴不同,语言不同,但都成了好朋友。
在祖国的大家庭里,在鲜艳的五星红旗下共同过着幸福的学习生活。
“穿戴不同”“鲜艳的服装”“绚丽多彩”形成“绚丽多彩的学校”画面。
3、同学们向在校园里欢唱的小鸟打招呼,向敬爱的老师问好,向高高飘扬的国旗敬礼。
这一句课文作了提示“我好象看到了这样的情景”这是想象的句子。
这句话中连续用了三个“向……”,形成“进行各种活动”的画面。
写出了学校的生活的美好,孩子们来到学校时的欢快心情。
4、最有趣的是,跑来了几只猴子。
这些山林里的朋友,是那样好奇地听着同学们读课文。
下课了,大家在大青树下跳孔雀舞、摔跤、做游戏,招引来许多小鸟,连松鼠、山狸也赶来看热闹。
这句话写出了操场上到底怎样热闹,课间活动丰富多彩,引得小动物心生羡慕,也前来看热闹。
电工三级习题+参考答案
电工三级习题+参考答案一、单选题(共80题,每题1分,共80分)1、弯管时,管子的弯曲角度不应小于( )。
A、90°B、60°C、45°D、30°正确答案:A2、串联谐振式逆变器( )电容串联。
A、电阻和换流B、负载和换流C、电阻和电感D、负载和电感正确答案:B3、PLC编程器的数字键由0~9共10个键组成,用以设置地址号、( )、定时器的设定值等。
A、参数控制B、计数器C、顺序控制D、工作方式正确答案:B4、FX系列可编程控制器常开触点输入用( )指令。
A、ORIB、LDC、ORD、LDI正确答案:B5、用双踪示波器依次检查各晶匣管(VT1~VT6)的触发脉冲是否按规定顺序依次相差( )。
A、90°B、120°C、180°D、60°正确答案:D6、钢管比塑料管的耐腐蚀性( )。
A、高B、差C、好D、一样正确答案:B7、智能功率模块IPM具有驱动电源欠压保护,能自动检测驱动电源,当驱动电源低于( )超过10μs时,将截止驱动信号。
A、10VB、12VC、15VD、20V正确答案:C8、FX系列PLC中的OUT指令为逻辑行设定一线圈,可以是( )等。
A、定时器及计数器B、都是C、辅助继电器D、输出继电器正确答案:D9、数控系统程序数据保存不住,可直接检查后备电池、断电检测及切换电路,以及( )。
A、震荡电路B、存储器周边电路C、地址线逻辑D、CPU及周边电路正确答案:B10、市场经济条件下,不符合爱岗敬业要求的是( )。
A、强化职业责任B、干一行爱一行C、多转行多锻炼D、树立职业理想正确答案:C11、为了保护零件加工程序,数控系统有专用电池作为存储器RAM芯片的备用电源。
当电池电压小于( )V时,需要换电池,更换时应按有关说明书的方法进行。
A、4.5B、3C、1.5D、6正确答案:A12、利用光导纤维进行远距离传输信号是利用( )原理。
机械制造技术基础(第2版)第三章课后习题答案
机械制造技术基础(第2版)第三章课后习题答案《机械制造技术基础》部分习题参考解答第三章机械制造中的加工方法及装备3-1表面发生线的形成方法有哪几种?答:(p69-70)表面发生线的形成方法有轨迹法、成形法、相切法、展成法。
具体参见第二版教材p69图3-2。
3-2试以外圆磨床为例分析机床的哪些运动是主运动,哪些运动是进给运动?答:如图3-20(p87),外圆磨削砂轮旋转nc是主运动,工件旋转nw、砂轮的横向移动fr、工作台往复运动fa均为进给运动。
3-3机床有哪些基本组成部分?试分析其主要功用。
答:(p70-71)基本组成部分动力源、运动执行机构、传动机构、控制系统和伺服系统、支承系统。
3-5试分析提高车削生产率的途径和方法。
答:(p76)提高切削速度;采用强力切削,提高f、ap;采用多刀加工的方法。
3-6车刀有哪几种?试简述各种车刀的结构特征及加工范围。
答:(p77)外圆车刀(左、右偏刀、弯头车刀、直头车刀等),内、外螺纹车刀,切断刀或切槽刀,内孔车刀(通孔、盲孔车刀、)端面车刀、成形车刀等。
顾名思义,外圆车刀主要是切削外圆表面;螺纹车刀用于切削各种螺纹;切断或切槽车刀用于切断或切槽;内孔车刀用于车削内孔;端面车刀切断面;成形车刀用于加工成形表面。
3-7试述CA6140型卧式车床主传动链的传动路线。
答:(p82)CA6140型卧式车床主传动链的传动路线:3-8CA6140型卧式车床中主轴在主轴箱中是如何支承的三爪自定心卡盘是怎样装到车床主轴上去的?答:(p83-84)3-9CA6140型卧式车床是怎样通过双向多片摩擦离合器实现主轴正传、反转和制动的?答:如教材图3-17和3-18所示,操纵手柄向上,通过连杆、扇形齿块和齿条带动滑套8向右滑移,拨动摆杆10使拉杆向左,压紧左边正向旋转摩擦片,主轴实现正转;若操纵手柄向下,通过连杆、扇形齿块和齿条带动滑套8向左滑移,拨动摆杆10使拉杆向右,压紧右边反向旋转摩擦片,主轴反转。
三年级科学下册习题参考答案
三年级科学下册习题参考答案一、填空1、物体的冷热程度叫温度,通常用摄氏度(℃)表示。
物体的温度可以温度计测量。
它是根据物体的热胀冷缩性质制成的。
2、温度计由玻璃管、玻璃泡、液柱构成,玻璃管上边有刻度。
3、对一个物体来说,温度下降,说明物体热量减少:温度上升,说明物体的热量增加。
4、水的温度下降到0℃时,水开始结冰。
从液_态变成固态。
水在结冰过程中,要向周围放出热量。
5、当环境温度高于0℃,冰开始融化成水。
从固态变成液_态。
冰在融化过程中,要从周围吸收热量,冰在融化过程中,温度地会长时间保持在0℃,直到完全融化成水。
热量是使水的状态发生变化的重要因素。
6、水变成水蒸气的过程叫蒸发,空气中的水蒸气冷却变成看得见的水滴,这种现象叫做凝结。
7、空气中充满了看不见的水蒸气。
8、水蒸发的快慢与周围的温度有关。
加热能加快水的蒸发9、水在自然界有各种形态——云、雾、雨、露、霜、雪、冰、水蒸气……。
10、水在自然界中的三种形态:固态、液_态、气态。
温度的变化引起了水的三态变化。
11、水的三种状态之间可以互相转化,这使水在自然界中产生了循环运动。
二、判断1、温度计不能测量温度。
(×)2、温度计是华伦海特发明的。
(×)3、温度计上的每一格刻度表示1摄氏度。
(∨)4、为了观测到比较正确的温度人们观察温度计的读数时要平视(∨)5、由于嘴里呼出的热气能使温度计中的液柱上升,所以在靠近温度计读取温度时要用鼻子呼吸(∨)6、装满碎冰的玻璃杯外壁上的小水珠是从杯口溢出来的。
(×)7、蒸发的速度是恒定的,与外界因素无关。
(×)8、用湿布在干净的黑板上写出一个字,这个字会越来越清楚。
(×)9、水只有达到100℃才会蒸发(×)10、到了冬天河里的水一定会结冰(×)11、人工降雨是利用水的三态可以相互转化的性质对自然的改造(∨)11、雾在日出后会逐渐消散是因为那些小水滴受热又蒸发的原因(∨)12、雨是水滴,是液体状态的水;雪是冰晶,是固体状态的水。
电磁场与电磁波第三章习题及参考答案
第3章习题3-1 半径为的薄圆盘上电荷面密度为s ρ,绕其圆弧轴线以角频率旋转形成电流,求电流面密度。
解:圆盘以角频率旋转,圆盘上半径为r 处的速度为r ω,因此电流面密度为ϕωρρˆr v J s s s ==3-2 在铜中,每立方米体积中大约有28105.8⨯个自由电子。
如果铜线的横截面为210cm ,电流为A 1500。
计算 1) 电流密度;2) 电子的平均漂移速度; 解:1)电流密度m A S I J /105.11010150064⨯=⨯==- 2) 电子的平均漂移速度 v J ρ=,3102819/1036.1105.8106.1m C eN ⨯=⨯⨯⨯==-ρs m J v /101.11036.1105.14106-⨯=⨯⨯==ρ 3-3 一宽度为cm 30传输带上电荷均匀分布,以速度s m /20匀速运动,形成的电流,对应的电流强度为A μ50,计算传输带上的电荷面密度。
解:电流面密度为m A L I J S /7.1663.050μ===因为 v J S S ρ= 所以 2/33.8207.166m C v J S S μρ=== 3-4 如果ρ是运动电荷密度,U是运动电荷的平均运动速度,证明:0=∂∂+∇⋅+⋅∇tU U ρρρ证:如果ρ是运动电荷密度,U是运动电荷的平均运动速度,则电流密度为U J ρ=代入电荷守恒定律tJ ∂∂-=⋅∇ρ得0=∂∂+∇⋅+⋅∇t U U ρρρ3-5 由m S /1012.17⨯=σ的铁制作的圆锥台,高为m 2,两端面的半径分别为cm 10和cm 12。
求两端面之间的电阻。
解:用两种方法(1)如题图3.5所示⎰⎰==2122)(tan zz lz dzS dl R ασπσ)11()(tan 1212z z -=ασπ 01.0202.0tan ==α题3.5图m r z .1001.0/1.0tan /11===α,m r z 1201.0/12.0tan /22===αΩ⨯=-⨯⨯⨯=-=--647212107.4)121101(101012.11)11()(tan 1πασπz z R (2)设流过的电流为I ,电流密度为2rI S I J π==电场强度为 2r IJ E πσσ== 电压为 dz z IEdz V z z z z ⎰⎰==21212)tan (σαπ ⎰==2122)(tan zz zdz I V R απσΩ⨯=-6107.4 3-6 在两种媒质分界面上,媒质1的参数为2,/10011==r m S εσ,电流密度的大小为2/50m A ,方向和界面法向的夹角为030;媒质2的参数为4,/1022==r m S εσ。
《财务管理》第3章习题及参考答案(1).doc
中级财管第三章习题一、计算题1. 你正在分析一项价值250万元,残值为50万元的资产购入后从其折旧中可以得到的税收收益。
该资产折旧期为5年。
a. 假设所得税率为40%,估计每年从该资产折旧中可得到的税收收益。
b. 假设资本成本为10%,估计这些税收收益的现值。
参考答案:(1)年折旧额=(250-5)=40(万元)获得的从折旧税收收益=40*40%=16万元(2)P=16*(P/A,10%,5)=60.56万元2.华尔公司考虑购买一台新型交织字母机。
该机器的使用年限为4年,初始支出为100 000元。
在这4年中,字母机将以直线法进行折旧直到帐面价值为零,所以每年的折旧额为25 000元。
按照不变购买力水平估算,这台机器每年可以为公司带来营业收入80 000元,公司为此每年的付现成本30 000元。
假定公司的所得税率为40%,项目的实际资金成本为10%,如果通货膨胀率预期为每年8%,那么应否购买该设备?参考答案:NCF0=-100 000NCF1-4=(80 000-30 000-25 000)*(1-40%)+25 000NPV=NCF1-4/(P/A,18%,4)+NCF0若NPV>0,应该购买,否则不应该购买该项设备。
3.甲公司进行一项投资,正常投资期为3年,每年投资200万元,3年共需投资600万元。
第4年~第13年每年现金净流量为210万元。
如果把投资期缩短为2年,每年需投资320万元,2年共投资640万元,竣工投产后的项目寿命和每年现金净流量不变。
资本成本为20%,假设寿命终结时无残值,不用垫支营运资金。
试分析判断是否应缩短投资期。
参考答案:1、用差量的方法进行分析(1)计算不同投资期的现金流量的差量(单位:万元)(2)计算净现值的差量2、分别计算两种方案的净现值进行比较 (1)计算原定投资期的净现值(2)计算缩短投资期后的净现值(3)比较两种方案的净现值并得出结论:因为缩短投资期会比按照原投资期投资增加净现值20.27(24.38-4.11)万元,所以应该采用缩短投资的方案。
数据结构(C语言版)第三版习题答案
精神成就事业,态度决定一切。
附录习题参考答案习题1参考答案1.1.选择题(1). A. (2). A. (3). A. (4). B.C. (5). A. (6). A. (7). C. (8). A. (9). B. (10.) A.1.2.填空题(1). 数据关系(2). 逻辑结构物理结构(3). 线性数据结构树型结构图结构(4). 顺序存储链式存储索引存储散列表(Hash)存储(5). 变量的取值范围操作的类别(6). 数据元素间的逻辑关系数据元素存储方式或者数据元素的物理关系(7). 关系网状结构树结构(8). 空间复杂度和时间复杂度(9). 空间时间(10). Ο(n)1.3 名词解释如下:数据:数据是信息的载体是计算机程序加工和处理的对象包括数值数据和非数值数据数据项:数据项指不可分割的、具有独立意义的最小数据单位数据项有时也称为字段或域数据元素:数据元素是数据的基本单位在计算机程序中通常作为一个整体进行考虑和处理一个数据元素可由若干个数据项组成数据逻辑结构:数据的逻辑结构就是指数据元素间的关系数据存储结构:数据的物理结构表示数据元素的存储方式或者数据元素的物理关系数据类型:是指变量的取值范围和所能够进行的操作的总和算法:是对特定问题求解步骤的一种描述是指令的有限序列1.4 语句的时间复杂度为:(1) Ο(n2)(2) Ο(n2)(3) Ο(n2)(4) Ο(n-1)(5) Ο(n3)1.5 参考程序:main(){int XYZ;scanf("%d %d%d"&X&YZ);if (X>=Y)if(X>=Z)if (Y>=Z) { printf("%d %d%d"XYZ);}else{ printf("%d %d%d"XZY);}else{ printf("%d %d%d"ZXY);}else if(Z>=X)if (Y>=Z) { printf("%d %d%d"YZX);}else{ printf("%d%d%d"ZYX);}else{ printf("%d%d%d"YXZ);}}1.6 参考程序:main(){int in;float xa[]p;printf("\nn=");scanf("%f"&n);printf("\nx=");scanf("%f"&x);for(i=0;i<=n;i++)scanf("%f "&a[i]);p=a[0];for(i=1;i<=n;i++){ p=p+a[i]*x;x=x*x;}printf("%f"p)'}习题2参考答案2.1选择题(1). C. (2). B. (3). B. (4). B. 5. D. 6. B. 7. B. 8. A. 9. A. 10. D.2.2.填空题(1). 有限序列(2). 顺序存储和链式存储(3). O(n) O(n)(4). n-i+1 n-i(5). 链式(6). 数据指针(7). 前驱后继(8). Ο(1) Ο(n)(9). s->next=p->next; p->next=s ;(10). s->next2.3. 解题思路:将顺序表A中的元素输入数组a若数组a中元素个数为n将下标为012...(n-1)/2的元素依次与下标为nn-1...(n-1)/2的元素交换输出数组a的元素参考程序如下:main(){int in;float ta[];printf("\nn=");scanf("%f"&n);for(i=0;i<=n-1;i++)scanf("%f "&a[i]);for(i=0;i<=(n-1)/2;i++){ t=a[i]; a[i] =a[n-1-i]; a[n-1-i]=t;} for(i=0;i<=n-1;i++)printf("%f"a[i]);}2.4 算法与程序:main(){int in;float ta[];printf("\nn=");scanf("%f"&n);for(i=0;i<n;i++)scanf("%f "&a[i]);for(i=1;i<n;i++)if(a[i]>a[0]{ t=a[i]; a[i] =a[0]; a[0]=t;}printf("%f"a[0]);for(i=2;i<n;i++)if(a[i]>a[1]{ t=a[i]; a[i] =a[1]; a[1]=t;}printf("%f"a[0]);}2.5 算法与程序:main(){int ijkn;float xta[];printf("\nx=");scanf("%f"&x);printf("\nn=");scanf("%f"&n);for(i=0;i<n;i++)scanf("%f "&a[i]); // 输入线性表中的元素for (i=0; i<n; i++) { // 对线性表中的元素递增排序k=i;for (j=i+1; j<n; j++) if (a[j]<a[k]) k=j; if (k<>j) {t=a[i];a[i]=a[k];a[k]=t;}}for(i=0;i<n;i++) // 在线性表中找到合适的位置if(a[i]>x) break;for(k=n-1;k>=i;i--) // 移动线性表中元素然后插入元素xa[k+1]=a[k];a[i]=x;for(i=0;i<=n;i++) // 依次输出线性表中的元素printf("%f"a[i]);}2.6 算法思路:依次扫描A和B的元素比较A、B当前的元素的值将较小值的元素赋给C如此直到一个线性表扫描完毕最后将未扫描完顺序表中的余下部分赋给C即可C的容量要能够容纳A、B两个线性表相加的长度有序表的合并算法:void merge (SeqList ASeqList BSeqList *C){ int ijk;i=0;j=0;k=0;while ( i<=st && j<=st )if (A.data[i]<=B.data[j])C->data[k++]=A.data[i++];elseC->data[k++]=B.data[j++];while (i<=st )C->data[k++]= A.data[i++];while (j<=st )C->data[k++]=B.data[j++];C->last=k-1;}2.7 算法思路:依次将A中的元素和B的元素比较将值相等的元素赋给C如此直到线性表扫描完毕线性表C就是所求递增有序线性表算法:void merge (SeqList ASeqList BSeqList *C){ int ijk;i=0;j=0;k=0;while ( i<=st)while(j<=st )if (A.data[i]=B.data[j])C->data[k++]=A.data[i++];C->last=k-1;}习题3参考答案3.1.选择题(1). D (2). C (3). D (4). C (5). B (6). C (7). C (8). C (9). B (10).AB (11). D (12). B (13). D (14). C (15). C (16). D(17). D (18). C (19). C (20). C 3.2.填空题(1) FILOFIFO(2) -13 4 X * + 2 Y * 3 / -(3) stack.topstack.s[stack.top]=x(4) p>llink->rlink=p->rlinkp->rlink->llink=p->rlink(5) (R-F+M)%M(6) top1+1=top2(7) F==R(8) front==rear(9) front==(rear+1)%n(10) N-13.3 答:一般线性表使用数组来表示的线性表一般有插入、删除、读取等对于任意元素的操作而栈只是一种特殊的线性表栈只能在线性表的一端插入(称为入栈push)或者读取栈顶元素或者称为"弹出、出栈"(pop)3.4 答:相同点:栈和队列都是特殊的线性表只在端点处进行插入删除操作不同点:栈只在一端(栈顶)进行插入删除操作;队列在一端(top)删除一端(rear)插入3.5 答:可能序列有14种:ABCD; ACBD; ACDB; ABDC; ADCB; BACD; BADC; BCAD; BCDA; BDCA; CBAD; CBDA; CDBA; DCBA3.6 答:不能得到435612最先出栈的是4则按321的方式出不可能得到1在2前的序列可以得到135426按如下方式进行push(1)pop()push(2)push(3)pop()push(4)push(5)pop()pop()pop()push(6)pop()3.7 答:stack3.8 非递归:int vonvert (int noint a[]) //将十进制数转换为2进制存放在a[] 并返回位数{int r;SeStack s*p;P=&s;Init_stack(p);while(no){push(pno%2);no/=10;}r=0;while(!empty_stack(p)){pop(pa+r);r++;}return r;}递归算法:void convert(int no){if(no/2>0){Convert(no/2);Printf("%d"no%2);}elseprintf("%d"no);}3.9 参考程序:void view(SeStack s){SeStack *p; //假设栈元素为字符型char c;p=&s;while(!empty_stack(p)){c=pop(p);printf("%c"c);}printf("\n");}3.10 答:char3.11 参考程序:void out(linkqueue q){int e;while(q.rear !=q.front ){dequeue(qe);print(e); //打印}}习题4参考答案4.1 选择题:(1). A (2). D (3). C (4). C (5). B (6). B (7). D (8). A (9). B (10). D 4.2 填空题:(1)串长相等且对应位置字符相等(2)不含任何元素的串(3)所含字符均是空格所含空格数(4) 10(5) "hello boy"(6) 13(7) 1066(8)模式匹配(9)串中所含不同字符的个数(10) 364.3 StrLength (s)=14StrLength (t)=4SubStr( s87)=" STUDENT"SubStr(t21)="O"StrIndex(s"A")=3StrIndex (st)=0StrRep(s"STUDENT"q)=" I AM A WORKER"4.4 StrRep(s"Y""+");StrRep(s"+*""*Y");4.5 空串:不含任何字符;空格串:所含字符都是空格串变量和串常量:串常量在程序的执行过程中只能引用不能改变;串变量的值在程序执行过程中是可以改变和重新赋值的主串与子串:子串是主串的一个子集串变量的名字与串变量的值:串变量的名字表示串值的标识符4.6int EQUAl(ST){char *p*q;p=&S;q=&T;while(*p&&*q){if(*p!=*q)return *p-*q;p++;q++;}return *p-*q;}4.7(1)6*8*6=288(2)1000+47*6=1282(3)1000+(8+4)*8=1096(4)1000+(6*7+4)*8=13684.8习题5参考答案5.1 选择(1)C(2)B(3)C(4)B(5)C(6)D(7)C(8)C(9)B(10)C (11)B(12)C(13)C(14)C(15)C(16)B5.2 填空(1)1(2)1036;1040(3)2i(4) 1 ; n ; n-1 ; 2(5)2k-1;2k-1(6)ACDBGJKIHFE(7)p!=NULL(8)Huffman树(9)其第一个孩子; 下一个兄弟(10)先序遍历;中序遍历5.3叶子结点:C、F、G、L、I、M、K;非终端结点:A、B、D、E、J;各结点的度:结点: A B C D E F G L I J K M度: 4 3 0 1 2 0 0 0 0 1 0 0树深:4无序树形态如下:二叉树形态如下:5.5二叉链表如下:三叉链表如下:5.6先序遍历序列:ABDEHICFJG中序遍历序列:DBHEIAFJCG后序遍历序列:DHIEBJFGCA5.7(1) 先序序列和中序序列相同:空树或缺左子树的单支树;(2) 后序序列和中序序列相同:空树或缺右子树的单支树;(3) 先序序列和后序序列相同:空树或只有根结点的二叉树5.8这棵二叉树为:先根遍历序列:ABFGLCDIEJMK后根遍历序列:FGLBCIDMJKEA层次遍历序列:ABCDEFGLIJKM5.10证明:设树中结点总数为n叶子结点数为n0则n=n0 + n1 + ...... + nm (1)再设树中分支数目为B则B=n1 + 2n2 + 3n3 + ...... + m nm (2)因为除根结点外每个结点均对应一个进入它的分支所以有n= B + 1 (3)将(1)和(2)代入(3)得n0 + n1 + ...... + nm = n1 + 2n2 + 3n3 + ...... + m nm + 1 从而可得叶子结点数为:n0 = n2 + 2n3 + ...... + (m-1)nm + 15.11由5.10结论得n0 = (k-1)nk + 1又由 n=n0 + nk得nk= n-n0代入上式得n0 = (k-1)(n-n0)+ 1叶子结点数为:n0 = n (k-1) / k5.12int NodeCount(BiTree T){ //计算结点总数if(T)if (T-> lchild==NULL )&&( T --> rchild==NULL )return 1;elsereturn NodeCount(T-> lchild ) +Node ( T --> rchild )+1; elsereturn 0;}void ExchangeLR(Bitree bt){/* 将bt所指二叉树中所有结点的左、右子树相互交换 */ if (bt && (bt->lchild || bt->rchild)) {bt->lchild<->bt->rchild;Exchange-lr(bt->lchild);Exchange-lr(bt->rchild);}}/* ExchangeLR */5.14int IsFullBitree(Bitree T){/* 是则返回1否则返回0*/Init_Queue(Q); /* 初始化队列*/flag=0;In_Queue(QT); /* 根指针入队列按层次遍历*/while(!Empty_Queue (Q)){Out_Queue(Qp);if(!p) flag=1; /* 若本次出队列的是空指针时则修改flag值为1若以后出队列的指针存在非空则可断定不是完全二叉树 */else if (flag) return 0; /*断定不是完全二叉树 */ else{In_Queue(Qp->lchild);In_Queue(Qp->rchild); /* 不管孩子是否为空都入队列*/}}/* while */return 1; /* 只有从某个孩子指针开始之后所有孩子指针都为空才可断定为完全二叉树*/}/* IsFullBitree */转换的二叉树为:5.16对应的森林分别为:5.17typedef char elemtype;typedef struct{ elemtype data;int parent;} NodeType;(1) 求树中结点双亲的算法:int Parent(NodeType t[ ]elemtype x){/* x不存在时返回-2否则返回x双亲的下标(根的双亲为-1 */for(i=0;i<MAXNODE;i++)if(x==t[i].data) return t[i].parent; return -2;}/*Parent*/(2) 求树中结点孩子的算法:void Children(NodeType t[ ]elemtype x){for(i=0;i<MAXNODE;i++){if(x==t[i].data)break;/*找到x退出循环*/}/*for*/if(i>=MAXNODE) printf("x不存在\n"); else {flag=0;for(j=0;j<MAXNODE;j++)if(i==t[j].parent){ printf("x的孩子:%c\n"t[j].data);flag=1;}if(flag==0) printf("x无孩子\n");}/*Children*/5.18typedef char elemtype;typedef struct ChildNode{ int childcode;struct ChildNode *nextchild;}typedef struct{ elemtype data;struct ChildNode *firstchild;} NodeType;(1) 求树中结点双亲的算法:int ParentCL(NodeType t[ ]elemtype x){/* x不存在时返回-2否则返回x双亲的下标 */for(i=0;i<MAXNODE;i++)if(x==t[i].data) {loc=i;/*记下x的下标*/break;}if(i>=MAXNODE) return -2; /* x不存在 *//*搜索x的双亲*/for(i=0;i<MAXNODE;i++)for(p=t[i].firstchild;p!=NULL;p=p->nextchild) if(loc==p->childcode)return i; /*返回x结点的双亲下标*/}/* ParentL */(2) 求树中结点孩子的算法:void ChildrenCL(NodeType t[ ]elemtype x){for(i=0;i<MAXNODE;i++)if(x==t[i].data) /*依次打印x的孩子*/{flag=0; /* x存在 */for(p=t[i].firstchild;p;p=p->nextchild){ printf("x的孩子:%c\n"t[p-> childcode].data);flag=1;}if(flag==0) printf("x无孩子\n");return;}/*if*/printf("x不存在\n");return;}/* ChildrenL */5.19typedef char elemtype;typedef struct TreeNode{ elemtype data;struct TreeNode *firstchild; struct TreeNode *nextsibling; } NodeType;void ChildrenCSL(NodeType *telemtype x){ /* 层次遍历方法 */Init_Queue(Q); /* 初始化队列 */In_Queue(Qt);count=0;while(!Empty_Queue (Q)){Out_Queue(Qp);if(p->data==x){ /*输出x的孩子*/p=p->firstchild;if(!p) printf("无孩子\n");else{ printf("x的第%i个孩子:%c\n"++countp->data);/*输出第一个孩子*/p=p->nextsibling; /*沿右分支*/while(p){printf("x的第%i个孩子:%c\n"++countp->data);p=p-> nextsibling;}}return;}if(p-> firstchild) In_Queue(Qp-> firstchild);if(p-> nextsibling) In_Queue(Qp-> nextsibling);}}/* ChildrenCSL */5.20(1) 哈夫曼树为:(2) 在上述哈夫曼树的每个左分支上标以1右分支上标以0并设这7个字母分别为A、B、C、D、E、F和H如下图所示:则它们的哈夫曼树为分别为:A:1100B:1101C:10D:011E:00F:010H:111习题6参考答案6.1 选择题(1)C (2)A (3)B(4)C(5)B______条边(6)B(7)A(8)A(9)B(10)A(11)A(12)A(13)B(14)A(15)B(16)A(17)C 6.2 填空(1) 4(2) 1对多 ; 多对多(3) n-1 ; n(4) 0_(5)有向图(6) 1(7)一半(8)一半(9)___第i个链表中边表结点数___(10)___第i个链表中边表结点数___(11)深度优先遍历;广度优先遍历(12)O(n2)(13)___无回路6.3(1)邻接矩阵:(2)邻接链表:(3)每个顶点的度:顶点度V1 3V2 3V3 2V4 3V5 36.4(1)邻接链表:(2)逆邻接链表:(3)顶点入度出度V1 3 0V2 2 2V3 1 2V4 1 3V5 2 1V6 2 36.5(1)深度优先查找遍历序列:V1 V2 V3 V4 V5; V1 V3 V5 V4 V2; V1 V4 V3 V5 V2 (1)广度优先查找遍历序列:V1 V2 V3 V4 V5; V1 V3 V2 V4 V5; V1 V4 V3 V2 V56.6有两个连通分量:6.7顶点(1)(2)(3)(4)(5)Low Close Cost VexLow CloseCost VexLow CloseCost VexLow CloseCost VexLow CloseCost VexV10 00 00 00 00 0V21 00 00 00 00 0V31 01 00 00 00 0V43 02 12 10 10 1V5∞ 05 13 22 30 3U{v1} {v1v2} {v1v2v3} {v1 v2 v3 v4} {v1 v2 v3 v4 v5} T {} { (v1 v2) } {(v1 v2) (v1 v3) } {(v1 v2) (v1 v3) (v2 v4) } {(v1 v2) (v1v3)(v2v4)(v4v5) }最小生成树的示意图如下:6.8拓扑排序结果: V3--> V1 --> V4 --> V5 --> V2 --> V66.9(1)建立无向图邻接矩阵算法:提示:参见算法6.1因为无向图的邻接矩阵是对称的所以有for (k=0; k<G ->e; k++) /*输入e条边建立无向图邻接矩阵*/{ scanf("\n%d%d"&i&j);G ->edges[i][j]= G ->edges[j][i]=1;}(2)建立无向网邻接矩阵算法:提示:参见算法6.1初始化邻接矩阵:#define INFINITY 32768 /* 表示极大值*/for(i=0;i<G->n;i++)for(j=0;j<G->n;j++) G->edges[i][j]= INFINITY;输入边的信息:不仅要输入边邻接的两个顶点序号还要输入边上的权值for (k=0; k<G ->e; k++) /*输入e条边建立无向网邻接矩阵*/{ scanf("\n%d%d%d"&i&j&cost); /*设权值为int型*/G ->edges[i][j]= G ->edges[j][i]=cost;/*对称矩阵*/}(3)建立有向图邻接矩阵算法:提示:参见算法6.16.10(1)建立无向图邻接链表算法:typedef VertexType char;int Create_NgAdjList(ALGraph *G){ /* 输入无向图的顶点数、边数、顶点信息和边的信息建立邻接表 */scanf("%d"&n); if(n<0) return -1; /* 顶点数不能为负 */G->n=n;scanf("%d"&e); if(e<0) return =1; /*边数不能为负 */G->e=e;for(m=0;m< G->n ;m++)G-> adjlist [m].firstedge=NULL; /*置每个单链表为空表*/for(m=0;m< G->n;m++)G->adjlist[m].vertex=getchar(); /*输入各顶点的符号*/for(m=1;m<= G->e; m++){scanf("\n%d%d"&i&j); /* 输入一对邻接顶点序号*/if((i<0 || j<0) return -1;p=(EdgeNode*)malloc(sizeof(EdgeNode));/*在第i+1个链表中插入一个边表结点*/ p->adjvex=j;p->next= G-> adjlist [i].firstedge;G-> adjlist [i].firstedge=p;p=(EdgeNode*)malloc(sizeof(EdgeNode));/*在第j+1个链表中插入一个边表结点*/ p->adjvex=i;p->next= G-> adjlist [j].firstedge;G-> adjlist [j].firstedge=p;} /* for*/return 0; /*成功*/}//Create_NgAdjList(2)建立有向图逆邻接链表算法:typedef VertexType char;int Create_AdjList(ALGraph *G){ /* 输入有向图的顶点数、边数、顶点信息和边的信息建立逆邻接链表 */scanf("%d"&n); if(n<0) return -1; /* 顶点数不能为负 */G->n=n;scanf("%d"&e); if(e<0) return =1; /*弧数不能为负 */G->e=e;for(m=0;m< G->n; m++)G-> adjlist [m].firstedge=NULL; /*置每个单链表为空表*/for(m=0;m< G->n;m++)G->adjlist[m].vertex=getchar(); /*输入各顶点的符号*/for(m=1;m<= G->e ; m++){scanf("\n%d%d"&t&h); /* 输入弧尾和弧头序号*/if((t<0 || h<0) return -1;p=(EdgeNode*)malloc(sizeof(EdgeNode));/*在第h+1个链表中插入一个边表结点*/ p->adjvex=t;p->next= G-> adjlist [h].firstedge;G-> adjlist [h].firstedge=p;} /* for*/return 0; /*成功*/}//Create_AdjList6.11void Create_AdjM(ALGraph *G1MGraph *G2){ /*通过无向图的邻接链表G1生成无向图的邻接矩阵G2*/G2->n=G1->n; G2->e=G1->e;for(i=0;i<G2->n;i++) /* 置G2每个元素为0 */for(j=0;j<G2->n;j++) G2->edges[i][j]= 0;for(m=0;m< G1->n;m++)G2->vexs[m]=G1->adjlist[m].vertex; /*复制顶点信息*/num=(G1->n/2==0?G1->n/2:G1->n/2+1); /*只要搜索前n/2个单链表即可*/for(m=0;m< num;m++){ p=G1->adjlist[m].firstedge;while(p){ /* 无向图的存储具有对称性*/G2->edges[m][ p->adjvex ]= G2->edges[p->adjvex ] [m] =1;p==p->next;}}/* for */}/*Create_AdjM */void Create_AdjL(ALGraph *G1MGraph *G2){ /*通过无向图的邻接矩阵G1生成无向图的邻接链表G2*/G2->n=G1->n; G2->e=G1->e;for(i=0;i<G1->n;i++) /* 建立每个单链表 */{ G2->vexs[i]=G1->adjlist[i].vertex;G2->adjlist[i].firstedge=NULL;for(j=i; j<G1->n; j++) /*对称矩阵只要搜索主对角以上的元素即可*/{ if(G1->edges[i][j]== 1){ p=(EdgeNode*)malloc(sizeof(EdgeNode));/*在第i+1个链表中插入一个边表结点*/p->adjvex=j;p->next= G-> adjlist [i].firstedge;G-> adjlist [i].firstedge=p;p=(EdgeNode*)malloc(sizeof(EdgeNode));/*在第j+1个链表中插入一个边表结点*/p->adjvex=i;p->next= G-> adjlist [j].firstedge;G-> adjlist [j].firstedge=p;}/*if*/}/* for*/}/* for*/}/* Create_AdjL */6.13(1) 邻接矩阵中1的个数的一半;(2) 若位于[i-1j-1]或[j-1i-1]位置的元素值等于1则有边相连否则没有(3) 顶点i的度等于第i-1行中或第i-1列中1的个数6.14(1) 邻接链表中边表结点的个数的一半;(2) 若第i-1(或j-1)个单链表中存在adjvex域值等于j-1(或i-1)的边表结点则有边相连否则没有(3) 顶点i的度等于第i-1个单链表中边表结点的个数提示:参见算法6.2 和6.3习题 7参考答案7.1 选择题(1)C (2)C (3) C (4)B (5) A (6)A (7) D (8)B (9)D (10) B(11)B (12)A (13)C (14)C (15)A (16)D (17)C (18)BC (19)B (20)A7.2 填空题(1) O(n)O(log2n)(2) 12485log2(n+1)-1(3)小于大于(4)增序序列(5)m-1(6) 70; 342055(7) n/m(8)开放地址法链地址法(9)产生冲突的可能性就越大产生冲突的可能性就越小(10)关键码直接(11)②①⑦(12) 1616821(13)直接定址法数字分析法平方取中法折叠法除留余数法随机数法(14)开放地址法再哈希法链地址法建立一个公共溢出区(15)装满程度(16)索引快(17)哈希函数装填因子(18)一个结点(19)中序(20)等于7.3 一棵二叉排序树(又称二叉查找树)或者是一棵空树或者是一棵同时满足下列条件的二叉树:(1)若它的左子树不空则左子树上所有结点的键值均小于它根结点键值(2)若它的右子树不空则右子树上所有结点的键值均大于它根结点键值(3)它的左、右子树也分别为二叉排序树7.4 对地址单元d=H(K)如发生冲突以d为中心在左右两边交替进行探测按照二次探测法键值K的散列地址序列为:do=H(K)d1=(d0+12)mod md2=(d0-12)mod md3=(d0+22)mod md4=(d0-12)mod m......7.5 衡量算法的标准有很多时间复杂度只是其中之一尽管有些算法时间性能很好但是其他方面可能就存在着不足比如散列查找的时间性能很优越但是需要关注如何合理地构造散列函数问题而且总存在着冲突等现象为了解决冲突还得采用其他方法二分查找也是有代价的因为事先必须对整个查找区间进行排序而排序也是费时的所以常应用于频繁查找的场合对于顺序查找尽管效率不高但却比较简单常用于查找范围较小或偶而进行查找的情况7.6此法要求设立多个散列函数Hii=1...k当给定值K与闭散列表中的某个键值是相对于某个散列函数Hi的同义词因而发生冲突时继续计算该给定值K在下一个散列函数Hi+1下的散列地址直到不再产生冲突为止7.7散列表由两个一维数组组成一个称为基本表另一个称为溢出表插入首先在基本表上进行;假如发生冲突则将同义词存人溢出表7.8 结点个数为n时高度最小的树的高度为1有两层它有n-1个叶结点1个分支结点;高度最大的树的高度为n-l有n层它有1个叶结点n-1个分支结点7.9 设顺序查找以h为表头指针的有序链表若查找成功则返回结点指针p查找失败则返回null值pointer sqesrearch(pointer hint xpointerp){p=null;while(h)if(x>h->key)h=h->link;else{if(x==h->key)p=h;return(p);}}虽然链表中的结点是按从小到大的顺序排列的但是其存储结构为单链表查找结点时只能从头指针开始逐步进行搜索故不能用折半(二分)查找7.10 分析:对二叉排序树来讲其中根遍历序列为一个递增有序序列因此对给定的二叉树进行中根遍历如果始终能保证前一个值比后一个值小则说明该二叉树是二叉排序树int bsbtr (bitreptr T) /*predt记录当前结点前趋值初值为-∞*/{ if (T==NULL) return(1);else{b1=bsbtr(T->lchild);/*判断左子树*/if (!b1|| (predt>=T->data)) return(0);*当前结点和前趋比较*/ predt=T->data;/*修改当前结点的前趋值*/return(bsbtr(T->rchild));/*判断右子树并返回最终结果*/}}7.11 (1)使用线性探查再散列法来构造散列表如表下所示散列表───────────────────────────────地址 0 1 2 3 4 5 6 7 8 9 10───────────────────────────────数据 33 1 13 12 34 38 27 22───────────────────────────────(2)使用链地址法来构造散列表如下图(3)装填因子a=8/11使用线性探查再散列法查找成功所需的平均查找次数为Snl=0.5(1+1/(1-a))=0.5*(1+1/(1-8/11))=7/3使用线性探查再散列法查找不成功所需的平均查找次数为:Unl=0.5(1+1/(1-a)2)=0.5*(1+1/(1-8/11)2)=65/9 使用链地址法查找成功所需的平均查找次数为:Snc=l+a/2=1+8/22=15/11使用链地址法查找不成功所需的平均查找次数为: 'Unl=a+e-a=8/1l+e-8/117.12 分析:在等查区间的上、下界处设两个指针由此计算出中间元素的序号当中间元素大于给定值X时接下来到其低端区间去查找;当中间元素小于给定值X时接下来到其高端区间去查找;当中间元素等于给定值X时表示查找成功输出其序号Int binlist(sqtable Aint stkeytype X) /*t、s分别为查找区间的上、下界*/{ if(s<t) return(0);/*查找失败*/else{ mid=(S+t)/2;switCh(mid){case x<A.item[midJ.key: return(binlist(Asmid-lX));/*在低端区间上递归*/case x==A.item[mid].key: return(mid);/+查找成功*/ case x>A.item[mid].key: return(amid+ltX));/*在高端区间上递归*/}}}int sqsearch0 (sqtable Akeytype X) /*数组有元素n个*/{ i=l;A.item[n+1].key=X;/t设置哨兵*/while (A.item[n+1].key!=X) i++;return (i% (n/1));/*找不到返回0找到返回其下标*/}查找成功平均查找长度为:(1+2+3+...+n)/n:(1+n)/2查找不成功平均查找长度为:n+17.14散列函数:H(key)=100+(key个位数+key十位数) mod l0;形成的散列表:100 101 102 103 104 105 106 107 108 10998 75 63 46 49 79 61 53 17查找成功时的平均长度为:(1+2+1+1+5+1+1+5+5+3)/10=2.5次由于长度为10的哈希表已满因此在插人第11个记录时所需作的比较次数的期望值为10查找不成功时的平均长度为10习题 8参考答案8.1 选择题(1)B (2)A (3)D (4)C (5)B (6)A (7)B (8)C (9)A (10)C(11)D (12)C (13) C (14)D (15)C (16)B (17) D (18)C (19)B (20)D8.2填空题(1)快速归并(2) O(log2n)O(nlog2n)(3)归并(4)向上根结点(5) 1918162030(6)(7)4913275076386597(8)88(9)插入选择(每次选择最大的)(10)快速归并(11)O(1)O(nlog2n)(12)稳定(13)3(14)(15205040)(15)O(log2n)(16)O(n2)(17)冒泡排序快速排序(18)完全二叉树n/2(19)稳定不稳定(20)24(2015)8.3. 假定给定含有n个记录的文件(r1f2...rn)其相应的关键字为(k1k2...kn)则排序就是确定文件的一个序列rrr2...rn使得k1'≤k2'≤...≤kn'从而使得文件中n个记录按其对应关键字有序排列如果整个排序过程在内存中进行则排序叫内部排序假设在待排序的文件中存在两个或两个以上的记录具有相同的关键字若采用某种排序方法后使得这些具有相同关键字的记录在排序前后相对次序依然保持不变则认为该排序方法是稳定的否则就认为排序方法是不稳定的8.4.稳定的有:直接插入排序、二分法插入排序、起泡排序、归并排序和直接选择排序8.5.初始记录序列按关键字有序或基本有序时比较次数为最多8.6.设5个元素分别用abcde表示取a与b、c与d进行比较若a>bc>d(也可能是a<bc<d此时情况类似)显然此时进行了两次比较取b与d再比较若b>d则a>b>d若b<d则有c>d>b此时已进行了3次比较要使排序比较最多7次可把另外两个元素按折半检索排序插入到上面所得的有序序列中此时共需要4次比较从而可得算法共只需7次比较8.7.题目中所说的几种排序方法中其排序速度都很快但快速排序、归并排序、基数排序和Shell排序都是在排序结束后才能确定数据元素的全部序列而排序过程中无法知道部分连续位置上的最终元素而堆排序则是每次输出一个堆顶元素(即最大或最少值的元素)然后对堆进行再调整保证堆顶元素总是当前剩下元素的最大或最小的从而可知欲在一个大量数据的文件中如含有15000个元素的记录文件中选取前10个最大的元素可采用堆排序进行8.8.二分法排序8.9.void insertsort(seqlist r)  ;{ //对顺序表中记录R[0一N-1)按递增序进行插入排序&NBSP;int ij;  ;for(i=n-2;i>=0; i--) //在有序区中依次插入r[n-2]..r[0]  ;if(r[i].key>r[i+1].key) //若不是这样则r[i]原位不动 ;{  ;r[n]=r[i];j=i+l;//r[n]是哨兵 ;do{ //从左向右在有序区中查找插入位置 ;r[j-1]= r[j];//将关键字小于r[i].key的记录向右移 ;j++;  ;}whle(r[j].key r[j-1]=r[n];//将引i)插入到正确位置上 ;}//endif ;}//insertsort.  ;8.10.建立初始堆:[937 694 863 265 438 751 742129075 3011]&NBSP;&NBSP;第一次排序重建堆:[863 694 751 765 438 301 742 129 075]9378.11.在排序过程中每次比较会有两种情况出现若整个排序过程至少需作t次比较则显然会有2^t个情况由于n个结点总共有n!种不同的排列因而必须有n!种不同的比较路径于是: 2t≥n!即t≥log2n!因为log2nl=nlog2n-n/ln2+log2n/2+O(1)故有log2n!≈nlog2n从而t≧nlog2n得证8.12.依据堆定义可知:序列(1)、(2)、(4)是堆(3)不是堆从而可对其调整使之为如下的大根堆(1009580604095821020)8.13.第一趟:[265 301] [129 751] [863 937] [694 742] [076 438]&NBSP; &NBSP;第二趟:[129 265 301 751] [694 742 863 937] [076 438]&NBSP;&NBSP;第三趟:[129 265 301 694 742 751 863 937] [076 438]&NBSP;&NBSP;第四趟:[076 129 265 301 438 694 742 751 863 937]&NBSP;8.14.(1)归并排序:(1829) (2547) (1258) (1051)(18252947) (10125158)(1012182529475158)(2)快速排序:(1018251229585147)(1018251229475158)(1012182529475158)(3)堆排序:初始堆(大顶堆):(58 47512918122510)第一次调整:(51 472529181210)(58)第二次调整:(47 2925101812)(5158)第三次调整:(29 18251012)(475158)第四次调整:(25 181210)(29475158)第五次调整:(18 1012)(2529475158)第六次调整:(12 10) (182529475158)第七次调整:(10 12182529475158)8.15.(1)直接插入排序序号 1 2 3 4 5 6 7 8 9 10 11 12 关键字 83 40 63 13 84 35 96 57 39 79 61 151=2 40 83 [63 13 84 35 96 57 39 79 61 15] 1=3 40 63 83 [13 84 35 96 57 39 79 61 15] 1=4 13 40 63 83 [84 3 5 96 57 39 79 61 15] I=5 13 40 63 83 84 [35 96 57 39 79 61 15] I=6 13 35 40 63 83 84 [96 57 39 79 61 15] 1=7 13 35 40 63 83 84 96 [57 39 79 61 15] 1=8 13 35 40 57 63 83 84 96 [ 39 79 61 15] 1=9 13 35 39 40 57 63 83 84 96 [79 61 15] I=10 13 35 39 40 57 63 79 83 84 96 [61 15] I=11 13 35 39 40 57 61 63 79 83 84 96 [15] 1=12 13 15 35 39 40 57 61 63 79 83 84 96 (2)直接选择排序序号 1 2 3 4 5 6 7 8 9 10 11 12 关键字 83 40 63 13 84 35 96 57 39 79 61 15i=1 13 [ 40 63 83 84 35 96 57 39 79 61 15] i=2 13 15 [63 83 84 35 96 57 39 79 61 40] i=3 13 15 35 [83 84 63 96 57 39 79 61 40] i=4 13 15 35 39 [84 63 96 57 83 79 61 40] i=5 13 15 35 39 40 [63 96 57 83 79 61 84] i=6 13 15 35 39 40 57 [96 63 83 79 61 84] i=7 13 15 35 39 40 57 61 [63 83 79 96 84] i=8 13 15 35 39 40 57 61 63 [83 79 96 84] i=9 13 15 35 39 40 57 61 63 79 183 96 84] i=10 13 15 35 39 40 57 61 63 79 83 [96 84] i=11 13 15 35 39 40 57 61 63 79 83 84 [96] (3)快速排序关键字 83 40 63 13 84 35 96 57 39 79 61 15 第一趟排序后 [15 40 63 13 61 35 79 57 39] 83 [96 84] 第二趟排序后 [13] 15 [63 40 61 35 79 57 39] 83 84 [96] 第三趟排序后 13 15 [39 40 61 35 57] 63 [79] 83 84 96 第四趟排序后 13 15 [35] 39 [61 40 57] 63 79 83 84 96第五趟排序后 13 15 35 39 [57 40] 61 63 79 83 84 96 第六趟排序后 13 15 35 39 40 [57] 61 63 79 83 84 96 第七趟排序后 13 15 35 39 40 57 61 63 79 83 84 96 (4)堆排序关键字 83 40 63 13 84 35 96 57 39 79 61 15排序成功的序列 96 84 83 79 63 61 57 40 39 35 15 13(5)归并排序关键字 83 40 63 13 84 35 96 57 39 79 61 15 第一趟排序后 [40 83] [13 63] [3584] [57 96] [39 79] [15 61]第二趟排序后 [13 40 63 83] [35 57 84 96] [15 39 61 79] 第三趟排序后 [13 35 40 57 63 83 84 96]] [15 39 61 79] 第四趟排序后 13 15 35 39 40 57 61 63 79 83 84 96。
综合教程第三册课后翻译习题参考答案
综合教程第三册课后翻译习题参考答案综合教程第三册课后翻译习题参考答案Unit 1 Fresh Start1. 听到他屡遭失败的消息,我感到很难过。
(distress)It distressed me a great deal to hear the news that he had suffered repeated failures.2. 他虽然失去了老板的欢心,但仍然装出一副高兴的样子。
(assume)He assumed an air of cheerfulness, even though he lost favor with his boss.3. 格列佛(Gulliver)经历了冒险奇遇,见到了一群光怪陆离的人物。
(assortment)Gulliver met with extraordinary adventures and saw a strange assortment of people.4. 如果你再犯同样的错误,他会对你非常生气的。
(furious)He will be furious with you if you repeat the same mistake.5. 我们都被他坦率的观点、幽默的语言和亲切的态度所深深吸引。
(draw)We were all greatly drawn by his frank views, humorous words and genial manner.6. 等到雷鸣般的掌声平息下来,那位诺贝尔奖获得者开始演讲。
(die dawn)After the thunderous applause died down, the Nobel Prize winner began his speech.Unit 2 Tyranny of the Urgent1. 他时常想起孩提时代的往事。
(haunt)Memories of his childhood haunted him.2. 需要更多的志愿者来完成这项辛苦的工作。
第3章 三相交流电路 习题参考答案
第3章 三相交流电路 习题参考答案3-1一台三相交流电动机,定子绕组星形连接于U L =380V 的对称三相电源上,其线电流I L =2.2A ,cos φ=0.8,试求每相绕组的阻抗Z 。
解:先由题意画出电路图(如下图),以帮助我们思考。
因三相交流电动机是对称负载,因此可选一相进行计算。
三相负载作星接时p l U U 3=由于U l =380(V),I L =2.2(A)则 U P =220(V), I p =2.2(A),1002.2220===pp U U Z (Ω) 由阻抗三角形得808.0100=⨯==ϕCOS Z R (Ω) 60801002222=-=-=R Z X L (Ω)所以 Z=80+j60(Ω)3-2已知对称三相交流电路,每相负载的电阻为R=8Ω,感抗为X L =6Ω。
(1)设电源电压为U L =380V ,求负载星形连接时的相电流、相电压和线电流,并画相量图; (2)设电源电压为U L =220V ,求负载三角形连接时的相电流、相电压和线电流,并画相量图; (3)设电源电压为U L =380V ,求负载三角形连接时的相电流、相电压和线电流,并画相量图。
解:由题意:(1)负载作星接时p l U U 3=因380=l U V ,则2203380====c b a U U U (V )设︒=0/220a U (V )因相电流即线电流,其大小为: ︒-=+︒=9.36/22680/220.j I A (A)9.156/22.-=B I (A) ︒=1.83/22.C I (A) 此时的相量图略。
(2)负载作三角形连接时p l U U =因220=l U V ,则220===ca bc ab U U U (V )设︒=0/220abU 则相电流 ︒-=+︒==9.36/22680/220..j Z U I ab ab (A ) ︒-=9.156/22.bcI(A )︒=1.83/22.ca I (A )线电流 ︒-=︒-=9.66/3830/3.ab AI I (A ) ︒=︒-=︒-=1.173/389.186/3830/3bcB I I (A ) ︒=︒-=1.53/3830/3.ca CI I (A ) 此时的相量图略。
道路建筑材料习题集及参考答案(三)
道路建筑材料》习题集及参考答案(三)第四章沥青与沥青混合料一、单项选择题1、现代高级沥青路面所用沥青的胶体结构应属于2、可在冷态下施工的沥青。
A 、石油沥青B 、煤沥青C 、乳化沥青3、沥青混合料中最理想的结构类型结构。
A 、密实骨架B 、密实悬浮C 、骨架空隙4、在沥青混合料中,应优先选用°A 、酸性石料B 、碱性石料C 、中性石料D 、以上都不是5、粘稠石油沥青三大性能指标是针入度、延度和A 、软化点B 、燃点C 、脆点D 、闪点6、根据马歇尔试验结果,沥青混合料中稳定度与沥青含量关系为 A 、随沥青含量增加而增加,达到峰值后随沥青含量增加而降低°B 、随沥青含量增加而增加°C 、随沥青含量增加而减少。
D 、沥青含量的增减对稳定度影响不大。
7、根据马歇尔试验结果,沥青混合料中流值与沥青含量关系为°A 、随沥青含量增加而增加,达到峰值后随沥青含量增加而降低°B 、随沥青含量增加而增加°C 、随沥青含量增加而减少。
D 、沥青含量的增减对流值影响不大。
8、根据马歇尔试验结果,沥青混合料中空隙率与沥青含量关系为°A 、随沥青含量增加而增加,达到峰值后随沥青含量增加而降低°B 、随沥青含量增加而增加°C 、随沥青含量增加而减少。
D 、沥青含量的增减对空隙率影响不大。
9、A 级道路石油沥青适用于°A 、各个等级公路的所有层次。
B 、适用于高速、一级公路下面层及以下层次C 、三级及三级以下公路各个层次D 、三级以上公路各个层次10、SMA 表示°A 、热拌沥青混合料B 、常温沥青混合料C 、沥青表面处理D 、沥青玛蹄脂碎石混合料11、工程上常用确定沥青胶体结构。
A 、针入度指数法B 、马歇尔稳定度试验法A 、溶胶型B 、凝胶型C 、溶一凝胶型D 、以上均不属于 D 、粘稠沥青 D 、以上都不是C 、环与球法D 、溶解一吸附法12、用标准粘读计测液体沥青粘度时,在相同温度和相同孔径条件下,流出时间越长,表示沥青的粘度。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
3-习题参考答案
高分子第三章习题参考答案
思考题
2、下列烯类单体适于何种机理聚合:自由基聚合,阳离子聚合或阴离子聚合?并说明理由。
CH2=CHCl,CH2=CCl2,CH2=CHCN,CH2=C(CN)2,CH2=CHCH3,CH2=C(CH3)2,CH2=CHC5H6,CF2=CF2,CH2=C(CN)COOCH3,
CH2=C(CH3)-CH=CH2
参考答案:
CH2=CHCl:适于自由基聚合,Cl原子是吸电子基团,也有共轭效应,但较弱。
CH2=CCl2:适于自由基聚合,Cl原子是吸电子基团。
CH2=CHCN:适于自由基聚合和阴离子聚合,CN是强吸电子基团,并有共轭效应。
CH2=C(CN)2:适于自由基聚合和阴离子聚合,CN是强吸电子基团。
CH2=CHCH3:适于阳离子聚合,CH3是供电子基团,CH3是与双键有超共额轭效应。
CH2=C(CH3)2:适于阳离子聚合,CH3是供电子基团,CH3是与双键有超共轭效应。
CH2=CHC5H6和CH2=C(CH3)-CH=CH2:均可进行自由基聚合、阳离子聚合和阴离子聚合。
因为共轭体系π电子的容易极化和流动。
CF2=CF2:适于自由基聚合。
F原子体积小,结构对称。
CH2=C(CN)COOCH:适合阴离子和自由基聚合,两个吸电子基,并兼有共轭效应。
3、判别下列单体能否进行自由基聚合,并说明理由。
CH2=C(C5H6)2,ClCH=CHCl,CH2=C(CH3)C2H5,
CH3CH=CHCH3,CH2=C(CH3)COOCH3,CH2=CHOCOCH3,
CH3 CH=CHCOCH3
参考答案:
CH2=C(C5H6)2
(4)链终止反应;
偶合终止:
歧化终止:
8、过氧化二苯甲酰和偶氮二异丁腈是常用的引发剂,有几种方法可以促使其分解成自由基?写出分解反应式。
这两种引发剂的诱导分解和笼蔽效应有什么特点,对应法效率的影响如何?
参考答案:
过氧化二苯甲酰和偶氮二异丁腈可以热引发,也可以光引发。
过氧化二苯甲酰分解反应式:
偶氮二异丁腈的分解反应式:
过氧化二苯甲酰诱导分解较大,偶氮二异丁腈诱导分解较少;(见75页)9、大致说明下列引发剂的使用温度范围,并写出分解反应式:
异丙苯过氧化氢、过氧化十二酰、过氧化二碳酸二环己酯、过硫酸钾-亚铁盐、过氧化二苯甲酰-二甲基苯胺。
参考答案:
体系名称分解温度(℃)
异丙苯过氧化氢125~139
过氧化十二酰50~70
过氧化二碳酸二环己酯50~60
过硫酸钾-亚铁盐室温~80
过氧化二苯甲酰-二甲基苯胺室温~60
异丙苯过氧化氢分解反应式:
过氧化十二酰分解反应式:
过氧化二碳酸二乙基己酯分解反应式:
过硫酸钾-亚铁盐分解反应式:
S2O82-+Fe2+→ SO42-+SO·4-+Fe3+
过氧化二苯甲酰-二甲基苯胺分解反应式:
13、推导自由基聚合动力学方程时,作了哪些基本假设?聚合速率与引发剂浓度平方根成正比,是哪一机理造成的。
这一结论的局限性怎样?
参考答案:
三个假设:(1)等活性理论假设,即链自由基的活性与链长基本无关;
(2)稳态状态假设,即引发速率和终止速率相等;
(3)用于引发的单体远少于增长消耗的单体,即R i<<R p。
聚合速率与引发剂浓度平方根成正比,是由双基终止机理造成的。
这一结论对于凝胶效应,尤其是沉淀聚合,链自由基活性末端手到包埋,难以双基终止;或有单基和双基终止并存,对引发剂浓度级数介于0.5~1.0之间。
17、动力学链长的定义是什么?与平均聚合度的关系?链转移反应对对动力学链长和聚合度有何影响?试举2~3例说明利用链转移反应控制聚合度的工业应用,试用链转移常数数值来帮助说明。
参考答案:
将每个活性种从引发阶段到终止阶段所消耗的单体数定义为动力学链长。
对于无链转移的聚合反应,双基终止时,平均聚合度是动力学链长的两倍;歧化终止时,平均聚合度就是动力学链长。
有链转移反应存在时:向单体、向溶剂、向引发剂向链转移发生链转移都使聚合物的动力学链长和平均聚合度下降。
例如:聚氯乙烯分子量主要决定于向单体转移,由聚合温度来控制,温度升高链转移常数增加,分子量下降;丁苯橡胶的分子量有十二硫醇的用量来调节。
补充题:
1、什么叫链转移反应?有几种形式?对聚合速率和分子量有何影响?什么叫链转移常数?与链转移速率常数的关系?
参考答案:
在自由基聚合过程中,链自由基有可能从单体、溶剂、引发剂等低分子或大分子上夺取一个原子而终止,并使这些失去原子的分子成为自由基,继续新的链的增长,使聚合反应继续进行下去。
这一反应称为链转移反应。
链转移反应有向单体转移、向引发剂转移、向溶剂或链转移剂转移、向大
分子转移等几种。
向单体转移、向引发剂转移、向溶剂或链转移剂转移都使分子量降低,向大分子转移使分子量增加。
对速率的影响见P44表2-16。
链转移速率常数与链增长速率常数之比叫链转移常数。
在链增长速率常数一定时,链转移速率常数越大,链转移常数就越大。
2、聚氯乙烯的分子量为什么与引发剂浓度基本上无关而决定与温度?
参考答案:
氯乙烯在进行自由基聚合时,链自由基向单体转移的速率常数较大,而且受温度影响很大,所以聚氯乙烯的聚合度与引发剂的用量基本无关,仅处决于聚合温度。
3、自由基聚合时,转化率和分子量随时间的变化有何特征?与机理有何关系?参考答案:
自由基聚合时,转化率随聚合时间延长而提高,分子量随聚合时间延长基本不变。
由自由基聚合机理可知,自由基聚合是慢引发、快增长、速终止,一个单体分子从引发,经增长和终止,转变成大分子,时间极短,不能停留在中间聚合度阶段,反应混合物仅由单体和聚合物组成。
计算题
6、苯乙烯单体溶液浓度0.20mol·L-1,过氧类引发剂浓度为4.0×10-3 mol·L-1,在60℃下加热聚合。
如引发剂半衰期44小时,引发剂效率f=0.80,k p=145L·mol·s-1,k t=7.0×107 L·mol·s-1,欲达到50%转化率,需要多长时间?
参考答案:
已知:t1/2=44小时,
由P27页式(2-3)求分解速率常数k d=0.693÷t1/2=0.693÷(44×3600)=4.4×10-6s-1由P38页式(2-27)求达到50%转化率,需要的时间;
解方程得:t=3.4×105s。
11、对于双基终止的自由基聚合,每个大分子含有1.30个引发剂残基。
假定没有链转移反应,试计算歧化和偶合终止的相对量。
参考答案:
偶合终止时一个大分子带有2个引发剂残基,歧化终止时一个大分子带有1个引发剂残基。
设偶合终止为X,则歧化终止为1-X,依题意得:
2X+(1-X)=1.30
解得:X=0.3
即偶合终止占30%,歧化终止70%。