210CSC306 Exam Time Table Code CSC306 Use of a calculator is permitted Level 3 Examination for the degree(s) of MEng, BEng, BSc COMPUTER SCIENCE Artificial Intelligence Friday, 16th May 2008 9:30 am - 12:30 pm Examiners: Dr I O'Neill Professor E K Burke and the internal examiners All questions carry equal marks Write on both sides of the answer paper Answer FOUR Questions Examination Duration THREE Hours
1. ARTIFICIAL INTELLIGENCE (a) In the late1960s it seemed to some expert observers that computers with humanlike intelligence would be a reality in the twenty-first century. How did contemporary developments in AI research encourage this early optimism and was such optimism concerning AI misplaced? (b) Customer: System: Ehm. Hello. I d like two tickets for the James Bond film tomorrow evening. I m very sorry, evening performances of the latest James Bond movie, Casino Royale, are sold out tomorrow, Friday the thirtieth of May. Would you be interested in two tickets for the evening of Saturday the thirty-first instead? Explain some of the many difficulties that developers have to tackle when they create spoken dialogue systems capable of exchanges such as the one shown above. (c) Declarative programming languages like PROLOG were specifically developed to support logic-based AI application development. Discuss some of the main characteristics and advantages of declarative languages, and consider why other types of programming language are often used in AI application development despite the benefits of the declarative approach. Where appropriate, illustrate your arguments with short fragments of code or pseudocode. (d) A team of town planners has decided on a number of criteria for determining the location of a new housing estate. The basic requirement is that the new estate should be approximately within a fifteen-minute commute from an existing town centre. A potential site will be regarded as very attractive if, in addition to the basic requirement, it is within a range of about 2km of existing convenience stores. A potential site will be extremely attractive if, in addition to the basic requirement, it is less than 1km away from a local primary school. What branch of AI might help in the process of determining a location for the new housing estate? Explain why this approach would be appropriate and indicate the main steps that would be involved in developing an AI solution. Precise calculations are not required, but you should attempt to explain how the decisionmaking criteria outlined above might be incorporated into the solution. Page 2 of 7
2. FUZZY LOGIC (a) (b) (c) (d) A shutter speed selection system for an automatic camera includes the following two inference rules. - If the brightness of the scene is moderate and the subject s motion is slow, shutter speed is slow. - If brightness of the scene is high and the subject s motion is fast, shutter speed is fast. On the basis of these rules, use graphs and a written commentary to explain the processes of fuzzification and defuzzification that will be used to determine the shutter speed in given conditions. Include in your written commentary an explanation of how developers would decide the terminology of the problem domain and why particular membership function shapes would be used. (Detailed calculations are not required.) [8 marks] Fuzzy logic captures the naturally blurred transitions between one category and another. With particular reference to the concepts of short, medium and long distances for car travel, use graphs of fuzzy membership functions and written commentaries to describe how degrees of membership might be used to represent typical human perceptions of distance for car journeys. In what way does the fuzzy approach make for more realistic labelling than classical set theory? Defining the implication operator in fuzzy logic is problematic. Explore the difficulties of translating crisp rules for implication into a fuzzy rule, and outline the strengths (and any outstanding weaknesses) of a working definition of fuzzy implication. Develop your arguments using formulae and graphs as appropriate. [6 marks] The following graph represents an aggregate of clipped time graphs. Use the centroid method to determine a crisp time to be used by a system. Show the formula you use to calculate the centroid and show your working. 0.8 Membership 0.6 0.4 A 0.1 a b 0 10 20 30 40 50 60 70 80 90 100 time Page 3 of 7
3. EXPERT SYSTEMS (a) i) In a population of 200, 17 people have a symptom s, 11 people have a disease d and 9 people with disease d have symptom s. If a person has the symptom s, what is the probability that they have the disease d? Use Bayes theorem for one event and one piece of evidence to calculate your answer. Show your working. ii) Using the generalized form of Bayes theorem and the following information, work out whether an escallonia plant that has yellowing leaves is suffering from a lack of water, or has been attacked by a parasitic fungus flavicillium, or has been damaged by frost. Show your working, giving the probabilities for each scenario. The overall probability of lack of water: 0.2 The overall probability of an attack by flavicillium: 0.05 The overall probability of frost damage: 0.3 The probability of yellow leaves given a lack of water: 0.96 The probability of yellow leaves given an attack by flavicllium: 0.98 The probability of yellow leaves given frost damage: 0.88 (b) (c) (d) A magic square typically comprises nine numbers taken from a continuous sequence and arranged in three rows and three columns. To solve the magic square, it is necessary to arrange the numbers so that the rows, columns and diagonals add up to the same value. With particular reference to the magic square problem, indicate why, in attempting to find a computerbased solution, it is important to adopt an appropriate search strategy. Use diagrams as appropriate to illustrate your arguments. To build a knowledge-based system, developers have to interact with domain experts to work out how specialized decisions are made. Describe this information-gathering process and some of the techniques that are typically used. In implementational terms there is very little difference between depth-first and breadth-first search, yet the choice of strategy can have a significant impact on search efficiency. Using pseudocode and an accompanying commentary, explain how depth-first and breadth-first search are typically implemented, describe the strengths and weaknesses of each strategy, and indicate ways in which the weaknesses can be managed. Page 4 of 7
4. PROPOSITIONAL CALCULUS, PREDICATE CALCULUS AND PROLOG (a) Normalise and where appropriate simplify the following expressions: (i) X Y Z [1 mark] (ii) B A (C A) (b) How might the following statements in predicate calculus most naturally be translated into English: (i) Person born_equal(person) [1 mark] (ii) Right_way to_do_things(right_way) [1 mark] (c) The following Prolog database represents media production teams. % The structure of a media production team takes the form % team(producer, Core_team, Production_assistant). % Core_team is an arbitrarily long list of staff structures, % but excludes the staff structures for Producer and % and Production_assistant. % staff structures represent employees and take the form % staff(surname,initial,file(speciality,grade,cv)). % CV is an arbitrarily long list of titles of media productions. team(staff(lyttleton,h,file(music,3,[my_music,best_tunes,showtime])), [staff(garden,g,file(musical_comedy,2,[on_the_town,my_music])), staff(crier,b,file(musical_comedy,2,[on_the_town,best_tunes]))], staff(brooke-taylor,t,file(music,2,[my_music,best_tunes]))). team(staff(wise,e,file(science,3,[horizon,frontiers,insight])), [staff(morcambe,e,file(science,3,[horizon,leading_edge]))], staff(o_connor,d,file(documentary,2,[horizon,insight]))). team(staff(merton,p,file(variety,2,[showtime,dance,circus])), [staff(smith,p,file(variety,1,[showtime,dance,circus,my_music])), staff(hamilton,a,file(variety,1,[dance,best_tunes]))], staff(steaffel,s,file(comedy,2,[comedians,my_music]))). team(staff(chaplin,c,file(economics,3,[business_review,stock_show])), [staff(keaton,b,file(documentary,3,[business_review,insight])), staff(hardy,o,file(news,3,[news-report,stock_show,target,now])), staff(laurel,s,file(economics,3,[news_report,stock_show,now]))], staff(senate,m,file(news,3,[business_review]))). Given this information, write rules (and any additional predicates required) that can be used to return the following: (i) the initial and surname of any employee whose grade is 1. (ii) the initial and surname of any producer whose team includes 2 employees whose CVs include a production entitled Now. [3 marks] (iii) the initial and surname of the production assistant in a team whose employees grades total 15 or more. (iv) the surnames of employee A and employee B, where employee A and employee B are in different teams, each have Insight in their CV, and each have documentary as their specialism. (d) Using a truth table prove that (A B) = A B. Page 5 of 7
5. DISAMBIGUATION & INFORMATION RETRIEVAL, PATTERN RECOGNITION & NEURAL NETWORKS (a) (b) When ambiguous words are used in combination, selectional restrictions, synsets and hyponomy chains can assist the process of disambiguation. Discuss. [7 marks] The following term-by-document matrix indicates the occurrence of three keywords in three sections of a TV and Radio listings magazine: television radio digital Editor s Foreword 5 3 3 Highlights 16 11 12 Radio Section 1 6 7 How similar is each section to the other two? In each case calculate the degree of similarity and interpret the result. Show your working. [3 marks] (c) (d) Briefly describe the key features of a multilayer perceptron, highlighting in particular how it differs from a simple perceptron in terms of implementation, training and discriminative ability. [7 marks] Plot the data given below in an appropriate feature space. Would the weights w 0 = - 4, w 1 = 1, w 2 = 1 enable a single artificial neuron to classify the data correctly? To support your answer, plot the artificial neuron s decision boundary in your feature space, explaining the significance of the boundary and how its position is determined. Index Class Label x 1 x 2 1 A 0.0 1.0 2 A 1.0 0.0 3 A 1.0 1.0 4 A 1.0 2.0 5 A 2.0 1.0 6 B 3.0 2.0 7 B 4.0 1.0 8 B 4.0 2.0 9 B 4.0 3.0 10 B 5.0 2.0 [3 marks] Page 6 of 7
6. COMPUTATIONAL LINGUISTICS (a) Below is a Prolog implementation of a definite clause grammar. determiner --> [a] ; [some] ; [the]. noun --> [corner] ; [car] ; [rectangle]; [turnip]. noun --> [corners] ; [cars] ; [rectangles] ; [turnips]. adjective --> [fast] ; [tight] ; [new] ; [big] ; [quiet] ; [silent] ; [fresh]. verb --> [rounds] ; [buys] ; [sings]. verb --> [round] ; [buy] ; [sing]. adverb --> [very] ; [quickly] ; [loudly] ; [only]. adjective_phrase --> adjective. adjective_phrase --> adverb,adjective. noun_phrase --> determiner,noun ; determiner,adjective_phrase,noun. verb_phrase --> verb ; verb,noun_phrase. verb_phrase --> adverb,verb ; adverb,verb,noun_phrase. sentence --> noun_phrase,verb_phrase. State how Prolog will respond to the following queries. In each case, analyse the structure of the phrase, explain why the query succeeds or fails, and comment on the adequacy of the grammar and how it might be improved. In your comments, also consider the effect of using very simple syntactic rules when dealing with phrases that also have semantic content. (i)?- phrase(sentence,[the,fast,car,quickly,rounds,the,very,tight,corner]). (ii)?- phrase(sentence,[new,car,big,success,at,show]). (iii)?- phrase(sentence,[a,quiet,rectangle,loudly,sings,the,silent,turnips],rest). (iv)?- phrase(sentence,[buy,only,fresh,local,turnips]). [8 marks] (b) The word need can be pronounced as [n iy d] or, in certain circumstances, as [n iy]. There is a.89 probability that the [iy] sound is followed by [d], and a.11 probability that it ends the word. Assume that other transitions have a probability of 1. Using appropriate labelling for states and transitions, represent this information as a simple weighted automaton. (c) John gave a book to Mary ; John gave Mary a book ; A book was given by John to Mary ; Mary was given a book by John. Explain how grammatical transformations might produce such phrases from a common source. Mary received a book from John is also related to these phrases, but in a different way explain how. (d) Consider the following data (each letter represents a word). SRRRQRSRQQQRRSQSPPSPRRSQPRRQPSQRRQ Use unigram, bigram and trigram models to compute the most probable value for X in the sequence RRX, and, combining models, suggest a most probable value overall. Show and explain your working. Page 7 of 7