0% found this document useful (0 votes)
71 views

......aiml vityarthi mod 3

Uploaded by

chirayujain600
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
71 views

......aiml vityarthi mod 3

Uploaded by

chirayujain600
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

Module 3 – Worksheet 1

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 2. The term "Skolemization" in First Order Logic is used to:


a) Eliminate existential quantifiers
b) Introduce existential quantifiers
c) Simplify conjunctions
d) Remove universal quantifiers
Answer: a) Eliminate existential quantifiers

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 4. The negation of "∃x P(x)" is:


a) ∀x P(x)
b) ∃x ¬P(x)
c) ¬∃x P(x)
d) ∀x ¬P(x)
Answer: d) ∀x ¬P(x)

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 9. What is the purpose of "universal instantiation" in First Order Logic?


a) To eliminate existential quantifiers
b) To substitute a constant for a universally quantified variable
c) To eliminate universal quantifiers
d) To standardize variables
Answer: b) To substitute a constant for a universally quantified variable

Q.No 10. How are predicates represented in Prolog?


a) By variables
b) By constants
c) By atoms
d) By functions
Answer: c) By atoms

Q.No 11. How are rules represented in Prolog?


a) By facts
b) By clauses
c) By queries
d) By atoms
Answer: b) By clauses

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 13. How are lists represented in Prolog?


a) Separated by commas
b) Enclosed in square brackets
c) Enclosed in curly braces
d) Separated by semicolons
Answer: b) Enclosed in square brackets

Q.No 14. What is the purpose of the "assert" predicate in Prolog?


a) To check if a fact is true
b) To add a new rule to the database
c) To retract a clause from the database
d) To add a new fact to the database
Answer: d) To add a new fact to the database

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 16. In Prolog, how are arithmetic operations represented?


a) Using keywords like "add" and "subtract"
b) Using infix notation
c) Using prefix notation
d) Using postfix notation
Answer: b) Using infix notation

Q.No 17. In Prolog, how is a disjunction of goals represented?


a) Using the and keyword
b) Using the , (comma) operator
c) Using the or keyword
d) Using the ; (semicolon) operator
Answer: d) Using the ; (semicolon) operator

Q.No 18. In Prolog, what is the purpose of the "is" predicate?


a) To check for equality
b) To perform arithmetic operations
c) To negate a goal
d) To concatenate lists
Answer: b) To perform arithmetic operations

Q.No 19. In unification, what is a "substitution"?


a) A set of terms that cannot be unified
b) A set of variable assignments that makes two terms identical
c) A set of rules used for backtracking
d) A set of constants used in a clause
Answer: b) A set of variable assignments that makes two terms identical

Q.No 20. Which of the following is a valid unification?


a) f(X, Y) and f(a, b)
b) g(X) and h(Y)
c) p(a, b, c) and p(X, Y, Z)
d) q(a, b) and q(a, b, c)
Answer: a) f(X, Y) and f(a, b)

Q.No 21. In the context of unification, what is a "mgu"?


a) Minimum Generalization Unit
b) Most General Unifier
c) Maximum Generalization Unit
d) Multi-level Generalization Unit
Answer: b) Most General Unifier

Q.No 22. Which of the following is a limitation of Forward Chaining?


a) It may not reach the desired goal
b) It is computationally expensive
c) It is not suitable for rule-based systems
d) It requires extensive preprocessing
Answer: b) It is computationally expensive

Q.No 23. Which of the following is a limitation of Backward Chaining?


a) It may not reach the desired goal
b) It is computationally expensive
c) It is not suitable for rule-based systems
d) It requires extensive preprocessing
Answer: b) It is computationally expensive

Q.No 24. In Backward Chaining, the process often involves:


a) Generating additional goals
b) Backtracking
c) Both a and b
d) Neither a nor b
Answer: c) Both a and b

Q.No 25. In resolution, what is the purpose of the "complementary literals"?


a) To introduce new facts
b) To represent contradictory information
c) To simplify clauses
d) To perform arithmetic operations
Answer: b) To represent contradictory information

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 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: c) It assumes complete knowledge

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 30. Which knowledge representation approach uses frames to organize


information?
a) Semantic networks
b) Rule-based systems
c) Frames systems
d) Predicate logic
Answer: c) Frames systems

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 33. What is the primary goal of ontological engineering?


a) Designing software interfaces
b) Representing and formalizing knowledge
c) Developing algorithms for data analysis
d) Creating user-friendly applications
Answer: b) Representing and formalizing knowledge

Q.No 34. In ontological engineering, what is an "ontology"?


a) A programming language
b) A set of algorithms
c) A formal representation of knowledge
d) A data storage system
Answer: c) A formal representation of knowledge

Q.No 35. Which of the following statements is true about ontologies?


a) They are static and unchanging representations of knowledge
b) They are dynamic and evolving structures
c) They are only used in natural language processing
d) They focus solely on procedural knowledge
Answer: c) A formal representation of knowledge

Q.No 36. What is the main challenge in ontological engineering?


a) Creating ontologies that are too specific
b) Ensuring the completeness of ontologies
c) Achieving consensus on the meaning of terms across different communities
d) Developing ontologies that are independent of domain knowledge
Answer: c) Achieving consensus on the meaning of terms across different communities

Q.No 37. How are objects typically represented in cognitive science?


a) Through physical events
b) Through mental events
c) Through mental representations
d) Through categorical events
Answer: c) Through mental representations

Q.No 38. In the context of mental events, what are "schemas"?


a) Mental objects
b) Mental representations of events or situations
c) Physical events
d) Categorical representations
Answer: b) Mental representations of events or situations

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 40. In cognitive science, what are "prototypes" related to?


a) Basic level categories
b) Mental events
c) Mental objects
d) Schemas
Answer: a) Basic level categories
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: Predicate

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.12. In resolution-based theorem proving, the __________ clause represents the


hypothesis to be proved.
Answer: Negated goal

Q.No.13. Objects in cognitive science are typically represented through __________, which are
mental representations.
Answer: Schemas or Concepts

Q.No.14. In the context of mental events, __________ represent mental representations of


events or situations.
Answer: Mental models

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

Match the following


Q.1. PART A PART B ANSWER
A Variables and Constants 1 Elements are used to represent objects and individuals in A-1
logic.
B Quantifiers 2 Expressions like "for all" and "there exists" are used to B-2
quantify statements.
C Predicates 3 Logical sentences that include variables and represent C-3
relationships between objects.
D Functions 4 Operations that take objects as arguments and produce new D-4
objects.
E Universal and Existential 5 Expressions used to represent statements about the quantity E-5
Quantifiers of objects satisfying a predicate.

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.2. PART A PART B ANSWER


A Prolog uses a form of _________, where facts and rules are 1 Declarative A-1
used to derive new information.
B Prolog supports _________, allowing the definition of recursive 2 Clauses B-2
rules and relationships.
C Prolog is a _________ programming language designed for 3 Predicate C-4
symbolic reasoning and manipulation.
D In Prolog, _________ is the process of finding values for 4 Logic D-7
variables that satisfy the goals specified in the query. Programming
E Prolog's execution strategy, known as _________, involves 5 Queries E-10
searching through the clauses to find solutions.
F The _________ operator in Prolog is used to represent logical OR 6 Comma (,) F-9
between goals in a clause.
G The basic building block in Prolog is a _________, which is a 7 Unification G-3
statement that can be true or false.
H In Prolog, a program consists of a set of _________ that define 8 Recursion H-2
relationships and rules.
I The _________ operator in Prolog is used to represent logical 9 Semicolon (;) I-6
AND between goals in a clause.
J Queries in Prolog are posed using _________, seeking solutions 10 Depth-First J-5
to specific goals. Search

Q.3. PART A PART B ANSWER


A ________ is a reasoning strategy that starts with known facts and 1 Goal-Driven A-6
derives conclusions as new information becomes available. Approach
B ________ is a reasoning strategy that starts with specific goals and 2 Goal Selection B-3
works backward to find the necessary facts and rules.
C One advantage of ________ is its ability to explore a large 3 Backward C-5
solution space, potentially discovering multiple paths to a goal. Chaining
D The process of ________ involves applying rules and making 4 Process of D-4
inferences until no further conclusions can be drawn. Deriving
Conclusions
E One advantage of ________ is that it can be more goal-driven, 5 Exploration of E-1
focusing on what information is required to achieve a specific Solution Space
objective.
F ________ involves selecting appropriate rules and facts to 6 Forward Chaining F-2
achieve a goal and moving step by step toward a solution.

Q.4. PART A PART B ANSWER


A ________ is a powerful inference rule used in propositional and 1 Logical Sentences A-3
first-order logic for proving or disproving statements. in DNF
B In ________, two clauses with complementary literals are resolved 2 Inference Process B-6
to create a new clause.
C A ________ is a logical sentence expressed in disjunctive normal 3 Resolution Rule C-1
form (DNF) that serves as input to the resolution process.
D The result of applying the resolution rule to two clauses with 4 Unification in D-5
complementary literals is the creation of a new ________. First-Order Logic
E The process of ________ involves applying the resolution rule to 5 Resolvent E-2
derive new clauses until a contradiction or the desired conclusion
is reached.
F In ________, unification extends the resolution rule and involves 6 Elimination of F-4
unifying terms in the resolution process. Complementary
Literals

Q.5. PART A PART B ANSWER


A An ________ is a formal specification of a conceptualization, 1 Reuse of
providing a structured representation of entities and their Knowledge
relationships. Representations
B The goal of ________ is to enhance knowledge sharing and 2 Formal
interoperability across different systems and domains. Specification of
Conceptualization
C ________ leverages existing ontologies for new applications, 3 Representation of
promoting the reuse of knowledge representations. Complex
Relationships
D A key challenge in ________ is achieving consensus on the 4 Knowledge
meaning of terms and concepts across different communities and Sharing and
domains. Interoperability
E In the context of ________, ontologies play a vital role in 5 Consensus on
representing complex relationships and entities within a specific Meaning
domain.
F ________ involves creating, refining, and maintaining ontologies 6 Design and
to capture and organize knowledge in a machine-readable format. Development of
Ontologies
Module 3 – Worksheet 3
Q.No 1 : Discuss the role of unification in the First Order Predicate Logic. Provide
examples to illustrate how unification is applied when resolving variables in different
clauses.
Hint : Unification Steps
Solution:

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:

Q. No 3 : Think critically about the diverse aspects of knowledge representation to foster


a deeper understanding of the field in the artificial intelligence arena.
Hint : Real world applications of knowledge representation
Solution:
Q. No: 4. Create a Prolog program with a basic knowledge base 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).

% Example Query: Can a chicken fly?


% Query: ?- can_fly(chicken).
Solution :
Q. No: 5. Consider a real-world scenario called “Smart City Traffic Management System”.
The problem is depicted as:
In a smart city, managing traffic flow is crucial for minimizing congestion and ensuring
efficient transportation. The goal is to create an intelligent traffic management system that
utilizes forward chaining algorithm to dynamically adjust traffic signals and provide real-
time route recommendations.

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).

% 2. Find all vehicles with 4 wheels


?- has_property(Object, has_wheels, 4).
Solution :

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:

Q. No 9. Create a Prolog program defining categories, objects, events, mental events,


and mental objects within a knowledge base.
Hint:
?- is_category(book, Category). % Output: Category = physical_object
?- is_category(reading, Category). % Output: Category = physical_object
?- is_category(dreaming, Category). % Output: Category = mental_object
Solution:
Q. No 10. Reasoning with default information involves handling situations where certain
assumptions or defaults are made unless there is explicit information to the contrary. Write
a Prolog program that represents reasoning systems for categories and incorporates default
information.
Hint:
• The default_category() predicate represents default information that
assumes an unspecified item belongs to the 'object' category by default.
• The has_category( , ) rule includes both explicit category information
and default information.
Solution:

You might also like