NATIONAL QUALIFICATIONS CURRICULUM SUPPORT Computing Revision Questions [ADVANCED HIGHER] Acknowledgements This document is produced by Learning and Teaching Scotland as part of the National Qualifications support programme for Computing. Permission to base these support materials on past CSYS papers is acknowledged with thanks to the Scottish Qualifications Authority. First published 2002 Electronic version 2002 © Learning and Teaching Scotland 2002 This publication may be reproduced in whole or in part for educational purposes by educational establishments in Scotland provided that no profit accrues at any stage. ISBN 1 85955 927 1 CONTENTS Introduction 1 Section 1: Software Development Revision Exercises 1–6 Answers 3 Section 2: Artificial Intelligence Revision Exercises 1–6 Answers 33 Section 3: Data Communications Revision Exercises 1–6 Answers 63 RE VI S I O N Q UE ST ION S ( AH C OMP UT ING) ii i iv RE VI S I O N Q UE ST I ON S ( AH C OMP UT ING) INTRODUCTION This support pack contains sets of revision questions for three Advanced Higher units. The questions were based on past CSYS papers issued by SQA. It was not possible to use past papers to produce a suitable range of revision questions for the Computer Systems unit. Answer sheets accompany each set of exercises. The number of points that would be expected in an answer is indicated. Advice on the allocation of marks is also given. It should be noted that these questions are offered as additional work and do not form part of the formal assessment of each unit. Staff may find the questions useful in other contexts such as revision and supported self-study. RE VI S IO N Q UE ST ION S ( AH C OMP UT I NG) 1 2 RE VI S I O N Q UE ST I ON S ( AH C OMP UT ING) SO F T WA R E D E V E LO PM EN T SECTION 1 Revision Exercise 1 A furniture removal company intends to replace its manual system for generating reports with a computer system. The company has produced the following informal statement of requirements. We have a fleet of articulated lorries which are used to transport containers of furniture. Typically, a container is loaded up with furniture belonging to a customer and is transported to one of the company’s storage depots, where it is left until the customer requires the furniture. When required, the container is transported by lorry to a destination where the furniture is unloaded. The empty container is then returned to the depot. Hence, at any time while the furniture is in the company’s care, it is in a specified container, which is either located at a depot or is in transit to or from a depot. When not being used for transportation and storage, lorries and empty containers ar e kept at one or other of the depots. We want a computer system to keep track of the location of furniture, containers and lorries. The computer system has to be able to receive information from any of its depots and produce reports when required. 1. 2. An analyst is asked to produce a formal requirements specification for the computer system. a. Describe the way in which the analyst would go about obtaining this. 2 b. Give examples of the type of information that would be required from the customer, indicating those aspects of the company’s operations to which the analyst would need to have access. 2 a. What is the difference between a requirements specification and a system specification? b. 2 Outline a possible top-level system specification for the removal company’s computer system. The specification should be presented in terms of a number of functions, each with a clearly defined set of inputs, processes and outputs. You will need to make some assumptions about the RE VI S IO N Q UE ST ION S ( AH C OMP UT ING) 3 SO F T WA R E D E V E LO PM EN T company’s operations; state clearly any such assumptions that you make. Base your answer on the fact that the following reports are required each week: • A history of the movements of each container and of each lorry • An inventory of containers and lorries at each depot • A statement of the location of the furniture belonging to each customer • The number of hours driven by each driver and each lorry 7 3. 4 a. Describe two major validation or verification activities that need to take place when developing a computer system of this kind. 2 b. Suppose a report was also required to give the total of the weekly mileages of all the lorries owned by the company. How would the company go about checking that the software used to produce the report was correct? 3 c. If during the check it was found that a report stated an incorrect total mileage, what procedures should be adopted to determine the source(s) of the error? 2 Total 20 RE VI S I O N Q UE ST I ON S ( AH C OMP UT ING) SO F T WA R E D E V E LO PM EN T Revision Exercise 2 1. The development process for large software systems normally requires formal techniques of specification and design as well as carefully planned and documented project management. In contrast, the development process for small programs that are intended for personal use is often informal. Explain why large software systems justify a more formal development process than is required for small programs. 3 2. One representation of the software development lifecycle is the ‘V’ model shown in the diagram below. The diagonal arrows represent progression in the phases of the system’s development. a. b. c. Explain the purpose of the following phases: • feasibility study • system design • module validation. 3 Describe the activities which should be included within the following phases: • evaluation and acceptance • maintenance and enhancements. 2 The diagram shown does not make explicit the iterative nature of software development. i. State what is meant by iterative in this context. 1 ii. Describe an example of how iteration could occur as a result of activities undertaken during the ‘integration and system test’ phase. 2 RE VI S IO N Q UE ST ION S ( AH C OMP UT ING) 5 SO F T WA R E D E V E LO PM EN T 3. A company which specialises in technical documentation employs a staff of 35 technical authors along with two managers, three administrative workers and three computing support staff. The managing director suggests that, in order to improve the company’s productivity, the computing support staff might develop a new word processor which will have special facilities for technical writing. Outline a range of activities that should be undertaken in a feasibility study into this proposal. State clearly the questions that should be answered by each activity. 9 Total 20 6 RE VI S I O N Q UE ST I ON S ( AH C OMP UT ING) SO F T WA R E D E V E LO PM EN T Revision Exercise 3 A bakery in a large city produces and delivers its products each day to a variety of outlets using its own fleet of delivery vans. The managing director has decided that the bakery could save money and time and give better service to its customers if it computerised its order processing system. The managing director has produced the following statement of the bakery’s requirements. We receive orders from shops, hotels, restaurants and works’ canteens for the bread, rolls, pies, cakes and pastries that are required the next day. Each day we must prepare: • a bakers’ production schedule which lists the numbers and types of bakery items required • for each driver, a route report listing outlets that require deliveries and the goods to be delivered there • customer invoices. 1. The managing director decides to consult a systems analyst who explains that the first stage in computerising the order processing system is to carry out a feasibility study. Identify and describe two important elements of a feasibility study. 2. A subsequent step is the systems investigation which requires consideration of the data flow within the organisation. Describe, by using a diagram or otherwise, how the data flows into and out of the order processing system of the bakery. 3. 4 2 The systems analyst states that to produce an operational requirement specification, it will be necessary to visit the bakery and interview members of the staff and management to find out their precise requirements. Identify three significant areas for exploration by the systems analyst and • identify the kinds of questions that he or she should ask in that area • justify the relevance of the questions in terms of the operational requirement specification. 6 RE VI S IO N Q UE ST ION S ( AH C OMP UT ING) 7 SO F T WA R E D E V E LO PM EN T 4. 8 The systems analyst prepares an operational requirement specificatio n which is accepted by the managing director. The managing director now asks what further stages are required to complete the development of the computerised order processing system. a. Describe the further stages required to complete the development .4 b. What should the system developers do to ensure that the managing director is satisfied with the final system? RE VI S I O N Q UE ST I ON S ( AH C OMP UT ING) 4 Total 20 SO F T WA R E D E V E LO PM EN T Revision Exercise 4 A large lending library intends to develop new software to maintain records of its stocks and customers, and to provide reports on demand. A working party has been given the remit of overseeing the development and implementation of the software. The working party has produced the following statement of what is required of the software. The library has books located in three different buildings. In two of the buildings books are on public display and there are issue desks for borrowing and returning books. The third building is used to store books that are no longer kept on public display. Customers of the library are able to borrow books on public display, reserve books that are currently on loan, and inspect books kept in the store. The new software is required to maintain records of the history of each book, including locations, borrowers, condition, and dates of being borrowed and returned. In addition, records relating to each customer are required. These need to contain relevant personal or institutional details and a history of transactions. The software has to maintain and update these records. Various reports are required. At any time a request for the current status of any book may be generated by a member of the library staff, or by a customer. Regular reports on library usage will be expected by the library management. Other reports should be triggered automatically when anomalies are detected, or when a customer does not return a book on time. The library has a multi-user computer system with basic terminals for customer use and with more sophisticated terminals located in offices and at issue desks for staff use. 1. a. What is the difference between the statement produced by the working party and a formal operational requirement specification? 1 b. In the context of the lending library, outline the steps that would be needed to produce an operational requirement specification. 6 RE VI S IO N Q UE ST ION S ( AH C OMP UT ING) 9 SO F T WA R E D E V E LO PM EN T 2. After an operational requirement specification has been produced, what additional steps will be required to produce a software design? 3 3. The external behaviour of a system is a description of what the system does in terms of its functions, inputs and outputs: the internal behaviour of a system is a description of how the system achieves its results in terms of the processes and methods that operate within it. Should an operational requirement specification specify external system behaviour, internal system behaviour, or both? Illustrate your answer using one feature of the new library software as an example. 2 4. Outline an issue relating to the reliability of the software and an issue relating to the security of the data that arise from the fact that the library computer system is multi-user rather than single-user. With regard to each of these issues, in what ways could those implementing the software attempt to guarantee its reliability and the security of the data? 4 5. Those using the new software will require facilities to help them become acquainted with its capabilities. Describe two different methods by which the software itself could help users become familia r with its capabilities. Discuss the advantages and disadvantages of these methods from the perspective of the library staff and customers. 4 Total 20 10 RE VI S I O N Q UE ST I ON S ( AH C OMP UT ING) SO F T WA R E D E V E LO PM EN T Revision Exercise 5 The manager of a local estate agency would like to invest in a computerised property management system for her branch. She describes the current operations of her agency as follows: All properties are listed in a Weekly Guide produced by a local desktop publishing company. This contains a picture of each property plus basic information on the property. It also contains the selling price of the property. A more detailed Property Brochure for each property is also held at our branch. This contains a comprehensive description of the property. It includes details of the number of rooms, room measurements and any extras that might be included in the sale, such as carpets and curtains. When asked to sell a property, we arrange an interview with the seller and undertake an initial survey. We agree a selling price and prepare the information that will go into the Weekly Guide and the Property Brochure. Offers for the purchase of the property may be made by more than one buyer. Each offer must be recorded. Property at any time can be seen in one or more of the following stat es: • available for viewing • under offer to purchase • withdrawn from sale • sold. When an offer is accepted we inform the legal section at Head Office. The legal section manages the transfer of property title deeds to the new owner and prepares all financial transactions. 1. Head Office commissions a feasibility study. a. What is the purpose of a feasibility study? b. State two questions that the feasibility study should attempt to answer. c. Give two reasons why feasibility studies are generally considered useful. 3 RE VI S I O N Q UE ST ION S ( AH C OMP UT ING) 11 SO F T WA R E D E V E LO PM EN T 2. Head Office decides to proceed with this development and approves a system investigation. Describe the roles and activities of each of the following within the system investigation. a. b. c. 3. The systems analyst Branch staff Customers Head Office is concerned that the development will cost too much. Propose two ways in which the scope of development of the system could be limited. 6 2 4. A problem may arise when several buyers simultaneously make offers for the same property. At which stage of the software development process should any solutions to this problem be specified? Justify your answer. 2 5. Describe fully the stages required to complete the development of the system beyond the system investigation. 6 6. The system is installed and staff training begins. Identify the training needs of the branch manager. 1 Total 20 12 RE VI S I O N Q UE ST I ON S ( AH C OMP UT ING) SO F T WA R E D E V E LO PM EN T Revision Exercise 6 RapidApps is a software development company which specialises in commercial data processing applications. The company uses the following two software development models. Model A This involves the complete capture of client requirements prior to the start of any further developments. Parts of the system are then delivered to the client as they are developed. The client may accept these or not, according to whether they meet the previously agreed requirements. Model B An initial implementation is developed following brief and informal discussion with the client. This is made availab le to the client for comment. The system is refined to take account of this comment. This process is then iterated until an adequate system has been developed. 1. a. Recommend which of the above models should be used in a situation where it may be difficult to elicit client needs. Give an example which illustrates your answer. 2 b. Contrast software development Model A and software development Model B with respect to: • management of system documentation • maintenance of the final system. 4 2. Certain software development models require no participation from the client other than an initial requirements elicitation and final acceptance of the system. Describe two possible advantages that such a software development model could bring to the software developer. 2 3. In a traditional model of software development, the design stage starts after both a feasibility study and a system investigation have been completed. a. Describe three activities that are part of the design stage. RE VI S I O N Q UE ST ION S ( AH C OMP UT ING) 3 13 SO F T WA R E D E V E LO PM EN T b. 4. 14 A variety of design notations may contribute to the description of software designs. Name one design notation. Describe the purpose of this notation and give one example of its use. 4 An important activity in software development is validation. a. Describe the purpose of validation. b. Identify two stages in the software development cycle when validation takes place. For each stage you should refer to: • personnel involved • activities carried out. 4 Total 20 RE VI S I O N Q UE ST I ON S ( AH C OMP UT ING) 1 SO F T WA R E D E V E LO PM EN T Answers for Revision Exercise 1 The following are indicators of the level of answer required at Advanced Higher, where ‘level’ refers to the concepts, not necessarily the language used. 1. a. Producing the requirements specification involves finding out from the customer what is required for the computer system, and defining these requirements in a clear and unambiguous way. ½ mark for each of the following The processes involved will be: • procure a statement of requirements from the client • meet with the client to clarify the requirements • carry out a feasibility study • carry out a system investigation. b. The informal statement of requirements produced by the company is too sparse to produce a requirements specification immediately. ½ mark each for any 4 of the following Clarification would be required about: • the system used at present • those aspects of the present system which are to be computerised • the extensions to the present system which are required • the number of storage depots and containers • the volume of traffic to and from depots • i/o requirements including number of users and maximum response time • financial and other constraints on the system. 2. a. Marks as indicated The requirements specification presents the system requirements from the client’s point of view (½); it is a non-technical document (½) which should be complete, concise and unambiguous. The system specification specifies the components of the system and their interaction from the software developer’s point of view (½); it is a technical document identifying functions and constraints such as hardware requirements, software tools, training requirements ( ½). RE VI S I O N Q UE ST ION S ( AH C OMP UT ING) 15 SO F T WA R E D E V E LO PM EN T b. Assume that the company maintains a database on a central computer, with update and interrogation access from each depot by means of a PC connected to a modem, and with report generation capabilities at the central office. This assumes also that the central computer has a sufficiently powerful multi -access system equipped with a multi-line modem and all necessary communications software, memory and disk storage. 1 mark for each of the following: • When a driver collects a container from a depot, input is required via a modem to update the cent ral database. Inputs: existing database, new data (e.g. date, time, driver id, container reference, container status, vehicle registration, destination, customer reference). Processes: data validation and database update. Outputs: result of validation, confirmation of database update, the modified database. • When a driver delivers a container to a depot, input is again required via a modem to update the central database. Inputs, processes and outputs as above. • A function is required to input a container reference and to receive as output a full history of that container to date; various options for abbreviated output should be provided. Inputs: database, container reference plus options. Processes: database interrogation. Outputs: monitor display, r eport generation or history of containers. • A function is required to input a vehicle registration number and to receive as output a full history of that vehicle to date; various options for abbreviated output should be provided. Inputs: database, vehicle registration plus options. Processes and outputs as above. • A function is required to input a depot reference and to receive as output either an inventory. Inputs: database, depot reference. Processes and outputs as above. • When a customer’s reference is input to the database, details of the history of locations of the customer’s furniture should be output, including depot reference (when in storage) and vehicle registration and journey details (when in transit). Inputs: database, customer reference. Processes and outputs as above. • A function is required to input a driver id and to output a history of journeys. Inputs: database, driver id, dates. 16 RE VI S I O N Q UE ST I ON S ( AH C OMP UT ING) SO F T WA R E D E V E LO PM EN T Processes: database interrogation. Outputs: itinerary for specified dates and total number of hours driven. A similar function is required for vehicles. 3. a. 1 mark each for any 2 of the following: • to formally check the system specification against the requirements specification in order to be sure of its correctness; • to establish the verification requirements which will be required to be satisfied as each function is checked for conformity with its specification; • to perform the testing of functions in accordance with the established verification requirements. b. 1 mark for each of the following activities: • consult the verification requirements and check that testing procedures have been followed; • run a simulation, including typical data, data representing extreme situations, and invalid data; • run the software alongside the manual system and check that outputs agree. c. 1 mark each for any 2 of the following: • check that data input procedures have been correctly followed; • assuming the software is at fault, run a simulation using the same data, checking the database before and after the operation of each function; • check the operation of locking procedures designed to control simultaneous attempts to update the database. Total 20 RE VI S I O N Q UE ST ION S ( AH C OMP UT ING) 17 SO F T WA R E D E V E LO PM EN T Answers for Revision Exercise 2 The following are indicators of the level of answer required at Advanced Higher, where ‘level’ refers to the concepts, not necessarily the language used. 1. 1 mark each for any 3 of the following: • Large systems require communication between the development team members to coordinate their efforts; small programs are often the work of a single person and so communication is unimportant. • Large systems are very expensive so require formal contract with the purchaser, based on a formal product definition; small programs are often for the developer’s own use or internal company use and require no formal contract. • Large systems have a complexity that cannot be managed without systematic design and construction methods; small programs are often simple enough to be successfully constr ucted with ad-hoc methods. • Large systems must be highly reliable since, for example, their failure may imperil company finances or safety; small programs seldom play a critical role and need not be constructed to the same standards of reliability. 2. a. 1 mark for each of the following: Feasibility study – to investigate the technical feasibility – whether current hardware and software can produce the required concept; economic feasibility – whether the required system is possible within the funds available and the cost benefits predicted; legal feasibility – whether the project will meet legal requirements, e.g. Data Protection Act. System design – describes how the product definition could be satisfied by a set of interacting programs or progr am modules. Module validation – tests an individual constructed module to ensure that it correctly implements its specification as per the system and module design. b. 18 1 mark for each of the following: Evaluation and acceptance – purchaser testing against the product definition; purchaser accepts, rejects, or requests changes to product; system developer completes RE VI S I O N Q UE ST I ON S ( AH C OMP UT ING) SO F T WA R E D E V E LO PM EN T documentation; system developer reviews entire project and identifies future implications. Maintenance and enhancements – corrective maintenance to remove errors not discovered during testing; adaptive maintenance to alter the system when the client changes hardware or software; perfective maintenance to upgrade the system to meet an extended specification. c. 3. i. 1 mark Iterative – an event taking place in a later phase of the system’s development forces a review of decisions made at earlier phases of the lifecycle, with the possibility that activities in these phases may have to be repeated. ii. Marks as indicated Iteration during integration and system test will occur if a test failure of the integrated system reveals a flaw in the system design, forcing the system design to be corrected (1). The altered system design may require a change to the design of one or more modules, resulting in more implementation and module validation, before the integration and system test phase is repeated (1). 1½ marks each for any 6 of the following: • Analysis of existing provision. What technology are authors using at present? What are the benefits and limitations of this technology? Are the authors open to a change in technology? How much training would a change require? • Establish training requirements. Do the computing staff have the skills to build a new WP? Do they have time to add this to their existing duties? If not, could training be given or additional staff be imported? • Estimate project costs. How much effort (programmer months) to build a new WP? What is the cost of new hardware and development software? How high is the risk of project failure? What are the likely future maintenance costs? • Assess project advantages. What will be the benefit to authors from the new WP? What will be the benefit to the company? What will be the benefit to the company’s clients? • Assess project disadvantages. What are the drawbacks of using a ‘non-standard’ WP? How much new training will be required? RE VI S I O N Q UE ST ION S ( AH C OMP UT ING) 19 SO F T WA R E D E V E LO PM EN T • Consider alternative options. Could an existing WP be adopted/adapted instead? Is the status quo acceptable? • Reach conclusions. Which of the following options will bring most overall gain: – retain status quo – develop the new WP – adapt an existing WP to meet company’s specialist needs? Total 20 20 RE VI S I O N Q UE ST I ON S ( AH C OMP UT ING) SO F T WA R E D E V E LO PM EN T Answers for Revision Exercise 3 The following are indicators of the level of answer required at Advanced Higher, where ‘level’ refers to the concepts, not necessarily the language used. 1. 2 marks for an appropriate full description of 2 of the following: • Economic feasibility which considers questions such as: Is it cost effective? • Technical feasibility which considers questions such as: Does the hardware and software capability exist? What are the risks? What are the project’s scope and objectives? • Legal feasibility which considers questions such as: What are the requirements of the Data Protection Act? What are the alternatives? Manual, partial and full computerisation and reasons for selection made? 2. 1 mark for correct inputs, 1 for correct outputs Orders from shops, hotels, restaurants and canteens are the inputs to the order processing system and bakers’ production schedules, drivers’ route reports and customer invoices are the outputs from the system. Or diagrammatic response such as: Bakers’ production schedule Shops’ orders Hotels’ orders Restaurants’ orders Canteens’ orders 3. Order Processing System Drivers’ route report Customer invoices ½ mark for each of the following areas and ½ mark for relevant questions in each area: Orders – How many clients are there? When are orders available for processing? To what extent do daily orders change and to what extent do they stay the same? How many different items are there? Production schedule – When must this be available to the bakers? What are the criteria which determine the order of baking (e.g. oven temperatures, preparation times etc.)? How many people and resources (e.g. ovens, mixers etc.) are available? Route reports – How many outlets are there and how many are visited at the maximum each day? How many vans and drivers are RE VI S I O N Q UE ST ION S ( AH C OMP UT ING) 21 SO F T WA R E D E V E LO PM EN T there and do restrictions on drivers’ hours have an effect? What is the capacity of each van and how much space does each item take? Invoices – How many customers are there? How many invoices on average and at maximum are issued daily? What details are entered on invoices and what forms are used? What records of customer accounts must be kept? 1 mark for each of 3 justifications from the following list: • Determining the amount of disk storage required (e.g. how many customers, how many orders, what customer records are kept?). • Determining the quantity and range of printed output required (e.g. how many invoices, what details are required on them?). • Determining the timing and amount of data preparation required (e.g. when are orders available, how much do orders alter daily?). • Determining the quantity and speed of processing required (e.g. when must the schedule be available to the bakers, how many outlets, vans and drivers?). • Determining the system constraints for programming (e.g. how many ovens, how many drivers, what are the van capacities?). 4. 22 a. 1 mark for each of the following: • System specification – produce a precise description of the software functions. • Software design and validation – specify the programs required by means of pseudocode and/or structure charts and through dry runs check the algorithms used. • Implementation and testing of components and whole system – coding, testing and debugging procedures then assembling these, testing and debugging. • Documentation and maintenance – user and technical documentation completed; in due course alter the software to remove errors which arise and to accommodate further features. b. 1 mark for each of two points from the following: • Validate software to ensure compliance with the operational requirement specification. • Verify software to ensure that it meets the design specification. • Ensure that the testing strategy meets the firm’s demands and that all of the firm’s functional requirements are met. RE VI S I O N Q UE ST I ON S ( AH C OMP UT ING) SO F T WA R E D E V E LO PM EN T • Involve the firm’s employees in all of these processes so that alterations can be made in light of their comments. • Deliver the system within budget and on time to meet the contract. Total 20 RE VI S I O N Q UE ST ION S ( AH C OMP UT ING) 23 SO F T WA R E D E V E LO PM EN T Answers for Revision Exercise 4 The following are indicators of the level of answer required at Advanced Higher, where ‘level’ refers to the concepts, not necessarily the language used. 1. a. 1 mark The working party are the clients for the system and they have produced a non-technical report on what they believe a system can do for them. They have not taken any account of the technical feasibility of the proposed system nor the eventual cost if all of these features are implemented. A formal operational requirements specification is a technical document that will have considered these questions and many more and it will be produced by systems analysts, i.e. computing professionals who are aware of the technical feasibility and the costs involved. b. 2 marks for each step as follows: Step 1 Prior to the operational requirements specification, the systems analysts will produce a formal problem specification, agreed with the working group, which clearly describes the problems and desired outcomes from the project. They will then produce a feasibility study in which they will interview staff and study the current system to determine alternatives and investigate the technical, economic and legal feasibility of the project. This study will then be agreed with the working group together with the timetable and costs for further stages in the project. Step 2 The next stage will be a system investigation in which the analysts discover through interviews with library staff and observation the answers to the why, what, where, how, who and when questions about the information within the library. They will also study the flow of data within the library’s operations and identify the inputs, processes and outputs of these operations. From this they will develop a basic design and refine their timetable and costs that will again be agreed with the working group. 24 RE VI S I O N Q UE ST I ON S ( AH C OMP UT ING) SO F T WA R E D E V E LO PM EN T Step 3 The analysts are now ready to produce an operational requirements specification in which they will evaluate the alternatives, e.g. partial and full computerisation. They will make a recommendation with reasons and then describe fully the hardware and software functions which will be implemented and the performance of the system in terms of capa city and speed. 2. 3 marks as shown The operational requirements specification will have to be analysed to determine the exact requirements of hardware and software and this will be discussed with the client to ensure that decisions made at this stage match the client’s view of what is required. (1) The next stage is the system specification that is often called the software requirements specification. At this stage the analysts produce a precise description of the software functions. At both stages prio r to the start of software design there will be a need to review decisions made at earlier stages – iteration. (1) The analysts can now pass their requirements to the software designers who will describe the major steps and their interconnection and then refine these steps to produce a detailed design which can be implemented. (1) 3. 2 marks as shown The operational requirements specification will only describe the external behaviour of the system as this is what the library working group will understand and need to make their decisions where compromises or alternatives are presented. The operational requirements specification will be analysed to produce the system specification which describes the internal behaviour. (1) For example, the operational requirements specification will describe the ‘regular reports on library usage’ by stating the presentation and content of these reports, e.g. which statistics are presented, how these are laid out and what type of chart is used. The operational requirements specification will not describe how the figures for these reports are gathered from the data of the library’s operations. (1) 4. 2 marks for each of the following: Reliability – There will be a problem when two customers simultaneously attempt to access the same book record to reserve that book or a customer attempts to access a book record while it is being edited by a librarian. The solution is to implement record RE VI S I O N Q UE ST ION S ( AH C OMP UT ING) 25 SO F T WA R E D E V E LO PM EN T lock-out so that while one user accesses a record, no other user can access that same record. Security – Customers should not be able to access details of other customers, e.g. they should be able to find that a book is on loan but not to whom, while the librarians should have this information and details of the borrower such as address and telephone number; also customers must not be able to alter data. Each user would be allocated a different security status level and each level above the customer enquiry level would have password protection. 5. 2 marks for each of two from the following: On-line help – This is suitable for both staff and customers though the language level for customers would need to be non -technical and help screens would only be available for the reduced number of operations available to customers. On-line tutorial – This would only be suitable for staff when the system was introduced as a reinforcement of training. It should not be necessary once staff are trained and using the system daily. It would not be suitable for customers as customers would be unwilling to spend the time and it would also tie up a terminal for one customer for too long. Cue cards or context-sensitive help – These would be suitable for both staff and customers but staff would find them irritating and wasteful of time once their expertise had reached a reasonable level. There should be a facility for staff to close cue cards while customers would not have this facility and the cue cards would be presented to every customer. Total 20 26 RE VI S I O N Q UE ST I ON S ( AH C OMP UT ING) SO F T WA R E D E V E LO PM EN T Answers for Revision Exercise 5 The following are indicators of the level of answer required at Advanced Higher, where ‘level’ refers to the concepts, not necessarily the language used. 1. 2. a. 1 mark A feasibility study is a brief, preliminary analysis which attempts to discover whether a solution is possible, or indeed, worth pursuing. b. ½ • • • c. ½ mark for each of the following: • Considerably less financial outlay than a full investigation; employing fewer computing specialists and conducted over a relatively short period of time. • There is no legal requirement for the client to commit themselves to further development; no formal agreement between the client and the developers will have taken place. a. 1 mark for each of the following: • Analyst role is to conduct the investigation, identify information flow and processes and produce an operational requirements document. • Analyst activities include interviewing branch personnel, sampling information sources such as the Weekly Guide and Property Brochure, observing how the property sales are processed, noting communications between sub -systems such as Head Office and branch. b. 1 mark for each of the following: • Branch staff role is as a client. The client would be responsible for describing user requirements that any new system should be designed to meet. • Branch staff activities include taking part in interviews which involve explaining the nature of the work, demonstrating the processes involved in property sales such as initial surveys, construction of information contained in Weekly Guide and Property Brochure, mark each for two of the following: Is a solution technically feasible? Is a solution economically feasible? Is a solution legally feasible? RE VI S I O N Q UE ST ION S ( AH C OMP UT ING) 27 SO F T WA R E D E V E LO PM EN T maintenance of property state, liaison with potential buyers and with the seller, assistance with the verification of the correctness of the operational requirements specification. c. 1 mark for each of the following: • Customer role would be as consumer of the information provided by the system, providing qualitative feedback such as presentation, appearance, performance of the system (response). • Customer activities might include completion of questionnaires on service requirements or review of presentation technique. 3. 1 mark for each of the following: Suggestions to limit scope of development: • Not to include the development of legal transactions that would devolve any of the operations at Head Office. • Not to include on-line communications with Head Office as this would require further investigation of the level of computerisation and communications equipment needed. 4. 1 mark Problems such as these should be resolved and stated clearly at the specification of operational requirements. ½ mark for each of the following: • This document is a legal contract between the supplier and the client. It should contain specifications of all operations and data that the system will support. • If the process of handling multiple offers is not clarified at this stage then there is a high probability that the end product will not meet the requirements of the user. 5. 1 mark for full description of each stage, up to 6 marks: Analysis of operational requirements – A team of developers will examine the specification in preparation for the design of the system. This will be necessary as there may have been only a few, key personnel involved in the analysis phase and the design team may include people who are new to the specification. Alternatively, it may be a completely different development team/company who have secured the tender and are involved in taking the system onto a physical design level. 28 RE VI S I O N Q UE ST I ON S ( AH C OMP UT ING) SO F T WA R E D E V E LO PM EN T System specification – A description of the hardware and software requirements of the system are specified. This wi ll involve details of operating system software, application software and data, system hardware including storage medium, peripherals, communications. Installation and training requirements will also be identified. Software design and validation – This is the commencement of the logical design of the software. Identification of major modules and data communications. Data structures/management identified. Logical decomposition of modules into sub-modules, using design method. Module and interface descriptions. Detailed logic established. Selection and apportioning of programming activity. Implementation and testing of components – Test method employed (top-down, bottom-up, etc). Test cases established for module logic and module integration (depending upon methodology). Test groups established. Documentation of test cases, expected results, actual results and any design modifications arising. Integration and testing of whole system – Systematic integration of component modules. System testing. Any design modifications documented. Corrective procedures employed. Final, on -site acceptance test. Documentation and maintenance – System documentation and technical reference manuals produced, including necessary backup procedures. User documentation may include on-line help/tutorial systems (although this should have been agreed at the requirements stage). On-site installation where perfective and adaptive maintenance contracts come into effect. 6. 1 mark Branch Manager – need to have supervisory status within the system with overall control of access to information, security, backup procedures, operational maintenance, configuration. Total 20 RE VI S I O N Q UE ST ION S ( AH C OMP UT ING) 29 SO F T WA R E D E V E LO PM EN T Answers for Revision Exercise 6 The following are indicators of the level of answer required a t Advanced Higher, where ‘level’ refers to the concepts, not necessarily the language used. 1. a. 1 mark Model B would be suitable. 1 mark for the following or equivalent: In an application area such as Artificial Intelligence which attempts to emulate some human capability, and where knowledge of how humans solve certain problems is not known, the quick development of a prototype can provide a basis for further discussion on requirements and/or experimentation with further models of the problem solution. b. 1 mark for each of the following: • It is practical with Model A to generate system documentation at each stage of development. This documentation will be fairly stable, changing only if there are errors highlighted in client feedback. • Model B on the other hand, by nature of the rapid changes being made, cannot practically generate a great deal of system documentation. It could lead to an unmanageable situation if attempts are made to keep documentation up to date with each prototype release. • Model A builds a framework for design very early on due to the existence of a requirements specification. Maintenance will be more manageable due to the existence of documentation for each system increment. • Continual change will corrupt the structure of the prototype system and maintenance will be difficult and costly. 2. 1 mark each for any 2 of the following: • Easier for company to prepare a framework for the design and implementation of the system as the requirements specif ication will not undergo any change. • Easier for the company to schedule development work within the project. • The original specification should form a legally binding contract between the client and the developer which provides protection 30 RE VI S I O N Q UE ST I ON S ( AH C OMP UT ING) SO F T WA R E D E V E LO PM EN T for the company against future changes demanded by the client. • Reviews are made easier by referring to an original specification in order to verify that the company has built the right product. • Final acceptance of the system is based upon recognition th at the company has adhered to the requirements of the original specification. 3. a. 1 mark for each of the following: • Architectural design is where the structure of the software is outlined. This will include details of major sub -systems and their communications. It will not include detailed logic. • Detailed logic design is where the algorithms required to carry out the tasks defined at the structural design stage are specified. • Design of the human computer interface is where the nature of the user-interaction and prompts are specified. b. 1 • • • mark for one of the following: program description languages (PDL) pseudocode graphical notations – structure chart, data flow diagrams, entity-relation models 2 marks for good description and 1 mark for example of use PDLs and pseudocode are used to describe detailed software logic by step-wise refinement and show program structures. Used immediately prior to coding each algorithm. Structure charts are used to show module and procedur e interaction, communication and dependencies. Used after the main stages are identified to give these stages order in the whole system. Data flow diagrams and entity-relation models are used in database system development to show the inputs, processes an d outputs within the system. Used to identify data requirements and operations at an early stage in system investigation. RE VI S I O N Q UE ST ION S ( AH C OMP UT ING) 31 SO F T WA R E D E V E LO PM EN T 4. 32 a. 1 mark Validation – the process of ensuring that the correct product is being built, is fit for the purpose intended ( i.e . is traceable to client requirements). b. 1 mark for the personnel and activities identified for 2 of the following stages: Stage Personnel Activities Requirements analysis Client/analyst Requirements review wherein agreement is reached that development proposals meet the client’s needs. Stage Personnel Activities Design Program designers Structured walkthroughs of the design using test data identified at the operational requirements stage. Stage Personnel Activities Implementation and testing Developers Series of validation tests undertaken by development team used to demonstrate conformity with requirements. Stage Personnel Activities Installation/acceptance Client/developers Client uses the system to test that it meets requirements. This can be an informal ‘test drive’ on an alpha version or a full blown systematically executed series of tests. Total 20 RE VI S I O N Q UE ST I ON S ( AH C OMP UT ING) AR T IF IC I AL I N T E L LI G E NC E SECTION 2 Revision Exercise 1 The ‘Knight’s Tour’ problem concerns a chess knight which is initially placed on the lower left corner of an otherwise empty chess board. The knight is required to make a sequence of moves which will visit every square on the chess board exactly once. It is not permitted for the knight to leave the chess board. The diagram below indicates the first five moves of one attempt to solve the problem. Note: a chess knight moves either two squares horizontally and one square vertically or else one square horizontally and two squares vertically. It is proposed to represent the problem symbolically by means of a set of rules, one of which is as follows: <(R,C), Visited> 1. <(R+1,C+2), [ (R,C) / Visited] > Viewing the chessboard as a matrix of rows and columns, state what is represented by the following terms: a. b. c. 2. (R,C) (R+1,C+2) Visited 3 How many rules like the one shown will be required? Justify your answer by drawing a diagram or otherwise. RE VI S I O N Q UE ST ION S ( AH C OMP UT ING) 2 33 AR T IF IC I AL I N T E L LI G E NC E 3. In some circumstances, the rule shown could generate an invalid state. State two different ways in which this could happen and suggest how the rule might be strengthened with conditions which will prevent invalid states from being generated. 3 4. Suppose that after a period of play, in which only valid moves have been made, the current state is represented by the term < (R n ,C n ), V n >. Explain how an inspection of this term can determine whether a goal state has been reached. 5. 6. 7. 34 a. Draw the search tree for the problem to show all valid ways to make the first two moves. Label each node to indicate the corresponding symbolic board state. 2 2 b. Mark your search tree diagram to show traversal sequences which might be followed by a depth-first search. 2 c. Mark your search tree diagram to show traversal sequences which might be followed by a breadth-first search. 2 Depth-first and breadth-first are sometimes called brute force methods of search. a. State why the term ‘brute force’ is apt. 1 b. A computer is used with a brute force method in an attempt to solve the Knight’s Tour problem. Explain why it may not succeed. 1 As an alternative to a brute force method, a program which has extra information about the problem might follow a heuristic method of search. a. State briefly what kind of extra information will be needed for a heuristic search. 1 b. Explain why heuristic methods can sometimes succeed where brute force methods do not. 1 Total 20 RE VI S I O N Q UE ST I ON S ( AH C OMP UT ING) AR T IF IC I AL I N T E L LI G E NC E Revision Exercise 2 An automated warehouse contains numbered boxes which are to be stacked on three pallets. The boxes are manipulated by a robot that travels on an overhead rail. The robot is fitted with an extendable gripper and can perform two types of operation as follows: • If the robot’s location is above a non -empty pallet, it may transfer the top box from this pallet onto another pallet. Thus, the robot can transform the scene shown in S1 into the one shown in S2 by this operation. • The robot can move from one location to another directly above a pallet without transferring any box. Thus, S2 below can be transformed into S3 by this operation. S1 rail robot Numbered boxes 1 2 3 pallet S2 2 3 1 2 3 1 S3 RE VI S I O N Q UE ST ION S ( AH C OMP UT ING) 35 AR T IF IC I AL I N T E L LI G E NC E The robot’s control software represents symbolically the transformations arising from these operations by means of state transition rules as follows: The transformation from scene S1 to scene S2 is represented as: <L, [1, 2], [3], [ ] > <R, [2], [3], [1] > The transformation from scene S2 to scene S3 is represented as: <R, [2], [3], [1] > <M, [2], [3], [1] > 1. Using the same symbolic notation, write down the representations of: • the three other transformations which could be applied to the boxes in scene S1 • the three other transformations which could be applied to the boxes in scene S2. 3 2. In a typical problem, the robot’s task is t o transform scene Sl into the scene shown below by a suitable sequence of operations. 1 2 3 a. b. 36 Write down the symbolic representation of this problem’s goal state. 1 Draw part of a search tree for the problem, labelling each node with the appropriate symbolic state representation. Your tree should show all states reachable from scene Sl within two operations. Omit reverse operations that return to the initial state S1. One branch, which you should identify clearly, should be extended further to reveal a solution to the problem. 4 RE VI S I O N Q UE ST I ON S ( AH C OMP UT ING) AR T IF IC I AL I N T E L LI G E NC E c. By marking your search tree or otherwise, indicate the traversal sequences which would be followed by: • depth-first search; • breadth-first search. 2 d. Ideally, the robot’s control software should f ind very quickly a solution which requires the fewest operations. Explain why the depth-first and breadth-first search methods may not give rise to ideal performance. 4 e. Describe a heuristic search strategy based on a numerical state evaluation function that might perform better than depth-first and breadth-first methods for planning the robot’s task. Your answer should: • name the search method on which your strategy will be based • describe how states will be evaluated • state the first two operations which could be made, starting from scene S1, when the robot’s control software implements your search strategy. Justify your answer fully. RE VI S I O N Q UE ST ION S ( AH C OMP UT ING) 6 Total 20 37 AR T IF IC I AL I N T E L LI G E NC E Revision Exercise 3 The ‘Water Buckets’ problem is described as follows. There are two buckets which can hold 7 litres and 5 litres of water respectively. Initially both are empty. A tap is available which can be used to pour water into a bucket until it is full, and there is a drain into which a bucket may be completely emptied. Water can be transferred from one bucket to another, but a transfer operation must either completely fill, or completely empty, one or other bucket. The aim is to find a sequence of transfer operations that result in a state in which the big bucket conta ins exactly 4 litres. The contents of the small bucket at that point do not matter. 1. The table below names and describes symbolic operators that could be used to represent some of the possible transfer operations. Name and describe four further operators that are necessary for a complete representation of the ‘Water Buckets’ problem. Name of operator empty_big_into_drain Type of transfer operation Pour all of big bucket into drain fill_small_from_tap Completely fill up small bucket from tap fill_small_from_big Completely fill up small bucket from big bucket Completely empty big bucket into small bucket empty_big_into_small 2. 2 Each operator could be defined by a state transition rule. For example, the fill small from big operator could be defined by the rule: fill_small_from_big: <Big, Small> <Big + Small -5, 5> In this rule, Big and Small are variables representing the respective contents of the buckets prior to the application of the operator. a. b. 38 Before applying this rule, what condition must be checked in order to ensure that the specified transfer operation is valid? Justify your answer. Using the same syntax, give state transition rules to define the operators RE VI S I O N Q UE ST I ON S ( AH C OMP UT ING) 1 AR T IF IC I AL I N T E L LI G E NC E • empty_big_into_drain, • fill_small_from_tap • empty_big_into_small as described in the table above. State any conditions that must be checked to ensure that the use of your rules is valid. 2 3. 4. These state transition rules could form the basis of a search program that attempts to solve the ‘Water Buckets’ problem. a. Draw a search tree diagram to show all the different ways in which such a search program could make the first two transfers. You should assume that the program uses loop detection to avoid returning to a previously reached state on any branch. Label the root of the tree <0, 0> and label each other node using similar notation to identify the contents of the two buckets. Label each arc with an appropriate symbolic operator. 4 b. Name two brute-force search methods that could be used by the program to search the tree. Annotate your tree to indicate the traversal sequences that would be followed under each method. 2 c. If the search program was not equipped with loop detection, what would be the effect upon the use of the two different search methods? Justify your answer fully. 3 In many problems, brute-force search methods are inadequate. Programs written to solve these problems are often based on heuristics. a. b. Explain why brute-force search methods may be inadequate to solve some problems and explain how heuristics might help in these cases. 2 A programmer suggests that the following heuristic could be applied to the Water Buckets problem: When the small bucket is full, empty it; when the big bucket is empty, fill it; otherwise, transfer as much as possible from the big bucket to the small bucket. Is this heuristic effective? Justify your answer fully. 4 Total 20 RE VI S I O N Q UE ST ION S ( AH C OMP UT ING) 39 AR T IF IC I AL I N T E L LI G E NC E Revision Exercise 4 1. Name an expert system shell with which you are familiar. For your named shell: a. explain how knowledge may be represented by the shell’s representation language 3 b. explain how the inference engine processes information from the knowledge base 2 c. describe the forms of justification that are available at runtime 2 2. d. describe the provision that is made for handling uncertainty 2 e. explain how a knowledge base developed with the shell could be debugged 2 f. describe the facilities provided for the design of the interface that is used for runtime consultation. 1 It is proposed to develop a ‘Course Choice’ expert system to assist school pupils in selecting courses. a. State four questions that should be asked to assess the feasibility of this project. 2 b. The development of the ‘Course Choice’ system would require the participation of: • at least one knowledge engineer • at least one domain expert • some target users. Identify the types of person who may be able to fulfil these roles and describe the main tasks that they would be expected to undertake. 3 c. 40 In principle, the system could be implemented using either an expert system shell or a general -purpose high-level language. Describe the possible advantages and disadvantages of using a general-purpose high-level language instead of an expert system shell to implement the ‘Course Choice’ expert system. 3 Total 20 RE VI S I O N Q UE ST I ON S ( AH C OMP UT ING) AR T IF IC I AL I N T E L LI G E NC E Revision Exercise 5 Monosoft Ltd wishes to develop an expert system to help its software technicians install operating systems for desktop computers. It is envisaged that the expert system will run on palmtop computers carried on site. Monosoft Ltd hopes that the software technicians will be able to use the expert system to reduce installation time and assist in fault finding. A knowledge engineer has been asked to produce a feasibility study for this proposal. 1. 2. Identify four factors which the knowledge engineer should take into account during the feasibility study and explain why each of these factors is significant. 4 Should this expert system incorporate numerical certainty factors? Justify your answer. 4 3. Describe two techniques which the knowledge engineer might use to obtain information for the knowledge base of this expert system. For each technique you have described, identify one advantage and one disadvantage. 4 4. Describe the Justification facilities which should be available in the completed expert system and discuss how these might affect Monosoft’s software technicians and customers. 4 5. Operating systems are constantly being updated. What are the implications of this for the validation and maintenance stages of the development of this expert system? 4 Total 20 RE VI S I O N Q UE ST ION S ( AH C OMP UT ING) 41 AR T IF IC I AL I N T E L LI G E NC E Revision Exercise 6 1. Knowledge acquisition has been called the bo ttleneck of expert systems development. a. Describe what is meant by knowledge acquisition and explain why this stage in the development of a new expert system may be a bottleneck. 3 b. Identify two techniques that are commonly used by knowledge engineers to elicit knowledge from human domain experts. Explain why the expert’s contribution to the development of a new expert system may continue beyond the knowledge acquisition stage. 2 Apart from human experts, what other sources of domain information might be investigated by the knowledge engineer? Your answer should distinguish electronic from non -electronic information sources. 2 c. 2. 42 Expert systems are commonly developed with the aid of a shell. Some shells, but not all, provide quantitative certainty handling. a. Name a commercially available expert system shell with which you are familiar and which supports quantitative certainty handling. State the form of a rule which incorporates a certainty measure and exemplify your answer with a rule written in the syntax of your shell. 2 b. State the formulae used by your shell for combining certainty measures during inferencing. 2 c. It may be desirable to withhold from the client of an expert system a conclusion which is reached with a measure of certainty which falls below some preset threshold value. Explain why this may be desirable and describe how the threshold level should be determined. State whether your shell has such a thresholding capability. 3 d. An expert system is produced in two versions. The first version uses standard binary (true/false) logic. The second version incorporates quantitative certainty handling. Explain why the clients of the expert system might prefer the first version. 2 RE VI S I O N Q UE ST I ON S ( AH C OMP UT ING) AR T IF IC I AL I N T E L LI G E NC E 3. In many cases, the development of a new expert system involves the construction of one or more prototypes. a. b. State what is meant by a prototype and describe three possible benefits of prototype construction. 2 A criticism that might be applied to the use of prototypes is that, since prototypes are sometimes discarded, their construction represents wasted effort. State two arguments that could be used to counter this criticism. 2 Total 20 RE VI S I O N Q UE ST ION S ( AH C OMP UT ING) 43 AR T IF IC I AL I N T E L LI G E NC E Answers for Revision Exercise 1 The following are indicators of the level of answer required at Advanced Higher, where ‘level’ refers to the concepts, not necessarily the language used. 1. 2. a. 1 mark (R,C) – the knight’s row and column location before the move (the current state). b. 1 mark (R+1, C+2) – the knight’s row and column location after the move (the successor state). c. 1 mark Visited – the (list of) squares that the knight has reached, other than the current square, before this move (prior to the current state). 1 mark for ‘8 rules’ and 1 mark for good explanation 8 rules are required, corresponding to the 8 types of knight’s move. The diagram shows the goal positions required. A rule might look like (2 right, 1 forward). 8 1 7 2 6 3 5 4 3. 1 mark for each bullet point The rule generates an invalid state <(R+I,C+2), [(R,C) / Visited]> in circumstances in which: • R>7 or C>6 – since then the knight has jumped off the board. • (R+1,C+2) already appears on the Visited – since then the knight has returned to a previously visited square. • The conditions R<=7 and C<=6 and member((R+1,C+2), Visited) = false could be used to check that only valid states are generated from the rule. 44 RE VI S I O N Q UE ST I ON S ( AH C OMP UT ING) <(2, 4),[(3, 2), (1, 1)]> <(1, 3),[(3, 2), (1, 1)]> <(2, 3),[(1, 1)]> <(2, 4),[(3, 2), (1, 1)]> <(1, 3),[(3, 2), (1, 1)]> <(5, 1),[(3, 2), (1, 1)]> <(5, 3),[(3, 2), (1, 1)]> <(4, 4),[(3, 2), (1, 1)]> <(1, 5),[(2, 3), (1, 1)]> <(3, 1),[(2, 3), (1, 1)]> <(4, 2),[(2, 3), (1, 1)]> <(4, 4),[(2, 3), (1, 1)]> <(3, 5),[(2, 3), (1, 1)]> <(2, 3),[(1, 1)]> <(5, 1),[(3, 2), (1, 1)]> <(5, 3),[(3, 2), (1, 1)]> <(4, 4),[(3, 2), (1, 1)]> <(1, 5),[(2, 3), (1, 1)]> <(3, 1),[(2, 3), (1, 1)]> <(4, 2),[(2, 3), (1, 1)]> <(4, 4),[(2, 3), (1, 1)]> b. <(3, 5),[(2, 3), (1, 1)]> AR T IF IC I AL I N T E L LI G E NC E 4. 1 mark for ‘63 pairs’ and 1 mark for explanation <(R n ,C n ),V n > is a goal state if V n is a list containing 63 terms (pairs). 5. a. ½ mark for tree structure, ½ mark for correct syntax of visited locations, ½ mark for correct syntax of current square location, ½ mark for complete accuracy <(1, 1),[]> <(3, 2),[(1, 1)]> 2 marks <(1, 1),[]> <(3, 2),[(1, 1)]> RE VI S I O N Q UE ST ION S ( AH C OMP UT ING) 45 AR T IF IC I AL I N T E L LI G E NC E c. 2 marks First visit the root node (level 0) <(1, 1),[]> <(2, 3),[(1, 1)]> <(3, 2),[(1, 1)]> Second, visit both nodes at level 1 6. 7. 46 <(2, 4),[(3, 2), (1, 1)]> <(1, 3),[(3, 2), (1, 1)]> <(5, 1),[(3, 2), (1, 1)]> <(5, 3),[(3, 2), (1, 1)]> <(4, 4),[(3, 2), (1, 1)]> <(1, 5),[(2, 3), (1, 1)]> <(3, 1),[(2, 3), (1, 1)]> <(4, 2),[(2, 3), (1, 1)]> <(4, 4),[(2, 3), (1, 1)]> <(3, 5),[(2, 3), (1, 1)]> Third, visit all nodes at level 2 a. 1 mark The term ‘brute force’ aptly applies to depth-first and breadthfirst search strategies because these strategies make no attempt at intelligent discrimination between states, but raw computer power to search the tree exhaustively. b. 1 mark A brute-force search may fail because a computer’s memory is finite and may not be sufficient to enable an exhaustive search of a large tree. a. 1 mark Heuristic search requires information about the relative values of individual states (= a state evaluation function). b. 1 mark Heuristic methods can sometimes succeed where brute force methods do not because a heuristic search typically only covers part of the search tree, not the whole tree, and this may be viable within the computer’s available memory resources. Total 20 RE VI S I O N Q UE ST I ON S ( AH C OMP UT ING) AR T IF IC I AL I N T E L LI G E NC E Answers for Revision Exercise 2 The following are indicators of the level of answer required at Advanced Higher, where ‘level’ refers to the concepts, not necessarily the language used. 1. ½ mark for each fully correct transformat ion Three other transformations from scene S1: <L, [1,2], [3]> <M, [2], [1,3]> <L, [1,2], [3]> <M, [1,2], [3]> <L, [1,2], [3]> <R, [1,2], [3], []> Three other transformations <R, [2], [3], [1]> <R, [2], [3], [1]> <R, [2], [3], [1]> 2. a. b. from S2: <M, [2], [1,3]> <L, [1,2], [3]> <L, [2], [3], [1]> 1 mark <R, [], [], [1,2,3]> 3 marks for the tree annotated correctly to level 2. All branches should be present but any left-right sequence is acceptable. 1 mark for the extended (solution) branch <L,[1,2],[3],[]> <M,[2],[1,3],[] > <R,[2],[3],[1]> <M,[1,2],[3],[] > <M,[2],[1],[3]> <M,[1,2],[3],[] > <L,[1,2],[],[3]> <R,[1,2],[3],[]> <L,[3,1,2],[],[] > <M,[2],[3],[1]> <L,[2],[3],[1]> <M,[2],[1,3],[] > <R,[2],[1,3],[]> <L,[2],[1,3],[]> <R,[2],[3],[1]> <R,[1,2],[],[3]> <R,[1,2],[3],[]> <L,[2],[1],[3]> <R,[],[1],[2,3]> <M,[],[1],[2,3] > <R,[],[],[1,2,3] > RE VI S I O N Q UE ST ION S ( AH C OMP UT ING) 47 AR T IF IC I AL I N T E L LI G E NC E c. 1 mark for indication that branches are explored exhaustively and sequentially Depth-first traversal: <L,[1,2],[3],[]> <M,[2],[1,3],[] > <M,[1,2],[3],[] > <R,[2],[3],[1]> <R,[1,2],[3],[]> <M,[2],[1],[3]> <M,[1,2],[3],[] > <L,[1,2],[],[3]> <R,[1,2],[3],[]> <L,[3,1,2],[],[] > <M,[2],[3],[1]> <L,[2],[3],[1]> <M,[2],[1,3],[] > <R,[2],[1,3],[]> <L,[2],[1,3],[]> <R,[2],[3],[1]> <R,[1,2],[],[3]> <L,[2],[1],[3]> To end of branch <R,[],[1],[2,3]> <M,[],[1],[2,3] > <R,[],[],[1,2,3] > 1 mark for indication that levels are explored exhaustively and sequentially Breadth-first traversal: <L,[1,2],[3],[]> <M,[2],[1,3],[] > <R,[2],[3],[1]> <M,[1,2],[3],[] > <M,[2],[1],[3]> <L,[2],[1],[3]> <R,[],[1],[2,3]> <M,[],[1],[2,3] > <R,[],[],[1,2,3] > 48 RE VI S I O N Q UE ST I ON S ( AH C OMP UT ING) <M,[1,2],[3],[] > <L,[1,2],[],[3]> <R,[1,2],[3],[]> <L,[3,1,2],[],[] > <M,[2],[3],[1]> <L,[2],[3],[1]> <M,[2],[1,3],[] > <R,[2],[1,3],[]> <L,[2],[1,3],[]> <R,[2],[3],[1]> <R,[1,2],[],[3]> <R,[1,2],[3],[]> AR T IF IC I AL I N T E L LI G E NC E d. 1 mark • Depth-first and breadth-first methods are generally impractical with large trees 3 marks for clear reasoning as follows: • If breadth-first search does find a solution then it will be an optimal (fewest operations) solution but reaching it is likely to take unreasonable time and memory since every node to the goal node’s level must be generated and judged • Depth-first search may find a solution in reasonable time and memory but this will be the nearest solution to the left -hand side of the tree and it could be a highly non -optimal solution that requires the robot to perform an unnecessarily large number of operations. e. 1 mark for a named heuristic Assuming that we start with state S1 and want the final state given in b. The search method would be hill climbing by which each state will be evaluated and the successor state chosen will be the one with the highest evaluation that is greater. 5 marks for clearly stated example based on appropriate heuristic The state evaluation function (heuristic function) will be ‘add three points for each block that is in its final position; add one point for each block that can be moved to its final position; add one point for the crane being above a block that can be moved to its final position’. The initial state S1 evaluates as 1 (only box 3 can be moved to its final position). The goal state evaluates as 9 (three boxes in the final positions). Evaluating the states at the first level: <M, [2], [1,3], []> <R, [2], [3], [1]> <M, [1,2], [3], []> <R, [1,2], [3], []> gives gives gives gives 0 1 2 1 hence <M, [1,2], [3], []> is chosen and at the next level: <L, [3,1,2], [], []> <R, [1,2], [], [3]> <R, [1,2], [3], []> gives 1 gives 3 gives 1 hence <R, [1,2], [], [3]> is chosen. Total 20 RE VI S I O N Q UE ST ION S ( AH C OMP UT ING) 49 AR T IF IC I AL I N T E L LI G E NC E Answers for Revision Exercise 3 The following are indicators of the level of answer required at Advanced Higher, where ‘level’ refers to the concepts, not necessarily the language used. 1. ½ mark per name with description Name of operator Empty_small_into_drain Type of transfer operation Pour all of small bucket into drain fill_big from_tap Completely fill up big bucket from tap fill_big_from_small Completely fill up big bucket from small bucket Completely empty small bucket into big bucket empty_small_into_big 2. a. 1 mark The condition that must be checked is Big >= 5 - Small i.e. there must be enough water in the big bucket to fill the small bucket. Without this condition the rule may produce negative quantities of water in the big bucket, which is not possible. b. 2 marks The rules are: empty_big into_drain: <Big,Small> <0,Small> {No condition} fill_small_from_tap: <Big,Small> <Big,5> {No condition) empty_big_into_small: <Big,Small> <0,Big+Small> {Big+Small<=5} 3. a. 4 marks: 1 mark per fully correct branch; deduct half mark if loops are shown; deductions for poor arc or node labelling 50 RE VI S I O N Q UE ST I ON S ( AH C OMP UT ING) AR T IF IC I AL I N T E L LI G E NC E Give the rules abbreviated names, e.g. edib = empty_big_into_drain. <0,0> fbft fsft <7,0> fsfb <2,5> 4. <0,5> fsft <7,5> fbft <7,5> esib <5,0> b. 1 mark for each of the following: • for naming depth-first with correct annotations on tree • for naming breadth-first with correct annotations on tree. c. 1 mark for each of the following: • Without loop detection, all branches of the search tree are infinitely long and the tree is much bushier. • A depth-first search would search only the leftmost branch. Unless this branch happened to contain a solution, the search would fail: the search program would run forever or until a memory overflow occurred. • A breadth-first search would find a solution, but more time and memory would be required because of the bushier tree. a. 2 marks for the following: • Brute-force search methods may be inadequate because they rely on unguided/exhaustive search. If the search tree for a problem is too big, this may be impractical in time and memory requirements. • A heuristic is a piece of expertise (rule of thumb) which enables the search to be selective, so that time and memory requirements are reduced. RE VI S I O N Q UE ST ION S ( AH C OMP UT ING) 51 AR T IF IC I AL I N T E L LI G E NC E b. 1 mark for the diagram, ½ for ‘excellent’, ½ for each of up to 5 points equivalent to those in the paragraph Applying the heuristic, we get: <0,0> fill_b <7,0> fill_s_from_b <2,5> drain_s <2,0> empty_b_into_s <0,2> fill_b <7,2> fill_s_from_b <4,5> The heuristic is excellent. Regardless of the heuristic search method used (best -first, beam, hill climbing, etc) it will find the solution given above because there is no choice at each step (½). Thus in contrast to the br uteforce search methods, time or memory is not expended on developing other search paths (½). Also the heuristic uses less than the full set of the operators (½). It selects them by simple rules (½). This should ensure that the time and memory requirements to apply the heuristic are fairly small (½). If the problem asked for 3 litres to be left in the big bucket then the solution <0,0> <0,5> <5,0> <5,5> <7,3> <0,3> <3,0> would not be produced by this heuristic i.e. it is not a general heuristic for all problems of this type (½). Total 20 52 RE VI S I O N Q UE ST I ON S ( AH C OMP UT ING) AR T IF IC I AL I N T E L LI G E NC E Answers for Revision Exercise 4 The following are indicators of the level of answer r equired at Advanced Higher, where ‘level’ refers to the concepts, not necessarily the language used. 1. The answers below are for Primex. Any other expert system shell may be named. a. 3 marks for an answer that covers relevant main features of the shell to a level of detail and accuracy as shown below. Knowledge may be represented by rules which take the form: ADVICE Conclusion if Conditionl AND Condition2 AND ... AND ConditionN. (top-level rules) Conclusion if Condition1 AND Condition2 AND .. . AND ConditionN (lower-level rules) Conclusions and conditions may be unstructured text strings, e.g. The surface is red in colour Or may be parameterised formulae, e.g. The colour of the surface is: red b. 2 marks for a full and correct description The inference engine processes information using a Prolog -style depth-first backward chaining strategy. The system selects the conclusions of advice rules in listed order as top -level goals. To solve a goal, the system unifies the goal with the left-hand side of a matching rule and substitutes for it the goals specified by the rule’s conditions. A condition that is unmatched by any rule is evaluated by asking the user whether it is true or false. c. 2 marks for a full and correct description Justification is available for advice reached and questions asked. How-explanation justifies advice by displaying a trace of the goal tree which derived the advice from the combination of the user’s answers and the knowledge base. Why-explanation justifies questions by displaying the current goal (i.e. the left -hand side of the rule that owns the condition that is being evaluated by a question) and if necessary the ancestors of that goal. RE VI S I O N Q UE ST ION S ( AH C OMP UT ING) 53 AR T IF IC I AL I N T E L LI G E NC E d. 2 marks for a full and correct description Uncertainty is provided for by means of certainty factors. A certainty factor is an integer (in the range -100..+100) that can be attached to any rule to indicate the knowledge engineer’s confidence (between certainly false and certainly true) in the validity of that rule. At runtime, the certainty factors contained in the rules that led to any advice are combined to provide the user with an overall certainty factor for the advice. e. 2 marks for a full and correct description A trace facility is available which can list runtime steps. It is also possible to insert special conditions into the knowledge base that will report on the values of variables at any runtime point. Debugging a knowledge base generally requires the presence of a domain expert who can identify incorrect system output. f. 1 mark Very few facilities are provided for the design of the user interface, since runtime interaction is limited to Q/A, advice, and explanation, for all of which dialogues are generated automatically. The user environment is essentially the same as the developer’s environment. The developer can influence minor aspects, e.g. can arrange for a graphical start -up dialogue. 2. a. ½ mark each for any 4 of the following: • Is there available a domain expert, someone who knows about course choice and who is willing to communicate expertise to the knowledge engineer? • Is the essential knowledge about course choice limited in scope? • Can the essential knowledge about course choice be expressed with precision? • Is there a need for a Course Choice expert system sufficient to justify the effort of development? • Is there available hardware and a software development environment, for building the expert system? • Will there be resources available to maintain the system after it has been built? 54 RE VI S I O N Q UE ST I ON S ( AH C OMP UT ING) AR T IF IC I AL I N T E L LI G E NC E b. ½ mark for each type of person and ½ for appropriate tasks Individuals and tasks are: • knowledge engineer – a computing professional with some AI expertise; tasks: responsible for the development of the course choice software, including knowledge acquisition, representation, validation, maintenance; • domain expert – a school staff member with expertise in the school’s curriculum, possibly a guidance teacher; tasks: provides authoritative description of the knowledge needed by the system, supports validation and maintenance; • target users – students and teachers who are representative of the eventual users of the system; tasks: provide examples of runtime interaction to support the development and evaluation of the user interface and the validation of the overall system. c. ½ mark for each, up to 3 marks Possible advantages of a general-purpose high-level language: • Greater availability of trained software developers • Greater availability of development tools • Improved portability across hardware platforms • Improved runtime efficiency (speed and memory). Possible disadvantages of a general-purpose high-level language: • Extended development time and hence increased cost . • More difficult to maintain completed knowledge base. Total 20 RE VI S I O N Q UE ST ION S ( AH C OMP UT ING) 55 AR T IF IC I AL I N T E L LI G E NC E Answers for Revision Exercise 5 The following are indicators of the level of answer required at Advanced Higher, where ‘level’ refers to the concepts, not necessarily the language used. 1. 1 mark for one from each of the following: Technical factors • The expert system must be able to run on a palmtop computer. Issues about RAM, backing storage requirements and processing speed must be considered. • The knowledge engineer will have to decide whether the installation process of software on a desktop computer is complicated enough to justify the expense of building an expert system. Knowledge representation factors Expert system shells tend to make use of one particular knowle dge representation system. • The knowledge engineer must choose one which best fits the type of knowledge to be represented. • The expert system shell chosen is significant because this will determine such features as cost, the user interface, and te chnical support. Economic factors • Does the cost of developing the expert system justify the savings in support costs? • Will development of the expert system delay the implementation of the operating system? • On the positive side, building the expert system will in itself help the company to improve their installation instructions and training materials. • Economic factors are significant in a feasibility study because they will determine whether or not the project goes ahead. Social factors • A possible effect on the status of the software technicians is to de skill them. • The technical expertise of the knowledge engineer also has to be taken into account as time may be needed to become familiar with the operating system which is the subject of the proposed knowledge base. 56 RE VI S I O N Q UE ST I ON S ( AH C OMP UT ING) AR T IF IC I AL I N T E L LI G E NC E 2. 1 mark for statement of whether factors are necessary or not, 3 marks for justification which contains at least the level of detail below. If valid reasons are given, then marks should be awarded for the opposite viewpoint. Numerical certainty factors are unlikely to be necessary in this particular application. The system developed is likely to be a fault diagnosis one where known possible faults are investigated, and their causes determined by a series of specific tests or questions which can elicit complete information that is certain. Numerical certainty factors are more likely to be of use in systems such as medical diagnosis, where it is often difficult to determine precisely the causes of a particular problem. 3. 1 mark for a full description of each technique, ½ mark each for an advantage and disadvantage Three techniques are as follows: (i) Interviewing by a knowledge engineer of personnel skilled in the installation process. • Advantages of this technique are its directness and the availability in this case of suitable experts, namely operating systems specialists. • Disadvantages are the time-consuming nature of encoding knowledge from the information received. The interviewer will also need to be familiar with, or acquaint themselves with, the knowledge area. Articulate experts are required. (ii) Case study analysis by knowledge engineer of previous records of installation experiences. • Advantage is that information from past records may be readily and cheaply available. • Disadvantage is that a sufficient set of cases may not be available to allow for a representative analysis. (iii) Reading by the knowledge engineer of installation instructions and manuals. • Advantages are that the information is likely to be well structured and accurate in such documents. • Disadvantages are that such documents may not pinpoint useful cases and often assume specialist prior knowledge on the reader’s part. RE VI S I O N Q UE ST ION S ( AH C OMP UT ING) 57 AR T IF IC I AL I N T E L LI G E NC E 4. 2 marks for full description of justification facilities, 1 mark each for detailed description of effects on technicians and customers How justification will explain the route through the knowledge base which has resulted in the conclusion reached. Why justification will explain why a particular question is being asked, and what may be proved by possible answers to it. Technicians – The justification facilities of the expert system can be used to support the training of software technicians, as they can use it to discover why errors have arisen and gain a more thorough understanding of the process from querying the questions they are asked (Why justification) and the advice they are given (How justification). Justification facilities will also give the technician confidence in the strategies suggested by the expert system. Customers – The justification facilities should lead to more reliable, lower cost and faster upgrades to the customers’ computer systems. 5. 2 marks for implications for validation stage, 2 marks for maintenance stage • The rapid rate of operating system development is likely to make the validation stage of this project a difficult one. There is considerable commercial pressure on companies to produce operating system upgrades at regular intervals (1). This means that the time for the validation stage is likely to be short (1). This is likely to be a particular problem once customers become used to an easier upgrade process as a result of the existence of the expert system. • The maintenance stage of the project is likely to be an extended one for the same reason. Each operating system upgrade will result in changes to the expert system, necessitating further rounds of knowledge acquisition and representation, thus increasing the amount of development time which an operating system upgrade requires (1). Overall maintenance costs will increase with more frequent operating system releases (1). Total 20 58 RE VI S I O N Q UE ST I ON S ( AH C OMP UT ING) AR T IF IC I AL I N T E L LI G E NC E Answers for Revision Exercise 6 The following are indicators of the level of answe r required at Advanced Higher, where ‘level’ refers to the concepts, not necessarily the language used. 1. a. 1 mark Knowledge acquisition is the process whereby the knowledge engineer consults expert sources in order to obtain the domain knowledge that will be needed in order to build the expert system. ½ mark each for any 4 Knowledge acquisition may be a bottleneck because it requires time to: • familiarise the knowledge engineer with the terminology of the problem area • locate suitable expert sources • elicit knowledge from human experts • identify gaps and inconsistencies in knowledge • distinguish relevant from non-relevant information b. ½ mark each for any 2 elicitation techniques • Structured interview of domain expert by knowledge engineer • Review of case study by domain expert in presence of knowledge engineer • 20 questions technique • Card sort technique • Repertory grid technique • Laddered grid technique • Decision tree techniques • Decision table technique ½ mark for each of the following: After the initial stage of knowledge acquisition the domain expert is needed: • to validate the system • to support the maintenance and updating of the system in use. c. 1 mark for 2 electronic sources • databases • existing computer programs RE VI S I O N Q UE ST ION S ( AH C OMP UT ING) 59 AR T IF IC I AL I N T E L LI G E NC E • 1 • • • • • 2. online information services. mark for 2 non-electronic sources textbooks procedures manuals company regulations research papers case study materials a. ½ mark Any shell which supports quantitative uncertainty handling, e.g. Primex, InterModdler. 1 mark The form used by Primex is <conclusion> IF <conditions> CF N. where N is an integer in the interval - 100...+100. ½ mark Example: Take AH Computing IF you want to become a programmer CF 60 b. ½ mark for each correct rule up to 2 marks The inferencing rules used by Primex are: cf(A AND B) = min(cf(A),cf(B)) cf(A OR B) = max(cf(A),cf(B)) cf(NOT A) = -cf(A) cf(A via (A IF RHS CF K)) = K*cf(RHS)//100 cf(A via (RI ... Rn)) = max(cf(A via Rl), ... cf(A via Rn)) c. Marks as indicated It may be desirable to withhold from the client of an expert system a conclusion that is reached with a level of certainty which falls below some preset threshold value because low -certainty conclusions may be of little value to clients and might confuse them. (1½ marks) The domain expert should be asked to specify the threshold level, based on the level at which they themselves would withhold a conclusion. (1 mark) Primex does have this capability. (½ mark) 60 RE VI S I O N Q UE ST I ON S ( AH C OMP UT ING) AR T IF IC I AL I N T E L LI G E NC E 3. d. 1 mark for each of any 2 of the following: Clients of the expert system might prefer the first version (the one without quantitative certainty handling) because it: • avoids need to cope with a more complex interface • avoids need to supply representations of certainty in answering questions (a certainty-handling system will require quantified answers, not just true/false) • avoids need to interpret uncertainty representations in system’s recommendations (a certainty-handling system will supply certainty measures with recommendations ) • avoids need to engage in a more protracted consultation (inferencing in a certainty-handling system is more complex and may require a deeper search of the knowledge base, and more question-answering, before recommendations are given). a. ½ mark A prototype is a small-scale model of a final system or subsystem. ½ mark each for any 3 of the following: The benefit of a prototype expert system is to: • confirm the feasibility of an expert system approach to the problem • demonstrate that the proposed knowledge representation and inference techniques are adequate • confirm the applicability of the selected expert system tools • enable interface style/s to be tested • provide a vehicle for further knowledge acquisition, and interface development b. 1 mark for each of the following: A supporter of prototyping could say: • a prototype which has established that a design or project is bad has performed a useful service. To continue with an unsound approach is even more costly than to abandon it at the prototype stage. • many prototypes are not thrown away. Those that confirm the soundness of the design may be scaled-up to produce the fullscale system or subsystem. In the best case, the entire prototype code is preserved in the final system. Total 20 RE VI S I O N Q UE ST ION S ( AH C OMP UT ING) 61 62 RE VI S I O N Q UE ST I ON S ( AH C OMP UT ING) DA TA CO M M UNI CA T IO N S SECTION 3 Revision Exercise 1 1. Networks can include the following devices: • repeaters • bridges • routers • gateways. Select three of these devices and, for each device, describe: a. b. c. 2. 6 the function of the device; an example of an appropriate application; the highest level at which the device operates accordin g to the ISO/OSI model. A large city hospital, consisting of several buildings, is updating its computer system. It is planning to install a network of computers that will expand in line with future requirements. The network installation will be required to fulfil the following purposes: • administration including registering new patients as they arrive at the hospital, controlling out-patient appointments, recording bed availability, etc; • access to appropriate patient details in the buildings housing the wards and laboratories; • access by hospital staff to patient details held in remote databases located in the offices of local doctors; • the facility in all parts of the hospital for appropriate staff to create and amend patient records; • access to the databases held in other hospitals to obtain information on available transplants. By constructing an annotated diagram, or otherwise, describe a possible layout of the planned network, taking into account the hospital’s requirements. Discuss the design of your proposed network with particular reference to security, network applications and standards, bandwidth requirements and cabling, taking account of links between different buildings. 10 63 RE VI S I O N Q UE ST I ON S ( AH C OMP UT ING) DA TA CO M M UNI CA T IO N S 3. 64 Accessing worldwide networks, such as the Internet, has become more common in recent times. a. Explain why usage of these networks has increased. b. Identify and describe two factors that still limit the uptake of such networks by some users. 2 Total 20 RE VI S I O N Q UE ST I ON S ( AH C OMP UT ING) 2 DA TA CO M M UNI CA T IO N S Revision Exercise 2 1. Protocols at all layers in a protocol hierarchy add overhead (additional data) to the data being transmitted. For each of the following layers, identify one component of this additional data and describe its purpose. (You should choose a different component at each layer.) • Data link layer • Network layer • Transport layer 6 2. The Aberness Bookshop has decided to open a web site to attract new customers. The site is to be maintained on the bookshop’s own server. Speed of response is thought to be very important to the popularity of the site. Each book will have its own web page, containing 5000 bytes of text and a compressed image of the book’s cover, which takes 15 000 bytes. 3. a. The Internet Service Provider (ISP) that the bookshop uses imposes a maximum packet size of 1040 bytes, of which 40 bytes are reserved for protocol overheads. The bookshop’s server is connected to the ISP by a 64 000 bits per second ISDN link. What is the minimum time that will elapse between a book’s web pag e being requested from the server for the first time and it being available at the ISP for onward transmission to the customer? Justify your calculations. 4 b. It is suggested that shorter times may be possible if the bookshop changes its ISP to one that offers a 96 000 bits per second link. This alternative ISP imposes a maximum packet length of 600 bytes of which 100 bytes are reserved for protocol overheads. Calculate the minimum time for a book’s web page to be available at this ISP. 2 c. There are many other sources of delay in network communications apart from the time for a requested page to reach the ISP. Describe measures that the ISP can take to reduce the delay. 2 A business with a web site wishes to investigate the possibility of on-line ordering of goods from its web site. Describe what problems there could be with this development and how you RE VI S I O N Q UE ST ION S ( AH C OMP UT ING) 65 DA TA CO M M UNI CA T IO N S would advise the business to solve them. Your answer should consider the following factors: • Security • Network failures • Multiple access. 6 Total 20 66 RE VI S I O N Q UE ST I ON S ( AH C OMP UT ING) DA TA CO M M UNI CA T IO N S Revision Exercise 3 One way of classifying protocols is to describe them as providing either a connection-oriented service or a connectionless service. A protocol providing a connection-oriented service is one in which both processes involved in the communication maintain state information about the progress of the communication. A protocol providing a connectionless service maintains no such state information and merely transmits each message without regard to the outcome of earlier transmissions. 1. State whether a connection-oriented or a connectionless service is preferable for the following applications. Justify each answer carefully. a. b. c. d. 2. 3. Web page retrieval Electronic mail Telephony Remote weather station monitoring 1 1 1 1 Explain how a connection-oriented service can be provided by the transport layer in the case of a network layer that offers only a connectionless service. Your answer should take account of the following possibilities: • packets being lost • packets being duplicated • packets being resequenced. 8 A file transfer protocol is to be developed. Outline the design of such a protocol using a connectionless transport service. Your answer should make reference to: • encoding • flow control • error recovery. 8 Total 20 RE VI S I O N Q UE ST ION S ( AH C OMP UT ING) 67 DA TA CO M M UNI CA T IO N S Revision Exercise 4 1. An advertising agency has decided to install a computer network to allow its artists to share designs created with an art package and to share a colour graphics printer. In addition to workstations used for art work, other workstations on the network will be used by secretarial staff to produce word processed documents which will be printed using a shared laser printer. The agency must choose between a client server network and a peer-topeer network. With the client server network, all the software and files would be stored on a central hard disk attached to the file server while the workstations would have no disk storage. With the peer -to-peer network, there would be no central disk storage but each workstation would have its own hard disk storage which could be accessed by any other workstation on the network. With either type of network, all workstations would be able to access the colour graphics printer and the laser printer. 2. a. Discuss the advantages and disadvantages of each type of network for the applications described. 4 b. What are the implications for workstation linkage and bandwidth requirements if the agency decides to install a client server network? 4 In the ISO/OSI model, each layer has its own functions and provides services to the layer above. a. Describe briefly two functions of the transport layer. b. Describe briefly two services which the transport layer provides to the session layer. 2 3. A university student cannot find the answer to a programming problem she has encountered in her project. She decides to use the Internet through her university’s computer network to help find the solution. There is a range of network applications available, which includes: • Information access • File transfer • Electronic mail • Remote access. 68 RE VI S I O N Q UE ST I ON S ( AH C OMP UT ING) 2 DA TA CO M M UNI CA T IO N S a. Describe briefly the operation of each of the network applications shown in italics above. 2 b. Explain how the student could make use of each application to help overcome her problem. 4 Total 18 RE VI S I O N Q UE ST ION S ( AH C OMP UT ING) 69 DA TA CO M M UNI CA T IO N S Revision Exercise 5 1. A large architectural practice, which will use CAD software, anticipates that its architects will wish to exchange files in which their designs are stored. The architects are based in a number of offices in different cities. The files may be large. Describe, in detail, how the transfer could be accomplished using each of the following methods. Your answer should discuss the advantages and disadvantages of each method and should include reference to any relevant international standards. a. b. c. d. 2. Information access (World Wide Web) Standard file transfer protocols (FTP) Electronic mail Physical transfer of floppy disks If architects in different cities wish to work on the same files simultaneously, none of the methods in question 1 is entirely satisfactory. Discuss a further method of interconnecting the offices that will allow simultaneous access to files. 12 2 3. Communication protocols in the data link layer of the ISO/OSI model incorporate mechanisms for detecting transmission errors. Give two examples of mechanisms for detecting errors. Compare the benefits and limitations of your chosen mechanisms. 2 4. Local area networks based on a bus topology are likely to adopt different protocols from those based on a ring topology. 70 a. Explain why these topologies use different protocols. b. At which level in the ISO/OSI model do these differences occur? 1 c. Briefly discuss the suitability of each topology for a network that controls a number of industrial robots. 3 Total 22 RE VI S I O N Q UE ST I ON S ( AH C OMP UT ING) 2 DA TA CO M M UNI CA T IO N S Revision Exercise 6 1. 2. Domestic users of the Internet normally connect their home computers to the network using a modem and the public telephone network. a. Describe two benefits and two limitations of this form of access. 2 b. Describe an alternative method of connection to the Internet that is appropriate to domestic or small business users. Describe two advantages of this alternative method compared to modem access.4 A large corporation uses a wide area network to link its offices in different cities. The network is used to transfer files and send electronic mail. Describe how an electronic mail message might be tr ansferred between offices. Your answer should explain how the message is transformed as it is passed through each of the following layers of a protocol hierarchy. • Application • Transport • Network • Data link • Physical 10 3. The corporation mentioned in question 2 above wishes to achieve a high level of security for its electronic mail. It already ensures physical security and has password control. Describe an additional technique that provides a high level of security. Include in your answer the extra information needed by the technique. 4 Total 20 RE VI S I O N Q UE ST ION S ( AH C OMP UT ING) 71 DA TA CO M M UNI CA T IO N S Answers for Revision Exercise 1 The following are indicators of the level of answer required at advanced higher, where ‘level’ refers to the concepts, not necessarily the lang uage used. 1. 2 marks for each device, up to 6 marks Repeaters a. As a signal is propagated along a transmission medium its amplitude decreases as the length of the cable increases. Normally a limit is set on the length of cable to ensure a reliable signal. One way to lengthen the usable cable is to use repeaters, inserted at intervals along the cable to restore the signal to the original level. b. Expansion of a network. c. Physical layer. Bridges a. These are simple devices that bridge the gap between two remote LANs. The distance between the two LANs depends on the bridge’s capabilities (many are now able to utilise public circuits, either using dial-up services or permanent private circuits). The intelligence of the bridge can vary but usually a bridge will examine the address of each packet of information on the network. Any locally addressed packets are ignored and all packets with addresses remotely related to that bridge will be passed across to the remote bridge which will place them on its network. b. LANs in two offices within the one building. c. A bridge operates at the data link level of the LAN. It can work without needing to know or understand any of the higher layers. Routers a. Highly intelligent devices designed to provide single or multiple connections between WANs and LANs. The types of LAN can be dissimilar and a selective choice can be made dynamically based on the cheapest and fastest way to route a data packet. b. Needed when two networks use the same transport layer but have different network layers. c. Network layer. 72 RE VI S I O N Q UE ST I ON S ( AH C OMP UT ING) DA TA CO M M UNI CA T IO N S Gateways a. It is a specialised form of access device. It is designed to create access between networked systems or environments running different protocols. The gateway is concerned with conversion of incompatible protocols and network applications. b. For example a gateway may connect an Ethernet LAN operating TCP/IP to an X.25 network. c. A gateway operates at a high level in the OSI model, usually above layer 3 – Application layer. 2. 4 marks for annotated diagram or description Example: 2 marks for each of the following: Software and standards The hospital would require e-mail software, network software, all the usual application packages: • admin – WP (appointment letters, doctor referrals), database (patient records) • lab – spreadsheet (for results), database (labels), graphics package. It would be sensible for the hospital to purchase equipment from manufacturers that adhere to recognised standards so that the equipment can be interchangeable with equipment from any other manufacturer that complies with standards. The international RE VI S I O N Q UE ST ION S ( AH C OMP UT ING) 73 DA TA CO M M UNI CA T IO N S standards bodies concerned with computer manufacturers are ISO and IEEE. The other major standards body is CCITT , which is concerned with connecting the equipment to the public network. The hospital could adopt the TCP/IP protocol suite for the network environment. The three types of international standards associated with LAN – CSMA/CD bus, token ring and token bus – mentioned in the standards documents. Cabling and bandwidth The cabling between buildings would normally be fibre optics to link each building hub to a main central hub. The rest of the cabling could also be fibre optic, since it provides fast and secure transmission, but this would be expensive and not usual. The cables used inside the buildings would be dependent on the speed required and the transmitting distances. Twisted pair would not be very sensible for the hospital because of low transmission rates. Co-axial cable would be the better option for the hospital. Thin co -ax could be used to interconnect the workstations in the lab and the wards, and thick co-ax (which is more rigid) could be used along the corridors of the hospital. ISDN could be used via a gateway for WAN communications. Security Discuss security aspects – physical and otherwise – taking into account the various staff that will be using the network. Examples could include firewall software to stop users accessing sensitive data via WAN access. 3. a. 1 mark each for any 2 of the following: • Economic factors – the cost of equipment required to access the Internet has reduced dramatically. ISPs now provide low cost access, etc. • Technical factors – improvements in communications technology such as the speed of modems or improvements in the quality of cabling in the telephone network have made communications more easy. Software uses GUI 74 RE VI S I O N Q UE ST I ON S ( AH C OMP UT ING) DA TA CO M M UNI CA T IO N S which makes access much more straightforward for the novice user. • Social factors – public acceptability of the use of networks for shopping, banking, etc. b. any two factors, 1 mark for each • Organising the information into easily accessible categories can be difficult and users have to learn a number of procedures before they can search the database successfully. Search engines give far too many results to be useful. • There are quite high costs involved – telephone charges, charges by ISP, the cost of the hardware and software, tra ining, maintenance. Total 20 RE VI S I O N Q UE ST ION S ( AH C OMP UT ING) 75 DA TA CO M M UNI CA T IO N S Answers for Revision Exercise 2 The following are indicators of the level of answer required at advanced higher, where ‘level’ refers to the concepts, not necessarily the language used. 1. 1 mark for name of component, 1 for purpose at each level; up to 6 marks Data link layer: sequence number, acknowledgement, control, CRC or frame check. Sequence numbering is to detect missing frames; acknowledgement indicates sequence numbers successfully received at other end; control allows sequence numbers to be initialised, protocol parameters negotiated, etc; CRC or frame check is used to detect transmission errors in frame. Network layer: addresses, virtual circuit number. Transport layer: sequence numbers, quality of ser vice parameters, control fields. 2. a. 1 mark for each part, up to 4 marks Each book requires 20 000 bytes Hence need to transmit 20*1040 At 64 000 bits per second b. 2 marks This ISP requires 40 packets, 40*600 At 96 000 bits per second c. = = = = 20 packets 20 800 bytes 166 400 bits. 2.6 seconds = = = 24 000 bytes 192 000 bits 2 seconds 2 marks An option to allow no graphics, but only ASCII text to be downloaded would save a lot of time and reduce delays. Caching of web pages at local servers will help too. 3. 2 marks for each, up to 6 marks • Security of order, both from point of view of encrypting credit card numbers and of ensuring that all are genuine is important. Use of encryption or Secure Sockets Layer (SSL) should solve the problems. • Network failures are less of a problem if the protocol is stateless, and accumulates orders until committed. One might wish to confirm orders by e-mail. 76 RE VI S I O N Q UE ST I ON S ( AH C OMP UT ING) DA TA CO M M UNI CA T IO N S • Multiple access is a problem if on-line ordering is updating the stock records of the business – need to use lockout. Need also to ensure that orders are only taken for items in stock. Once an item is shown as available it remains so until the order is fulfilled. Total 20 RE VI S I O N Q UE ST ION S ( AH C OMP UT ING) 77 DA TA CO M M UNI CA T IO N S Answers for Revision Exercise 3 The following are indicators of the level of answer required at advanced higher, where ‘level’ refers to the concepts, not necessarily the language used. 1. a. 1 mark Connection-oriented: web pages with the associated graphics will tend to require a number of packets of data. b. 1 mark Connection-oriented: once the message has been sent it is important that an acknowledgement is received. c. 1 mark Connection-oriented: it is vital that packets arrive in the correct order. d. 1 mark Connectionless: the stations probably only send in reports once every hour or day. 2. 2 marks for each bullet point • Each packet sent by the transport protocol through the network layer should contain sequence numbers to allow the detection of missing packets at the receiving end. • When a packet is sent a timer is set, and if it expires before an acknowledgement is received, the packet is identified as lost and must be retransmitted. • The receiver should reply with an acknowledgement of the se quence number just received. If a packet is lost, it is possible for packets to be received in the wrong order. They then need to be re -sequenced into the correct order by the receiving end. • The receiver can insist on receiving packets in order, and ignore those that do not have the correct sequence number. This means that some packets will be duplicated. Alternatively it can store those packets that arrive before their predecessors, and deliver them all to the user when other packets arrive. 3. 2 marks for each of splitting file, identification of parts, retransmission of missing parts and timeouts, up to 8 marks Encoding: Split the file up into n packets, where packets should be as large as possible. Could also mention encoding in the sense of character sets used by different machines. 78 RE VI S I O N Q UE ST I ON S ( AH C OMP UT ING) DA TA CO M M UNI CA T IO N S Flow control: Send a header packet that indicates that n packets are to follow, and wait for it to be acknowledged (if it is not, the receiver will not be expecting packets). If no acknowledgement comes, try a gain. Once the initial message is acknowledged, send each packet, individually, with an identifier which states where in the file it belongs. Error recovery: After an interval, the receiver can time out and send an acknowledgement of the packets that have already arrived. On the basis of this, the missing packets can be retransmitted. Total 20 RE VI S I O N Q UE ST ION S ( AH C OMP UT ING) 79 DA TA CO M M UNI CA T IO N S Answers for Revision Exercise 4 The following are indicators of the level of answer required at advanced higher, where ‘level’ refers to the concepts, not ne cessarily the language used. 1. ½ mark for each advantage /disadvantage related to the application, up to 4 marks Art – client server Advantages • same software • data files and library of shapes available to all users regardless of station • easier to exchange designs WP – client server • Art – peer-to-peer • • WP – peer-to-peer 80 • Disadvantages • slower to transmit large files of graphics to/from the file server and to the colour printer • expensive hardware required for the high volume data transmission • applications must be headed delivered from server • multiple access to application will slow down network • large graphics files require large local disk storage cheap hardware requirements as lower data transfer rate does not affect performance as with graphics faster transmission of files and printing as network traffic is reduced (hard discs) easier to implement virtual memory facilities using the local hard disk to allow very large graphic layouts no real advantages • except secure e-mail facilities RE VI S I O N Q UE ST I ON S ( AH C OMP UT ING) more difficult to access resources such as document files, templates and printing resources as these are scattered through the other stations. DA TA CO M M UNI CA T IO N S b. 1 mark for size of files Graphics files are far larger than WP files. Typically, graphics files range from a few hundred kilobytes to many megabytes depending on the resolution and bit depth. WP file s are small, made up of ASCII codes and formatting details. 1 mark for topology A number of network topologies are applicable to a client -server network. The most commonly used on an Ethernet system will tend to be a star topology. 1 mark for bandwidth Bandwidth is more important for the graphics files due to their size. 1 mark for physical connection The physical connection required will be dependent on the distance between nodes and any electrical interference. For example, co-axial cables can be used over longer distances and are less susceptible to electrical interference than twisted pair. 2. 3. a. 1 • • • mark for description of each bullet point, up to 2 marks establishment of the link data transfer phase release the data link b. 1 • • • mark for each description, up to 2 marks establish the transport connections for the session entities provide the data transfer agreed release the connection when the session is complete a. ½ mark for each Information access: Large collection of information which can be searched from a machine which is not permanently linked; information is often formatted and allows linking from page to page. File transfer: Involves moving files from one machine to another. The machines are usually remote from one another and the files are transferred over a network rather than by exchanging disks. Electronic mail: Allows the exchange of messages between people. Messages are stored on a server until the users log on and download their messages. RE VI S I O N Q UE ST ION S ( AH C OMP UT ING) 81 DA TA CO M M UNI CA T IO N S Remote access: It is often possible to access an intranet remotely to allow access to information or even to peripherals such as printers. b. 1 mark for each Information access: There may be a ready-made solution on a remote web site or newsgroup that could then be copied and implemented. File transfer: There may be a ready-made solution on a remote file server – perhaps a set of library routines or even a full solution. Electronic mail: Other students may have already compl eted the task and may be able to e-mail a solution. Remote access: While working at home she could access the university server and find some help files or contact her tutor. Total 18 82 RE VI S I O N Q UE ST I ON S ( AH C OMP UT ING) DA TA CO M M UNI CA T IO N S Answers for Revision Exercise 5 The following are indicators of the level of answer required at advanced higher, where ‘level’ refers to the concepts, not necessarily the language used. 1. 1 mark for description of how transfer is accomplished in each method. 1 mark each for an advantage and disadvantage for each; maximum of 12 marks Information access: Originator of file must log in to web site space (probably an ISP), and then upload the file to the site. The availability of the file would then be made known. Those wishing to use the file then have to access the web site and download their own copy. Advantages: Disadvantages: simple to arrange, easy for anybody to take own copy, no hardware compatibility problems. difficult to restrict file to subset of users. File transfer protocols: Originator of file must publicise the availability of file, giving appropriate passwords to intended recipients. The file remains on the originator’s machine. Users must use an FTP program to log in to the originator’s machine, with the user name and passwords supplied, and transfer their own copy. Advantages: Disadvantages: simple to arrange, good for limited circulation list. requires recipient to explicitly request file; may need separate communication of passwords for security purposes; may be difficult to have different sets of files available for distinct sets of users. Electronic mail: Using e-mail system, send intended recipients a copy of the file. Advantages: Disadvantages: secure system, only intended recipients will receive it. inefficient for multiple recipients; older e-mail systems may have difficulty with binary data such as graphics. RE VI S I O N Q UE ST ION S ( AH C OMP UT ING) 83 DA TA CO M M UNI CA T IO N S Physical transfer of floppy disks: Copy files to floppy disks and send through post. Advantages: Disadvantages: simple to organise, very high data accuracy. may need large number of disks, long turnaround time. 2. 2 marks for a correct and full answer If simultaneous access to files by multiple users at distributed locations is necessary, a simple network will need to be set up. This will probably involve leased communication links or ISDN connections, and a file server or file servers. Workstations can then mount appropriate files on their local file system. 3. 1 mark each for the following: • Parity bit, simple to calculate, but fails to catch errors which change an even number of bits. • CRC check (checksum), slightly more complex to calculate, but much more robust. Catches all errors shorter than check sequence, and typically 97% of those longer errors. Only errors which exactly divide the check sequence are missed. 4. a. 1 mark for each characteristic • In bus-based systems, the signal travels to all stations simultaneously, in both directions. • Ring-based systems have unidirectional signal transmission, and the signal visits each station in turn, before returning to its sender. This return-to-sender means that it must take active steps to remove its signal. b. 1 mark Layer 2, data link layer c. 3 marks Robots need to be controlled in real time (1). Must be able to guarantee timely communication. This can be ensured by a priority mechanism (1). Bus-based local area networks such as Ethernet do not support any priority mechanism. Ring -based systems such as token ring or FDDI do support priorities using token passing (1). Total 22 84 RE VI S I O N Q UE ST I ON S ( AH C OMP UT ING) DA TA CO M M UNI CA T IO N S Answers for Revision Exercise 6 The following are indicators of the level of answer required at advanced higher, where ‘level’ refers to the concepts, not necessarily the language used. 1. a. ½ mark for each benefit or limitation up to a total of 2 Benefits: most houses have a telephone, and all Internet service providers allow access using dial-up connections. ISPs provide local call numbers and charges. Limitations: Bandwidth is limited to that accepted by voice grade circuits over telephone network (about 56K at maximum, nearer 33K in practice). Voice grade circuits are very noisy, leading to reduced throughput. Bandwidth may not be enough to support fast graphic updates or real time video. b. 2 marks for ISDN and description and 1 mark each for 2 advantages Integrated Services Digital Network connection is all digital connection giving two 64K digital channels, and a 16K signalling channel. Benefits: No need for modem and error pr one digital-to-analogue conversion. Higher bandwidth available. 2. 2 marks per layer Electronic mail is usually transferred from a user to a mail transfer agent (MTA) and then via a mail transfer system (MTS) to the mail transfer agent on the remote system. Application layer: In order to transfer a mail message, the MTA will add header information to the text of the message. This usually takes the form of text lines with From and To addresses, plus other extra fields such as time, date, CC line, etc. These are usually text lines. Transport layer: The MTS opens a connection over the network to the remote MTA through the transport layer. The transport layer is responsible for taking the message and splitting it up into packets. Packets have a large maximum size and can travel through the network independently. Each packet has a header indicating which transport connection it is part of. At the destination end, the transport layer is responsible for reassembling the packets to form the original me ssage. If any packets are missing, their retransmission must be arranged. RE VI S I O N Q UE ST ION S ( AH C OMP UT ING) 85 DA TA CO M M UNI CA T IO N S Network layer: Responsible for routing packets through the network. For each packet, the protocol decides at each intermediate packet switch to which other packet switch it should be forwarded. Data link layer: Responsible for the delivery of packets over a single communications link in the network. To this end it adds sequence numbers and acknowledgements in a header, and a CRC to check for transmission errors at the end. Physical layer: Needs no headers or extra information. All data passed as a stream of bits, with no delimiters. Standards needed to agree on signalling conventions. 3. 4 marks for either method well explained Cryptography is an appropriate technique. Each office has access to the same secret key (a code used for the encryption which is often a 48 or 128 bit number) which is used to transform the message. Without the key, the message cannot be transformed back to original text. Needs an appreciation that headers will still need to be in plain text. Alternative is to use public key scheme (e.g. PGP) which has public key known to the world at large, and a secret key known only to the receiving office. Transmitting office uses the receiving office’s public key, and knows that no one can read the message except the correct recipient. The most important requirement of the use of cryptography is the distribution of keys which must not be compromised. Total 20 86 RE VI S I O N Q UE ST I ON S ( AH C OMP UT ING)