PAPER KHOJ
Practice Examination — Set 1
For BITM · Semester 5
Based on the prescribed TU Faculty of Management syllabus and examination structure
Candidates are required to give their answers in their own words as far as practicable. The figures in the margin indicate full marks.
Group 'A'
Brief Answer Questions. Attempt all questions.
[5 × 2 = 10]- [2]
Define Artificial Intelligence and distinguish between Strong AI and Weak AI.
View model answerHide model answer
Artificial Intelligence & Strong vs. Weak AI:
- Definition of AI: The subfield of computer science dedicated to engineering computational systems and software agents capable of performing tasks that typically require human cognitive intelligence—such as perception, heuristic reasoning, problem-solving, learning, and contextual decision-making.
- Strong AI (General AI / AGI): Theoretical systems possessing generalized human-level or superhuman cognitive capabilities across any intellectual domain, with genuine self-awareness, abstraction, and intentionality.
- Weak AI (Narrow AI): Practical systems engineered and optimized to execute specific, bounded tasks (e.g. AlphaGo, facial recognition, Siri, spam filtering) without autonomous consciousness or cross-domain cognitive transfer.
- [2]
What is an Intelligent Agent? Formulate the PEAS description for an Automated Taxi Driver.
View model answerHide model answer
Intelligent Agent & PEAS Framework:
An Intelligent Agent is an autonomous entity that perceives its environment through sensors, processes information through internal reasoning logic, and directs its activity through actuators to maximize its expected performance measure.
PEAS Description for an Automated Taxi Driver:
- P (Performance Measure): Passenger safety, speed/arrival time, legal compliance (traffic laws), passenger comfort, and fuel efficiency/profit maximization.
- E (Environment): Urban and highway roadways, pedestrian footpaths, vehicular traffic, weather conditions (rain, fog), road construction, and diverse passengers.
- A (Actuators): Steering wheel, accelerator, brake pedal, horn, turn signals, and digital passenger interface/display.
- S (Sensors): Video cameras, LiDAR, radar, ultrasonic sonar sensors, GPS receiver, speedometer, accelerometer, and engine diagnostic telemetry.
- [2]
State the difference between Informed (Heuristic) and Uninformed (Blind) search strategies.
View model answerHide model answer
Informed vs. Uninformed Search:
Feature Uninformed (Blind) Search Informed (Heuristic) Search Domain Knowledge Possesses no problem-specific knowledge beyond the state-space definitions and transition operators. Leverages domain-specific heuristic functions estimating distance/cost to the goal. Search Guidance Systematically traverses nodes purely based on tree topology or path cost. Actively guides exploration towards promising branches evaluated by evaluation function . Efficiency High time and space complexity; prone to combinatorial state explosion. Dramatically shrinks search space; faster convergence to goal. Examples Breadth-First Search (BFS), Depth-First Search (DFS), Uniform Cost Search (UCS). Greedy Best-First Search, Search, Hill Climbing. - [2]
What is the Admissibility condition of a heuristic function in A* search?
View model answerHide model answer
Admissibility Condition in
Search: A heuristic function
is admissible if it never overestimates the actual cost to reach the nearest goal state from node . Mathematically:
where:
is the estimated cost from node to the goal. is the true optimal cost from node to the goal.
Significance: Admissibility is the necessary and sufficient condition for tree-search
to guarantee optimality (discovering the absolute least-cost solution path). - [2]
Explain the Horizon Effect in game-tree search.
View model answerHide model answer
The Horizon Effect:
The Horizon Effect occurs in depth-limited heuristic game playing (e.g. chess, checkers) when an inevitable, catastrophic adverse event (such as the loss of a Queen) is pushed beyond the maximum search horizon by executing delaying, sub-optimal intermediate moves (such as spite checks).
- Because the search engine cannot see beyond its fixed depth limit (the horizon), it erroneously believes it has avoided the catastrophe, while in reality it merely delayed it at the cost of worsening its positional advantage.
- Mitigation: Quiescence search, which dynamically extends search depth in unstable (non-quiescent) tactical capture positions until tactical calm is restored.
Group 'B'
Short Answer / Problem Solving Questions. Attempt any SIX questions.
[6 × 5 = 30]- [5]
Explain the four fundamental agent architectures: Simple Reflex, Model-based Reflex, Goal-based, and Utility-based agents with architectural diagrams and characteristics.
View model answerHide model answer
Four Fundamental Intelligent Agent Architectures:
1. Simple Reflex: [Sensors] -> [Condition-Action Rules] -> [Actuators] 2. Model-Based: [Sensors] -> [State + How World Evolves] -> [Condition-Action Rules] -> [Actuators] 3. Goal-Based: [Sensors] -> [State] + [Goals / Future Planning] -> [Actuators] 4. Utility-Based: [Sensors] -> [State] + [Utility Function / Trade-offs] -> [Actuators]
1. Simple Reflex Agent:
- Operates strictly on condition-action rules:
. - Ignores percept history; only reacts to current percept.
- Effective only in fully observable environments; suffers infinite loops in partially observable states.
2. Model-Based Reflex Agent:
- Maintains internal state tracking unobserved aspects of the current environment.
- Encapsulates two types of world knowledge:
- How the world evolves independently of the agent.
- How the agent’s own actions affect the environment.
- Can operate successfully in partially observable environments.
3. Goal-Based Agent:
- Combines state knowledge with explicit goals describing desirable terminal situations.
- Incorporates search and planning algorithms to determine multi-step sequences of actions to reach goals.
- Highly flexible: easily reconfigured by changing target goals without reprogramming behavioral rules.
4. Utility-Based Agent:
- Maps states onto real numbers via a Utility Function representing the degree of desirability/happiness.
- Resolves conflicting goals by evaluating trade-offs (e.g. speed vs. safety vs. fuel economy).
- Enables rational decision-making under uncertainty where goals can only be achieved probabilistically.
- Operates strictly on condition-action rules:
- [5]
Compare Uninformed Search Algorithms: Breadth-First Search (BFS), Depth-First Search (DFS), Depth-Limited Search (DLS), and Iterative Deepening DFS (IDDFS) across Time Complexity, Space Complexity, Completeness, and Optimality.
View model answerHide model answer
Comprehensive Comparison of Uninformed Search Strategies:
Let:
= branching factor = depth of the shallowest goal node = maximum depth of the state space = depth cutoff limit for DLS
Search Strategy Time Complexity Space Complexity Completeness Optimality Breadth-First Search (BFS) (keeps all frontier nodes in memory) Yes (if is finite) Yes (if path cost is a non-decreasing function of depth) Depth-First Search (DFS) (linear memory) No (fails in infinite paths or cyclic state spaces) No (can return deep non-optimal goal) Depth-Limited Search (DLS) No (if ) No Iterative Deepening DFS (IDDFS) (linear memory) Yes (if is finite) Yes (if step costs are equal)
Key Architectural Insights:
- BFS Memory Bottleneck: BFS is strictly memory-bound in real-world AI applications because it retains
nodes in RAM, causing out-of-memory crashes before CPU exhaustion. - IDDFS Superiority: IDDFS combines the modest linear memory footprint of DFS (
) with the completeness and optimality guarantees of BFS. Although top levels are regenerated, the computational overhead is negligible (typically less than 11% overhead for ) because the overwhelming majority of nodes reside at the lowest search depth.
- [5]
Explain Greedy Best-First Search and A* Search. Show why A* search is optimal when its heuristic function is admissible and consistent.
View model answerHide model answer
Greedy Best-First Search vs. A* Search:
1. Greedy Best-First Search:
- Evaluates nodes using solely the heuristic estimation:
. - Minimizes estimated distance to goal, ignoring accumulated past path cost
. - Prone to dead ends, cycles, and finding sub-optimal paths.
2. A* Search:
- Evaluates nodes using combined evaluation function:
where
is actual cost incurred from root to , and is estimated cost from to goal.
Proof of A* Optimality (Admissible Heuristic):
Let
be the optimal goal cost. Suppose for contradiction that terminates by selecting a sub-optimal goal with cost . - Since
is a goal, , so . - Prior to choosing
, there must exist at least one unexpanded node on the open frontier that lies on the true optimal path to the optimal goal . - By admissibility,
, meaning: - Since
, we have: - A priority queue ordered by minimum
will always expand before . - This holds for all nodes on the optimal trajectory until
itself is expanded with . - Thus,
can never be selected ahead of the optimal goal.
- Evaluates nodes using solely the heuristic estimation:
- [5]
What is a Constraint Satisfaction Problem (CSP)? Explain the AC-3 (Arc Consistency) algorithm with an example.
View model answerHide model answer
Constraint Satisfaction Problem (CSP) & AC-3:
A CSP is formalized by a triplet
: : A set of variables. : A set of domains containing allowable values for each variable. : A set of constraints restricting allowable combinations of assignments.
Arc Consistency Algorithm (AC-3):
A directed arc
is arc consistent if for every value , there exists at least one value that satisfies the constraint between and . AC-3 Algorithm Steps:
- Initialize queue
with all directed binary arcs in the CSP: . - While
is not empty: - Pop arc
. - If
deletes any value from : - If
, return Failure (no consistent solution possible). - For each neighbor
, insert arc into .
- If
- Pop arc
- Return Success (domain reduced to arc-consistent values).
Example (Map Coloring):
- Let Variables
share constraint . - If
and . - Arc
is revised: in conflicts with . - Value
is pruned from , reducing . Arc consistency is achieved.
- [5]
Explain the Minimax Algorithm in game-tree evaluation and describe how Alpha-Beta Pruning optimizes it without altering the final decision.
View model answerHide model answer
Minimax Algorithm & Alpha-Beta Pruning:
1. Minimax Algorithm:
Used in deterministic, perfect-information two-player zero-sum games (MAX vs. MIN):
- Complexity: Time
, Space . Exhaustive evaluation is computationally intractable for deep games (e.g. Chess ).
2. Alpha-Beta Pruning Optimization:
Prunes branches that cannot influence the final minimax decision at the root:
= Highest value found so far by MAX along the search path (lower bound on MAX’s payoff). Initialized to . = Lowest value found so far by MIN along the search path (upper bound on MIN’s payoff). Initialized to .
Pruning Conditions:
- At MIN node: If
, prune remaining children ( -cutoff). MAX already has a better move elsewhere. - At MAX node: If
, prune remaining children ( -cutoff). MIN already has a better defensive move elsewhere.
Efficiency Gain:
With perfect move ordering, alpha-beta reduces time complexity from
to . This effectively doubles the search depth reachable within the same CPU time limit. - Complexity: Time
- [5]
Describe Hill Climbing Search. Detail its three primary failure modes (Local Maxima, Ridges, Plateaus) and explain how Simulated Annealing resolves them.
View model answerHide model answer
Hill Climbing Search & Simulated Annealing:
Hill Climbing is an iterative local search algorithm that continually moves in the direction of increasing elevation (value) to find the peak of a state-space surface.
Three Primary Failure Modes:
- Local Maximum: A peak that is higher than all its neighboring states, but lower than the global maximum. The algorithm terminates prematurely thinking it found the optimum.
- Ridge: A sequence of local maxima joined by steep slopes where standard orthogonal coordinate moves step down on either side, halting progress.
- Plateau (Shoulder / Flat Maximum): A flat area of the state-space landscape where all neighboring states possess identical heuristic values, leaving the search with no directional gradient.
How Simulated Annealing Resolves These Limitations:
Inspired by metallurgy (gradual cooling of molten metal to form defect-free crystalline structures):
- Instead of purely greedy moves, it allows downhill (sub-optimal) moves with a probability governed by the Boltzmann distribution:
where
, and is temperature. - When
is high (early phase), the agent frequently accepts worse moves, escaping local maxima and exploring wide basins. - As temperature
gradually cools according to an annealing schedule ( ), the probability of accepting downhill moves drops to zero, smoothly transitioning into standard greedy local optimization.
Group 'C'
Comprehensive / Analytical Questions. Attempt all questions.
[2 × 10 = 20]- [10]
Consider the state-space graph where S is the start node and G is the goal node. The step costs g(n) between nodes and heuristic values h(n) to the goal G are given as follows:
- S->A: 3, S->B: 2, S->C: 4
- A->D: 5, A->E: 4
- B->E: 3, B->F: 6
- C->F: 2
- D->G: 4, E->G: 3, F->G: 5 Heuristics: h(S)=7, h(A)=6, h(B)=5, h(C)=6, h(D)=3, h(E)=2, h(F)=4, h(G)=0. Perform a step-by-step trace of A* search. Show the Open and Closed lists at each step, path costs g, heuristic values h, evaluation function f = g + h, and identify the optimal solution path and total cost.
View model answerHide model answer
Step-by-Step A* Search Graph Traversal:
Evaluation function:
Iteration Trace:
Step 1: Initialize
- Open List:
- Closed List:
Step 2: Expand
( ) - Successors of
: , Path: , Path: , Path:
- Open List:
- Closed List:
Step 3: Expand
(Minimum ) - Successors of
: , Path: , Path:
- Open List:
- Closed List:
Step 4: Expand
(Minimum ) - Successors of
: , Path:
- Open List:
- Closed List:
Step 5: Expand
(Minimum ) is the goal state! When a goal node is removed from Open list for expansion, terminates with guaranteed optimality.
Summary Table:
Step Node Picked Generated Children Open List (Priority Ordered) 1 - - - - 2 0 7 7 3 2 5 7 4 5 2 7 5 (Goal) 8 0 8 Terminated Goal reached optimally
Final Solution:
- Optimal Path:
- Total Path Cost:
- [10]
Apply the Minimax Algorithm with Alpha-Beta Pruning on a 3-ply game tree where root node A (MAX) has children B and C (MIN).
- Node B has terminal children: D=4, E=6, F=2
- Node C has terminal children: G=8, H=1, I=9 Trace the exact order of node evaluations, update alpha and beta values at each step, determine all pruned branches (cutoffs), calculate the minimax values for nodes B, C, and A, and state the optimal opening move.
View model answerHide model answer
Minimax with Alpha-Beta Pruning Complete Trace:
A (MAX) [alpha=-inf, beta=+inf] / \ / \ B (MIN) C (MIN) / | \ / | \ D E F G H I [4] [6] [2] [8] [1] [9]
Step-by-Step Traversal Trace:
-
At Root Node A (MAX):
- Initialize
. - Visit first child B (MIN) passing
.
- Initialize
-
At Node B (MIN):
- Initialize for B:
. - Evaluate child D: Value =
. . - Check:
No cutoff.
- Evaluate child E: Value =
. . - Check:
No cutoff.
- Evaluate child F: Value =
. . - Check:
No cutoff.
- All children of B evaluated.
- Return minimax value of
.
- Initialize for B:
-
Back at Root Node A (MAX):
- Updates from left child B:
. remains .
- Visit second child C (MIN) passing
.
- Updates from left child B:
-
At Node C (MIN):
- Inherits bounds:
. - Evaluate child G: Value =
. . - Check:
No cutoff.
- Evaluate child H: Value =
. . - Check Cutoff Condition:
- Since
, MIN at node C can already guarantee a score of at most . MAX at root A already has guaranteed score of from branch B. Therefore, MAX will never choose branch C regardless of what follows.
- Pruning: Child I (value 9) is PRUNED and never evaluated!
- Node C terminates with value
(effective value ).
- Inherits bounds:
-
Back at Root Node A (MAX):
. - Final minimax value at root
.
Final Evaluation Summary:
- Minimax Value of Node B:
- Minimax Value of Node C:
(with pruning) - Minimax Value of Node A (Root):
- Pruned Branch: Node I is pruned under node C (
-cutoff). - Optimal Move for MAX: Move to Node B.