......aiml vityarthi mod 3
......aiml vityarthi mod 3
Name: Chirayu
Jain
Reg no: 24BAI10706
Multiple Choice Questions
Q.No 1. In First Order Predicate Logic, a predicate is a symbol denoting a:
a) Variable
b) Constant
c) Function
d) Relation
Answer: d) Relation
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: b) The set of all constants
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: a) An instance of a predicate with no variables
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: b) A variable that is not quantified within a formula
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: c) It is false for at least one value of x
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: a) To make variables unique within a formula
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: c) Matching terms and binding variables b) Enclosed in square brackets
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: c) A goal to be proved
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: a) The creation of a new clause
Q.No 28. In first-order logic, what is the extension of the resolution rule?
a) Skolemization
b) Quantification
c) Unification
d) Backtracking
Answer: c) Unification
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: To encode information in a machine-readable format
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: d) Predicate logic
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: b) Rule-based systems
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: b) Mental objects are manifestations of mental events
Q.No.2. Inference rules such as __________ and __________ are commonly employed in
firstorder logic for deriving conclusions from premises.
Answer: Modus Ponens and Universal Instan a on
Q.No.3. The language of first-order logic allows for the representation of complex relationships
through the use of __________ and __________.
Answer: Predicates and Quantifiers
Q.No.4. The __________ operator in Prolog is used to represent logical AND between goals in
a clause.
Answer: , (comma)
Q.No.5. In Prolog, __________ is the process of finding values for variables that satisfy the
goals specified in the query.
Answer: Unification
Q.No.6. The __________ operator in Prolog is used to represent logical OR between goals in
a clause.
Answer: (semicolon)
Q.No.7. __________ is commonly used in rule-based systems where the knowledge base is
extensive and conclusions need to be reached incrementally.
Answer: Forward chaining
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: Backward chaining
Q.No.9. A __________ is a logical sentence expressed in disjunctive normal form (DNF) that
serves as input to the resolution process.
Answer: Clause
Q.No.10. The resolution rule applies to two clauses with __________ literals, leading to the
creation of a resolvent.
Answer: Complementary
Q.No.11. The result of applying the resolution rule to two clauses with complementary literals
is the creation of a new __________.
Answer: Clause
Q.No.13. Objects in cognitive science are typically represented through __________, which are
mental representations.
Answer: Schemas or Concepts
Q.No.15. The relationship between mental events and mental objects is that mental events are
often considered as __________ of mental objects.
Answer: Perceptions or Representations
F Well-Formed Sentences 6
A logical sentence with specific values substituted for its F-6
variables.
G Unification 7 The process of finding values for variables that make a given G-7
formula true.
H Inference Rules 8 Mechanisms used for deriving conclusions from premises in H-8
first-order logic.
I Ground Instance 9 Formulas that become valid sentences when specific values I-9
are substituted for variables.
J Skolemization 10 A process that introduces new functions to eliminate J-10
existential quantifiers.
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:
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 at 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 definitions of concepts, relationships, and rules within a specific domain.
Hint :
% Queries
% 1. Find all vehicles and their classifications
?- is_a(Object, vehicle).
Q. No 8. Write a Prolog program illustrating the use of resolution to query about family
relationships:
Hint:
• The parent( , ) predicates represent parent-child relationships in the knowledge
base.
• The ancestor( , ) rule defines that someone is an ancestor if they are a direct parent
or if they are the parent of an ancestor.
• The query ancestor(bob, mary) is a resolution query, asking whether "bob" is an
ancestor of "mary" based on the rules and facts.
Solution: