Knowledge Representation and Reasoning (CS551J)
Assessment 2
The assessment is worth 25% of the overall marks for the module. Each item indicates the number
of marks it is worth, clearly broken down in their specification. Students will provide their answers via
MyAberdeen and receive feedback via MyAberdeen.
Learning outcomes associated with this assessment:
? Understand the logical foundations and applications of Knowledge Representation and Reasoning.
? Students will be able to identify the knowledge base (or lack thereof) of an AI application.
Instructions to students:
? Your solution should be one single PDF file that you should upload to MyAberdeen by the
established time/deadline. Any other format will result in 0 marks. Do not email us your
solution.
? If you submit a scanned/handwritten PDF and we cannot understand your calligraphy, you will
get 0 marks.
? Your file should be named “CS551J-ASMNT2-YourSurname-YourName-YourIDNo.pdf”. For
instance, “CS551J-ASMNT2-Smith-John-999999.pdf”1
, where 999999 is your student ID.
? I encourage you to use Latex to typeset your answer to this assessment. There are many tutorials
of Latex online, it is not our responsibility to teach you this.
? Some guide suggestions about typesetting symbolic logic:
Word:
? https://www.youtube.com/watch?v=hJw1NhyJt10
? https://www.youtube.com/watch?v=Sfj-liMtFpU
Latex:
? https://www.yumpu.com/en/document/view/39275121/symbolic-logic-and-latex-david-w-agler
? https://www.geeksforgeeks.org/logic-notations-in-latex/
About this assessment: You must never share it with anybody in or outside the course, even
after you complete the course. Please do not distribute or post solutions to any of the projects and
notebooks.
Academic Dishonesty: This is an advanced course, therefore we expect full professionalism and
ethical conduct. You must work on this project individually. You are free to discuss high-level design
issues with the people in your class, but every aspect of your actual formalisation/code/answer must
be entirely your own work. Furthermore, there can be no textual similarities in the reports generated
by each person. Plagiarism, no matter the degree, will result in forfeiture of the entire grade of this
assessment. Plagiarism is a serious issue and we take academic misconduct very seriously. Sophisticated
plagiarism detection software will be used to check your code against other submissions in the class as
well as resources available on the web for logical redundancy. Please do not let us down and risk our
trust. If you do, we will pursue the strongest consequences available to us according to the guidelines
provided by the university. For more information, see the Code of Practice on Student Discipline. Use
of automated services to generate submissions for assessment will be treated as academic
misconduct and pursued under the University misconduct procedures.
Late Submissions: Deadline extensions will not be granted unless under serious extenuating circumstances that can be corroborated with some credible proof. Extensions can only be asked before
the deadline, no extensions will be granted after the deadline. We reserve the right to deny extensions
on a case by case basis. Please familiarise yourself with the University’s guidance on late submission.
1Do not put the quotation marks in your filename
CS551J – Knowledge Representation and Reasoning
Procedural Control of Reasoning
1. This question concern generalizing Horn derivations to incorporate negation as failure. For this
question, assume that a KB consists of a list of rules of the form (q ← a1, ..., an) where n ≥ 0,
q is an atom, and each ai
is either of the form p or not(p), where p is an atom. The q in this
case is called the conclusion of the rule, and the ai make up the antecedent of the rule. The
forward-chaining procedure presented in class for Horn clause satisfiability can be extended to
handle negation as failure by marking atoms incrementally with either a Y (when they are known
to be solved), or with an N (when they are known to be unsolvable), using the following procedure:
For any unmarked atom q,
? if there is a rule (q ← a1, ..., an) ∈ KB , where all the positive ai are marked Y and all the
negative a i are marked N, then mark q with Y
? if for every rule (q ← a1, ..., an) ∈ KB, some positive ai
is marked N or some negative ai
is
marked Y , then mark q with N.
Note that the first case trivially applies for rules where n = 0, and that the second case trivially
applies if there are no rules with q as the conclusion.
(a) (3 marks) Show how the procedure would label the atoms in the following KB:
a ←
b ← a
c ← b
d ← not(c)
e ← c, g
f ← d, e
f ← not(b), g
g ← not(h), not(f)
(b) (2 marks) Give an example of a KB where this procedure fails to label an atom as either Y
or N, but where the atom is intuitively Y , according to negation as failure and explain why.
Assessment 2 2
CS551J – Knowledge Representation and Reasoning
Total Marks 1: 5 marks
Rules in Production Systems
2. Production systems are a general computational framework, but one based originally on the observation that human experts appear to reason from “rules of thumb” in carrying out tasks. There
are many advantages claimed for production systems when applied to practical complex problems.
Among the key advantages, the most cited ones are ”modularity”, ”fine-grained control” and
”transparency.” Explain each one of these concepts regarding production systems.
(a) (2 marks) Modularity:
(b) (1 mark) Fine-grained control:
(c) (2 marks) Transparency:
Total Marks 2: 5 marks
Assessment 2 3
CS551J – Knowledge Representation and Reasoning
Object-Oriented Representation
3. Consider the Trip scenario we saw during our course for Object-Oriented Representation. Consider
that we have the general definition of a Trip as follows:
(T rip
<: F irstStep T ravelStep >
<: T raveler P erson >
<: BeginDate Date >
<: EndDate Date >
<: T otalCost P rice >
) Given this definition, solve the following tasks.
(a) (2 marks) Define an instance of Trip called Assessement2Trip, done by John Doe. This trip
will travel through Scotland and starts with a travel stept1, which is starting from Aberdeen
to Edinburgh. The whole trip should last three months, starting in 08/05/2024, as John
Doe and will cost in average 100$ a day. Create the instance only using the necessary
information.
(b) (3 marks) Now define the generic definition of a TravelStep, which t1 is an instance of.
TravelStep shoud be a TripPart (which does not need to be defined). Consider the information
that was provided in the previous task and provide ONLY necessary information. Also, add
that John Doe will stay 5 days in Aberdeen and 5 days in Edinburgh. Then, using the
generic definition, define t1 as an instance.
Assessment 2 4
CS551J – Knowledge Representation and Reasoning
Total Marks 3: 5 marks
Assessment 2 5
CS551J – Knowledge Representation and Reasoning
Structured Descriptions
4. (5 marks) In the context of Description Languages, write the following natural language description
as description logic language (DL). Consider that a Progressive company is a company with
at least seven directors, and all of whose managers are women with Ph.D.s degrees and whose
minimum salary is $24.00/hour. Complete the following DL:
(P rogressiveCompany .= [...]
Total Marks 4: 5 marks
Assessment 2 6
CS551J – Knowledge Representation and Reasoning
Inheritance
5. (5 marks) Considering the Inheritance, build an inheritance network given the following assertions:
? George is a Student.
? Ernest is a Student and an Employee.
? Students can be Academics.
? Those who study are not Illiterate.
? Employees are Taxpayer and Salaried.