AI – Unit I & II Questions and Answers
Unit I
Q1: Define AI. Explain AI Problems.
Definition:
Artificial Intelligence (AI) is “the science and engineering of making intelligent
machines, especially intelligent computer programs.” It studies how to make
computers perform tasks that normally require human intelligence.
AI Problems:
Formal Tasks:
These are structured, rule-based problems.
Examples: Game playing (chess, tic-tac-toe, Go) where AI must evaluate
multiple moves and strategies; Theorem proving in logic and mathematics
where AI tries to derive proofs automatically.
Importance: They test reasoning ability and were the first areas of
success in AI.
Mundane Tasks:
These are everyday human abilities that seem simple but are difficult for
machines.
Examples: Vision (recognizing objects in images), Speech recognition,
Natural language understanding (interpreting and generating sentences).
Challenge: These tasks involve noisy, ambiguous, and real-world data.
Expert Tasks:
Require specialized domain knowledge and decision-making skills.
Examples: Medical diagnosis, engineering troubleshooting, planning and
scheduling in complex systems.
Importance: Expert tasks show how AI can support human professionals
by providing knowledge-based solutions.
Summary:
AI problems range from formal symbolic reasoning to mundane human skills
and specialized expert knowledge. Each type has unique challenges, but all
require effective search methods, heuristics, and knowledge representation to
solve.
Q2: What are AI Techniques?
AI techniques are the foundational methods employed to construct intelligent
systems. Three significant techniques include:
Search:
Addresses problems lacking a direct solution by systematically exploring
potential states or solutions. For instance, chess programs utilize search
to evaluate moves (a, b, c…) until a winning strategy is identified.
Use of Knowledge:
Leverages domain knowledge to resolve complex issues. By encoding
facts and rules about the world (knowledge base), AI systems can reason
more effectively. For example, expert systems apply medical or
engineering knowledge to diagnose problems.
Abstraction:
Concentrates on the most pertinent features of a problem while
disregarding irrelevant details. This approach simplifies complexity by
omitting insignificant variations. For instance, in route planning, only
distance and traffic on major roads might be considered, abstracting away
local specifics.
Each technique offers a unique method for narrowing down possibilities and
directing problem-solving efforts.
Q3: Discuss Turing Test
Definition:
The Turing Test, proposed by Alan Turing in 1950, is a behavioral test to
measure a machine’s intelligence. A computer is said to be intelligent if it can
converse in such a way that a human interrogator cannot reliably tell it apart
from another human.
Process:
A human interrogator interacts (text-based) with both a machine and a
human.
The interrogator asks questions to both participants without knowing which
is which.
If the interrogator cannot distinguish the machine from the human
consistently, the machine is said to have “passed” the test.
Purpose/Importance:
Shifts the question “Can machines think?” to “Can machines behave
indistinguishably from humans?”
Focuses on observable behavior instead of internal mechanisms.
Provides a practical benchmark for conversational AI.
Criticism:
Passing the test may show imitation, not true understanding.
Narrow: only tests language ability, not other aspects of intelligence.
Summary:
The Turing Test evaluates intelligence based on behavioral indistinguishability
— if a computer’s answers are mistaken for human responses, it demonstrates
machine intelligence.
Q4: Explain the Level of Model
Definition:
The “level of model” in AI refers to the extent to which a system imitates human
reasoning methods versus simply achieving results by any effective approach.
Types:
Performance-Level Models:
Aim at solving problems efficiently, regardless of whether the process
resembles human thought.
Prioritize accuracy, speed, and practicality.
Example: a calculator solving complex equations instantly (not human-
like, but correct).
Cognitive-Level Models:
Aim to replicate human reasoning and thought processes.
Useful for studying or simulating psychological theories.
Example: PARRY, an early program that simulated a paranoid patient.
Benefits:
Helps test cognitive/psychological models.
Makes reasoning transparent (e.g., explaining why a system reached a
conclusion).
Useful when human-like interaction or understanding is needed.
Summary:
Performance models emphasize results and efficiency.
Cognitive models emphasize human-like reasoning and explainability.
The choice depends on the AI system’s purpose (practical problem-solving
vs. human-like interaction).
Q5: List out the applications of AI.
AI finds applications across various domains. Key applications include:
Gaming:
In strategic games like chess, poker, and Go, AI evaluates numerous
possible moves using search and heuristics.
Natural Language Processing (NLP):
Understanding and generating human language (translation, chatbots,
question-answering).
Expert Systems:
Rule-based systems offering reasoning and advice in fields such as
medicine or engineering (e.g., diagnostic programs).
Computer Vision:
Interpretation of visual input (image recognition, scene understanding).
Speech Recognition:
Transforming spoken language into text and comprehending it.
Handwriting Recognition:
Deciphering handwritten text and converting it into digital format.
Intelligent Robotics:
Robots equipped with sensors and learning capabilities that perform
tasks (such as assembling, navigating, and adapting to their
environments).
These applications illustrate AI’s extensive reach in processing language, images,
and enabling autonomous decision-making across various sectors.
Unit II
Q1: Define state, state space with example.
A state represents a complete description of the problem at a specific moment,
while the state space encompasses all states achievable from the initial state.
For example, in chess, each configuration of pieces on the board constitutes a
state, and the state space consists of all legal board setups that may arise. In
the water-jug problem, a state can be denoted as (x,y) for the water levels in
each jug, with the state space comprising all possible (x,y) combinations
reachable through pouring actions.
Q2: Explain Production system.
A production system is a rule-based AI model used for problem-solving. It
consists of:
Rules (Productions):
A collection of if–then rules, each containing a left-hand side (condition)
and a right-hand side (action). When a rule’s condition matches the
current state, its action specifies how to update the state.
Knowledge base (Working memory):
A repository of facts regarding the current problem state and background
knowledge. Some facts are permanent, while others (temporary facts)
reflect the current scenario.
Control strategy:
Determines which rule to apply next and resolves conflicts when multiple
rules are applicable. It may follow a priority order or heuristic.
Rule applier (Inference engine):
The mechanism that implements a selected rule, updating the state and
tracking the sequence of rules applied.
Problem-solving within a production system occurs by repeatedly selecting and
executing applicable rules: the control strategy applies rules to the state
description until a rule achieves the goal state. Thus, addressing a problem is
modeled as a sequence of rule applications from the initial state to the desired
goal.
Q3: Illustrate the Following Algorithms
Depth-First Search (DFS):
DFS explores a search tree by going deep along one branch before
backtracking.
Starts at the root and follows successors until reaching a leaf node or dead
end.
Uses a stack (explicit or recursion) to keep track of unexplored nodes.
Example: Starting at node S → A → B → D → E, then backtracks to explore C →
G.
Advantages: Requires less memory since only the current path is stored.
Disadvantages: Not guaranteed to find the shortest path and may loop in
infinite paths if not controlled.
Breadth-First Search (BFS):
BFS explores the search tree level by level.
Begins at the root, expands all immediate successors, then their successors,
and so on.
Uses a queue (FIFO) to maintain the frontier of nodes.
Advantages: Complete in finite spaces and guaranteed to find the shortest
path (minimum steps).
Disadvantages: Requires large memory to store all frontier nodes, making it
space-intensive.
Best-First Search:
Best-First Search is an informed search algorithm that uses a heuristic
function.
At each step, it expands the node that appears most promising based on
heuristic evaluation.
Nodes are placed in a priority queue sorted by heuristic cost.
Advantages: More efficient than blind search when a good heuristic is
available.
Disadvantages: Can be misled if heuristic is poor; performance depends
heavily on heuristic quality.
Q4: Explain Heuristic Function
A heuristic function h(n) provides an estimate of the cost from a given state
n to the goal.
It acts as a guide in informed search algorithms (e.g., Best-First, A*).
Helps the algorithm decide which node to expand first by prioritizing
promising paths.
Properties of a good heuristic:
Non-negative values.
Admissibility: should never overestimate the actual cost (ensures optimal
solution with A*).
Consistency: estimate obeys triangle inequality (makes search more
efficient).
A well-designed heuristic significantly reduces the search space and
computation time.
Q5: Discuss Hill Climbing Method
Hill Climbing is a greedy local search algorithm.
Starts from an initial state and evaluates its neighboring states.
Moves to the neighbor with the highest (or best) value according to an
objective function.
Repeats this process until no better neighbors exist → local maximum is
reached.
Variants:
Simple Hill Climbing: selects the first better neighbor found.
Steepest-Ascent: evaluates all neighbors, chooses the best.
Stochastic: randomly picks among better neighbors.
Advantages: Simple, fast, requires little memory.
Disadvantages: Can get stuck at local maxima, on plateaus, or along ridges,
failing to find the global optimum.
Q6: Differentiate between Breadth First Search and Depth First Search.
Characteristic Breadth-First Search Depth-First Search
(BFS) (DFS)
Strategy Explores nodes level Explores nodes by
by level (breadth-wise) going deep along a
branch before
backtracking
Data Structure Uses a FIFO queue Uses a stack (explicit or
(stores frontier at each recursion)
level)
Completeness Complete if search Complete only in finite
space is finite (will find spaces (may not
a solution if it exists) terminate on infinite
paths)
Optimality Optimal for uniform- Not optimal (may find
cost (finds shortest a suboptimal solution)
path by number of
steps)
Time Complexity O(bd)O(b^d)O(bd), O(bm)O(b^m)O(bm),
where bbb is branching where mmm is
factor and ddd is depth maximum depth of
of shallowest solution search (could be much
larger than ddd)
Space Complexity O(bd)O(b^d)O(bd) O(b×m)O(b \times
(stores an entire level m)O(b×m) (stores
of nodes) current path of length
up to mmm)
Uses Guarantees shortest- Uses less memory; may
path discovery find a solution faster if
(unweighted graphs) lucky path chosen
Each row contrasts BFS vs DFS using theory and the source text (e.g. BFS’s completeness
and optimality vs DFS’s memory efficiency and potential incompleteness).