prolog homework
comp-329-diagnostic-test.html
Macquarie University Faculty of Science and Engineering
search
COMP329: Knowledge Systems
You are here:- Macquarie Home »
- Faculty of Science and Engineering »
- Department of Computing »
- Undergraduate Studies »
COMP329 Diagnostic Test
1. Introduction
The background knowledge for this diagnostic test is covered in COMP329 lectures, tutorials, and practicals. However, some parts of this test may not be answered without prior independent research and/or searching for other sources of information. Please cite these sources of information that you use properly and provide references whenever necessary.
2. Tasks
Please answer the questions specified in the following four tasks and submit the answers to these questions as a PDF or Word file to iLearn (see submission details below).
Task 1
In 2011, the IBM Watson system participated in the TV quiz show Jeopardy! and did beat the former human winners in this competition. Do some research and then answer the following questions. Please keep your answers succinct and do not provide more than 50-100 words for each answer.
- Explain what the structure of the Jeopardy! game looks like. (0.5 mark)
- Describe the technology stack (software, hardward, and data) that the IBM Watson system used to compete in the Jeopardy! game (use a bullet point list for your description). (0.5 mark)
- Explain why the IBM Watson system was able to beat the human contesters. (0.5 mark)
- Provide two questions that would be difficult to answer by the IBM Watson system. (0.5 mark)
- Explain what WatsonPaths is and how it extends the IBM Watson system. (0.5 mark)
- In what respect is the Loebner Test different from the Jeopardy! game? (0.5 mark )
Task 2
Prolog is a logic programming language that is used in artificial intelligence and natural language processing because of its excellent support for symbolic reasoning and pattern matching. Please answer the following qustions and provide Prolog code where required:
- What is the difference between a fact and a rule in Prolog? (0.5 mark)
- What is the result of the following unification: (0.5 mark)
?- [a, p(X, f(Y)), [], _, a|Rest] = [A, B, C, D, E, F].
- The Prolog program below goes into a loop if we ask the query ?- p(a, B). Fix the program so that it returns the expected answers. (0.5 mark)
q(a, b).
q(a, c).
p(X, Z) :-
p(Y, Z),
q(X, Y).
p(X, Y) :-
q(X, Y).
- Write your own (recursive) Prolog predicate that counts the number of elements in a list and returns the result (Result), for example: (0.5 mark)
?- number_of_elements([a, b, c, d], Result).
Result = 4.
- Write your own (recursive) Prolog predicate that removes exactly one element E at a given position of a list and returns that element and the remaining list (Rest), for example: (0.5 mark)
?- remove_element_at(4, [a, b, c, d, e, d, d], E, Rest).
E = d,
Rest = [a, b, c, e, d, d]
- Check the SWI Prolog manual and provide the code that transform the Prolog term: p(a, b, c) into the following list: [p, a, b, c]. (0.5 mark)
Task 3
- Consider the English sentence, Somebody is robbed by a thief everyday. Provide at least three interpretations of this sentence in clear English. (1.5 marks)
- Suppose you want to translate the sentence Somebody is robbed by a thief everyday into the language of First Order Logic. Would you need different schemes of abbreviation for the different interpratations you provided in answer to the above question? Why or Why not? (0.5 mark)
- Provide symbolic translations of the English sentence, Somebody is robbed by a thief everyday, corresponding to the different interpretations you provided in the answer to the first part of this question. Clearly specify the scheme(s) of abbreviation you are using. (1 mark)
Task 4
- Translate into English the following symbolic sentence: ∀x (Mother(x) → ∃y Daughter(x,y)) using the following scheme of abbreviation: Mother(x): x is a mother, and Daughter(x,y): x is a daughter of y. (0.5 mark)
- Translate the English sentence you obtained back to the symbolic language using the following scheme of abbreviation: m(x): the mother of x, I(x,y): x is identical with y, and D(x): x is a daughter. (0.5 mark)
3. Assessment
The marking of this diagnostic test will refer to a model solution provided to markers and later made available to students as an explanation of the marks. In many cases, the marker will not be correcting your solutions. The reasons and explanations for the marks should be evident to you from making a comparison with the model solution. You should minimize the size of your submission document by answering only the questions as asked. So, please be succinct and precise.
This diagnostic test is worth 10 marks (= 10% of the final marks for COMP329); the marks are awarded as follows:
- Task 1: 3 marks
- Task 2: 3 marks
- Task 3: 3 marks
- Task 4: 1 mark
4. Submission
You have to submit a PDF or Word file that contains the answers to this test via iLearn before Friday, 21st August 2015, 18:00.
Please contact Rolf Schwitter, if you have any questions about tasks 1 and 2; and Abhaya Nayak for questions about tasks 3 and 4.
© Copyright Macquarie University | Privacy Statement | Accessibility Information Site Publisher: Department of Computing | Last Updated: 4th August 2015
ABN 90 952 801 237 | CRICOS Provider No 00002J