Module 3 Workbook
Module 3 Workbook
Q.No 3. The term "Herbrand Universe" in First Order Logic refers to:
a) The set of all individuals
b) The set of all constants
c) The set of all variables
d) The set of all functions
Answer:
a) ∀x P(x)
Q.No 4. The negation of "∃x P(x)" is:
b) ∃x ¬P(x)
d) ∀x ¬P(x)
c) ¬∃x P(x)
Answer:
Q.No 5. What does the term "ground instance" refer to in First Order Logic?
a) An instance of a predicate with no variables
b) An instance of a predicate with universal quantifiers
c) An instance of a function with existential quantifiers
d) An instance of a relation with free variables
Answer:
Q.No 6. In First Order Logic, what does the term "free variable" mean?
a) A variable quantified by an existential quantifier
b) A variable that is not quantified within a formula
c) A variable that is constant across all instances
d) A variable that is quantified by a universal quantifier
Answer:
Q.No 7. In First Order Predicate Logic, a universally quantified statement (∀x) becomes
false if:
a) It is true for at least one value of x
b) It is true for every value of x
c) It is false for at least one value of x
d) It is false for every value of x
Answer:
Q.No 8. What is the purpose of the term "standardization of variables" in First Order
Logic?
a) To make variables unique within a formula
b) To eliminate existential quantifiers
c) To normalize the range of variables
d) To simplify conjunctions
Answer:
Q.No 12. In Prolog, what does the term "unification" refer to?
a) Merging two databases
b) Combining multiple rules
c) Matching terms and binding variables
d) Splitting a clause into subgoals
Answer:
Q.No 15. In Prolog, what does the term "query" refer to?
a) A rule in the database
b) A statement that is always true
c) A goal to be proved
d) A clause in a rule
Answer:
Q.No 26. What is the result of applying the resolution rule to two clauses with
complementary literals?
a) The creation of a new clause
b) The deletion of one of the clauses
c) The addition of a new rule
d) The resolution fails
Answer:
Q.No 27. What is a limitation of resolution in handling incomplete or uncertain
information?
a) It requires extensive preprocessing
b) It is not suitable for rule-based systems
c) It assumes complete knowledge
d) It is computationally expensive
Answer:
Q.No 28. In first-order logic, what is the extension of the resolution rule?
a) Skolemization
b) Quantification
c) Unification
d) Backtracking
Answer:
Q.No 29. What is the primary goal of knowledge representation in artificial intelligence?
a) To encode information in a machine-readable format
b) To simplify data storage
c) To optimize algorithms
d) To generate random facts
Answer:
Q.No 31. Which representation allows the use of variables and quantifiers to express
general relationships?
a) Semantic networks
b) Rule-based systems
c) Frames systems
d) Predicate logic
Answer:
Q.No 32. Which knowledge representation approach uses a set of production rules to
represent knowledge?
a) Semantic networks
b) Rule-based systems
c) Frames systems
d) Predicate logic
Answer:
Q.No 39. What is the relationship between mental events and mental objects?
a) Mental events are subcategories of mental objects
b) Mental objects are manifestations of mental events
c) They are synonymous terms
d) They are unrelated concepts
Answer:
Q.No 40. In cognitive science, what are "prototypes" related to?
a) Basic level categories
b) Mental events
c) Mental objects
d) Schemas
Answer:
Module 3 – Worksheet 2
Fill in the blanks
Q.No.1. A __________ is a formula that becomes a well-formed sentence when specific values
are substituted for its variables.
Answer:
Q.No.2. Inference rules such as __________ and __________ are commonly employed in first-
order logic for deriving conclusions from premises.
Answer:
Q.No.3. The language of first-order logic allows for the representation of complex relationships
through the use of __________ and __________.
Answer:
Q.No.4. The __________ operator in Prolog is used to represent logical AND between goals in a
clause.
Answer:
Q.No.5. In Prolog, __________ is the process of finding values for variables that satisfy the goals
specified in the query.
Answer:
Q.No.6. The __________ operator in Prolog is used to represent logical OR between goals in a
clause.
Answer:
Q.No.7. __________ is commonly used in rule-based systems where the knowledge base is
extensive and conclusions need to be reached incrementally.
Answer:
Q.No.8. __________ is often used in diagnostic systems and problem-solving scenarios where
the goal is to identify the root cause of a particular issue.
Answer:
Q.No.9. A __________ is a logical sentence expressed in disjunctive normal form (DNF) that
serves as input to the resolution process.
Answer:
Q.No.10. The resolution rule applies to two clauses with __________ literals, leading to the
creation of a resolvent.
Answer:
Q.No.11. The result of applying the resolution rule to two clauses with complementary literals is
the creation of a new __________.
Answer:
Q.No.13. Objects in cognitive science are typically represented through __________, which are
mental representations.
Answer:
Q.No.15. The relationship between mental events and mental objects is that mental events are
often considered as __________ of mental objects.
Answer:
F Well-Formed Sentences 6 A logical sentence with specific values substituted for its
variables.
G Unification 7 The process of finding values for variables that make a
given formula true.
H Inference Rules 8 Mechanisms used for deriving conclusions from premises in
first-order logic.
I Ground Instance 9 Formulas that become valid sentences when specific values
are substituted for variables.
J Skolemization 10 A process that introduces new functions to eliminate
existential quantifiers.
Answer
Q.2. PART A PART B ANSWER
A Prolog uses a form of _________, where facts and rules are 1 Declarative
used to derive new information.
B Prolog supports _________, allowing the definition of recursive 2 Clauses
rules and relationships.
C Prolog is a _________ programming language designed for 3 Predicate
symbolic reasoning and manipulation.
D In Prolog, _________ is the process of finding values for 4 Logic
variables that satisfy the goals specified in the query. Programming
E Prolog's execution strategy, known as _________, involves 5 Queries
searching through the clauses to find solutions.
F The _________ operator in Prolog is used to represent logical 6 Comma (,)
OR between goals in a clause.
G The basic building block in Prolog is a _________, which is a 7 Unification
statement that can be true or false.
H In Prolog, a program consists of a set of _________ that define 8 Recursion
relationships and rules.
I The _________ operator in Prolog is used to represent logical 9 Semicolon (;)
AND between goals in a clause.
J Queries in Prolog are posed using _________, seeking solutions 10 Depth-First
to specific goals. Search
Answer
Q.No 2: Write a Prolog program to illustrate how FOPL concepts are used, considering a
case study of relationships between people in terms of parent-child relationships.
Hint :
• The parent( , ) predicate represents parent-child relationships.
• The ancestor( , ) predicate is defined recursively using rules to find ancestors. An
ancestor is either a parent or a parent of an ancestor.
• The query ?- parent(john, mary). checks if John is a parent of Mary, and Prolog will
respond true.
• The query ?- ancestor(X, jim). asks Prolog to find all ancestors of Jim, and Prolog will
respond with all possible values of X such that X is an ancestor of Jim.
Solution:
Solution:
Q. No: 4. Create a Prolog program with a basic knowledge about animals and their
characteristics and implement queries to retrieve information.
Hint :
% Queries to identify and classify animals
% Example Query: Is a dog a mammal?
% Query: ?- mammal(dog).
Hint : Forward Chaining: The system starts with high congestion on a road and uses
forward
chaining to optimize traffic flow by adjusting traffic signals.
• The knowledge base includes information about current traffic conditions,
historical traffic patterns, road infrastructure, and optimal routes.
• Dynamic Route Recommendations: The system uses backward chaining to calculate the
optimal route based on real-time traffic conditions.
% Forward chaining query
% How can we optimize traffic flow on avenue_b?
?- optimize_traffic_flow(avenue_b).
Solution :
Q. No: 6. Create a Prolog program demonstrating backward chaining with a knowledge
base
related to the courses and prerequisites of a B. Tech. student in VIT Bhopal University.
Hint :
• The prerequisite( , ) facts represent the initial knowledge about course prerequisites.
• The can_take( , ) rule represents backward chaining rules. It infers that a student can
take a course if the student has completed the course directly or has completed the
prerequisites for that course.
• The has_completed( , ) facts represent the initial completion status of some courses for
students.
Solution :
Q. No: 7. Create a Prolog program of an ontology for vehicles and their classifications
involving definition of concepts, relationships, and rules within a specific domain.
Hint :
% Queries
% 1. Find all vehicles and their classifications
?- is_a(Object, vehicle).