Review_for_Chapter_2,川大计网部分习题答案第二章
川大软院计网选择题答案Chapter4(含答案)

川大软院计网选择题答案C h a p t e r4(含答案)-CAL-FENGHAI.-(YICAI)-Company One1CHAPTER 4: NETWORK LAYER1.Which of the following groups belongs to network layer protocol_____D____A.IP, TCP andUDPB.ARP, IP, and UDPC.FTP, IMAP andIPD.ICMP, BGP, and RIP2.The 3-PDU is named as ____C_____A.messageB.packetC.datagramD.segment3.In a datagram network, the forwarding decision is based on thevalue of the ____B field in the packet header.A.source addressB.destination addressbelD.None of the choices are4.HOL blocking happens on ____A_____A.inputportB.output portC.switchingfabricsD.all of above5.If no free buffers in router, the arriving packets will be: AA.droppedB.queuedC.returnedD.marked6.During normal IP packet forwarding at a router, which of thefollowing packet fields are updated____C____A.Source IPaddressB.Destination IP addressC.ChecksumD.Destination port number7.Which of the following IP address doesn’t belong to the202.115.32.0/25 network______D___A.202.115.32.1B.202.115.32.11C.202.115.32.120D.202.115.32.1298.You are given an IP network of 192.168.5.0 and told that you needto separate this network into sub networks that can support a maximum of 30 hosts per subnet. This will help alleviatecongestion on the network. What subnet mask can you use tocreate the subnets necessary to meet the given criteria___C______A.255.255.255.0B.255.255.255.128C.255.255.255.224D.255.255.255.2409.An IP datagram of 1500 bytes (20 byte of IP header plus 1480bytes of IP payload) arrives at a router and must be forwarded to a link with an MTU of 500 bytes. Thus the router has tofragment the datagram. To the last fragment, the value of offset should be _____D____A.1440B.1000C.186D.18010.IP is a ____C_____ protocol.A.connection-orientedunreliableB.connection-oriented reliableC.connectionlessunreliableD.connectionless reliable11.Which ICMP message type is the basis for the Tracerouteutility?BA.EchoRequestB.TTL expiredC.HostUnreachableD.Fragment Reassembly Time Exceed12.Routers in the path are not allowed to_________________B__________.A.fragment the packet they receiveB.change source or destination addressC.decapsulate the packetD.All of the choices are correct13.____B_____ allows a site to use a set of private addresses forinternal communication and a set of global Internet addresses for communication with the rest of the world.A.DHCPB.NATC.ICMPD.None of the choices are correct14.How many bits are there in IPv6______C___A.32B.64C.128D.25615.In CIDR notation, which of the following networks contains host192.168.14.2?CA.192.168.10.0/22B.192.168.11.0/21C.192.168.12.0/23D.192.168.13.0/2416.What is the limited broadcast address corresponding to the nodewith the following IP address: 131.15.46.59?DA.131.15.46.255B.131.15.255.255C.255.255.255.255D.None of the above17.In classful IP addressing, how many network bits does125.140.128.16 have?AA.8B.16C.24D.3218.What is the broadcast IP address for 193.140.141.128 / 26DA.193.140.141.128B.193.140.141.127C.255.255.255.63D.193.140.141.19119.What’s a networkFrom IP address perspective they can physically reach each other without intervening router and the device interfaces with: CA.same IP addressB.same TCP port #C.same network part of IP addressD.same host part of IP address20.The Internet’s network layer has three major components, thefirst component is the IP protocol, the second component is the routing protocol, the final component is____.DA.forwardingB.address translationC.checkD.ICMP21.IP addressing assigns an address to 223.10.198.250/29, thenetwork address for this network is____.A()A.223.10.198.248B.223.10.198.250C.223.10.198.0D.223.10.0.022.There are two 16-bit integers: 1110 0110 0110 0110, 1101 01010101 0101. Their checksum isA____.A.0100010001000011B.1011101110111100C.1111111111111111D.100000000000000023.The use of hierarchy in routing tables can __A______ the size ofthe routing tables.A.reduceB.increaseC.neither reduce nor increaseD.None of the choices are correct24.Which of the following protocol doesn’t belong to intra-ASrouting protocol_____B____A.RIPB.BGPC.OSPFD.IRAP25.Which of the following protocol belongs to intra-AS routingprotocol______A___A.RIPB.BGPC.DV (DistanceVector)D.LS (Link State)26.In OSPF network, a ____B_____ belongs to both an area and thebackbone.A.internalrouterB.area border routerC.boundaryrouterD.backbone router27._A___ is an inter-domain routing protocol using path vectorrouting.A.BGPB.RIPC.OSPFD.None of the choices are correct28.RIP uses the services of ___C____.A.TCPB.IPC.UDPD.None of the choices are correct29.The Routing Information Protocol (RIP) is an intra-domainrouting based on _______A__ routing.A.distance vectorB.link stateC.path vectorD.all of the above30.Which of the following algorithm has the so called count-to-infinity problem?CA.Flooding algorithmB.Link-state algorithmC.Distance vector algorithmD.None of the above。
计网课后习题答案(英文)

Review Questions第一章1.Which characteristics of a multiterminal system make it different from a computer network?A processing power of multiterminal systems remained fully centralized, whilecomputer networks have a distributed processing power.一个多端系统处理能力仍然完全集中,而计算机网络具有分布式处理能力。
2.When were the first important results achieved in the field of joining computers using long-haul links?In the late 60s在60年代后期3.What is ARPANET?A.A network of supercomputers belonging to military organizations and research institutes in the United StatesB.An international scientific research networkC.The technology of creating WANsA is correct4.When did the first network operating systems appear?In the late 60s60年代后期5.In what order did the events listed here take place?A.The invention of WebB.The development of standard LAN technologiesC.The start of voice transmission in digital form through telephone networksThe invention of World Wide Web互联网的诞生6.Which of the events stimulated LAN development?Appearance of large-scale integrated circuits (LSI devices) resulted in invention of microcomputers which in its turn stimulated a research activity in the area of local computer networks (LANs). The adoption of personal computers was a powerful incentive for the development of LANs.大规模集成电路(LSI器件出现)导致这反过来刺激了研究活动在本地计算机网络(LAN)的微型计算机的发明。
川大软院计网选择题答案Chapter5(含答案)

1. A ( D) protocol is used to move a packet over an individual 独立link.A. application-layerB. transport-layerC. network-layerD. link-layer2. Which of the following services can not offered by a link-layer protocol? ( )A. congestion controlB. Link AccessC. Error controlD. FramingHint:framing, link access,reliable delivery,flow control,error detection,error correction,half-duplex and full-duplex3. ( B ) protocol serves to 为……服务coordinate 协调the frame transmissionsof the many nodes when multiple nodes share a single broadcast link.A. ARPB. MACC. ICMPD. DNS4. Consider CRC error checking approach, the four bit generator G is 1011, andsuppose that the data D is 10101010, then the value of R is ( A).A. 010B. 100C. 011D. 1105. In the following four descriptions说明about random access protocol, whichone is not correct? ( A )A. In slotted ALOHA, nodes can transmit at random time.B. CSMA/CD cannot be implemented on a wireless channel.C. The maximum efficiency of a slotted ALOHA is higher than a pure ALOHA.D. In CSMA/CD, one node listens to the channel before transmitting.6. In the following descriptions about MAC address, which one is not correct? ( D )A. The MAC address is the address of one node’s ada pter.B. No two adapters have the same MAC address.C. The MAC address doesn’t change no matter where the adapter goes.D. MAC address has a hierarchical structure分层结构.MAC:flat structureIP:hierarchical structure7. The ARP protocol can translate ( ) into ( ). ( C )A. host name, IP addressB. host name, MAC addressC. IP address, MAC addressD. broadcast address, IP address8. The value of Preamble field in Ethernet frame structure is ( C)A. 10101010 10101010……10101010 11111111B. 10101011 10101011……10101011 10101011C. 10101010 10101010……10101010 10101011D. 10101010 10101010……10101010 101010109. In CSMA/CD, the adapter waits some time and then returns to sensing thechannel. In the following four times, which one is impossible? ( D)A. 0 bit timesB. 512 bit timesC. 1024 bit timesD. 1028 bit times10. The principal components of PPP include but not( D ).A. framingB. physical-control protocolC. link-layer protocolD. network-layer protocol11. Consider the data D is 01110010001, if use even parity checking approach, theparity bit is( ① ), if use odd parity checking approach, the parity bit is( ② ). ( D )A. ① 0 ② 1B. ① 0 ② 0C. ① 1 ② 1D. ① 1 ② 012. In the following four descriptions, which one is not correct? (B )A. Switches can interconnect different LAN technologies.B. Hubs can interconnect different LAN technologies.C. There is no limit to how large a LAN can be when switches are used tointerconnect LAN segments.D. There is restriction on the maximum allowable number of nodes in a collisiondomain when hubs are used to interconnect LAN segments.13. Which of the following devices is not a plug and play device? ( B )A. hubB. routerC. switchD. repeater14. Which device has the same collision domain? ( A )A. HubB. SwitchC. RouteD. Bridge15. In data link-layer, which protocol is used to share bandwidth? ( D)A. SMTPB. ICMPC. ARPD. CSMA/CD16. When two or more nodes on the LAN segments transmit at the same time, therewill be a collision and all of the transmitting nodes well enter exponential back-off, that is all of the LAN segments belong to the same( A ).A. collision domainB. switchC. bridgeD. hub17. In the following four descriptions about PPP, which one is not correct? ( D )A. PPP is required to detect and correct errors.B. PPP is not required to deliver frames to the link receiver in the same order inwhich they were sent by the link sender.C. PPP need only operate over links that have a single sender and a single receiver.D. PPP is not required to provide flow control.18. For ( A ) links that have a single sender at one end of the link and a single receiverat the other end of the link.A. point-to-pointB. broadcastC. multicastD. all of the above19. With(B )transmission, the nodes at both ends of a link may transmit packets at thesame time.A. half-duplexB. full-duplexC. simplex(单工)D.synchronous20. Which of the following is wrong? ( A )A. ARP table is configured by a system administratorB. ARP table is built automaticallyC. ARP table is dynamicD. ARP table maps IP addresses to MAC addresses21. In LAN, if UTP is used, the common connector is (C ).A. AUIB. BNCC. RJ-45D. NNI22. Which of the following four descriptions about MAC addresses is wrong? ( C )A. a MAC address is burned into the adapter’s ROMB. No two adapters have the same addressC. An adapter’s MAC address is dynamicD. A MAC address is a link-layer address23. In the CSMA/CD protocol, what condition on the transmission delay and thepropagation delay has to be satisfied to guarantee that a node always detects a collision? BA. B.C. D.。
川大计算机专业英语123516秋在线作业2 (1)

奥鹏17春川大《计算机专业英语1235》16秋在线作业2一、单选题(共10 道,共20 分。
)1. Comparing with WAN ,LAN can provide ( ).A. lower data transmission ratesB. higher data transmission ratesC. the same transmission ratesD. very high transmission rates标准解:2. Which one is a painting and drawing tool( )?A. PhotoshopB. WordC. Extreme 3DD. Premiere标准解:3. Which one is a sound-editing tool( )?A. PhotoshopB. WordC. Extreme 3DD. Premiere标准解:4. CAE ( ).A. Computer-Aided EngineeringB. Computer-Aided EducationC. Canadian Aviation ElectronicsD. Carbon Alcohol Extractions标准解:5. Page frame is used in ( ).A. real memoryB. virtual memoryC. diskD. cache标准解:6. CAD ( ).A. Computer-Access DeviceB. Computer-Aided DesignC. Computer-Access DiagnosisD. Computer-Access Detection标准解:7. Consumption of the total life-cycle effort in software maintenance is( ) that in software development.A. less thanB. larger thanC. equal or less thanD. equal or larger than标准解:8. CAM ( ).A. Computer-Address MemoryB. Civil Air ManagementC. Computer-Aided ManufacturingD. Computer-Aided Mathematical Analysis标准解:9. Which one is a moviemaking tool( )?A. PhotoshopB. WordC. Extreme 3DD. Premiere标准解:10. Which one is a 3-D modeling tool( )?A. PhotoshopB. WordC. Extreme 3DD. Premiere标准解:《计算机专业英语1235》16秋在线作业2二、多选题(共20 道,共40 分。
川大软院计网选择题答案Chapter4(含答案)

CHAPTER 4: NETWORK LAYER1.Which of the following groups belongs to network layer protocol? _____D____A.IP, TCP and UDPB.ARP, IP, and UDPC.FTP, IMAP and IPD.ICMP, BGP, and RIP2.The 3-PDU is named as ____C_____A.messageB.packetC.datagramD.segment3.In a datagram network, the forwarding decision is based on the value of the____B field in the packet header.A.source addressB.destination addressbelD.None of the choices are4.HOL blocking happens on ____A_____A.input portB.output portC.switching fabricsD.all of above5.If no free buffers in router, the arriving packets will be: AA.droppedB.queuedC.returnedD.marked6.During normal IP packet forwarding at a router, which of the following packetfields are updated? ____C____A.Source IP addressB.Destination IP addressC.ChecksumD.Destination port number7.Which of the following IP address doesn’t belong to the 202.115.32.0/25 network?______D___A.202.115.32.1B.202.115.32.11C.202.115.32.120D.202.115.32.1298.You are given an IP network of 192.168.5.0 and told that you need to separatethis network into sub networks that can support a maximum of 30 hosts per subnet.This will help alleviate congestion on the network. What subnet mask can you use to create the subnets necessary to meet the given criteria? ___C______A.255.255.255.0B.255.255.255.128C.255.255.255.224D.255.255.255.2409.An IP datagram of 1500 bytes (20 byte of IP header plus 1480 bytes of IP payload)arrives at a router and must be forwarded to a link with an MTU of 500 bytes.Thus the router has to fragment the datagram. To the last fragment, the value of offset should be _____D____A.1440B.1000C.186D.18010.IP is a ____C_____ protocol.A.connection-oriented unreliableB.connection-oriented reliableC.connectionless unreliableD.connectionless reliable11.Which ICMP message type is the basis for the Traceroute utility?BA.Echo RequestB.TTL expiredC.Host UnreachableD.Fragment Reassembly Time Exceed12.Routers in the path are not allowed to _________________B__________.A.fragment the packet they receiveB.change source or destination addressC.decapsulate the packetD.All of the choices are correct13.____B_____ allows a site to use a set of private addresses for internalcommunication and a set of global Internet addresses for communication with the rest of the world.A.DHCPB.NATC.ICMPD.None of the choices are correct14.How many bits are there in IPv6 ? ______C___A.32B.64C.128D.25615.In CIDR notation, which of the following networks contains host 192.168.14.2?CA.192.168.10.0/22B.192.168.11.0/21C.192.168.12.0/23D.192.168.13.0/2416.What is the limited broadcast address corresponding to the node with thefollowing IP address: 131.15.46.59?DA.131.15.46.255B.131.15.255.255C.255.255.255.255D.None of the above17.In classful IP addressing, how many network bits does 125.140.128.16 have?AA.8B.16C.24D.3218.What is the broadcast IP address for 193.140.141.128 / 26 ?DA.193.140.141.128B.193.140.141.127C.255.255.255.63D.193.140.141.19119.What’s a network? From IP address perspective they can physically reach eachother without intervening router and the device interfaces with: CA.same IP addressB.same TCP port #C.same network part of IP addressD.same host part of IP address20.The Internet’s network layer has three major components, the first component isthe IP protocol, the second component is the routing protocol, the final component is____.DA.forwardingB.address translationC.checkD.ICMP21.IP addressing assigns an address to 223.10.198.250/29, the network address forthis network is____.A()A.223.10.198.248B.223.10.198.250C.223.10.198.0D.223.10.0.022.There are two 16-bit integers: 1110 0110 0110 0110, 1101 0101 0101 0101. Theirchecksum isA____.A.0100010001000011B.1011101110111100C.1111111111111111D.100000000000000023.The use of hierarchy in routing tables can __A______ the size of the routingtables.A.reduceB.increaseC.neither reduce nor increaseD.None of the choices are correct24.Which of the following protocol doesn’t belong to intra-AS routing protocol?_____B____A.RIPB.BGPC.OSPFD.IRAP25.Which of the following protocol belongs to intra-AS routing protocol?______A___A.RIPB.BGPC.DV (Distance Vector)D.LS (Link State)26.In OSPF network, a ____B_____ belongs to both an area and the backbone.A.internal routerB.area border routerC.boundary routerD.backbone router27._A___ is an inter-domain routing protocol using path vector routing.A.BGPB.RIPC.OSPFD.None of the choices are correct28.RIP uses the services of ___C____.A.TCPB.IPC.UDPD.None of the choices are correct29.The Routing Information Protocol (RIP) is an intra-domain routing based on_______A__ routing.A.distance vectorB.link stateC.path vectorD.all of the above30.Which of the following algorithm has the so called count-to-infinity problem?CA.Flooding algorithmB.Link-state algorithmC.Distance vector algorithmD.None of the above。
川大软院计网选择题答案Chapter5(含答案)

1. A ( D) protocol is used to move a packet over an individual 独立link.A. application-layerB. transport-layerC. network-layerD. link-layer2. Which of the following services can not offered by a link-layer protocol? ( )A. congestion controlB. Link AccessC. Error controlD. FramingHint:framing, link access,reliable delivery,flow control,error detection,error correction,half-duplex and full-duplex3. ( B ) protocol serves to 为……服务coordinate 协调the frame transmissionsof the many nodes when multiple nodes share a single broadcast link.A. ARPB. MACC. ICMPD. DNS4. Consider CRC error checking approach, the four bit generator G is 1011, andsuppose that the data D is 10101010, then the value of R is ( A).A. 010B. 100C. 011D. 1105. In the following four descriptions说明about random access protocol, whichone is not correct? ( A )A. In slotted ALOHA, nodes can transmit at random time.B. CSMA/CD cannot be implemented on a wireless channel.C. The maximum efficiency of a slotted ALOHA is higher than a pure ALOHA.D. In CSMA/CD, one node listens to the channel before transmitting.6. In the following descriptions about MAC address, which one is not correct?( D )A. The MAC address is the address of one node’s ada pter.B. No two adapters have the same MAC address.C. The MAC address doesn’t change no matter where the adapter goes.D. MAC address has a hierarchical structure分层结构.MAC:flat structureIP:hierarchical structure7. The ARP protocol can translate ( ) into ( ). ( C )A. host name, IP addressB. host name, MAC addressC. IP address, MAC addressD. broadcast address, IP address8. The value of Preamble field in Ethernet frame structure is ( C)A. 10101010 10101010……10101010 11111111B. 10101011 10101011……10101011 10101011C. 10101010 10101010……10101010 10101011D. 10101010 10101010……10101010 101010109. In CSMA/CD, the adapter waits some time and then returns to sensing thechannel. In the following four times, which one is impossible? ( D)A. 0 bit timesB. 512 bit timesC. 1024 bit timesD. 1028 bit times10. The principal components of PPP include but not( D ).A. framingB. physical-control protocolC. link-layer protocolD. network-layer protocol11. Consider the data D is 01110010001, if use even parity checking approach, theparity bit is( ① ), if use odd parity checking approach, the parity bit is( ② ).( D )A. ① 0 ② 1B. ① 0 ② 0C. ① 1 ② 1D. ① 1 ② 012. In the following four descriptions, which one is not correct? (B )A. Switches can interconnect different LAN technologies.B. Hubs can interconnect different LAN technologies.C. There is no limit to how large a LAN can be when switches are used tointerconnect LAN segments.D. There is restriction on the maximum allowable number of nodes in a collisiondomain when hubs are used to interconnect LAN segments.13. Which of the following devices is not a plug and play device? ( B )A. hubB. routerC. switchD. repeater14. Which device has the same collision domain? ( A )A. HubB. SwitchC. RouteD. Bridge15. In data link-layer, which protocol is used to share bandwidth? ( D)A. SMTPB. ICMPC. ARPD. CSMA/CD16. When two or more nodes on the LAN segments transmit at the same time, therewill be a collision and all of the transmitting nodes well enter exponential back-off, that is all of the LAN segments belong to the same( A ).A. collision domainB. switchC. bridgeD. hub17. In the following four descriptions about PPP, which one is not correct? ( D )A. PPP is required to detect and correct errors.B. PPP is not required to deliver frames to the link receiver in the same order inwhich they were sent by the link sender.C. PPP need only operate over links that have a single sender and a singlereceiver.D. PPP is not required to provide flow control.18. For ( A ) links that have a single sender at one end of the link and a singlereceiver at the other end of the link.A. point-to-pointB. broadcastC. multicastD. all of the above19. With(B )transmission, the nodes at both ends of a link may transmit packets atthe same time.A. half-duplexB. full-duplexC. simplex(单工)D.synchronous20. Which of the following is wrong? ( A )A. ARP table is configured by a system administratorB. ARP table is built automaticallyC. ARP table is dynamicD. ARP table maps IP addresses to MAC addresses21. In LAN, if UTP is used, the common connector is (C ).A. AUIB. BNCC. RJ-45D. NNI22. Which of the following four descriptions about MAC addresses is wrong? ( C )A. a MAC address is burned into the adapter’s ROMB. No two adapters have the same addressC. An adapter’s MAC address is dynamicD. A MAC address is a link-layer address23. In the CSMA/CD protocol, what condition on the transmission delay andthe propagation delay has to be satisfied to guarantee that a node always detects a collision? BA. B.C. D.。
川大软院计网选择题答案Chapter1(含答案)

1.1 In the following options, which does not define in protocol? ( D )A the format of messages exchanged between two or more communicatingentitiesB the order of messages exchanged between two or more communicatingentitiesC the actions taken on the transmission of a message or other eventD the transmission signals are digital signals or analog signals1.2 In the following options, which is defined in protocol? ( A )A the actions taken on the transmission and/or receipt of a message or othereventB the objects exchanged between communicating entitiesC the content in the exchanged messagesD the location of the hosts1.3 An application can rely on the connection to deliver all of its data without error and in the proper order. The sentence describes (C ).A flow controlB congestion-controlC reliable data transferD connection-oriented service1.4 The Internet’s connection-oriented service has a name, it is ( A ).A TCPB UDPC TCP/IPD IP1.5 The Internet’s connectionless service is called ( B ).A TCPB UDPC TCP/IPD IP1.6 Which of the following nodes belongs to the network core?CA. a Web ServerB. a Host with Win2003 ServerC. a Router with NAT serviceD. a Supernode on Skype Network1.7 In the Internet, the equivalent concept to end systems is ( )A.A hostsB serversC clientsD routers1.8 In the Internet, end systems are connected together by ( C ).A copper wireB coaxial cableC communication linksD fiber optics1.9 End systems access to the Internet through its (C ).A modemsB protocolsC ISPD sockets1.10 In the following options, which belongs to the network core? ( B )A end systemsB routersC clientsD servers1.11 End systems, packet switches, and other pieces of the Internet, run ( D ) that control the sending and receiving of information within the Internet.A programsB processesC applicationsD protocols1.12 The internet allows ( D ) running on its end systems to exchange data with each other.A clients applicationsB server applicationsC P2P applicationsD distributed applications1.13 The protocols of various layers are called ( A ).A the protocol stackB TCP/IPC ISPD network protocol1.14 In the OSI reference model, the upper layers of the OSI model are, in correct orderDA Session, application, presentationB Session, presentation, applicationC Session, application, presentation, physicalD Application, presentation, session1.15 The lower layers of the OSI model are, in correct orderDA physical, system, network, logicalB physical, logical, network, systemC physical, transport, network, data linkD physical, data link, network, transport1.16 The Internet Protocol (IP) generally corresponds to which OSI layer?AA Network (layer three)B Transport (layer four)C Data link (layer two)D Session (layer five)1.17 What layer of the OSI model is designed to perform error detection functions?BA PhysicalB Data linkC NetworkD transport1.18 Which of the following protocol layers is not explicitly part of the Internet Protocol Stack? _____B____A. application layerB. session layerC. data link layerD. transport layer1.19 The 5-PDU is called__A_A. messageB. segmentC. datagramD. frame1.20 The Internet’s network layer is responsible for moving network-layer packets known as B( ) from one host to another.A frameB datagramC segmentD message1.21 Transport-layer packets are called:BA. messageB. segmentC. datagramD. frame1.22 The units of data exchanged by a link-layer protocol are called ( A).A FramesB SegmentsC DatagramsD bit streams1.23 There are two fundamental approaches to building a network core, ( B ) and packet switching.A electrical current switchingB circuit switchingC data switchingD message switching1.24 Datagram networks and virtual-circuit networks differ in that ( C ).A datagram networks are circuit-switched networks, and virtual-circuitnetworks are packet-switched networks.B datagram networks are packet-switched networks, and virtual-circuitnetworks are circuit-switched networks.C datagram networks use destination addresses and virtual-circuit networks useVC. numbers to forward packets toward their destination.D datagram networks use VC. numbers and virtual-circuit networks usedestination addresses to forward packets toward their destination.1.25 (A ) means that the switch must receive the entire packet before it can begin to transmit the first bit of the packet onto the outbound link.A Store-and-forward transmissionB FDMC End-to-end connectionD TDM1.26 In ( C ) networks, the resources needed along a path to provide for communication between the end system are reserved for the duration of the communication session.A packet-switchedB data-switchedC circuit-switchedD message-switched1.27 In ( A ) networks, the resources are not reserved; a session’s messages use the resources on demand, and as a consequence, may have to wait for access to communication link.A packet-switchedB data-switchedC circuit-switchedD message-switched1.28 In a circuit-switched network, if each link has n circuits, for each link used by the end-to-end connection, the connection gets ( A) of the link’s bandwidth for the duration of the connection.A a fraction 1/nB allC 1/2D n times1.29 For (C ), the transmission rate of a circuit is equal to the frame rate multiplied by the number of bits in a slot.A CDMAB packet-switched networkC TDMD FDM1.30 The network that forwards packets according to host destination addresses is called ( D) network.A circuit-switchedB packet-switchedC virtual-circuitD datagram1.31 The network that forwards packets according to virtual-circuit numbers is called ( C ) network.A circuit-switchedB packet-switchedC virtual-circuitD datagram1.32 The time required to propagate from the beginning of the link to the next router is ( C).A queuing delayB processing delayC propagation delayD transmission delay1.33 Processing delay does not include the time to (B ).A examine the packet’s headerB wait to transmit the packet onto the linkC determine where to direct the packetD check bit-error in the packet1.34 In the following four descriptions, which one is correct? ( C)A The traffic intensity must be greater than 1.B The fraction of lost packets increases as the traffic intensity decreases.C If the traffic intensity is close to zero, the average queuing delay will be closeto zero.D If the traffic intensity is close to one, the average queuing delay will be closeto one.1.35 Suppose, a is the average rate at which packets arrive at the queue, R is the transmission rate, and all packets consist of L bits, then the traffic intensity is ( B ),A LR/aB La/RC Ra/LD LR/a1.36 Suppose there is exactly one packet switch between a sending host and a receiving host. The transmission rates between the sending host and the switch and between the switch and the receiving host are R1 and R2, respectively. Assuming that the switch uses store-and-forward packet switching, what is the total end-to-end delay to send a packet of length L? (Ignore queuing delay, propagation delay, and processing delay.) ( A )A L/R1+L/R2B L/R1C L/R2D none of the above1.37 We are sending a 30 Mbit MP3 file from a source host to a destination host. Suppose there is only one link between source and destination and the link has a transmission rate of 10 Mbps. Assume that the propagation speed is 2 * 108 meters/sec, and the distance between source and destination is 10,000 km. Also suppose that message switching is used, with the message consisting of the entire MP3 file. How many bits will the source have transmitted when the first bit arrives at the destination?CA. 1 bitB. 30,000,000 bitsC. 500,000 bitsD. none of the above1.38 In the following entries, which is not a kind of access network?(D )A residential accessB company accessC wireless accessD local access1.39 The following technologies may be used for residential access, exceptDA. HFCB. DSLC. Dial-up modemD. FDDI1.40 Which kind of media is not a guided media? ( D)A twisted-pair copper wireB a coaxial cableC fiber opticsD digital satellite channel。
川大软件数据结构选择题库

_______________________________ 少年易学老难成,一寸光阴不可轻-百度文库一Chapter 1 Data Structures and Algorithms: Instructor's CD questions1.The primary purpose of most computer programs isa)to perform a mathematical calculation.*b) to store and retrieve information.c)to sort a collection of records.d)all of the above.e)none of the above.2.An integer is aa)) simple typeb)aggregate typec)composite typed)a and be)none of the above3.A payroll records is aa)simple typeb)aggregate typec)composite type*d) a and b e) none of the above4.Which of the following should NOT be viewed as an ADT?a)listb)integerc)array*d) none of the above5.A mathematical function is most like a*a) Problemb)Algorithmc)Program6.An algorithm must be or do all of the following EXCEPT:a)correctb)composed of concrete steps*c) ambiguousd)composed of a finite number of stepse)terminate7.A solution is efficient ifa.it solves a problem within the require resource constraints.b.it solves a problem within human reaction time.1_______________________________ 少年易学老难成,一寸光阴不可轻-百度文库_______ c.it solves a problem faster than other known solutions.d.a and b.*e. a and c.f. b and c.8.An array isa)A contiguous block of memory locations where each memory location storesa fixed-length data item.b)An ADT composed of a homogeneous collection of data items, each data item identified by a particular number.c)a set of integer values.*d) a and b.e)a and c.f)b and c.9.Order the following steps to selecting a data structure to solve a problem.(1)Determine the basic operations to be supported.(2)Quantify the resource constraints for each operation.(3)Select the data structure that best meets these requirements.(4)Analyze the problem to determine the resource constraints that anysolution must meet.a)(1, 2, 3, 4)b)(2, 3, 1, 4)c)(2, 1, 3, 4)*d) (1, 2, 4, 3)e) (1, 4, 3, 2)10.Searching for all those records in a database with key value between 10 and 100 is known as:a) An exact match query.*b) A range query.c)A sequential search.d)A binary search.Chapter 2 Mathematical Preliminaries: Instructor's CD questions1.A set has the following properties:a)May have duplicates, element have a position.b)May have duplicates, elements do not have a position.c)May not have duplicates, elements have a position.*d) May not have duplicates, elements do not have a position._______________________________ 少年易学老难成,一寸光阴不可轻-百度文库2.A sequence has the following properties:a)) May have duplicates, element have a position.b)May have duplicates, elements do not have a position.c)May not have duplicates, elements have a position.d)May not have duplicates, elements do not have a position.3.For set F, the notation |P| indicatesa)) The number of elements in Pb)The inverse of Pc)The powerset of F.d)None of the above.4.Assume that P contains n elements. The number of sets in the powerset of P isa)nb)n A2*c) 2A nd)2A n - 1e) 2A n + 15.If a sequence has n values, then the number of permutations for that sequence will bea)nb)n A2c)n A2 - 1d)2A n*e) n!6.If R is a binary relation over set S, then R is reflexive if*a) aRa for all a in S.b)whenever aRb, then bRa, for all a, b in S.c)whenever aRb and bRa, then a = b, for all a, b in S.d)whenever aRb and aRc, then aRc, for all a, b, c in S.7.If R is a binary relation over set S, then R is transitive ifa)aRa for all a in S.b)whenever aRb, then bRa, for all a, b in S.c)whenever aRb and bRa, then a = b, for all a, b in S.*d) whenever aRb and aRc, then aRc, for all a, b, c in S.8.R is an equivalence relation on set S if it isa)) reflexive, symmetric, transitive.b)reflexive, antisymmetric, transitive.c)symmetric, transitive.少年易学老难成,一寸光阴不可轻-百度文库d)antisymmetric, transitive.e)irreflexive, symmetric, transitive.f)irreflexive, antisymmetric, transitive.9.For the powerset of integers, the subset operation defines *a) a partial order.b)a total order.c)a transitive order.d)none of the above.10.log nm is equal toa) n + m*b) log n + log mc)m log nd)log n - log m11.A close-form solution isa) an analysis for a program.*b) an equation that directly computes the value of a summation.c) a complete solution for a problem.12.Mathematical induction is most likea) iteration.*b) recursion.c)branching.d)divide and conquer.13.A recurrence relation is often used to model programs witha)for loops.b)branch control like "if" statements.*c) recursive calls.d) function calls.14.Which of the following is not a good proof technique.a) proof by contradiction.*b) proof by example.c) proof by mathematical induction.15.We can use mathematical induction to:a) Find a closed-form solution for a summation.*b) Verify a proposed closed-form solution for a summation.c) Both find and verify a closed-form solution for a summation._______________________________ 少年易学老难成,一寸光阴不可轻-百度文库一Chapter 3 Algorithm Analysis: Instructor's CD questions1.A growth rate applies to:a)the time taken by an algorithm in the average case.b)the time taken by an algorithm as the input size grows.c)the space taken by an algorithm in the average case.d)the space taken by an algorithm as the input size grows.e)any resource you wish to measure for an algorithm in the average case.*f) any resource you wish to measure for an algorithm as the input size grows.2.Pick the growth rate that corresponds to the most efficient algorithm as n gets large:a) 5n*b) 20 log nc)2nA2d)2A n3.Pick the growth rate that corresponds to the most efficient algorithm when n =4.a)5nb)20 log nc)2nA2*d)2A n4.Pick the quadratic growth rate.a)5nb)20 log n*c) 2nA2d) 2An5.Asymptotic analysis refers to:a) The cost of an algorithm in its best, worst, or average case.*b) The growth in cost of an algorithm as the input size grows towards infinity.c)The size of a data structure.d)The cost of an algorithm for small input sizes6.For an air traffic control system, the most important metric is:a)The best-case upper bound.b)The average-case upper bound.c)) The worst-case upper bound.d)The best-case lower bound._______________________________ 少年易学老难成,一寸光阴不可轻-百度文库__________e)The average-case lower bound.f)The worst-case lower bound.7.When we wish to describe the upper bound for a problem we use:a)) The upper bound of the best algorithm we know.b)The lower bound of the best algorithm we know.c)We can't talk about the upper bound of a problem because there can alwaysbe an arbitrarily slow algorithm.8.When we describe the lower bound for a problem we use:a)The upper bound for the best algorithm we know.b)the lower bound for the best algorithm we know.c)The smallest upper bound that we can prove for the best algorithm that could possibly exist.*d) The greatest lower bound that we can prove for the best algorithm that could possibly exist.9.When the upper and lower bounds for an algorithm are the same, we use:a)big-Oh notation.b)big-Omega notation.*c) Theta notation.d)asymptotic analysis.e)Average case analysis.f)Worst case analysis.10. When performing asymptotic analysis, we can ignore constants and low order terms because:*a) We are measuring the growth rate as the input size gets large.b)We are only interested in small input sizes.c)We are studying the worst case behavior.d)We only need an approximation.11.The best case for an algorithm refers to:a) The smallest possible input size.*b) The specific input instance of a given size that gives the lowest cost.c)The largest possible input size that meets the required growth rate.d)The specific input instance of a given size that gives the greatest cost.12.For any algorithm:a)) The upper and lower bounds always meet, but we might not know what they are.少年易学老难成,一寸光阴不可轻-百度文库b)The upper and lower bounds might or might not meet.c)We can always determine the upper bound, but might not be able to determine the lower bound.d)We can always determine the lower bound, but might not be able to determine the upper bound.13.If an algorithm is Theta(f(n)) in the average case, then it is: a) Omega(f(n)) in the best case.*b) Omega(f(n)) in the worst case.c) O(f(n)) in the worst case.14.For the purpose of performing algorithm analysis, an important property ofa basic operation is that:a)It be fast.b)It be slow enough to measure.c)Its cost does depend on the value of its operands.*d) Its cost does not depend on the value of its operands.15.For sequential search,a) The best, average, and worst cases are asymptotically the same.*b) The best case is asymptotically better than the average and worst cases.c)The best and average cases are asymptotically better than the worst case.d)The best case is asymptotically better than the average case, and the average case is asymptotically better than the worst case.Chapter 4 Lists, Stacks and Queues: Instructor's CD questions1.An ordered list is one in which:a) The element values are in sorted order.*b) Each element a position within the list.2.An ordered list is most like a:a)set.b)bag.c)) sequence.3.As compared to the linked list implementation for lists, the array-based listimplementation requires:a)More spaceb)Less space*c) More or less space depending on how many elements are in the list._______________________________ 少年易学老难成,一寸光阴不可轻-百度文库4.Here is a series of C++ statements using the list ADT in the book.L1.append(10);L1.append(20);L1.append(15);If these statements are applied to an empty list, the result will look like:a)< 10 20 15 >*b) < | 10 20 15 >c)< 10 20 15 | >d)< 15 20 10 >e)< | 15 20 10 >f)< 15 20 10 | >5.When comparing the array-based and linked implementations, the array-based implementation has:a)) faster direct access to elements by position, but slower insert/delete from the current position.b)slower direct access to elements by position, but faster insert/delete from the current position.c)both faster direct access to elements by position, and faster insert/delete from the current position.d)both slower direct access to elements by position, and slower insert/delete from the current position.6.For a list of length n, the linked-list implementation's prev function requiresworst-case time:a)O(1).b)O(log n).*c) O(n).d) O(n A2).7.Finding the element in an array-based list with a given key value requiresworst case time:a)O(1).b)O(log n).*c) O(n).d) O(n A2).8.In the linked-list implementation presented in the book, a header node isused:*a) To simplify special cases._______________________________ 少年易学老难成,一寸光阴不可轻-百度文库一b)Because the insert and delete routines won't work correctly without it.c)Because there would be no other way to make the current pointer indicatethe first element on the list.9.When a pointer requires 4 bytes and a data element requires 4 bytes, thelinked list implementation requires less space than the array-based list implementation when the array would be:a)less than 1/4 full.b)less than 1/3 full.*c) less than half full.d)less than 第full.e)less than 34 fullf)never.10.When a pointer requires 4 bytes and a data element requires 12 bytes, thelinked list implementation requires less space than the array-based list implementation when the array would be:a)) less than 1/4 full.b)less than 1/3 full.c)less than half full.d)less than 2/3 full.e)less than 34 fullf)never.11.When we say that a list implementation enforces homogeneity, we meanthat:a) All list elements have the same size.*b) All list elements have the same type.c) All list elements appear in sort order.12.When comparing the doubly and singly linked list implementations, we findthat the doubly linked list implementation*a) Saves time on some operations at the expense of additional space.b)Saves neither time nor space, but is easier to implement.c)Saves neither time nor space, and is also harder to implement.13. We use a comparator function in the Dictionary class ADT:a)to simplify implementation.*b) to increase the opportunity for code reuse.c) to improve asymptotic efficiency of some functions.14.All operations on a stack can be implemented in constant time except:少年易学老难成,一寸光阴不可轻-百度文库a) Pushb)Popc)The implementor's choice of push or pop (they cannot both be implementedin constant time).*d) None of the above.15.Recursion is generally implemented usinga) A sorted list.*b) A stack.c) A queue.Chapter 5 Binary Trees: Instructor's CD questions1.The height of a binary tree is:a)The height of the deepest node.b)The depth of the deepest node.*c) One more than the depth of the deepest node.2.A full binary tree is one in which:*a) Every internal node has two non-empty children.b) all of the levels, except possibly the bottom level, are filled.3.The relationship between a full and a complete binary tree is:a)Every complete binary tree is full.b)Every full binary tree is complete.*c) None of the above.4.The Full Binary Tree Theorem states that:a)) The number of leaves in a non-empty full binary tree is one more than the number of internal nodes.b)The number of leaves in a non-empty full binary tree is one less than the number of internal nodes.c)The number of leaves in a non-empty full binary tree is one half of the number of internal nodes.d)The number of internal nodes in a non-empty full binary tree is one half of the number of leaves.5.The correct traversal to use on a BST to visit the nodes in sorted order is:a) Preorder traversal.*b) Inorder traversal.c) Postorder traversal.6. When every node of a full binary tree stores a 4-byte data field,10少年易学老难成,一寸光阴不可轻-百度文库two 4-byte child pointers, and a 4-byte parent pointer, theoverhead fraction is approximately:a)one quarter.b)one third.c)one half.d)two thirds.*e) three quarters.f) none of the above.7.When every node of a full binary tree stores an 8-byte data field and two 4-byte child pointers, the overhead fraction is approximately:a)one quarter.b)one third.*c) one half.d)two thirds.e)three quarters.f)none of the above.8.When every node of a full binary tree stores a 4-byte data field and theinternal nodes store two 4-byte child pointers, the overhead fraction is approximately:a)one quarter.b)one third.*c) one half.d)two thirds.e)three quarters.f)none of the above.9.If a node is at position r in the array implementation for a complete binarytree, then its parent is at:a)) (r - 1)/2 if r > 0b)2r + 1 if (2r + 1) < nc)2r + 2 if (2r + 2) < nd)r - 1 if r is evene)r + 1 if r is odd.10.If a node is at position r in the array implementation for a complete binarytree, then its right child is at:a)(r - 1)/2 if r > 0b)2r + 1 if (2r + 1) < n*c) 2r + 2 if (2r + 2) < nd)r - 1 if r is evene)r + 1 if r is odd.11_______________________________ 少年易学老难成,一寸光阴不可轻-百度文库—11.Assume a BST is implemented so that all nodes in the left subtree of agiven node have values less than that node, and all nodes in the rightsubtree have values greater than or equal to that node. Whenimplementing the delete routine, we must select as its replacement:a) The greatest value from the left subtree.*b) The least value from the right subtree.c) Either of the above.12.Which of the following is a true statement:a)In a BST, the left child of any node is less than the right child, and in a heap, the left child of any node is less than the right child.*b) In a BST, the left child of any node is less than the right child, but in a heap, the left child of any node could be less than or greater than the right child.c)In a BST, the left child of any node could be less or greater than the right child, but in a heap, the left child of any node must be less than the right child.d)In both a BST and a heap, the left child of any node could be either less than or greater than the right child.13.When implementing heaps and BSTs, which is the best answer?a)The time to build a BST of n nodes is O(n log n), and the time to build a heap of n nodes is O(n log n).b)The time to build a BST of n nodes is O(n), and the time to build a heap of n nodes is O(n log n).*c) The time to build a BST of n nodes is O(n log n), and the time to build a heap of n nodes is O(n).d) The time to build a BST of n nodes is O(n), and the time to build a heap of n nodes is O(n).14.The Huffman coding tree works best when the frequencies for letters area) Roughly the same for all letters.*b) Skewed so that there is a great difference in relative frequencies for various letters.15.Huffman coding provides the optimal coding when:a)The messages are in English.b)The messages are binary numbers.*c) The frequency of occurrence for a letter is independent of its context within the message.d) Never.12_______________________________ 少年易学老难成,一寸光阴不可轻-百度文库一Chapter 6 Binary Trees: Instructor's CD questions1.The primary ADT access functions used to traverse a general tree are: a) left child and right siblingb) left child and right child*c) leftmost child and right siblingd) leftmost child and next child2.The tree traversal that makes the least sense for a general treeis:a) preorder traversal*b) inorder traversalc) postorder traversal3.The primary access function used to navigate the general tree when performing UNION/FIND is:a)left childb)leftmost childc)right childd)right sibling*e) parent4.When using the weighted union rule for merging disjoint sets, the maximum depth for any node in a tree of size n will be:a) nearly constant*b) log nc)nd)n log ne)n A25.We use the parent pointer representation for general trees to solve which problem?a)Shortest pathsb)General tree traversal*c) Equivalence classesd) Exact-match query6. When using path compression along with the weighted union rule for merging disjoint sets, the average cost for any UNION or FIND operation in a tree of size n will be:*a) nearly constantb)log nc)nd)n log n13_______________________________ 少年易学老难成,一寸光阴不可轻-百度文库一7.The most space efficient representation for general trees will typically be:a) List of children*b) Left-child/right siblingc) A K-ary tree.8.The easiest way to represent a general tree is to:a) convert to a list.*b) convert to a binary tree.c) convert to a graph.9.As K gets bigger, the ratio of internal nodes to leaf nodes:a)) Gets smaller.b)Stays the same.c)Gets bigger.d)Cannot be determined, since it depends on the particular configuration of the tree.10.A sequential tree representation is best used for:*a) Archiving the tree to disk.b)Use in dynamic in-memory applications.c)Encryption algorithms.d)It is never better than a dynamic representation.Chapter 7 Internal Sorting: Instructor's CD questions1.A sorting algorithm is stable if it:a) Works for all inputs.*b) Does not change the relative ordering of records with identical key values.c) Always sorts in the same amount of time (within a constant factor) for a given input size.2.Which sorting algorithm does not have any practical use?a) Insertion sort.*b) Bubble sort.c)Quicksort.d)Radix Sort.e)a and b.3.When sorting n records, Insertion sort has best-case cost:a)O(log n).14_______________________________ 少年易学老难成,一寸光阴不可轻-百度文库*b) O(n).c)O(n log n).e)O(n!)f)None of the above.4.When sorting n records, Insertion sort has worst-case cost:a)O(log n).b)O(n).c)O(n log n).*d) O(n A2)e)O(n!)f)None of the above.5.When sorting n records, Quicksort has worst-case cost:a)O(log n).b)O(n).c)O(n log n).*d) O(n A2)e)O(n!)f)None of the above.6.When sorting n records, Quicksort has average-case cost:a)O(log n).b)O(n).c)) O(n log n).d)O(n A2)e)O(n!)f)None of the above.7.When sorting n records, Mergesort has worst-case cost:a)O(log n).b)O(n).*c) O(n log n).d)O(n A2)e)O(n!)f)None of the above.8.When sorting n records, Radix sort has worst-case cost:a)O(log n).b)O(n).c)O(n log n).d)O(n A2)e)O(n!)15少年易学老难成,一寸光阴不可轻-百度文库*f) None of the above.9.When sorting n records with distinct keys, Radix sort has a lower bound of:a)Omega(log n).b)Omega(n).*c) Omega(n log n).d)Omega(n A2)e)Omega(n!)f)None of the above.10.Any sort that can only swap adjacent records as an average case lower bound of:a)Omega(log n).b)Omega(n).c)Omega(n log n).*d) Omega(n A2)e)Omega(n!)f)None of the above.11.The number of permutations of size n is:a)O(log n).b)O(n).c)O(n log n).d)O(n A2)*e) O(n!)f)None of the above.12.When sorting n records, Selection sort will perform how many swaps in the worst case?a) O(log n).*b) O(n).c)O(n log n).d)O(n A2)e)O(n!)f)None of the above.13.Shellsort takes advantage of the best-case behavior of which sort?*a) Insertion sortb)Bubble sortc)Selection sortd)Shellsorte)Quicksortf)Radix sort16_______________________________ 少年易学老难成,一寸光阴不可轻-百度文库_______________14.A poor result from which step causes the worst-case behavior for Quicksort?*a) Selecting the pivotb)Partitioning the listc)The recursive call15.In the worst case, the very best that a sorting algorithm can do when sorting n records is:a)O(log n).b)O(n).*c) O(n log n).d)O(n A2)e)O(n!)f)None of the above.Chapter 8 File Processing and External Sorting: Instructor's CD questions1.As compared to the time required to access one unit of data frommain memory, accessing one unit of data from disk is:a)10 times faster.b)1000 times faster.c)1,000,000 time faster.d)10 times slower.e)1000 times slower.*f) 1,000,000 times slower.2.The most effective way to reduce the time required by a disk-based program is to:a) Improve the basic operations.*b) Minimize the number of disk accesses.c)Eliminate the recursive calls.d)Reduce main memory use.3.The basic unit of I/O when accessing a disk drive is:a)A byte.*b) A sector.c)A cluster.d)A track.e)An extent.4.The basic unit for disk allocation under DOS or Windows is:a)A byte.b)A sector.*c) A cluster.17少年易学老难成,一寸光阴不可轻-百度文库d) A track.e) An extent.5.The most time-consuming part of a random access to disk is usually: *a) The seek.b)The rotational delay.c)The time for the data to move under the I/O head.6.The simplest and most commonly used buffer pool replacement strategy is:a)First in/First out.b)Least Frequently Used.*c) Least Recently Used.7.The C++ programmer's view of a disk file is most like:a)) An array.b)A list.c)A tree.d)A heap.8.In external sorting, a run is:a)) A sorted sub-section for a list of records.b)One pass through a file being sorted.c)The external sorting process itself.9.The sorting algorithm used as a model for most external sorting algorithms is:a)Insertion sort.b)Quicksort.*c) Mergesort.d) Radix Sort.10.Assume that we wish to sort ten million records each 10 bytes long (for a total file size of 100MB of space). We have working memory of size 1MB, broken into 1024 1K blocks. Using replacement selection and multiway merging, we can expect to sort this file using how many passes through the file?a)About 26 or 27 (that is, log n).b)About 10.c)4.*d) 2.Chapter 9 Searching: Instructor's CD questions18少年易学老难成,一寸光阴不可轻-百度文库1.Which is generally more expensive?a) A successful search.*b) An unsuccessful search.2.When properly implemented, which search method is generally the most efficient for exact-match queries?a)Sequential search.b)Binary search.c)Dictionary search.d)Search in self-organizing lists*e) Hashing3.Self-organizing lists attempt to keep the list sorted by:a) value*b) frequency of record accessc) size of record4.The 80/20 rule indicates that:a) 80% of searches in typical databases are successful and 20% are not.*b) 80% of the searches in typical databases are to 20% of the records.c) 80% of records in typical databases are of value, 20% are not.5.Which of the following is often implemented using a self-organizing list? *a) Buffer pool.b)Linked list.c)Priority queue.6.A hash function must:a)) Return a valid position within the hash table.b)Give equal probability for selecting an slot in the hash table.c)Return an empty slot in the hash table.7.A good hash function will:a)Use the high-order bits of the key value.b)Use the middle bits of the key value.c)Use the low-order bits of the key value.*d) Make use of all bits in the key value.8.A collision resolution technique that places all records directlyinto the hash table is called:a)Open hashing.b)Separate chaining.*c) Closed hashing.d) Probe function.19少年易学老难成,一寸光阴不可轻-百度文库9.Hashing is most appropriate for:a)In-memory applications.b)Disk-based applications.*c) Either in-memory or disk-based applications.10.Hashing is most appropriate for:a)) Range queries.b)Exact-match queries.c)Minimum/maximium value queries.11.In hashing, the operation that will likely require more record accesses is: *a) insertb) deleteChapter 10 Indexing: Instructor's CD questions1.An entry-sequenced file stores records sorted by:a)Primary key value.b)Secondary key value.*c) Order of arrival.d) Frequency of access.2.Indexing is:a) Random access to an array.*b) The process of associating a key with the location of a corresponding data record.c) Using a hash table.3.The primary key is:a)) A unique identifier for a record.b)The main search key used by users of the database.c)The first key in the index.4.Linear indexing is good for all EXCEPT:a)Range queries.b)Exact match queries.*c) Insertion/Deletion.d)In-memory applications.e)Disk-based applications.5.An inverted list provides access to a data record from its:a) Primary key.20______________________________ 少年易学老难成,一寸光阴不可轻-百度文库*b) Secondary key.c) Search key.6.ISAM degrades over time because:a) Delete operations empty out some cylinders.*b) Insert operations cause some cylinders to overflow.c) Searches disrupt the data structure.7.Tree indexing methods are meant to overcome what deficiency in hashing? *a) Inability to handle range queries.。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
Chapter 2 Review QeustionsR1,R3,R4,R5,R10,R11,R13,R15,R16,R20,R21,R22,R27,R28R1. List five nonproprietary Internet applications and the application-layer protocols that they use.Answer:The Web: HTTP; file transfer: FTP; remote login: Telnet; Network News: NNTP;e-mail: SMTP.R3. What is the difference between network architecture and application architecture?Answer:Network architecture refers to the organization of the communication process into layers (e.g., the five-layer Internet architecture). Application architecture, on the other hand, is designed by an application developer and dictates the broad structure of the application (e.g., client-server or P2P)•R4What information is used by a process running on one host to identify a process running on another host?Answer:The IP address of the destination host and the port number of the destination socket.•R5For a P2P file-sharing application, do you agree with the statement, “There is no notion of client and server sides of a communication session”? Why or why not?Answer:No. As stated in the text, all communication sessions have a client side and a server side. In a P2P file-sharing application, the peer that is receiving a file is typically the client and the peer that is sending the file is typically the server.•R10Recall that TCP can be enhanced with SSL to provide process-to-process security services, including encryption. Does SSL operate at the transport layer or the application layer? If the application developer wants TCP to be enhanced with SSL, what does the developer have to do ?Answer:SSL operates at the application layer. The SSL socket takes unencrypted data from the application layer, encrypts it and then passes it to the TCP socket. If the application developer wants TCP to be enhanced with SSL, she has to include the SSL code in the application.•R11What is meant by a handshaking protocol?Answer:A protocol uses handshaking if the two communicating entities first exchange control packets before sending data to each other. SMTP uses handshaking at the application layer whereas HTTP does not.•R13Telnet into a Web server and send a multiline request message. Include in the request message the If-modified-since: header line to force a response message with the 304 Not Modified status code.Answer:Issued the following command (in Windows command prompt) followed by the HTTP GET message to the “”web server:> telnet 80Since the index.html page in this web server was not modified since Fri, 18 May 2007 09:23:34 GMT, the following output was displayed when the above commands were issued on Sat, 19 May 2007. Note that the first 4 lines are the GET message and header lines input by the user and the next 4 lines (starting from HTTP/1.1 304 Not Modified) is the response from the web server.•R15Suppose Alice, with a Web-based e-mail account (such as Hotmail or gmail), sends a message to Bob, who accesses his mail from his mail server using POP3. Discuss how the message gets from Alice’s host to Bob’s host. Be sure to list the series of application-layer protocols that are used to move the message between the two hosts.Answer:Message is sent from Alice’s host to her mail server over HTTP. Alice’s mail server then sends the message to Bob’s mail server over SMTP. Bob then transfers the message from his mail server to his host over POP3.•R16Print out the header of an e-mail message you have recently received. How many Received: header lines are there? Analyze each of the header lines in the message.Answer: skipped•R20Consider a new peer Alice who joins BitTorrent without possessing any chunks. Without any chunks, she cannot become a top-four uploader for any of the other peers, since she has nothing to upload. How then will Alice get her first chunk?Answer:Alice will get her first chunk as a result of she being selected by one of her neighbors as a result of an “optimistic unchoke,”for sending out chunks to her.•R21In BitTorrent, suppose Alice provides chunks to Bob throughout a 30-second interval. Will Bob necessarily return the favor and provide chunks to Alice in this same interval? Why or why not?Answer:It is not necessary that Bob will also provide chunks to Alice. Alice has to be in the top 4 neighbors of Bob for Bob to send out chunks to her; this might not occur even if Alice is provides chunks to Bob throughout a 30-second interval.•R22What is an overlay network? Does it include routers? What are the edges in the overlay network? How is the query-flooding overlay network created and maintained?Answer:The overlay network in a P2P file sharing systemconsists of the nodes participating in the file sharingsystem and the logical links between the nodes. There is a logical link (an “edge”in graph theory terms) from node A to node B if there is a semi-permanent TCPconnection between A and B. An overlay network does not include routers. With Gnutella, when a node wants to join the Gnutella network, it first discovers the IPaddress of one or more nodes already in the network. It then sends join messages to these nodes. When the node receives confirmations, it becomes a member of the of Gnutella network. Nodes maintain their logical links with periodic refresh messages.•R27For the client-server application over TCP described in section 2.7, why must the server program be executed before the client program? For the client-server application over UDP described in Section 2.8, why may the client program be executed before the server program?Answer:For the TCP application, as soon as the client is executed, it attempts to initiate a TCP connection with the server. If the TCP server is not running, then the client will fail to make a connection. For the UDP application, the client does not initiate connections (or attempt to communicate with the UDP server) immediately upon execution•R28The UDP server described in Section 2.8 needed only one socket, where the TCP server described in Section 2.7 needed two sockets. Why? If the TCP server were to support n simultaneous connections, each from a different client host, how many sockets would the TCP server need?Answer:With the UDP server, there is no welcoming socket, and all data from different clients enters the server through this one socket. With the TCP server, there is awelcoming socket, and each time a client initiates aconnection to the server, a new socket is created. Thus, to support n simultaneous connections, the serverwould need n+1 sockets.ProblemsP1,P4,P5,P7,P8,P16,P24,P25•P1True or false?a. A user requests a Web page that consists of some textand three images. For this page, the client will sendone request message and receive four responsemessages.b.Two distinct Web pages (for example,/research.html and/student.html)can be sent over the same persistent connection.c.With nonpersistent connection between browser andorigin server, it is possible for a single TCP segment to carry two distinct HTTP request messages.d.The Date: header in the HTTP response messageindicates when the object in the response was lastmodified.Answer:a) Fb) Tc) Fd) F•P4Obtain the HTTP/1.1 specification (RFC2616). Answer the following questions: a.Explain the mechanism used forsignaling between the client and serverto indicate that a persistent connection is being closed. Can the client, theserver ,or both signal the close of aconnection?b.What encryption services are providedby HTTP?Answer:a) Persistent connections are discussed in section 8 ofRFC 2616 (the real goal of this question was to getyou to retrieve and read an RFC). Sections 8.1.2 and8.1.2.1 of the RFC indicate that either the client or theserver can indicate to the other that it is going to close the persistent connection. It does so by including theincluding the connection-token "close" in theConnection-header field of the http request/reply.b) HTTP does not provide any encryption services.•P5Read RFC 959 for FTP. List all of theclient commands that are supported by the RFC.Answer:Access control commands:USER, PASS, ACT, CWD, CDUP, SMNT, REIN, QUIT.Transfer parameter commands:PORT, PASV, TYPE STRU, MODE.Service commands:RETR, STOR, STOU, APPE, ALLO, REST, RNFR, RNTO, ABOR, DELE,RMD, MRD, PWD, LIST, NLST, SITE, SYST, STAT, HELP, NOOP.•P7Suppose within your Web browser you click on a link to obtain a Web page. The IP address for the associated URL is not cached in your local host, so a DNS lookup is necessary to obtain the IP address. Suppose that nDNS servers are visited before your host receives theIP address from DNS; the successive visits incur andRTTof RTT1,…RTTn. Further suppose that the Webpage associated with the link contains exactly one object, consisting of a small amount of HTML text. LetRTT0denote the RTT between the local host and theserver containing the object. Assuming zero transmission time of the object, how much time elapses from when the client clicks on the link until the client receives the object?Answer:The total amount of time to get the IPaddress iselapses to set up the Once the IP address is known, RTTTCP connection and another RTTelapses to requestand receive the small object. The total response time is•P8Referring to Problem P7,suppose theHTML file references three very smallobjects on the same server. Neglecting transmission times, how much timeelapses witha.Non-persistent HTTP with no parallelTCP connections?b.Non-persistent HTTP with parallelconnections?c.Persistent HTTP?Answer: a)b)c)•P16Consider distributing a file of F=5 Gbits to N peers. The server has an upload rateof us =20Mbps, and each peer has adownload rate of di =1Mbps and anupload rate of u. For N=10,100, and1,000 and u=100Kbps, 250Kbps,and 500Kbps,prepare a chart giving the minimum distribution time for each of the combinations of N and u for both client-server distribution and P2P distribution.Answer:For calculating the minimum distribution time for client-server distribution, we use the following formula:Similarly, for calculating the minimum distribution time for P2P distribution, we use the following formula:•P24Suppose that in UDPClient.java we replace the LineDatagramSocket clientSocket= new DatagramSocket();withDatagramSocket clientSocket= new DatagramSocket(5432);Will it become necessary to changeUDPServer.java? What are the port numbers for the sockets in UDPClient and UDPServer?What were they before making this change?Answer:•P25Install and compile the Java ProgramsTCPClient and UDPCLient on one hostand TCPServer and UDPServer onanother host.a.Suppose you run TCPClient before yourun TCPServer. What happens? Why?b.Suppose you run UDPCLient before yourun UDPServer. What happens? Why?c.What happens if you use different portnumbers for the client and server sides?Answer:a)If you run TCPClient first, then the client will attempt to make a TCP connection with a non-existent server process.A TCP connection will not be made.b) UDPClient doesn't establish a TCP connection with the server. Thus, everythingshould work fine if you first run UDPClient, then run UDPServer, and then type some input into the keyboard.c) If you use different port numbers, then the client will attempt to establish a TCP connection with the wrong process or a non-existent process. Errors will occur.。