Group A — Short Answer Questions (1 Mark Each)

Q1Define Artificial Intelligence.

Ans: Concise point-wise definition/formula for Define Artificial Intelligence. in accordance with MAKAUT examination pattern.

Q2What is Turing Test?

Ans: Concise point-wise definition/formula for What is Turing Test? in accordance with MAKAUT examination pattern.

Q3Define Intelligent Agent.

Ans: Concise point-wise definition/formula for Define Intelligent Agent. in accordance with MAKAUT examination pattern.

Q4What is PEAS representation?

Ans: Concise point-wise definition/formula for What is PEAS representation? in accordance with MAKAUT examination pattern.

Q5Define Environment in AI.

Ans: Concise point-wise definition/formula for Define Environment in AI. in accordance with MAKAUT examination pattern.

Q6What is Fully Observable Environment?

Ans: Concise point-wise definition/formula for What is Fully Observable Environment? in accordance with MAKAUT examination pattern.

Q7What is Partially Observable Environment?

Ans: Concise point-wise definition/formula for What is Partially Observable Environment? in accordance with MAKAUT examination pattern.

Q8What is Deterministic Environment?

Ans: Concise point-wise definition/formula for What is Deterministic Environment? in accordance with MAKAUT examination pattern.

Q9What is Stochastic Environment?

Ans: Concise point-wise definition/formula for What is Stochastic Environment? in accordance with MAKAUT examination pattern.

Q10Define State Space.

Ans: Concise point-wise definition/formula for Define State Space. in accordance with MAKAUT examination pattern.

Q11What is Initial State and Goal State?

Ans: Concise point-wise definition/formula for What is Initial State and Goal State? in accordance with MAKAUT examination pattern.

Q12Define Path Cost.

Ans: Concise point-wise definition/formula for Define Path Cost. in accordance with MAKAUT examination pattern.

Q13What is Uninformed Search?

Ans: Concise point-wise definition/formula for What is Uninformed Search? in accordance with MAKAUT examination pattern.

Q14What is Informed Search?

Ans: Concise point-wise definition/formula for What is Informed Search? in accordance with MAKAUT examination pattern.

Q15Define Heuristic Function.

Ans: Concise point-wise definition/formula for Define Heuristic Function. in accordance with MAKAUT examination pattern.

Q16What is Admissible Heuristic?

Ans: Concise point-wise definition/formula for What is Admissible Heuristic? in accordance with MAKAUT examination pattern.

Q17What is Consistent Heuristic?

Ans: Concise point-wise definition/formula for What is Consistent Heuristic? in accordance with MAKAUT examination pattern.

Q18Define Breadth-First Search (BFS).

Ans: Concise point-wise definition/formula for Define Breadth-First Search (BFS). in accordance with MAKAUT examination pattern.

Q19Define Depth-First Search (DFS).

Ans: Concise point-wise definition/formula for Define Depth-First Search (DFS). in accordance with MAKAUT examination pattern.

Q20What is Uniform Cost Search?

Ans: Concise point-wise definition/formula for What is Uniform Cost Search? in accordance with MAKAUT examination pattern.

Q21What is A* Search?

Ans: Concise point-wise definition/formula for What is A* Search? in accordance with MAKAUT examination pattern.

Q22Define Greedy Best-First Search.

Ans: Concise point-wise definition/formula for Define Greedy Best-First Search. in accordance with MAKAUT examination pattern.

Q23What is Hill Climbing Search?

Ans: Concise point-wise definition/formula for What is Hill Climbing Search? in accordance with MAKAUT examination pattern.

Q24Define Local Maxima in hill climbing.

Ans: Concise point-wise definition/formula for Define Local Maxima in hill climbing. in accordance with MAKAUT examination pattern.

Q25What is Plateau in hill climbing?

Ans: Concise point-wise definition/formula for What is Plateau in hill climbing? in accordance with MAKAUT examination pattern.

Q26What is Ridge in hill climbing?

Ans: Concise point-wise definition/formula for What is Ridge in hill climbing? in accordance with MAKAUT examination pattern.

Q27What is Simulated Annealing?

Ans: Concise point-wise definition/formula for What is Simulated Annealing? in accordance with MAKAUT examination pattern.

Q28Define Constraint Satisfaction Problem (CSP).

Ans: Concise point-wise definition/formula for Define Constraint Satisfaction Problem (CSP). in accordance with MAKAUT examination pattern.

Q29What is Backtracking Search?

Ans: Concise point-wise definition/formula for What is Backtracking Search? in accordance with MAKAUT examination pattern.

Q30Define Game Tree.

Ans: Concise point-wise definition/formula for Define Game Tree. in accordance with MAKAUT examination pattern.

Q31What is Minimax Algorithm?

Ans: Concise point-wise definition/formula for What is Minimax Algorithm? in accordance with MAKAUT examination pattern.

Q32What is Alpha-Beta Pruning?

Ans: Concise point-wise definition/formula for What is Alpha-Beta Pruning? in accordance with MAKAUT examination pattern.

Q33Define Alpha and Beta values.

Ans: Concise point-wise definition/formula for Define Alpha and Beta values. in accordance with MAKAUT examination pattern.

Q34What is Knowledge Representation? --- Page 2 ---

Ans: Concise point-wise definition/formula for What is Knowledge Representation? --- Page 2 --- in accordance with MAKAUT examination pattern.

Q35Define Knowledge Base (KB).

Ans: Concise point-wise definition/formula for Define Knowledge Base (KB). in accordance with MAKAUT examination pattern.

Q36What is Propositional Logic?

Ans: Concise point-wise definition/formula for What is Propositional Logic? in accordance with MAKAUT examination pattern.

Q37What is First-Order Logic (FOL)?

Ans: Concise point-wise definition/formula for What is First-Order Logic (FOL)? in accordance with MAKAUT examination pattern.

Q38Define Universal Quantifier (∀).

Ans: Concise point-wise definition/formula for Define Universal Quantifier (∀). in accordance with MAKAUT examination pattern.

Q39Define Existential Quantifier (∃).

Ans: Concise point-wise definition/formula for Define Existential Quantifier (∃). in accordance with MAKAUT examination pattern.

Q40What is Conjunctive Normal Form (CNF)?

Ans: Concise point-wise definition/formula for What is Conjunctive Normal Form (CNF)? in accordance with MAKAUT examination pattern.

Q41Define Resolution Refutation.

Ans: Concise point-wise definition/formula for Define Resolution Refutation. in accordance with MAKAUT examination pattern.

Q42What is Unification in FOL?

Ans: Concise point-wise definition/formula for What is Unification in FOL? in accordance with MAKAUT examination pattern.

Q43Define Horn Clause.

Ans: Concise point-wise definition/formula for Define Horn Clause. in accordance with MAKAUT examination pattern.

Q44What is Forward Chaining?

Ans: Concise point-wise definition/formula for What is Forward Chaining? in accordance with MAKAUT examination pattern.

Q45What is Backward Chaining?

Ans: Concise point-wise definition/formula for What is Backward Chaining? in accordance with MAKAUT examination pattern.

Q46What is Semantic Network?

Ans: Concise point-wise definition/formula for What is Semantic Network? in accordance with MAKAUT examination pattern.

Q47Define Frame in knowledge representation.

Ans: Concise point-wise definition/formula for Define Frame in knowledge representation. in accordance with MAKAUT examination pattern.

Q48What is Bayes' Theorem?

Ans: Concise point-wise definition/formula for What is Bayes' Theorem? in accordance with MAKAUT examination pattern.

Q49Define Bayesian Network.

Ans: Concise point-wise definition/formula for Define Bayesian Network. in accordance with MAKAUT examination pattern.

Q50What is Fuzzy Logic?

Ans: Concise point-wise definition/formula for What is Fuzzy Logic? in accordance with MAKAUT examination pattern.

Q51Define Membership Function in fuzzy logic.

Ans: Concise point-wise definition/formula for Define Membership Function in fuzzy logic. in accordance with MAKAUT examination pattern.

Q52What is Expert System?

Ans: Concise point-wise definition/formula for What is Expert System? in accordance with MAKAUT examination pattern.

Q53What is Expert System Shell?

Ans: Concise point-wise definition/formula for What is Expert System Shell? in accordance with MAKAUT examination pattern.

Group B — Medium / Descriptive Questions (5 Marks Each)

AGENT Sensors (Percepts) Performance Measure Actuators (Actions) ENVIRONMENT Percepts Actions
Figure: PEAS Agent Framework & Environment Loop
Q1Explain PEAS Model with Automated Taxi and Medical Diagnosis examples.

Definition: The PEAS framework (Performance measure, Environment, Actuators, Sensors) is used to specify the task environment of a rational agent completely before designing it.

PEAS ElementAutomated TaxiMedical Diagnosis System
PerformanceSafety, speed, legality, comfort, profitCorrect diagnosis, minimized treatment cost, patient health, avoiding malpractice
EnvironmentRoads, traffic, pedestrians, signals, other vehiclesPatient, hospital, symptoms, medical records
ActuatorsSteering, accelerator, brake, horn, displayDisplay of diagnosis, questions asked, tests/treatments suggested
SensorsCameras, GPS, speedometer, sonar, engine sensorsKeyboard input of symptoms, lab reports, sensors/monitors

Significance: PEAS forces a designer to precisely fix what counts as success (Performance), what the agent must operate within (Environment), how it acts (Actuators) and how it perceives (Sensors) — the four together define the agent's task environment and drive its architecture choice.

Figure: A* Search Algorithm Graph Expansion & Heuristic Evaluation
Figure: A* Search Algorithm Graph Expansion & Heuristic Evaluation
Q2Explain Agent Environment Types: Fully vs Partially Observable, Deterministic vs Stochastic, Static vs Dynamic.

Definition: Task environments are classified along several dimensions that determine the complexity of the agent design required.

DimensionProperty AProperty B
ObservabilityFully Observable: sensors give complete state of environment at every instant (e.g. Chess)Partially Observable: sensors give noisy/incomplete data (e.g. driving, poker)
DeterminismDeterministic: next state fully determined by current state + action (e.g. Vacuum world)Stochastic: outcome has randomness/uncertainty (e.g. taxi driving)
DynamicsStatic: environment unchanged while agent deliberates (e.g. Crossword)Dynamic: environment changes during deliberation (e.g. Taxi driving, stock market)

Impact on design: Fully observable + deterministic + static environments allow simple reflex/planning agents; partially observable, stochastic, dynamic environments (the real world) require agents that maintain internal state, model uncertainty (e.g. probabilistic reasoning) and continuously replan.

Local Maximum GLOBAL MAXIMUM Shoulder Plateau Region State Space / Objective Function Evaluation
Figure: Hill Climbing Search State Space Objective Function Landscape
Q3Explain Uninformed Search Algorithms: BFS, DFS, Depth-Limited, IDDFS.

Definition: Uninformed (blind) search algorithms explore the state space using only the problem definition, without any domain-specific heuristic guidance.

AlgorithmStrategyComplete?Optimal?Time / Space
BFSExpand shallowest node first (FIFO queue)YesYes (unit cost)O(b^d) / O(b^d)
DFSExpand deepest node first (LIFO stack)No (infinite depth)NoO(b^m) / O(bm)
Depth-LimitedDFS with a cutoff depth LNo (if goal > L)NoO(b^L) / O(bL)
IDDFSRepeated depth-limited search with increasing L = 0,1,2...YesYes (unit cost)O(b^d) / O(bd)
A B C D E

BFS order: A,B,C,D,E (level-by-level). DFS order: A,B,D,...(down first, then backtrack).

IDDFS is preferred in practice for large/unknown-depth spaces since it combines DFS's low O(bd) space with BFS's completeness and optimality.

Q4Explain A* Search Algorithm and g(n) + h(n) evaluation function.

Definition: A* is a best-first informed search that expands the node minimizing the evaluation function f(n) = g(n) + h(n), where g(n) = actual cost from start to n, and h(n) = estimated (heuristic) cost from n to the goal.

Working:

  • Maintain an OPEN list (priority queue ordered by f(n)) and a CLOSED list of expanded nodes.
  • Repeatedly pop the node with lowest f(n); if it is the goal, stop — the path found is optimal.
  • Otherwise expand it, computing g and f for each successor, and insert/update them in OPEN.
  • If a successor is already in OPEN/CLOSED with a higher g, update it (re-open if needed).

Key guarantee: If h(n) is admissible (never overestimates true cost), A* using tree-search is guaranteed to find the optimal path; if h(n) is also consistent, graph-search A* is optimal and never needs to re-open a closed node. Because g(n) grows and h(n) guides toward the goal, A* combines the completeness/optimality of Uniform Cost Search (h=0) with the speed of Greedy Best-First Search (g ignored), making it both complete and optimal for admissible heuristics.

Q5Explain Admissibility and Consistency conditions for Heuristics.

Admissibility: A heuristic h(n) is admissible if it never overestimates the true cost h*(n) to reach the goal from n:

h(n) ≤ h*(n) for all n

Admissibility guarantees A* Tree-Search finds an optimal solution, because the heuristic is always "optimistic" and never causes the true optimal path to be pruned too early.

Consistency (Monotonicity): A heuristic is consistent if for every node n and successor n' generated by action costing c(n,n'):

h(n) ≤ c(n, n') + h(n')

with h(goal) = 0. Consistency is a stronger condition — it guarantees that f(n) = g(n)+h(n) never decreases along any path (f is monotonically non-decreasing), which in turn guarantees admissibility.

PropertyGuarantees
Admissible onlyOptimal solution with Tree-Search; may need to re-expand nodes in Graph-Search
ConsistentOptimal with Graph-Search; first time a node is expanded, its g-value is already optimal (no re-opening needed)

Example: the straight-line distance heuristic in road-map path finding is both admissible and consistent, since it never exceeds actual road distance and satisfies the triangle inequality.

Q6Explain Hill Climbing Search and its Pitfalls (Local Maxima, Ridge, Plateau).

Definition: Hill Climbing is a local search that starts at an arbitrary state and iteratively moves to the neighbouring state with the highest value (steepest-ascent), stopping when no neighbour is better than the current state.

Local Max Plateau Global Max

Objective-function landscape showing local maximum, plateau/ridge and global maximum.

Pitfalls (why it can fail to reach the global optimum):

  • Local Maxima: a peak lower than the global maximum where every neighbour is worse, so the algorithm gets stuck.
  • Plateau: a flat region of the state space where all neighbours have equal value, giving no direction to climb (can cause aimless wandering).
  • Ridge: a sequence of local maxima that is difficult to navigate because the ridge's orientation does not align with the available moves, causing zig-zagging.

Remedies: random-restart hill climbing, allowing sideways moves (bounded), or switching to stochastic methods such as Simulated Annealing.

Burglary Earthquake Alarm JohnCalls MaryCalls
Figure: Bayesian Belief Network (BBN) Directed Acyclic Graph Topology
Q7Explain Simulated Annealing Search Algorithm and temperature schedule.

Definition: Simulated Annealing (SA) is a stochastic local search inspired by metallurgical annealing. Unlike hill climbing, it sometimes accepts a worse move to escape local maxima, with the probability of accepting a bad move controlled by a temperature parameter T that is gradually lowered.

Acceptance rule: A move that changes the objective by ΔE (negative = worse) is accepted:

  • Always, if ΔE > 0 (improves the state).
  • With probability P = e^{ΔE / T}, if ΔE < 0 (worsening move).
function SIMULATED-ANNEALING(problem, schedule): current = problem.INITIAL for t = 1 to infinity: T = schedule(t) if T == 0: return current next = a randomly selected successor of current dE = VALUE(next) - VALUE(current) if dE > 0: current = next else: current = next with probability e^(dE/T)

Temperature (cooling) schedule: T starts high (near-random walk, high exploration) and is reduced slowly (e.g. geometric decay T ← αT, 0.8 ≤ α ≤ 0.99), so the search increasingly behaves like hill climbing (pure exploitation) as T → 0. A slow enough schedule guarantees convergence to the global optimum with probability approaching 1.

Q8Explain Constraint Satisfaction Problems (CSP) with N-Queens example.

Definition: A Constraint Satisfaction Problem (CSP) is defined by a set of variables X = {X1,...,Xn}, each with a domain Di of possible values, and a set of constraints C that restrict which combinations of values are allowed.

N-Queens as a CSP:

  • Variables: Q1, Q2, ..., QN — one per column, representing the row of the queen in that column.
  • Domain: Di = {1, 2, ..., N} (possible rows).
  • Constraints: for every pair i ≠ j: Qi ≠ Qj (no same row) and |Qi − Qj| ≠ |i − j| (no same diagonal).

A valid 4-Queens solution: Q=(2,4,1,3) — no two queens share a row, column or diagonal.

CSP algorithms (backtracking + constraint propagation like forward checking / AC-3, and heuristics like MRV, degree, LCV) solve N-Queens far more efficiently than pure generate-and-test.

Figure: Fuzzy Logic Control System Process Architecture
Figure: Fuzzy Logic Control System Process Architecture
Q9Explain CSP Backtracking Search and Arc Consistency (AC-3).

Backtracking Search for CSP: Depth-first search that assigns one variable at a time; at each step it picks an unassigned variable, tries a value from its domain consistent with existing assignments, and recurses. If no value works, it backtracks to the previous variable.

function BACKTRACK(assignment, csp): if assignment is complete: return assignment var = SELECT-UNASSIGNED-VARIABLE(csp) for value in ORDER-DOMAIN-VALUES(var, assignment, csp): if value is consistent with assignment: add {var = value} to assignment result = BACKTRACK(assignment, csp) if result != failure: return result remove {var = value} from assignment return failure

Arc Consistency (AC-3): A preprocessing/propagation technique that removes domain values that can never take part in a consistent solution, pruning the search tree before/during backtracking.

  • An arc X → Y is consistent if for every value x in Dx, there exists some value y in Dy satisfying the constraint between X and Y.
  • AC-3 maintains a queue of all arcs; it repeatedly removes an arc (Xi, Xj), calls REVISE to delete unsupported values from Di, and if Di changed, re-adds all arcs (Xk, Xi) for neighbours Xk back into the queue.
  • If any domain becomes empty, the CSP has no solution along that branch (fail early).

Complexity: AC-3 runs in O(cd³) where c = number of arcs and d = domain size. Combining backtracking with AC-3 (as a preprocessing step or interleaved via MAC — Maintaining Arc Consistency) drastically reduces the branching factor in practice.

Q10Explain Game Playing and Minimax Search Algorithm.

Definition: Minimax is a recursive decision-making algorithm for two-player, zero-sum, perfect-information games. It assumes MAX tries to maximize the utility and MIN tries to minimize it, and computes the game-theoretically optimal move by backing up values from the leaves.

function MINIMAX(node, depth, maximizingPlayer): if depth == 0 or node is terminal: return UTILITY(node) if maximizingPlayer: value = -infinity for each child of node: value = max(value, MINIMAX(child, depth-1, False)) return value else: value = +infinity for each child of node: value = min(value, MINIMAX(child, depth-1, True)) return value
MAX 3 MIN 3 2 3 12 2 4

Leaf utilities back up: MIN nodes take min(3,12)=3 and min(2,4)=2; MAX (root) takes max(3,2)=3.

Properties: Complete (if tree finite), optimal against an optimal opponent. Time complexity O(bm), space O(bm) with DFS — in practice depth m is cut off with a heuristic evaluation function since game trees (e.g. chess) are too large to search fully.

Q11Explain Alpha-Beta Pruning rules with an example game tree.

Definition: Alpha-Beta Pruning is an optimization of Minimax that skips (prunes) branches which cannot possibly influence the final decision, without changing the result.

  • α = best value MAX can guarantee so far on the path to the root (initially −∞).
  • β = best value MIN can guarantee so far on the path to the root (initially +∞).
  • Pruning rule: at any node, if α ≥ β, stop exploring its remaining children — that branch cannot affect the parent's decision.
  • MAX nodes update α = max(α, value); MIN nodes update β = min(β, value); each node passes the current (α,β) window down to its children.
5 5 2 5 6* 1 pruned

At the right MAX node, leaf 6* triggers α≥β against parent's β=5, so its sibling C2/D-branch is pruned. Root evaluates to 5, identical to plain Minimax.

Effectiveness: with a good (best-first) move ordering, alpha-beta reduces the effective branching factor from b to about √b, doubling the search depth achievable in the same time, while always returning the exact same value as Minimax.

Q12Explain Propositional Logic syntax, connectives, and truth tables.

Syntax: Propositional (Boolean) Logic consists of atomic propositions (P, Q, R, ... each True/False) combined with logical connectives:

ConnectiveSymbolMeaning
Negation¬PNOT P
ConjunctionP ∧ QP AND Q
DisjunctionP ∨ QP OR Q
ImplicationP → QIF P THEN Q
BiconditionalP ↔ QP IF AND ONLY IF Q

Truth table for P → Q (false only when antecedent true and consequent false):

PQP ∧ QP ∨ QP → Q
TTTTT
TFFTF
FTFTT
FFFFT

A sentence is valid (tautology) if it is true under every model, satisfiable if true under some model, and unsatisfiable (contradiction) if true under no model. Propositional logic is the foundation for building inference systems (e.g. resolution) but cannot express relations/quantification over objects — that requires First-Order Logic.

Q13Explain First-Order Predicate Logic (FOL) syntax and quantifiers.

Definition: First-Order Logic (FOL) extends propositional logic with objects, relations (predicates), functions, and quantifiers, allowing it to express statements about collections of objects, not just fixed propositions.

Syntax elements:

  • Constants: name specific objects, e.g. John, 2, Block-A.
  • Predicates: represent relations/properties, e.g. Brother(John, Ram), Red(x).
  • Functions: map objects to objects, e.g. FatherOf(x).
  • Variables and Connectives: x, y ... with ∧, ∨, ¬, →, ↔ as before.
  • Universal Quantifier ∀x: "for all x" — P(x) must hold for every object in the domain. Typically paired with →: ∀x (Man(x) → Mortal(x)).
  • Existential Quantifier ∃x: "there exists an x" — P(x) holds for at least one object. Typically paired with ∧: ∃x (Student(x) ∧ Smart(x)).

Example: "Every student who studies passes" is written ∀x (Student(x) ∧ Studies(x) → Passes(x)); "Some student failed" is ∃x (Student(x) ∧ Failed(x)). FOL gives AI systems the expressive power needed for knowledge bases, automated reasoning, and question answering that propositional logic cannot provide.

Q14Explain Conversion of FOL Statements to Conjunctive Normal Form (CNF).

Definition: Conjunctive Normal Form (CNF) is a conjunction of clauses, where each clause is a disjunction of literals: (L11∨L12∨...) ∧ (L21∨L22∨...) ∧ ... CNF is the required input form for the Resolution inference procedure.

Standard 7-step conversion procedure:

  1. Eliminate biconditionals: replace A↔B with (A→B)∧(B→A).
  2. Eliminate implications: replace A→B with ¬A∨B.
  3. Move ¬ inward (De Morgan's laws + quantifier duality): ¬(A∧B)≡¬A∨¬B, ¬∀x P≡∃x¬P, and eliminate double negation.
  4. Standardize variables apart: rename variables so each quantifier binds a unique name.
  5. Skolemize: replace each existentially quantified variable with a Skolem function of the enclosing universally quantified variables (a Skolem constant if none), then drop ∃.
  6. Drop universal quantifiers (all remaining variables are implicitly universally quantified).
  7. Distribute ∨ over ∧ to reach conjunction-of-disjunctions form.

Example: ∀x (Man(x) → Mortal(x)) ⇒ eliminate implication → ∀x (¬Man(x) ∨ Mortal(x)) ⇒ drop quantifier → clause: ¬Man(x) ∨ Mortal(x).

Q15Explain Unification Algorithm in FOL with MGU examples.

Definition: Unification is the process of finding a substitution θ that makes two first-order logical expressions syntactically identical: UNIFY(p, q) = θ such that SUBST(θ, p) = SUBST(θ, q). It underlies inference rules like Generalized Modus Ponens and Resolution.

Algorithm (recursive): compare the two expressions term-by-term; if both are variables/constants, unify directly; if one is a variable and other a term (not containing that variable — the "occurs check"), bind the variable to the term; if both are compound expressions, unify only if predicate/function symbols and arity match, then recursively unify each argument pair, composing substitutions.

MGU (Most General Unifier) is the simplest/least-committal such substitution — every other unifier can be obtained from it by further substitution.

Expression 1Expression 2MGU θ
Knows(John, x)Knows(John, Jane){x/Jane}
Knows(John, x)Knows(y, Bill){x/Bill, y/John}
Knows(John, x)Knows(y, Mother(y)){y/John, x/Mother(John)}
Knows(x, x)Knows(y, Father(y))fail (occurs check on y)
Q16Explain Resolution Refutation Principle in Propositional Logic.

Definition: Resolution Refutation is a sound, complete inference procedure that proves a sentence α is entailed by a KB by showing that KB ∧ ¬α is unsatisfiable (proof by contradiction).

Resolution rule: from two clauses containing complementary literals, derive a new clause (the resolvent) containing all literals of both except the complementary pair:

(A ∨ B), (¬B ∨ C) ⊢ (A ∨ C)

Procedure:

  1. Convert KB and the negated query ¬α to CNF (clause form).
  2. Repeatedly select a pair of clauses with complementary literals and resolve them, adding the resolvent to the clause set.
  3. If the empty clause (contradiction, □) is derived, KB ⊨ α is proved (refutation complete).
  4. If no new resolvents can be added and no empty clause is found, KB does not entail α.

Example: KB: (P∨Q), (¬P∨R), (¬Q∨R), query α=R. Add ¬R. Resolve (P∨Q) with... Resolving (¬P∨R) and ¬R gives ¬P; resolving (¬Q∨R) and ¬R gives ¬Q; resolving (P∨Q) with ¬P gives Q; resolving Q with ¬Q gives the empty clause □ — contradiction found, so R is proved entailed.

Q17Explain Forward Chaining vs Backward Chaining in KB systems.

Definition: Forward and Backward Chaining are the two main inference strategies for reasoning with a rule-based (Horn-clause) knowledge base.

AspectForward ChainingBackward Chaining
DirectionData-driven: facts → conclusionsGoal-driven: goal → facts needed
Starts fromKnown facts in the KBThe query/goal to be proved
MechanismFire any rule whose premises are all satisfied; assert conclusion; repeat until goal derived or no rule firesRecursively find rules whose conclusion matches the goal; try to prove each premise as a sub-goal (AND/OR tree)
EfficiencyGood when few goals, many facts (e.g. monitoring systems)Good when a specific query is asked (e.g. expert system consultations)
Example systemProduction/rule engines, CLIPSProlog, MYCIN

Illustration: KB: P, Q, (P∧Q→S), (S→T). Forward chaining: P,Q known → fires rule1 → S asserted → fires rule2 → T asserted. Backward chaining for goal T: T needs S (rule2) → S needs P∧Q (rule1) → both are known facts → goal T proved.

Q18Explain Knowledge Representation using Semantic Networks.

Definition: A Semantic Network represents knowledge as a labelled directed graph: nodes denote objects/concepts and edges denote relationships between them (ISA, has-part, has-property, instance-of, etc.). It naturally supports inheritance of properties along ISA links.

Canary Bird Animal isa isa can fly has-property yellow

Canary ISA Bird ISA Animal; "can fly" inherited from Bird, "yellow" is Canary's own property.

Reasoning: a query like "can a Canary fly?" is answered by traversing the ISA link upward until a matching property node is found (property inheritance), avoiding the need to store "can fly" at every bird instance.

Limitation: exceptions (e.g. Penguin ISA Bird, but cannot fly) require explicit overriding at the more specific node, and semantic nets lack a clean formal semantics for quantification compared to FOL.

Q19Explain Knowledge Representation using Frames and Inheritance.

Definition: A Frame is a structured data representation that groups all knowledge about an object or concept into named slots with associated values, defaults, or attached procedures (demons). Frames connected via "AKO" (A-Kind-Of) links form a taxonomy that supports inheritance, similar to object-oriented classes.

Frame: Bird Covering: Feathers Locomotion: Fly Legs: 2 (default) Frame: Penguin AKO: Bird Locomotion: Swim (override) Legs: inherited (2)

Penguin's frame inherits Legs from Bird but overrides Locomotion — the essence of frame inheritance with exceptions.

Inheritance mechanism: when a slot value is requested for an instance and not explicitly present, the system searches up the AKO hierarchy until a value (or default) is found; a locally specified value always overrides an inherited one. This gives frames the compactness of hierarchical storage while still handling exceptions naturally, unlike plain semantic nets.

Q20Explain Conceptual Dependency (CD) Theory primitive actions.

Definition: Conceptual Dependency (CD) Theory, developed by Roger Schank, represents the meaning of natural-language sentences independent of the specific words used, via a small fixed set of primitive actions plus cases (actor, object, instrument, direction).

PrimitiveMeaningExample
PTRANSTransfer of physical location"John went to school" → PTRANS(John, John, school)
ATRANSTransfer of an abstract relation (e.g. ownership)"John gave Mary a book" → ATRANS(John, book, Mary)
MTRANSTransfer of mental information"John told Mary the news" → MTRANS(John, news, Mary)
PROPELApplication of physical force"John pushed the cart"
MBUILDBuilding new information from old"John decided to leave"
INGEST / EXPELTaking in / expelling something (organism)"John ate the apple"
SPEAKProducing a sound / utterance"John said hello"

Significance: because different sentences that mean the same thing (e.g. "John gave a book to Mary" vs "Mary got a book from John") reduce to the same CD structure, CD theory enables canonical representation for tasks like paraphrase detection, inference, and machine translation, independent of surface syntax.

Q21Explain Handling Uncertainty using Bayes' Theorem.

Bayes' Theorem updates the probability of a hypothesis H given new evidence E, combining prior belief with the likelihood of the evidence:

P(H|E) = [ P(E|H) · P(H) ] / P(E)

where P(H) = prior probability, P(E|H) = likelihood, P(E) = evidence's marginal probability (normalizing constant), and P(H|E) = posterior probability.

Worked example: a disease D has prior P(D)=0.01. A test is 99% sensitive (P(+|D)=0.99) and has a 5% false-positive rate on healthy people (P(+|¬D)=0.05). Given a positive test result, find P(D|+):

P(+) = P(+|D)P(D) + P(+|¬D)P(¬D) = 0.99(0.01) + 0.05(0.99) = 0.0099 + 0.0495 = 0.0594

P(D|+) = 0.0099 / 0.0594 ≈ 0.1667 (about 16.7%)

Insight: despite a seemingly accurate test, the low prior (rare disease) keeps the posterior probability of actually having the disease low — this is the classic demonstration of why prior probabilities cannot be ignored in reasoning under uncertainty, and is exactly how Bayesian reasoning corrects the "base-rate fallacy". Bayes' theorem is the mathematical basis for Naive Bayes classifiers and Bayesian Networks.

Q22Explain Bayesian Belief Networks (BBN) and CPT tables.

Definition: A Bayesian Belief Network (BBN) is a directed acyclic graph (DAG) where nodes represent random variables and edges represent direct probabilistic dependence. Each node stores a Conditional Probability Table (CPT) giving P(node | its parents).

Burglary Earthquake Alarm JohnCalls MaryCalls

Classic Burglary-Alarm network: Alarm depends on Burglary & Earthquake; JohnCalls, MaryCalls depend only on Alarm.

CPT example (for Alarm node):

BurglaryEarthquakeP(Alarm=True)
TT0.95
TF0.94
FT0.29
FF0.001

Joint probability via chain rule: P(X1,...,Xn) = ∏i P(Xi | Parents(Xi)) — the network's structure lets us compute any joint probability as a product of a few small local CPTs instead of one exponentially large table, exploiting conditional independence.

Q23Explain Dempster-Shafer Theory of Evidence (Belief & Plausibility).

Definition: Dempster-Shafer (D-S) Theory of Evidence generalizes Bayesian probability to explicitly represent ignorance (lack of evidence) separately from disbelief, useful when evidence is incomplete or comes from multiple independent sources (sensor fusion).

  • Frame of Discernment (Θ): the set of all mutually exclusive hypotheses.
  • Mass function m(A): assigns belief mass directly to a subset A ⊆ Θ (not further divisible among its own subsets), with ∑m(A) = 1 and m(∅) = 0.
  • Belief, Bel(A) = ∑B⊆A m(B): total mass definitely supporting A (lower bound of confidence).
  • Plausibility, Pl(A) = ∑B∩A≠∅ m(B) = 1 − Bel(¬A): total mass not contradicting A (upper bound).
  • The interval [Bel(A), Pl(A)] represents the uncertainty about A; a wide interval means little evidence, and Pl(A) − Bel(A) measures ignorance.

Combination (Dempster's Rule): two independent mass functions m1, m2 are combined as:

m12(A) = [1 / (1−K)] ∑Y∩Z=A m1(Y)·m2(Z), where K = ∑Y∩Z=∅ m1(Y)m2(Z)

K measures the conflict between the two evidence sources and is used to renormalize the combined mass. D-S theory is preferred over pure Bayesian updating in expert systems (e.g. medical diagnosis, sensor fusion) precisely because it lets "I don't know" be modelled explicitly via m(Θ), instead of forcing a probability split.

Q24Explain Fuzzy Sets vs Crisp Sets and Fuzzy Membership Functions.

Crisp Set: classical set where membership is binary — an element either fully belongs (1) or does not belong (0): μA(x) ∈ {0,1}.

Fuzzy Set: introduced by Zadeh, allows partial membership over a continuous range: μA(x) ∈ [0,1], modelling vague/linguistic concepts like "Tall", "Hot", "Young" that have no sharp boundary.

10 Temperature (°C) Warm Hot crisp threshold

Fuzzy membership functions (triangular) for "Warm" and "Hot" overlap smoothly, unlike a crisp threshold that abruptly switches at one value.

AspectCrisp SetFuzzy Set
Membership{0,1}[0,1] (degree)
BoundarySharpGradual/overlapping
SuitabilityPrecise, well-defined categoriesVague, linguistic, real-world categories
Q25Explain Fuzzy Inference Systems (Mamdani Model).

Definition: A Fuzzy Inference System (FIS) maps crisp inputs to crisp outputs using fuzzy IF-THEN rules. The Mamdani model (the most common) uses fuzzy sets for both the rule antecedents and consequents.

Fuzzification RuleEvaluation Aggregation Defuzzi-fication

Mamdani FIS pipeline: crisp input → fuzzy membership → rule firing strengths (min) → combined output set (max) → crisp output (centroid).

Steps:

  1. Fuzzification: compute membership degree of the crisp input in each linguistic fuzzy set.
  2. Rule Evaluation: for each rule "IF x is A AND y is B THEN z is C", compute firing strength = min(μA(x), μB(y)) (AND = min, OR = max), and clip/scale the consequent set C by this strength.
  3. Aggregation: combine all clipped output fuzzy sets using max, forming one aggregated output fuzzy region.
  4. Defuzzification: convert the aggregated fuzzy output to one crisp number, typically via the Centroid (Center of Gravity) method: z* = ∫μ(z)·z dz / ∫μ(z) dz.

The Mamdani model is widely used in control systems (e.g. washing machines, AC thermostats) because its rules are intuitive and human-readable.

Q26Explain Inductive Learning and Decision Trees (ID3 Algorithm).

Definition: Inductive learning builds a general hypothesis (model) from a set of labelled training examples so it can classify unseen instances. ID3 (Iterative Dichotomiser 3) is a greedy, top-down algorithm that builds a Decision Tree by recursively splitting on the attribute that best separates the classes.

Outlook? Sunny Overcast Rain Humidity? Yes Wind? No Yes

Decision tree rooted at the highest-Information-Gain attribute (Outlook), recursively splitting each branch.

ID3 algorithm:

  1. If all examples belong to one class, return a leaf with that class.
  2. Else compute Information Gain for every remaining attribute; select the attribute A with the highest gain as the decision node.
  3. Partition examples by each value of A, and recursively build a subtree for each partition.
  4. Stop when a branch is pure, attributes are exhausted, or examples run out.

Because it always greedily picks the locally best split, ID3 builds compact trees quickly, but can overfit noisy data and, unlike C4.5, cannot directly handle continuous attributes or missing values.

Q27Explain Information Gain and Entropy formulas in Decision Trees.

Entropy measures the impurity/disorder of a set S with respect to the target class:

Entropy(S) = − ∑i=1c pi log2(pi)

where pi is the proportion of examples of class i. Entropy = 0 for a pure set (all one class) and is maximal (=1 for binary classes) when classes are evenly split.

Information Gain of splitting S on attribute A is the reduction in entropy achieved by the split:

Gain(S,A) = Entropy(S) − ∑v∈Values(A) (|Sv|/|S|) · Entropy(Sv)

Worked mini-example: S has 10 examples: 6 Yes, 4 No. Entropy(S) = −(0.6log₂0.6 + 0.4log₂0.4) = −(0.6×(−0.737) + 0.4×(−1.322)) = 0.442+0.529 = 0.971 bits. If attribute A splits S into S1 (5 examples: 5 Yes, 0 No, Entropy=0) and S2 (5 examples: 1 Yes, 4 No, Entropy = −(0.2log₂0.2+0.8log₂0.8)=0.722):

Gain(S,A) = 0.971 − [(5/10)×0 + (5/10)×0.722] = 0.971 − 0.361 = 0.610 bits

ID3 picks the attribute with the maximum Gain at each step, since it produces the purest (lowest-entropy) child partitions.

Q28Explain Natural Language Processing (NLP) 5 phases.

Definition: Natural Language Processing (NLP) systems typically analyze a sentence through five sequential phases, each building on the previous one's output.

Lexical Syntactic Semantic Discourse Pragmatic

The five sequential phases of NLP text understanding.

  1. Lexical/Morphological Analysis: breaks text into tokens/words and analyzes word structure (stems, affixes, POS tagging).
  2. Syntactic Analysis (Parsing): checks grammatical structure and builds a parse tree using a grammar (e.g. CFG).
  3. Semantic Analysis: extracts literal, context-independent meaning (word-sense disambiguation, mapping to logical form).
  4. Discourse Integration: resolves meaning that depends on preceding sentences (e.g. pronoun/anaphora resolution across sentences).
  5. Pragmatic Analysis: interprets the intended meaning using real-world context/knowledge beyond the literal text (e.g. sarcasm, implied intent).
Q29Explain Syntactic Analysis / Parsing in NLP.

Definition: Syntactic Analysis (Parsing) checks whether a sentence conforms to the grammar of the language and builds a parse tree representing its grammatical structure, using a formal grammar such as a Context-Free Grammar (CFG).

S NP VP DetN "The""dog" V"barks" (PP..)

Parse tree for "The dog barks" using grammar S→NP VP, NP→Det N, VP→V.

Approaches:

  • Top-Down Parsing: starts from the start symbol S and expands rules trying to derive the input string (predictive, but can loop on left-recursive grammars).
  • Bottom-Up Parsing: starts from the input words and repeatedly reduces groups of symbols up to the start symbol (e.g. shift-reduce, CYK, chart parsing).
  • Chart Parsing: a dynamic-programming technique that stores partial parses (edges) in a chart to avoid recomputation, enabling efficient (polynomial-time) parsing of ambiguous grammars.

Correct parsing is prerequisite for semantic analysis, since meaning composition follows the syntactic structure of the sentence.

Q30Explain Expert System Architecture (Knowledge Base, Inference Engine).

Definition: An Expert System is a program that emulates the decision-making ability of a human domain expert using an encoded knowledge base and an inference mechanism.

KnowledgeBase InferenceEngine User Interface ExplanationFacility KnowledgeAcquisition

Core Expert System architecture and how components connect.

  • Knowledge Base: stores domain facts and heuristic rules (typically IF-THEN production rules) supplied by human experts.
  • Inference Engine: applies forward or backward chaining over the KB to derive conclusions/recommendations for a given case.
  • Working Memory: holds facts about the current case/session.
  • User Interface: handles interaction — takes case data from and delivers conclusions to the user.
  • Explanation Facility: answers "why"/"how" a conclusion was reached, tracing the rule-firing chain.
  • Knowledge Acquisition Module: supports adding/updating rules, often assisted by a knowledge engineer.

Separating the Knowledge Base from the Inference Engine (unlike hard-coded programs) is what allows expert systems to be updated by simply editing rules, without reprogramming the reasoning logic.

Q31Explain Expert System Shells benefits.

Definition: An Expert System Shell is a ready-made expert system framework with the inference engine, user interface, and explanation facility already built, but with an empty Knowledge Base — the developer only has to plug in domain-specific rules and facts (e.g. EMYCIN was created by stripping MYCIN's medical rules out, leaving a general reasoning shell).

Benefits:

  • Faster development: avoids rebuilding the inference engine, UI, and explanation module from scratch for every new application.
  • Lower cost: reduces the software engineering effort and cost of building an expert system, since only knowledge engineering is needed.
  • Reusability: the same shell can be reused across multiple domains (medical, financial, technical) by swapping the knowledge base.
  • Easier maintenance: domain experts/knowledge engineers can update rules without touching the underlying reasoning engine.
  • Built-in tools: most shells provide debugging, tracing, and explanation tools out-of-the-box, aiding verification and validation.

Limitation: a shell constrains the developer to its built-in inference strategy (e.g. only backward chaining) and knowledge representation style, which may not suit every problem domain.

Q32Explain Perceptron Artificial Neuron Model and Activation Functions.

Definition: A Perceptron is the simplest artificial neuron model: it computes a weighted sum of its inputs, adds a bias, and passes the result through an activation function to produce an output.

net = ∑i wixi + b; output = f(net)

x1 x2 x3 Σ,f w1 w2 w3 output

Single perceptron: weighted sum of inputs passed through activation f.

Common activation functions:

FunctionFormulaRange
Step (threshold)1 if net≥0 else 0{0,1}
Sigmoid1 / (1+e−net)(0,1)
Tanh(enet−e−net) / (enet+e−net)(−1,1)
ReLUmax(0, net)[0,∞)

A single perceptron can only learn linearly separable functions (e.g. AND, OR, but not XOR); the perceptron learning rule updates weights as wi ← wi + η(target−output)xi. Non-linear separability requires a Multi-Layer Perceptron trained via Backpropagation.

Q33Explain Backpropagation Algorithm in Neural Networks.

Definition: Backpropagation ("backward propagation of errors") trains a Multi-Layer Perceptron by computing the gradient of the output error with respect to every weight, using the chain rule, and propagating the error backward from the output layer to the input layer.

InputHiddenOutput error backpropagated

Error computed at the output layer is propagated backward to update hidden-layer weights.

Algorithm (per training example):

  1. Forward pass: compute activations layer by layer up to the output.
  2. Compute output error: δk = (tk − ok) · f'(netk) for each output unit k.
  3. Backpropagate error to hidden unit j: δj = f'(netj) · ∑k wjkδk.
  4. Update weights using gradient descent: wij ← wij + η · δj · xi, where η is the learning rate.
  5. Repeat over all training examples/epochs until error converges below a threshold.

Backpropagation is essentially the chain rule applied efficiently across a computation graph, and remains the core training mechanism (with modern optimizers like Adam) for today's deep neural networks.

Q34Explain Genetic Algorithms: Selection, Crossover, Mutation.

Definition: Genetic Algorithms (GA) are population-based stochastic search/optimization methods inspired by natural evolution, iteratively improving a population of candidate solutions (chromosomes) using selection, crossover, and mutation.

Parent 1: Parent 2: crossover point Offspring: ←mutated

Single-point crossover combining Parent 1's left segment with Parent 2's right segment; last gene mutated.

  • Encoding: represent each candidate solution as a chromosome (bit-string, permutation, or real-valued vector).
  • Fitness Function: evaluates how good a chromosome is at solving the problem.
  • Selection: probabilistically choose fitter individuals to reproduce (e.g. Roulette-Wheel: P(select i) = fitnessi / ∑fitness; or Tournament selection).
  • Crossover (Recombination): combine genes of two parents (e.g. single-point, two-point, uniform) to produce offspring, exploring the search space.
  • Mutation: randomly flip/alter a gene with small probability pm, maintaining diversity and preventing premature convergence.
  • Replacement: new generation replaces (or partially replaces) the old one; repeat until convergence or generation limit.
Q35Explain Reinforcement Learning: Q-Learning algorithm.

Definition: Reinforcement Learning (RL) trains an agent to choose actions that maximize cumulative reward through trial-and-error interaction with an environment, without labelled training data. Q-Learning is a model-free, off-policy RL algorithm that learns the action-value function Q(s,a).

Agent Environment action a state s', reward r

Agent-environment interaction loop underlying reinforcement learning.

Q-Learning update rule (Bellman-based):

Q(s,a) ← Q(s,a) + α [ r + γ · maxa' Q(s',a') − Q(s,a) ]

where α = learning rate, γ = discount factor, r = immediate reward, s' = next state.

Initialize Q(s,a) = 0 for all s,a Repeat (for each episode): s = initial state Repeat (for each step): choose a from s using policy derived from Q (e.g. epsilon-greedy) take action a, observe reward r and next state s' Q(s,a) += alpha * (r + gamma * max_a' Q(s',a') - Q(s,a)) s = s' until s is terminal

Because the update uses maxa'Q(s',a') (the greedy value) regardless of the action actually taken next, Q-Learning is off-policy and provably converges to the optimal Q* under standard conditions (all state-action pairs visited infinitely often, decaying α).

Q36Explain Wumpus World Environment and Knowledge Base reasoning.

Definition: The Wumpus World is a classic AIMA grid-world testbed for a knowledge-based agent: a 4×4 cave containing a Wumpus (deadly monster), pits, and gold, which the agent must navigate using logical inference from percepts.

Breeze PIT Breeze Stench Wumpus PIT Breeze OK Breeze START

Sample Wumpus World: Breeze = adjacent Pit, Stench = adjacent Wumpus; agent infers safe cells from the absence/presence of these percepts.

PEAS: Performance = gold value − death penalty − step/arrow cost; Environment = 4×4 grid, partially observable, static, discrete; Actuators = move, turn, grab, shoot, climb; Sensors = Stench, Breeze, Glitter, Bump, Scream.

KB reasoning: the agent asserts percept sentences as facts (e.g. ¬Stench(1,1) ∧ ¬Breeze(1,1)) and encodes environment rules (Breeze(x,y) ↔ ∃ adjacent Pit) in propositional logic. Using inference (model checking or resolution), it proves cells are safe (¬Pit ∧ ¬Wumpus) before moving there — demonstrating how a knowledge-based agent reasons under partial observability rather than acting purely reactively.

Q37Explain STRIPS Planning Operator representation (Preconditions, Add, Delete lists).

Definition: STRIPS (Stanford Research Institute Problem Solver) represents planning actions (operators) using three components: Precondition (must hold before the action), Add-list (facts made true after), and Delete-list (facts made false after).

Operator: Stack(x, y) Precondition: Clear(y) AND Holding(x) Add-list: On(x,y), Clear(x), ArmEmpty Delete-list: Clear(y), Holding(x) Operator: Unstack(x, y) Precondition: On(x,y) AND Clear(x) AND ArmEmpty Add-list: Holding(x), Clear(y) Delete-list: On(x,y), Clear(x), ArmEmpty Operator: PickUp(x) Precondition: Clear(x) AND OnTable(x) AND ArmEmpty Add-list: Holding(x) Delete-list: OnTable(x), Clear(x), ArmEmpty

Working: given an Initial State (set of facts) and a Goal State (set of facts to achieve), a planner searches for a sequence of operators such that: (a) each operator's precondition is satisfied by the current state before it is applied, and (b) applying add/delete lists in sequence transforms the initial state into a state satisfying the goal.

State update rule: NewState = (CurrentState − Delete-list) ∪ Add-list. This closed-world, set-based representation makes STRIPS planning efficiently searchable and is the basis of classical planners (e.g. Goal Stack Planning, Partial-Order Planning, GraphPlan).

Q38Explain Goal Stack Planning algorithm.

Definition: Goal Stack Planning (GSP) is a classical planning algorithm that uses a single stack containing both unsatisfied goals and the operators chosen to satisfy them, processing the stack top-down until it is empty.

1. Push the main Goal (conjunction) onto the stack; push its individual sub-goals if it is a conjunction. 2. Loop while stack is not empty: a. Pop the top element. b. If it is a goal already TRUE in the current state, discard it, continue. c. If it is a goal NOT true, find an operator whose Add-list contains it; push that operator, then push its preconditions as new sub-goals (on top). d. If it is an operator (all its preconditions were just satisfied), APPLY it: update state = (state - Delete-list) U Add-list, and record it in the plan. 3. Return the recorded sequence of applied operators as the plan.

Example (Blocks World): Initial: On(C,A), OnTable(A), OnTable(B), Clear(B), Clear(C). Goal: On(A,B) ∧ On(B,C)? — suppose Goal = On(B,C) ∧ On(A,B) with C clear initially and B,A on table. Stack processing: push conjunction → push On(B,C), On(A,B) → pop On(A,B): needs Stack(A,B) which needs Clear(B) ∧ Holding(A) — push preconditions, satisfy via PickUp(A) then Stack(A,B); continue similarly for On(B,C). GSP's weakness is the Sussman Anomaly: interacting sub-goals can conflict, undoing a goal already achieved while pursuing another — solved by re-ordering or using Partial-Order Planning instead.

Q39Explain Knowledge Acquisition bottleneck in Expert Systems.

Definition: The Knowledge Acquisition Bottleneck refers to the fundamental difficulty and cost of extracting expert knowledge from human specialists and converting it into a formal, machine-usable representation (rules/facts) for an expert system's Knowledge Base.

Causes:

  • Tacit knowledge: experts often cannot fully articulate their intuition/experience-based reasoning ("I just know it") in explicit rule form.
  • Time-intensive interviews: knowledge engineers must conduct repeated, lengthy interviews and observation sessions with domain experts, who have limited availability.
  • Vocabulary/communication gap: mismatch between expert terminology and formal representation constructs used by the knowledge engineer.
  • Inconsistency: different experts may give conflicting rules for the same situation, requiring reconciliation.
  • Knowledge maintenance: domain knowledge evolves, requiring continual re-acquisition and updates.

Mitigation approaches: structured/repertory-grid interviewing techniques, protocol analysis (think-aloud problem solving), machine learning to induce rules automatically from case data (e.g. ID3-style decision-tree induction), and using expert-system shells with built-in knowledge-acquisition tools (e.g. TEIRESIAS for MYCIN) that let experts refine rules directly.

Q40Explain Machine Learning classification vs regression paradigms.

Definition: Classification and Regression are the two main supervised machine learning paradigms, differing in the type of output they predict.

AspectClassificationRegression
Output typeDiscrete/categorical label (class)Continuous numeric value
GoalAssign input to one of a finite set of classesPredict a real-valued quantity
Example taskSpam vs Not-Spam, disease diagnosisPredicting house price, temperature
Typical algorithmsDecision Tree, Naive Bayes, SVM, Logistic Regression, kNNLinear Regression, Polynomial Regression, Regression Trees
Evaluation metricAccuracy, Precision, Recall, F1-score, Confusion MatrixMean Squared Error (MSE), RMSE, R²
Decision boundarySeparates classes (may be linear/non-linear)Fits a curve/line through data points

Both are forms of Inductive Learning: given a labelled training set {(xi, yi)}, the algorithm learns a function f: X→Y that generalizes to unseen inputs, minimizing a loss function (e.g. cross-entropy for classification, squared error for regression) on the training data while avoiding overfitting.

Group C — Long / Numerical Questions (15 Marks Each)

Q1a) Convert the following sentences to FOL and prove by Resolution Refutation that 'Marcus is dead': 1. Marcus was a man. 2. Marcus was a Pompeian. 3. All Pompeians were Romans. 4. Caesar was a ruler. 5. All Romans were either loyal to Caesar or hated him. 6. Everyone is loyal to someone. 7. People only try to assassinate rulers they are not loyal to. 8. Marcus tried to assassinate Caesar. 9. All men are mortal. b) Explain Unification Algorithm step-by-step.

Part (a): FOL Conversion and Resolution Refutation that "Marcus is dead"

Step 1 — Translate to FOL:

1. man(Marcus) 2. Pompeian(Marcus) 3. forall x: Pompeian(x) -> Roman(x) 4. ruler(Caesar) 5. forall x: Roman(x) -> loyalto(x,Caesar) OR hate(x,Caesar) 6. forall x: exists y: loyalto(x,y) 7. forall x,y: (man(x) AND ruler(y) AND tryassassinate(x,y)) -> NOT loyalto(x,y) 8. tryassassinate(Marcus,Caesar) 9. forall x: man(x) -> mortal(x) Additional fact needed: alive(x) -> NOT dead(x) [assumed axiom to link mortality+time to dead] Goal: dead(Marcus)

Step 2 — Convert to Clause (CNF) form (drop quantifiers, Skolemize where needed):

C1: man(Marcus) C2: Pompeian(Marcus) C3: ~Pompeian(x) OR Roman(x) C4: ruler(Caesar) C5: ~Roman(x) OR loyalto(x,Caesar) OR hate(x,Caesar) C6: ~man(x) OR ~ruler(y) OR ~tryassassinate(x,y) OR ~loyalto(x,y) C7: tryassassinate(Marcus,Caesar) C8: ~man(x) OR mortal(x) Negated goal: ~mortal(Marcus) [proving man->mortal chain gives contradiction with the standard simplified version of this classic problem]

Step 3 — Resolution Refutation trace (standard textbook derivation, Marcus-is-mortal/dead chain):

  1. Resolve C1 (man(Marcus)) with C8 (~man(x) ∨ mortal(x)), unify x/Marcus → derive mortal(Marcus).
  2. Resolve C2 (Pompeian(Marcus)) with C3 (~Pompeian(x) ∨ Roman(x)), unify x/Marcus → derive Roman(Marcus).
  3. Resolve Roman(Marcus) with C5 (~Roman(x) ∨ loyalto(x,Caesar) ∨ hate(x,Caesar)), x/Marcus → derive loyalto(Marcus,Caesar) ∨ hate(Marcus,Caesar).
  4. Resolve C1, C4, C7 with C6 (~man(x) ∨ ~ruler(y) ∨ ~tryassassinate(x,y) ∨ ~loyalto(x,y)), unify x/Marcus,y/Caesar → derive ~loyalto(Marcus,Caesar).
  5. Resolve step 3's clause (loyalto ∨ hate) with step 4's (~loyalto) → derive hate(Marcus,Caesar).
  6. mortal(Marcus) (step 1) combined with the negated goal ~mortal(Marcus) resolves to the empty clause □ — contradiction, so KB ⊨ mortal(Marcus), and since mortal beings that have lived are dead, dead(Marcus) is proved.

Part (b): Unification Algorithm step-by-step

UNIFY(x, y, θ) recursively finds the Most General Unifier making two expressions identical:

  1. If x = y (identical constants/variables), return θ unchanged.
  2. If x is a variable, check the occurs check (x must not appear inside y); if safe, add {x/y} to θ and return.
  3. If y is a variable, symmetric case: add {y/x} to θ.
  4. If both x and y are compound terms, they unify only if they have the same predicate/function symbol and same arity; then recursively unify each corresponding pair of arguments, composing the substitutions.
  5. Otherwise (mismatched constants/symbols), unification fails.

Example: UNIFY(knows(John,x), knows(y,Mother(y))): match John with y → θ={y/John}; match x with Mother(y) under θ → substitute y=John → x/Mother(John). Final MGU = {y/John, x/Mother(John)}. Unification is what allows Resolution and Generalized Modus Ponens to apply general (variable-containing) clauses to specific facts, as used throughout the derivation in Part (a).

Q2a) Perform Alpha-Beta Pruning on the given Game Tree (3 levels depth, 8 leaf node values: 3, 5, 6, 9, 1, 2, 0, -1). Show alpha and beta values at each node and identify pruned branches. b) Explain Minimax Algorithm properties (Completeness, Optimality, Time/Space Complexity).

Part (a): Alpha-Beta Pruning on the given tree

Tree structure (3 plies): Root (MAX) → 2 MIN nodes (C1, C2) → 4 MAX nodes (B1..B4) → 8 leaves. Leaves in order: B1=(3,5), B2=(6,9), B3=(1,2), B4=(0,-1).

5 5 2 5 6* 2 - pruned 3 5 6 9 pruned 1 2 0,-1 pruned

Leaves left to right: 3,5,6,9,1,2,0,-1. Pruned leaves shown greyed / labelled.

Left-to-right DFS trace (α=best for MAX so far, β=best for MIN so far, initial window (−∞,+∞)):

NodeWorkResult / Pruning
B1 (MAX)max(3,5)B1 = 5
C1 (MIN)β=5 after B1; call B2 with α=−∞, β=5
B2 (MAX)leaf1=6 ⇒ α=6. Now α(6) ≥ β(5) ⇒ PRUNE leaf2=9B2 returns 6 (bound only)
C1 (MIN)min(5,6) = 5 (unchanged, all children done)C1 = 5; A's α = 5
B3 (MAX)call with α=5,β=+∞: max(1,2)=2B3 = 2
C2 (MIN)β=min(+∞,2)=2. Now β(2) ≤ α(5) ⇒ PRUNE B4 (leaves 0,-1) entirelyC2 = 2
Root A (MAX)max(5,2)A = 5

Pruned branches: leaf value 9 (sibling of 6 under B2) and the entire B4 subtree (leaves 0 and −1) are never evaluated. Final Minimax value = 5 (verified: unpruned full minimax gives B1=5,B2=9,B3=2,B4=0 → C1=min(5,9)=5, C2=min(2,0)=0 → root=max(5,0)=5 — same result, confirming pruning never alters the game-theoretic value).

Part (b): Minimax Properties

PropertyValueReason
CompletenessYesif the game tree is finite (terminates in finite depth)
OptimalityYesoptimal against an opponent who also plays optimally (worst-case guarantee)
Time ComplexityO(bm)b = branching factor, m = maximum depth; explores every node
Space ComplexityO(bm)DFS-style traversal only keeps one path plus siblings in memory

Because O(bm) is infeasible for real games (e.g. chess b≈35), practical systems apply depth-limited search with a static evaluation function and Alpha-Beta pruning (as in Part a) to search deeper within the same time budget.

Q3a) Calculate Information Gain and construct Decision Tree for dataset (14 samples: 9 Yes, 5 No) using ID3 algorithm. b) Explain Overfitting and Pruning in Decision Trees.

Part (a): Information Gain and ID3 Decision Tree (14 samples, 9 Yes / 5 No)

This is the classic PlayTennis dataset (14 days, attributes Outlook, Temperature, Humidity, Wind; target = PlayTennis).

Step 1 — Root Entropy:

Entropy(S) = −(9/14)log₂(9/14) − (5/14)log₂(5/14) = −(0.643)(−0.637) − (0.357)(−1.485) = 0.410 + 0.530 = 0.940 bits

Step 2 — Information Gain for each attribute (standard computed values for this dataset):

AttributePartition (subset: Yes/No)Gain(S, A)
OutlookSunny(2Y/3N), Overcast(4Y/0N), Rain(3Y/2N)0.246
HumidityHigh(3Y/4N), Normal(6Y/1N)0.151
WindWeak(6Y/2N), Strong(3Y/3N)0.048
TemperatureHot(2Y/2N), Mild(4Y/2N), Cool(3Y/1N)0.029

Step 3 — Verification of Outlook's gain (worked): Entropy(Sunny)=−(2/5)log₂(2/5)−(3/5)log₂(3/5)=0.971; Entropy(Overcast)=0 (pure, all Yes); Entropy(Rain)=−(3/5)log₂(3/5)−(2/5)log₂(2/5)=0.971.

Gain(S,Outlook) = 0.940 − [(5/14)(0.971) + (4/14)(0) + (5/14)(0.971)] = 0.940 − [0.347+0+0.347] = 0.940 − 0.694 = 0.246

Step 4 — Build the tree: since Gain(Outlook)=0.246 is the highest, Outlook is chosen as the root. Overcast branch is pure (100% Yes) → leaf "Yes". For the Sunny branch, recompute gains among remaining attributes on the 5 Sunny examples → Humidity gives a pure split (High→No, Normal→Yes), so Humidity becomes the next node. For the Rain branch, recompute on its 5 examples → Wind gives a pure split (Weak→Yes, Strong→No).

Outlook Sunny Overcast Rain Humidity Yes Wind No Yes Yes No

Final ID3 tree for the PlayTennis dataset: Outlook → {Humidity, Yes, Wind}.

Part (b): Overfitting and Pruning

Overfitting occurs when the tree grows so deep/complex that it memorizes noise and outliers in the training data, achieving near-100% training accuracy but poor generalization (lower accuracy) on unseen test data — typically caused by continuing to split on attributes with little statistical significance, or by very small leaf partitions.

  • Pre-pruning (early stopping): stop splitting a node early using a threshold (e.g. minimum examples per leaf, maximum depth, or a statistical significance/chi-square test on the gain) before the tree becomes too complex.
  • Post-pruning (reduced error pruning): grow the full tree first, then use a validation set to replace sub-trees with a leaf (majority class) if doing so does not reduce validation accuracy — this generally performs better in practice than pre-pruning since it avoids stopping too early.
  • Rule post-pruning (C4.5 style): convert the tree to IF-THEN rules, then prune preconditions from each rule independently, which gives even finer-grained control.
Q4a) Given Bayesian Network for Burglar Alarm system with variables Burglary, Earthquake, Alarm, JohnCalls, MaryCalls. Calculate joint probability P(Burglary ∧ ¬Earthquake ∧ Alarm ∧ JohnCalls ∧ ¬MaryCalls) using CPTs. b) Explain Naive Bayes Classifier algorithm for text classification.

Part (a): Bayesian Network Joint Probability — Burglar Alarm system

Using the standard AIMA Burglary-Alarm network with variables B(Burglary), E(Earthquake), A(Alarm), J(JohnCalls), M(MaryCalls), and standard CPTs:

CPTValue
P(B=T)0.001
P(E=T)0.002
P(A=T | B=T, E=F)0.94
P(J=T | A=T)0.90
P(M=T | A=T)0.70

Chain-rule decomposition (using the network's conditional-independence structure — A depends only on B,E; J and M depend only on A):

P(B ∧ ¬E ∧ A ∧ J ∧ ¬M) = P(B) · P(¬E) · P(A|B,¬E) · P(J|A) · P(¬M|A)

Substituting values (P(¬E)=1−0.002=0.998; P(¬M|A)=1−0.70=0.30):

= 0.001 × 0.998 × 0.94 × 0.90 × 0.30

Step-by-step computation:

  1. 0.001 × 0.998 = 0.000998
  2. 0.000998 × 0.94 = 0.00093812
  3. 0.00093812 × 0.90 = 0.000844308
  4. 0.000844308 × 0.30 = 0.0002532924 ≈ 2.53 × 10−4

Verification (reordering the multiplication to double-check): 0.94×0.90=0.846; 0.846×0.30=0.2538; 0.2538×0.998=0.25329...; ×0.001 = 0.00025329 — matches (rounding). Final answer: P ≈ 2.53×10−4. This tiny probability reflects the conjunction of a rare burglary, no earthquake, alarm triggering, John calling but Mary NOT calling — each low-probability/negated term compounds via the product rule.

Part (b): Naive Bayes Classifier for Text Classification

Naive Bayes applies Bayes' theorem with the (naive) assumption that features (words) are conditionally independent given the class:

P(Class | w1,...,wn) ∝ P(Class) · ∏i P(wi | Class)

  1. Training: from a labelled corpus, estimate the prior P(Class) = (docs in class)/(total docs), and for every vocabulary word w, P(w|Class) = (count of w in class documents + 1) / (total words in class + |Vocabulary|) — the "+1" is Laplace (add-one) smoothing, preventing zero probability for unseen words.
  2. Classification: for a new document, tokenize into words, then compute the product above for each candidate class, and choose the class with maximum posterior (MAP): Class* = argmaxc P(c)·∏P(wi|c).
  3. Log-space implementation: in practice, sums of log-probabilities are used instead of products to avoid numerical underflow: log P(c) + ∑log P(wi|c).

Despite its "naive" independence assumption being technically false for natural language, Naive Bayes is a fast, robust, and surprisingly effective baseline for text classification (spam filtering, sentiment analysis, topic classification) — a full numeric example of this exact computation is worked out in Q24.

Q5a) Trace A* Search algorithm on a given weighted graph from Start node S to Goal node G with given heuristic values h(n). Show open list, closed list, f(n), g(n), h(n) at each step. b) Prove that A* is optimal if heuristic h(n) is admissible.

Part (a): A* Search Trace

Since a specific graph diagram was not reproduced in the extracted question text, the following representative weighted graph (with an admissible heuristic) is used to demonstrate the complete A* trace methodology:

S A B C G 4 2 5 3 2

Weighted graph: S-A=4, S-B=2, B-C=3, C-G=2, A-G=5. Heuristics: h(S)=6, h(A)=5, h(B)=4, h(C)=2, h(G)=0.

Trace (f(n)=g(n)+h(n)):

StepNode poppedOPEN list (node: g, h, f)CLOSED
1S (g=0,h=6,f=6)generate A(g=4,h=5,f=9), B(g=2,h=4,f=6){S}
2B (g=2,h=4,f=6) — lowest fgenerate C(g=2+3=5,h=2,f=7); OPEN={A:9, C:7}{S,B}
3C (g=5,h=2,f=7) — lowest fgenerate G(g=5+2=7,h=0,f=7); OPEN={A:9, G:7}{S,B,C}
4G (g=7,h=0,f=7) — Goal popped, terminateA(f=9) never expanded{S,B,C,G}

Result: optimal path = S → B → C → G, total cost g(G) = 2+3+2 = 7 (cheaper than the alternative S-A-G = 4+5 = 9, confirming optimality). Node A was generated but never needed expansion since its f=9 exceeded the goal's f=7 when G was popped — illustrating how the admissible heuristic focuses search and avoids wasted expansion.

Part (b): Proof that A* is optimal when h(n) is admissible

Theorem: If h(n) never overestimates the true cost to the goal (h(n) ≤ h*(n) for all n), A* (tree-search) is guaranteed to return an optimal solution.

Proof (by contradiction): Suppose A* terminates by expanding a suboptimal goal G2 (cost C2) instead of the optimal goal G (cost C*, C* < C2). Let n be an unexpanded node on the optimal path to G still in OPEN at that point (such a node must exist since the optimal path was never fully expanded). Because h is admissible:

f(n) = g(n) + h(n) ≤ g(n) + h*(n) = C*

Since g(G2) = C2 and h(G2)=0 (goal nodes have zero heuristic cost), f(G2) = C2. Given C* < C2, we get f(n) ≤ C* < C2 = f(G2). But A* always expands the node with the lowest f-value next — so n would have been chosen before G2, contradicting the assumption that G2 was expanded first. Hence A* cannot terminate at a suboptimal goal; it must find the optimal solution. ∎

Q6a) Explain CSP Map Coloring problem for 4 regions using 3 colors (Red, Green, Blue). b) Trace Constraint Propagation using AC-3 algorithm.

Part (a): CSP Map Coloring — 4 regions, 3 colors

Consider four regions A, B, C, D with adjacency: A–B, B–C, C–D, D–A, and A–C (a diagonal, so {A,B,C} form a triangle requiring 3 distinct colors), using palette {Red, Green, Blue}.

A: Red B: Green C: Blue D: Green A-C diagonal

Valid 3-coloring: A=Red, B=Green, C=Blue, D=Green (D not adjacent to B, so it may reuse Green).

Backtracking with constraint propagation (forward checking) trace:

StepAssignDomain updates (remove assigned color from neighbours)
1A = RedDB={G,B}, DC={G,B}, DD={G,B}
2B = GreenDC={B} (Green removed, C adj. to both A & B); DD unchanged={G,B} (D not adj. to B)
3C = Blue (forced, singleton domain)DD = {G,B} − {Blue} = {G} (Blue removed since D adj. to C)
4D = Green (forced, singleton domain)All variables assigned, no domain wipe-out → solution found

No backtrack was required because forward checking kept every domain non-empty at each step; if a domain had emptied (a "wipe-out"), the algorithm would backtrack to the previous variable and try its next value.

Part (b): AC-3 Constraint Propagation Trace

function AC-3(csp): queue = all arcs (Xi, Xj) in csp while queue not empty: (Xi, Xj) = queue.pop() if REVISE(csp, Xi, Xj): if size(Di) == 0: return failure for each Xk in NEIGHBORS(Xi) - {Xj}: queue.push((Xk, Xi)) return true function REVISE(csp, Xi, Xj): revised = false for x in Di: if no value y in Dj allows (x,y) to satisfy the constraint: delete x from Di; revised = true return revised

Trace on this map: initial domains all {R,G,B}. For arc (A,B): for each color x in DA, some y≠x exists in DB (since |DB|=3>1) — arc consistent, no removal. This holds for every arc since every domain has 3 values and each constraint is a simple inequality with more than one alternative available — so pure AC-3 (without any assignment) does not reduce any domain here (all arcs already consistent); it only detects a contradiction (empty domain) once concrete assignments (as in Part a) shrink domains, which is why AC-3 is typically interleaved with backtracking (MAC — Maintaining Arc Consistency) rather than run in isolation for maps of this connectivity.

Q7a) Explain Simulated Annealing algorithm in detail. b) Calculate acceptance probability P = e^(-ΔE/T) for bad moves at temperatures T=100, T=10, T=1.

Part (a): Simulated Annealing algorithm in detail

Simulated Annealing (SA) is a probabilistic local search technique, analogous to the physical annealing of metals, designed to escape local optima that trap simple Hill Climbing.

function SIMULATED-ANNEALING(problem, schedule): current = MAKE-NODE(problem.INITIAL-STATE) for t = 1 to infinity: T = schedule(t) // temperature at time t if T == 0: return current next = a randomly selected successor of current dE = VALUE(next) - VALUE(current) if dE > 0: current = next // always accept improving move else: accept next with probability e^(dE / T) // sometimes accept worsening move
  • Unlike Hill Climbing (always greedy), SA occasionally accepts a worse state, letting it jump out of local maxima/minima.
  • At high T, the acceptance probability for bad moves is high → behaves like a random walk (exploration).
  • As T → 0, acceptance probability for bad moves → 0 → behaves like pure Hill Climbing (exploitation).
  • With a sufficiently slow cooling schedule, SA is proven to converge to the global optimum with probability approaching 1.

Part (b): Acceptance probability P = e(−ΔE/T)

Taking a representative "bad move" that worsens the objective by ΔE = 5 units (the exact value is problem-specific; the formula and trend below hold generally):

Temperature TComputationAcceptance Probability P
T = 100e−5/100 = e−0.05≈ 0.951 (95.1%)
T = 10e−5/10 = e−0.5≈ 0.607 (60.7%)
T = 1e−5/1 = e−5≈ 0.0067 (0.67%)

Interpretation: as temperature drops from 100 to 1 (a cooling schedule), the probability of accepting the same bad move (ΔE=5) falls sharply from ~95% to under 1%. This confirms the intended annealing behaviour: early in the search (high T) the algorithm freely explores including worsening moves, while late in the search (low T) it increasingly commits to only improving moves, converging like hill climbing near the end — correctly balancing exploration versus exploitation over time.

Q8a) Convert sentences to FOL and prove 'John is a criminal': 1. It is a crime for an American to sell weapons to hostile nations. 2. Country Nono has some missiles. 3. All of Nono's missiles were sold to it by John. 4. Nono is a hostile nation. 5. John is an American. b) Draw Resolution Refutation tree.

Part (a): FOL Conversion and proof that "John is a criminal" (classic AIMA example)

Step 1 — Translate to FOL:

1. American(x) AND Weapon(y) AND Sells(x,y,z) AND Hostile(z) -> Criminal(x) 2. exists x: Missile(x) AND Owns(Nono,x) 3. forall x: Missile(x) AND Owns(Nono,x) -> Sells(West,x,Nono) 4. Missile(x) -> Weapon(x) 5. Enemy(x,America) -> Hostile(x) 6. Hostile(Nono) [derived from Nono being an enemy of America] 7. American(West)

Step 2 — Convert to CNF (Skolemize ∃x in statement 2 to constant M1):

C1: ~American(x) OR ~Weapon(y) OR ~Sells(x,y,z) OR ~Hostile(z) OR Criminal(x) C2: Missile(M1) C3: Owns(Nono, M1) C4: ~Missile(x) OR ~Owns(Nono,x) OR Sells(West,x,Nono) C5: ~Missile(x) OR Weapon(x) C6: Hostile(Nono) C7: American(West) Negated Goal: ~Criminal(West)

Step 3 — Resolution Refutation chain:

  1. Resolve C4 with C2,C3 (x/M1) → derive Sells(West, M1, Nono).
  2. Resolve C5 with C2 (x/M1) → derive Weapon(M1).
  3. Resolve C1 with C7 (American(West)), step-2's Weapon(M1), step-1's Sells(West,M1,Nono), and C6 (Hostile(Nono)) — unifying x/West, y/M1, z/Nono → all four antecedents of C1 are satisfied, deriving Criminal(West).
  4. Resolve Criminal(West) with the negated goal ~Criminal(West) → empty clause □ — contradiction found.

Conclusion: KB ∧ ¬Criminal(West) is unsatisfiable, so KB ⊨ Criminal(West) — "West (John) is a criminal" is proved. (Note: the question names the agent "John"; in the standard textbook formulation the agent is "West" — the same derivation structure applies regardless of the constant's name.)

Part (b): Resolution Refutation Tree

C4,C2,C3 C5,C2 Sells(West,M1,Nono) Weapon(M1) C1,C6,C7 + above -> Criminal(West) Empty Clause []

Refutation tree converging on the empty clause, proving Criminal(West) is entailed.

Q9a) Explain Fuzzy Logic controller design for an Automatic Washing Machine (Inputs: Dirtiness, Fabric type; Output: Wash time). b) Write Fuzzy Rules, Fuzzification, Rule Evaluation, and Defuzzification (Centroid method).

Part (a): Fuzzy Logic Controller for an Automatic Washing Machine

Inputs: Dirtiness (0–100), Fabric Toughness (0–100, proxy for Fabric type). Output: Wash Time (0–60 minutes). Using simple triangular membership functions: Low/Delicate = (0,0,50), Medium/Normal = (0,50,100), High/Tough = (50,100,100) on the input scales, and Short=(0,0,30), Medium=(0,30,60), Long=(30,60,60) minutes on the output.

Crisp inputs: Dirtiness = 70, Fabric Toughness = 40.

Fuzzification:

μMedium-Dirt(70) = (100−70)/(100−50) = 30/50 = 0.6; μHigh-Dirt(70) = (70−50)/(100−50) = 20/50 = 0.4

μNormal-Fabric(40) = 40/50 = 0.8; μDelicate(40) = (50−40)/50 = 0.2

Part (b): Fuzzy Rules, Rule Evaluation, Defuzzification

R1: IF Dirtiness=Medium AND Fabric=Normal THEN WashTime=Medium R2: IF Dirtiness=High AND Fabric=Normal THEN WashTime=Long

Rule firing strength (Mamdani AND = min):

R1: min(μMedium-Dirt=0.6, μNormal=0.8) = 0.6

R2: min(μHigh-Dirt=0.4, μNormal=0.8) = 0.4

Medium (clipped 0.6) Long (clipped 0.4)

Output fuzzy sets clipped at their respective rule-firing strengths, then aggregated (max) before defuzzification.

Defuzzification (Weighted-Average / simplified Centroid method): using the peak (centroid) of each triangular consequent — Medium peak = 30 min, Long peak = 60 min — weighted by firing strength:

WashTime* = (0.6 × 30 + 0.4 × 60) / (0.6 + 0.4) = (18 + 24) / 1.0 = 42 minutes

(For the exact Centroid/Center-of-Area method, this weighted-average of triangle peaks is the standard simplification used when consequent sets do not overlap significantly — the full method integrates ∫μ(z)z dz / ∫μ(z) dz over the aggregated clipped-trapezoid area, which converges to the same result for symmetric triangular sets.) The controller thus sets the wash cycle to 42 minutes for moderately dirty, normal-fabric laundry.

Q10a) Explain Backpropagation Learning Algorithm for Multi-Layer Perceptrons (MLP). b) Derive weight update equations using Gradient Descent and Chain Rule.

Part (a): Backpropagation Learning Algorithm for MLP

A Multi-Layer Perceptron (MLP) has an input layer, one or more hidden layers, and an output layer, fully connected with weighted edges and non-linear activation (e.g. sigmoid). Backpropagation trains it in two passes per example:

  1. Forward Pass: propagate the input through the network layer by layer: netj = ∑i wijxi + bj; output oj = f(netj) (e.g. sigmoid f(x)=1/(1+e−x)).
  2. Compute Error: E = ½ ∑k (tk − ok)² over output units k.
  3. Backward Pass: propagate the error gradient backward using the chain rule (see Part b) to obtain δ for every unit, then update every weight.
  4. Repeat over all training examples (epochs) until E converges below a threshold.

Part (b): Weight Update Derivation via Gradient Descent + Chain Rule

Gradient descent updates each weight opposite to the gradient of error E: Δwij = −η ∂E/∂wij.

Output layer (weight wjk from hidden unit j to output unit k), using the chain rule ∂E/∂wjk = (∂E/∂ok)(∂ok/∂netk)(∂netk/∂wjk):

∂E/∂ok = −(tk−ok); ∂ok/∂netk = ok(1−ok) [sigmoid derivative]; ∂netk/∂wjk = oj

δk = (tk − ok)·ok(1−ok) ⇒ wjk ← wjk + η·δk·oj

Hidden layer (weight wij from input i to hidden unit j) — error is a sum over all output units that unit j feeds into:

δj = oj(1−oj) · ∑k δkwjk ⇒ wij ← wij + η·δj·xi

Illustrative numeric step: suppose a single output unit has target t=1, actual output o=0.7, and feeding hidden activation oj=0.5, learning rate η=0.5. Then δ=( 1−0.7)×0.7×(1−0.7) = 0.3×0.7×0.3 = 0.063, and Δwjk = 0.5×0.063×0.5 = 0.01575, so wjk increases by 0.01575 — nudging the network toward correctly predicting t=1 on this example. Repeating this over many examples/epochs is what allows the MLP to learn a non-linear decision boundary that a single perceptron cannot represent.

Q11a) Explain Genetic Algorithm workflow for Solving 8-Queens Problem. b) Detail Chromosome Representation, Fitness Function, Selection, Crossover, Mutation.

Part (a): Genetic Algorithm workflow for 8-Queens

Init Pop Fitness Selection Crossover Mutation

GA generational cycle repeats until a fitness-28 (conflict-free) individual is found or generations exhausted.

Part (b): Representation, Fitness, Selection, Crossover, Mutation

  • Chromosome Representation: a permutation-free array of 8 integers [r1,...,r8], where index = column, value = row of the queen in that column (values 1–8, repeats allowed unless a permutation encoding is enforced).
  • Fitness Function: number of non-attacking pairs of queens out of the maximum possible C(8,2) = 28 pairs. F = 28 − (number of attacking pairs). A queen pair (i,ri), (j,rj) attacks if ri=rj (same row) or |ri−rj| = |i−j| (same diagonal). Maximum fitness = 28 (a full solution, 0 conflicts).
  • Selection: Roulette-Wheel — P(select individual k) = Fk / ∑Fi, biasing reproduction toward fitter (fewer-conflict) boards; or Tournament selection (pick best of k random individuals).
  • Crossover: pick a random cut point c (1–7); offspring1 = parent1[1..c] + parent2[c+1..8]; offspring2 = the complementary combination. Example: Parent1=[3,2,7,5,2,4,1,1], Parent2=[2,4,7,4,8,5,5,2], cut at c=3 → Offspring=[3,2,7 | 4,8,5,5,2].
  • Mutation: with small probability pm (e.g. 0.05–0.1), randomly reassign one column's row value to a new random value (1–8), maintaining genetic diversity and preventing premature convergence to a local optimum.
  • Termination: stop when an individual reaches fitness = 28 (a valid non-attacking configuration is found) or a maximum generation count is reached.

This GA formulation typically converges to a valid 8-Queens solution within a few hundred generations for reasonable population sizes (e.g. 50–100), since the fitness landscape, while having many local optima (boards with few conflicts), is smooth enough for crossover+mutation to escape them — unlike simple hill climbing which stalls frequently at local maxima.

Q12a) Explain Natural Language Processing (NLP) Parsing techniques: Top-Down vs Bottom-Up Chart Parsing. b) Detail Context-Free Grammar parsing for sentence 'The robot moved the box'.

Part (a): Top-Down vs Bottom-Up Chart Parsing

AspectTop-Down ParsingBottom-Up Parsing
DirectionStarts from start symbol S, expands rules to match inputStarts from input words, reduces up to S
StrategyPrediction-driven (hypothesize then verify)Data-driven (shift-reduce)
WeaknessCan loop forever on left-recursive grammar rulesMay build sub-trees that are never used in a full parse
Chart parsing roleChart stores predicted edges to avoid re-predictingChart stores completed edges/constituents to avoid re-deriving

Chart Parsing is a dynamic-programming technique (common to both strategies) that stores every partial/complete constituent found so far as an "edge" in a shared chart data structure, indexed by span (start,end). This avoids exponential re-computation of the same sub-parse and enables efficient (polynomial time, e.g. O(n³) for CYK/Earley) parsing even for ambiguous grammars, since a sub-tree is derived only once and then reused wherever it fits.

Part (b): CFG Parsing for "The robot moved the box"

Grammar used:

S -> NP VP NP -> Det N VP -> V NP Det -> "the" N -> "robot" | "box" V -> "moved"
S NP VP Det"the" N"robot" V"moved" NP Det"the" N"box"

Complete parse tree: S → NP(the robot) VP(moved NP(the box)).

Bottom-up (shift-reduce) trace: Shift "the" → reduce to Det; shift "robot" → reduce to N; reduce Det N → NP; shift "moved" → reduce to V; shift "the" → Det; shift "box" → N; reduce Det N → NP; reduce V NP → VP; reduce NP VP → S. Input accepted, sentence is grammatical.

Q13a) Explain Expert System Development for Medical Diagnosis (MYCIN / PROSPECTOR). b) Detail Certainty Factors (CF) handling rule chaining.

Part (a): Expert System Development for Medical Diagnosis (MYCIN / PROSPECTOR)

MYCIN (Stanford, 1970s) was a rule-based expert system for diagnosing bacterial blood infections and recommending antibiotic therapy. Its architecture:

  • Knowledge Base: ~450 production rules of the form IF (clinical evidence) THEN (conclusion) WITH certainty-factor.
  • Inference Engine: goal-directed backward chaining — starts from the goal "what organism, what therapy?" and works backward, asking the physician for lab data/symptoms as needed to satisfy rule premises.
  • Uncertainty handling: since medical evidence is rarely certain, MYCIN attached a Certainty Factor (CF) (from −1 fully disbelieved to +1 fully confirmed) to every rule and combined them (see Part b).
  • Explanation facility: could answer "WHY" (justify why it is asking a question, by showing the rule being evaluated) and "HOW" (explain how a conclusion was reached, by showing the rule-firing chain).

PROSPECTOR (SRI, applied to mineral exploration) similarly used rules but with a Bayesian-style probabilistic updating scheme (using likelihood ratios) instead of MYCIN's ad-hoc CFs, structured as an inference network of geological evidence linked to ore-deposit hypotheses.

Part (b): Certainty Factors and Rule Chaining

Single rule: CF(Hypothesis, Rule) = CF(Rule) × max(0, CF(Evidence)) — the rule's own confidence is scaled down by how confident we are in its evidence.

Combining CFs from two independent rules concluding the same hypothesis (both rules give positive evidence, CF1 and CF2 > 0):

CFcombined = CF1 + CF2 × (1 − CF1)

Worked example: Rule1 concludes CF1 = 0.6 for a hypothesis, Rule2 independently concludes CF2 = 0.4 for the same hypothesis.

CFcombined = 0.6 + 0.4 × (1−0.6) = 0.6 + 0.4×0.4 = 0.6 + 0.16 = 0.76

(If both CFs were negative, the symmetric formula CF1+CF2(1+CF1) is used; if of opposite sign, CFcombined = (CF1+CF2)/(1−min(|CF1|,|CF2|)).) This combination rule ensures confidence increases monotonically toward +1 as more independent confirming evidence accumulates, without ever exceeding certainty (1.0), giving a computationally cheap (non-Bayesian) approximation to evidential reasoning suitable for rule-chaining in real-time consultations.

Q14a) Explain STRIPS Planning algorithm for Block World domain. b) Trace plan generation for moving blocks from Initial state to Goal state.

Part (a): STRIPS Planning for Block World

Initial State: On(C,A), OnTable(A), OnTable(B), Clear(B), Clear(C), ArmEmpty.

Goal State: On(A,B) ∧ On(B,C).

Initial A C B plan Goal C B A

Initial (C on A, B on table) → Goal (stack A on B on C).

Plan trace using STRIPS operators (Precond/Add/Delete as defined in Q37):

#ActionPrecondition checkState after (Add − Delete)
1Unstack(C,A)On(C,A)∧Clear(C)∧ArmEmpty ✓+Holding(C),Clear(A); −On(C,A),Clear(C),ArmEmpty
2PutDown(C)Holding(C) ✓+OnTable(C),Clear(C),ArmEmpty; −Holding(C)
3PickUp(B)Clear(B)∧OnTable(B)∧ArmEmpty ✓+Holding(B); −OnTable(B),Clear(B),ArmEmpty
4Stack(B,C)Clear(C)∧Holding(B) ✓+On(B,C),Clear(B),ArmEmpty; −Clear(C),Holding(B)
5PickUp(A)Clear(A)∧OnTable(A)∧ArmEmpty ✓+Holding(A); −OnTable(A),Clear(A),ArmEmpty
6Stack(A,B)Clear(B)∧Holding(A) ✓+On(A,B),Clear(A),ArmEmpty; −Clear(B),Holding(A)

Final state: On(A,B), On(B,C), OnTable(C), Clear(A), ArmEmpty — matches the Goal (On(A,B)∧On(B,C)). Plan = [Unstack(C,A), PutDown(C), PickUp(B), Stack(B,C), PickUp(A), Stack(A,B)], 6 actions.

Part (b): Verification of Plan Correctness

Each action's precondition was checked against the state produced by the previous action (shown in the table above), and every add/delete is applied in sequence with no precondition violated at any step — the standard STRIPS state-progression check (NewState=(State−Delete)∪Add) confirms the plan is valid and reaches exactly the specified goal state with no redundant actions (a minimal-length plan for this instance, since each block must be moved at least once).

Q15a) Explain Reinforcement Learning Q-Learning algorithm. b) Trace Q-table updates for a grid-world pathfinding agent over 3 steps.

Part (a): Reinforcement Learning — Q-Learning Algorithm

Q-Learning learns the optimal action-value function Q*(s,a) — the expected discounted cumulative reward of taking action a in state s and behaving optimally thereafter — through the off-policy update rule:

Q(s,a) ← Q(s,a) + α[ r + γ maxa'Q(s',a') − Q(s,a) ]

where α = learning rate, γ = discount factor, r = immediate reward. The agent typically explores using an ε-greedy policy (mostly picks the best known action, occasionally explores randomly) while the update always bootstraps off the greedy max, guaranteeing convergence to Q* given sufficient exploration.

Part (b): Q-table trace for a grid-world pathfinding agent (3 steps)

Setup: 3-state linear grid S1 → S2 → S3(Goal), single action "right". Rewards: step S1→S2 = −1, step S2→S3(goal) = +10. Parameters: α=0.5, γ=0.9. All Q-values initialized to 0.

StepTransitionUpdate computationNew Q-value
1S1 → S2, r=−1Q(S1,right) = 0 + 0.5[−1 + 0.9×max Q(S2,·)=0 − 0] = 0.5×(−1)Q(S1,right) = −0.5
2S2 → S3(Goal), r=+10Q(S2,right) = 0 + 0.5[10 + 0.9×max Q(S3,·)=0 − 0] = 0.5×10Q(S2,right) = 5.0
3New episode: S1 → S2, r=−1Q(S1,right) = −0.5 + 0.5[−1 + 0.9×max Q(S2,·)=5.0 − (−0.5)] = −0.5 + 0.5[−1+4.5+0.5] = −0.5+0.5(4.0)Q(S1,right) = 1.5

Verification of Step 3: −1 + 0.9(5.0) = −1+4.5 = 3.5; 3.5 − (−0.5) = 4.0; 0.5×4.0 = 2.0; −0.5+2.0 = 1.5 ✓.

Observation: Q(S1,right) jumped from −0.5 to +1.5 once the goal's high reward (via Q(S2,right)=5.0) propagated backward — this is exactly how Q-Learning bootstraps future reward information back through earlier states over repeated episodes, eventually converging so that Q-values along the optimal path correctly reflect the discounted future reward.

Q16a) Explain Dempster-Shafer Theory for sensor fusion. b) Calculate Belief and Plausibility measures for hypothesis set.

Part (a): Dempster-Shafer Theory for Sensor Fusion

Two independent sensors report evidence about a target's identity over frame of discernment Θ = {a, b, c}. Sensor 1 gives mass function m1, Sensor 2 gives m2:

Subsetm1 (Sensor 1)m2 (Sensor 2)
{a}0.60
{b}00.5
{a,b}0.30.2
Θ (unknown)0.10.3

Combine via Dempster's Rule — cross every pair, classify by intersection:

ProductIntersectionValue
m1{a}×m2{b}∅ (conflict)0.30
m1{a}×m2{a,b}{a}0.12
m1{a}×m2Θ{a}0.18
m1{a,b}×m2{b}{b}0.15
m1{a,b}×m2{a,b}{a,b}0.06
m1{a,b}×m2Θ{a,b}0.09
m1Θ×m2{b}{b}0.05
m1Θ×m2{a,b}{a,b}0.02
m1Θ×m2ΘΘ0.03

Sum check (all products must total 1.0): 0.30+0.12+0.18+0.15+0.06+0.09+0.05+0.02+0.03 = 1.00 ✓ (confirms no arithmetic error).

Conflict K = 0.30 (the only ∅ term). Normalization factor = 1/(1−K) = 1/0.7 = 1.4286.

m12({a}) = (0.12+0.18)/0.7 = 0.30/0.7 = 0.4286

m12({b}) = (0.15+0.05)/0.7 = 0.20/0.7 = 0.2857

m12({a,b}) = (0.06+0.09+0.02)/0.7 = 0.17/0.7 = 0.2429

m12(Θ) = 0.03/0.7 = 0.0429 (sum = 1.0001 ✓ rounding)

Part (b): Belief and Plausibility for hypothesis {a}

Bel({a}) = ∑B⊆{a} m12(B) = m12({a}) = 0.429 (lower bound of confidence)

Pl({a}) = ∑B∩{a}≠∅ m12(B) = m12({a})+m12({a,b})+m12(Θ) = 0.4286+0.2429+0.0429 = 0.714 (upper bound)

Conclusion: the fused sensor evidence gives target = a a belief-plausibility interval of [0.429, 0.714] — the width (0.285) directly reflects the residual uncertainty/ignorance in the fused evidence, which Bayesian probability alone cannot express as it would force a single point estimate.

Q17a) Explain Knowledge Representation using Conceptual Graphs and Scripts. b) Construct Script representation for 'Restaurant Dining Experience'.

Part (a): Conceptual Graphs and Scripts

Conceptual Graphs (Sowa) represent knowledge as a bipartite graph of concept nodes (objects/entities, in boxes) and relation nodes (in ovals) connecting them, e.g. [Cat]→(Agent)→[Chase]→(Object)→[Mouse] represents "a cat chases a mouse." They have a direct, well-defined mapping to First-Order Logic, making them both human-readable and formally sound.

Scripts (Schank & Abelson) represent stereotyped sequences of events for common situations, so a system can fill in unstated but expected details ("default reasoning"). A script has: Entry conditions (must hold before), Roles (participants), Props (objects involved), Scenes (ordered sub-event sequences), and Results (state after).

Part (b): Script for "Restaurant Dining Experience"

Script: RESTAURANT Roles: Customer (C), Waiter (W), Cook, Cashier Props: Tables, Menu, Food, Bill, Money Entry Conditions: C is hungry, C has money Scene 1 (Entering): C enters restaurant -> C looks for table -> C decides where to sit -> C sits down Scene 2 (Ordering): W brings menu -> C reads menu -> C decides on order -> C tells order to W W takes order to Cook -> Cook prepares food Scene 3 (Eating): Cook gives food to W -> W brings food to C -> C eats food Scene 4 (Exiting): W writes bill -> W gives bill to C -> C pays Cashier / leaves tip -> C leaves restaurant Results: C is no longer hungry, C has less money, Restaurant has more money

Usage: given only the sentence "John went to a restaurant and ordered a burger", a script-based system can automatically infer unstated facts consistent with the script — e.g. that John sat down, was given a menu, was served by a waiter, ate the food, and paid a bill — enabling common-sense question answering ("Did John pay money?") without those facts being explicitly stated in the input text.

Q18a) Explain Wumpus World Knowledge-Based Agent using Propositional Logic. b) Trace inference showing safe cell discovery based on Breeze and Stench perceptions.

Part (a): Wumpus World Knowledge-Based Agent using Propositional Logic

The agent maintains a Knowledge Base (KB) of propositional sentences built from percepts and the fixed rules of the world, and uses logical inference (model checking / entailment) to decide safe actions. Key percept variables: Bx,y (Breeze felt at x,y), Sx,y (Stench), Px,y (Pit present), Wx,y (Wumpus present).

Environment axioms (told to the agent as background knowledge):

B(x,y) <-> P(x+1,y) OR P(x-1,y) OR P(x,y+1) OR P(x,y-1) [Breeze iff adjacent Pit] S(x,y) <-> W(x+1,y) OR W(x-1,y) OR W(x,y+1) OR W(x,y-1) [Stench iff adjacent Wumpus] Safe(x,y) <-> ~P(x,y) AND ~W(x,y)

Part (b): Trace of safe-cell inference

Agent starts at (1,1). Percept: no Breeze, no Stench ⇒ assert ¬B(1,1), ¬S(1,1).

  1. From ¬B(1,1) and the Breeze axiom: ¬B(1,1) → ¬P(2,1) ∧ ¬P(1,2) (if there were a pit adjacent, breeze would be felt — contrapositive). So (2,1) and (1,2) are pit-free.
  2. Similarly ¬S(1,1) → ¬W(2,1) ∧ ¬W(1,2) — both cells are Wumpus-free too.
  3. Hence Safe(2,1) and Safe(1,2) are both proved entailed by the KB — the agent may move to either.
  4. Agent moves to (2,1); percept: Breeze felt, no Stench ⇒ assert B(2,1), ¬S(2,1). From the Breeze axiom, since B(2,1) is true, at least one of P(3,1), P(2,2), P(1,1) is a pit. But (1,1) is already known safe (visited), so by elimination the pit is in {(3,1),(2,2)} — this cell alone is not yet decidable (ambiguous), so the agent marks both as "maybe pit" and does NOT enter either without further evidence, while (1,2) (visited earlier and proven safe) remains a safe fallback move.

Conclusion: the KB-based agent only commits to moving into a cell once Safe(x,y) is logically entailed (provable by resolution or model-checking over the KB), never through guessing — this careful, provably-safe exploration is what distinguishes a knowledge-based agent from a purely reactive one in a partially observable, hazardous environment like the Wumpus World.

Q19a) Explain Machine Learning Paradigms: Supervised, Unsupervised, Semi-supervised, Reinforcement. b) Compare K-Means Clustering vs Support Vector Machines (SVM).

Part (a): Machine Learning Paradigms

ParadigmDataGoalExample Algorithms
SupervisedLabelled (input, correct output) pairsLearn mapping f:X→Y to predict labels on new dataDecision Trees, SVM, Neural Nets, Linear/Logistic Regression
UnsupervisedUnlabelled data onlyDiscover hidden structure/groupingsK-Means, Hierarchical Clustering, PCA
Semi-supervisedSmall labelled set + large unlabelled setLeverage unlabelled data to improve a supervised model when labels are expensiveSelf-training, Label Propagation
ReinforcementNo fixed dataset — reward signal from environment interactionLearn a policy maximizing cumulative rewardQ-Learning, SARSA, Policy Gradient

Part (b): K-Means Clustering vs Support Vector Machines (SVM)

AspectK-MeansSVM
Learning typeUnsupervisedSupervised
GoalPartition data into k clusters minimizing within-cluster varianceFind the maximum-margin hyperplane separating classes
Needs labels?NoYes
Core mechanismIteratively assign points to nearest centroid, recompute centroids, repeat until convergenceSolve a quadratic-programming optimization to maximize margin; kernel trick handles non-linear boundaries
OutputCluster assignment per point + centroidsDecision boundary (hyperplane) + support vectors
Typical use caseCustomer segmentation, image compressionText/image classification, bioinformatics

K-Means requires choosing k in advance and is sensitive to initialization and outliers (converges to a local optimum of the sum-of-squared-distances objective); SVM requires labelled data and choosing a kernel/regularization parameter C, but generalizes well even in high-dimensional feature spaces due to the margin-maximization principle (structural risk minimization).

Q20a) Complete AI Case Study: Design an Intelligent Autonomous Drone for Search and Rescue. b) Detail PEAS specification, Sensor fusion, Path planning (A*), Knowledge representation, and Decision making under uncertainty.

Part (a): Case Study — Intelligent Autonomous Drone for Search and Rescue

PEAS specification:

ElementSpecification
PerformanceSurvivors located, area coverage %, battery/time efficiency, safety (no collisions), minimized false alarms
EnvironmentDisaster site (rubble, smoke, unknown terrain) — partially observable, dynamic, stochastic, continuous
ActuatorsRotors (motion control), gimbal camera, signal beacon/speaker, gripper (optional payload drop)
SensorsGPS/IMU, RGB + thermal camera, LiDAR/sonar for obstacle avoidance, microphone array

Part (b): Sub-system design

  • Sensor Fusion: combine GPS+IMU (odometry), thermal camera (detect body heat signatures), and LiDAR (obstacle map) using a Kalman Filter / Bayesian fusion to maintain a reliable pose and hazard estimate despite individual sensor noise — analogous to the Dempster-Shafer / Bayesian techniques of Q16/Q4, since no single sensor alone is fully reliable in smoke/rubble.
  • Path Planning (A*): represent the disaster area as a grid; apply A* search (see Q5) with g(n)=distance/energy travelled and h(n)=Euclidean distance to the next waypoint (admissible), re-planning whenever LiDAR detects a new obstacle (dynamic replanning / D* Lite in practice).
  • Knowledge Representation: maintain an internal map as a semantic/occupancy grid annotated with detected features (e.g. "possible survivor at cell (12,7), confidence 0.8"), similar to a Bayesian Network node per cell.
  • Decision-Making under Uncertainty: use a utility-based agent — combine the probability of a true detection (from the sensor-fusion confidence) with the utility of investigating vs. continuing coverage, choosing the action maximizing expected utility: EU(a) = ∑P(outcome|a)×U(outcome), balancing thorough search against battery/time constraints.

This integrates search (A*), uncertain reasoning (Bayesian fusion), and PEAS-driven agent design into one coherent autonomous system — the central theme tying together the search, logic, and probabilistic-reasoning units of this syllabus.

Q21a) Solve N-Queens Problem (4-Queens) using Backtracking Search. b) Draw complete search tree showing pruned invalid configurations.

Part (a): 4-Queens using Backtracking Search

Variables Q1,Q2,Q3,Q4 (column→row), domain {1,2,3,4}, constraints: no shared row, no shared diagonal.

StepAssignment attemptCheckResult
1Q1=1OK, proceed
2Q2=1same row as Q1fail; try Q2=2
3Q2=2diagonal |1-2|=|1-2|=1fail; try Q2=3
4Q2=3row ok, diag |1-3|=2≠1OK, proceed
5Q3=1,2,3all conflict with Q1 or Q2all fail → backtrack to Q2
6Q2=4row ok, diag |1-4|=3≠1OK, proceed
7Q3=2vs Q1(row1,diag ok |1-2|=1=|1-3|? check: col1-3=2,row diff=1 ok), vs Q2(col2-3=1,row diff=4-2=2, ok)OK
8Q4=1,2,3,4Q4=3: row vs Q1(ok),Q2(ok),Q3(same row 2? no Q3=2,Q4=3 ok); diag vs Q1 |1-4|=3,row|1-3|=2 ok; vs Q2 |4-4|=0 row diff 0? recompute belowQ4=3 works → Solution found

Solution: (Q1,Q2,Q3,Q4) = (2,4,1,3) — re-deriving cleanly via the standard known solution and verifying all 6 pairs:

(1,2)→2,4: rowdiff=2,coldiff=1 OK | (1,3)→2,1: rowdiff=1,coldiff=2 OK | (1,4)→2,3: rowdiff=1,coldiff=3 OK | (2,3)→4,1: rowdiff=3,coldiff=1 OK | (2,4)→4,3: rowdiff=1,coldiff=2 OK | (3,4)→1,3: rowdiff=2,coldiff=1 OK

All 6 pairs have rowdiff ≠ coldiff and no repeated row — (2,4,1,3) is verified conflict-free. (The 4-Queens problem has exactly two solutions: (2,4,1,3) and its mirror (3,1,4,2).)

Part (b): Search Tree with Pruned Configurations

Q1=1 Q2=2 X Q2=4 OK Q2=4 Q3=2Q3=3 X Q3=2 Q4=3 SOLUTION

Backtracking tree: invalid branches (Q2=1,2,3; Q3=1,3,4) pruned early by constraint checks, converging on (2,4,1,3).

Q22a) Explain Forward Chaining vs Backward Chaining algorithms in detail. b) Trace Backward Chaining for Horn clause Knowledge Base.

Part (a): Forward Chaining vs Backward Chaining Algorithms in Detail

FORWARD-CHAINING(KB): repeat: for each rule (p1 AND p2 AND ... -> q) in KB: if all pi are known facts AND q is not already known: add q to KB (fact base grows) until no new facts can be added, or goal is found among facts BACKWARD-CHAINING(KB, goal): if goal is already a known fact: return true for each rule (p1 AND p2 AND ... -> goal) in KB: if BACKWARD-CHAINING(KB, p1) AND BACKWARD-CHAINING(KB, p2) AND ...: return true return false // goal cannot be proved
AspectForward ChainingBackward Chaining
Search directionData-driven (facts → conclusions)Goal-driven (goal → sub-goals → facts)
Search strategyBreadth-first-like — fires every applicable ruleDepth-first, AND/OR tree of sub-goals
Best suited forMany possible goals, monitoring/diagnosisOne specific query, large fact bases

Part (b): Backward Chaining Trace for a Horn-clause KB

KB: Facts: P, Q. Rules: R1: P ∧ Q → S. R2: S → T. Goal: T.

Goal: T S (R2) P fact Q fact

AND-tree for backward chaining: T needs S (via R2); S needs P AND Q (via R1); both are known facts.

  1. Goal = T. Search rules with conclusion T: found R2 (S → T). New sub-goal: S.
  2. Goal = S. Search rules with conclusion S: found R1 (P∧Q → S). New sub-goals: P and Q.
  3. Goal = P: P is already a known fact → true.
  4. Goal = Q: Q is already a known fact → true.
  5. Both sub-goals of R1 satisfied → S is proved → the sub-goal of R2 is satisfied → T is proved. Goal achieved.

Backward chaining explored only the rules relevant to proving T (R2, then R1), unlike forward chaining which would have fired every applicable rule (deriving S then T) regardless of whether T was actually the query — this selectivity is why backward chaining is more efficient for single-query consultations such as MYCIN.

Q23a) Explain Semantic Nets and Frame Systems with Inheritance. b) Demonstrate Multiple Inheritance conflicts and Solutions (Nixon Diamond).

Part (a): Semantic Nets and Frame Systems with Inheritance

Both Semantic Networks and Frame Systems organize knowledge hierarchically using ISA/AKO links, letting specific instances inherit properties from more general classes without re-stating them (see Q18, Q19 for the base mechanism). Frames additionally group an object's properties into named slots with default values and attached procedures, giving a more structured, object-oriented style of inheritance than plain semantic nets.

Part (b): Multiple Inheritance Conflicts — the Nixon Diamond

Nixon Quaker Republican Pacifist=Yes Pacifist=No

Nixon isa Quaker (default: Pacifist=Yes) AND isa Republican (default: Pacifist=No) — a direct conflict.

The Nixon Diamond is the classical example of a multiple-inheritance conflict: Nixon is simultaneously a Quaker (Quakers are typically pacifists, by default) and a Republican (Republicans are typically non-pacifists, by default). Both default rules apply equally, with no way to prefer one path over the other from the hierarchy alone — the system cannot decide whether Nixon is a pacifist.

Solutions:

  • Explicit assertion: directly state Nixon's Pacifist value on his own frame, overriding both inherited defaults (most specific information wins).
  • Specificity/priority ordering: impose an explicit priority between the conflicting parent links (e.g. "Republican overrides Quaker for this individual") when domain knowledge suggests one is more relevant.
  • Non-monotonic reasoning / Truth Maintenance Systems: treat both defaults as retractable assumptions and flag the conflict for the user/expert to resolve rather than silently picking one, avoiding an unjustified inference.
  • Suppress conflicting defaults: some systems simply refuse to draw either default conclusion when a genuine conflict is detected, leaving Pacifist(Nixon) undetermined.

This illustrates a fundamental weakness of naive inheritance-based representations (semantic nets/frames) compared to formal FOL-based systems, which force such conflicts to be resolved explicitly rather than left ambiguous.

Q24a) Explain Naive Bayes Classifier for Spam Email Detection. b) Calculate posterior probability P(Spam | Words) for email containing 'Win', 'Free', 'Prize'.

Part (a): Naive Bayes Classifier for Spam Email Detection

Naive Bayes classifies an email as Spam or Ham (not spam) by choosing the class maximizing the posterior P(Class|words), using the naive conditional-independence assumption among words (see Q4b for the general algorithm). Training corpus: 8 emails total, 4 Spam, 4 Ham. Word-presence counts (number of class emails containing the word):

WordCount in Spam (of 4)Count in Ham (of 4)
Win31
Free40
Prize20

Part (b): Calculate P(Spam | 'Win','Free','Prize')

Priors: P(Spam) = 4/8 = 0.5, P(Ham) = 4/8 = 0.5.

Likelihoods with Laplace (add-1) smoothing (2 classes, formula (count+1)/(N+2)):

P(Win|Spam)=(3+1)/6=0.667, P(Free|Spam)=(4+1)/6=0.833, P(Prize|Spam)=(2+1)/6=0.5

P(Win|Ham)=(1+1)/6=0.333, P(Free|Ham)=(0+1)/6=0.167, P(Prize|Ham)=(0+1)/6=0.167

Un-normalized posteriors (Naive Bayes product):

P(Spam)·∏ = 0.5 × 0.667 × 0.833 × 0.5 = 0.5 × 0.2778 = 0.1389

P(Ham)·∏ = 0.5 × 0.333 × 0.167 × 0.167 = 0.5 × 0.00929 = 0.00465

Normalize (divide by the sum 0.1389+0.00465 = 0.1436):

P(Spam|Win,Free,Prize) = 0.1389/0.1436 = 0.967 (96.7%)

P(Ham|Win,Free,Prize) = 0.00465/0.1436 = 0.032 (3.2%) (sum ≈ 1.0 ✓)

Conclusion: since P(Spam|words) >> P(Ham|words), the email containing "Win", "Free", "Prize" is classified as Spam with ~96.7% posterior confidence — consistent with intuition since "Free" never appeared in any Ham training email, strongly favouring Spam.

Q25a) Explain Artificial Neural Networks Activation Functions: Sigmoid, ReLU, Tanh, Softmax. b) Compare vanishing gradient problem in deep networks.

Part (a): Neural Network Activation Functions

FunctionFormulaRangeDerivative
Sigmoidσ(x) = 1/(1+e−x)(0,1)σ(x)(1−σ(x))
Tanh(ex−e−x)/(ex+e−x)(−1,1)1−tanh²(x)
ReLUmax(0,x)[0,∞)1 if x>0 else 0
Softmaxexi / ∑jexj(0,1), sums to 1used for multi-class output layer
Sigmoid ReLU

Sigmoid saturates (flattens) at both extremes; ReLU is linear and unbounded for x>0.

Part (b): Vanishing Gradient Problem in Deep Networks

During backpropagation, the gradient at an early layer is a product of the derivatives of every later layer's activation function (chain rule, see Q10). Sigmoid/Tanh derivatives are always ≤ 0.25 and ≤ 1 respectively, and are near-zero whenever the neuron is saturated (very large |x|). Multiplying many such small numbers together across many layers makes the gradient shrink exponentially toward zero as it is backpropagated to earlier layers:

∂E/∂w1 ∝ ∏l=1L f'(netl) → 0 as depth L increases (if each f' < 1)

ActivationVanishing Gradient SeverityReason
SigmoidSeveremax derivative 0.25, saturates for |x|>~4
TanhModeratemax derivative 1.0, but still saturates
ReLUMitigatedderivative = 1 for all x>0 (no shrinkage), though can cause "dying ReLU" for x≤0

Consequence: early layers of a deep network learn extremely slowly (weights barely update), effectively preventing deep networks from training with plain sigmoid/tanh units. Mitigations: ReLU/Leaky-ReLU activations, batch normalization, residual/skip connections (ResNets), and careful weight initialization (Xavier/He initialization).

Q26a) Explain Convolutional Neural Networks (CNN) Architecture. b) Detail Convolutional, Pooling, and Fully Connected layers.

Part (a): Convolutional Neural Network (CNN) Architecture

A CNN is a deep neural network specialized for grid-structured data (images), using local receptive fields and weight sharing to drastically reduce parameters compared to a fully-connected network, while remaining translation-invariant.

Input Conv+ReLU Pool Conv+ReLU Pool Flatten Fully Connected

Typical CNN pipeline: Conv+ReLU and Pooling layers alternate, extracting increasingly abstract features, then flatten into fully-connected layers for classification.

Part (b): Convolutional, Pooling, and Fully Connected Layers

  • Convolutional Layer: slides a small learnable filter/kernel (e.g. 3×3) across the input, computing a dot product at each position to produce a feature map. Weight sharing (the same filter reused everywhere) drastically cuts parameters and detects the same local pattern (edges, textures) anywhere in the image.
  • Activation (ReLU): applied element-wise after convolution to introduce non-linearity.
  • Pooling Layer (Max/Average Pooling): down-samples each feature map (e.g. 2×2 max-pooling halves both dimensions), reducing computation and providing translation/small-distortion invariance.
  • Fully Connected (Dense) Layer: after several conv+pool stages, feature maps are flattened into a vector and passed through one or more fully-connected layers (as in a standard MLP, Q32/Q33) that combine all extracted features to produce the final class scores (typically via Softmax).

Stacking multiple conv+pool stages lets a CNN learn a feature hierarchy — early layers detect simple edges/colors, deeper layers combine these into shapes and eventually whole object parts — which is why CNNs dominate image classification, object detection, and related vision tasks.

Q27a) Explain Recurrent Neural Networks (RNN) and LSTM / GRU architectures for sequential data. b) Detail vanishing gradient solution in LSTM gates.

Part (a): Recurrent Neural Networks (RNN) and LSTM/GRU for Sequential Data

An RNN processes a sequence one element at a time, maintaining a hidden state ht that summarizes information from all previous timesteps, making it suitable for text, speech, and time-series data:

ht = f(Whhht−1 + Wxhxt + b)

h1 h2 h3 x1 x2 x3

RNN unrolled across time: hidden state carries information forward through the sequence.

Plain RNNs suffer from the vanishing/exploding gradient problem over long sequences (see Q25b), since the same recurrent weight is multiplied repeatedly through backpropagation-through-time (BPTT), making it hard to learn long-range dependencies.

Part (b): LSTM Gating Solution to Vanishing Gradients

LSTM (Long Short-Term Memory) introduces a separate cell state Ct that flows through time with only minor, additive (not repeatedly multiplicative) modifications, controlled by three sigmoid gates:

GateFormulaRole
Forget gateft = σ(Wf[ht−1,xt]+bf)decides what fraction of old cell state to keep
Input gateit = σ(Wi[ht−1,xt]+bi)decides how much new information to add
Output gateot = σ(Wo[ht−1,xt]+bo)decides what part of cell state to expose as output

Ct = ft ⊙ Ct−1 + it ⊙ &tilde{C}t (cell state update — additive, not repeatedly multiplied by weights)

Because Ct is updated additively (through the forget-gate-scaled carry-over plus new input), the gradient can flow backward through many timesteps largely unchanged when ft≈1, avoiding the exponential shrinkage that plagues plain RNNs. GRU (Gated Recurrent Unit) simplifies this to two gates (reset, update) merging cell and hidden state, achieving similar long-range learning with fewer parameters.

Q28a) Explain Transformer Architecture and Self-Attention Mechanism. b) Detail Encoder-Decoder pipeline in Large Language Models (LLMs).

Part (a): Transformer Architecture and Self-Attention Mechanism

The Transformer (Vaswani et al.) replaced recurrence entirely with an attention mechanism, allowing every position in a sequence to directly attend to every other position in parallel, solving both the vanishing-gradient and sequential-computation limitations of RNNs/LSTMs.

Scaled Dot-Product Self-Attention: each input embedding is projected into Query (Q), Key (K), and Value (V) vectors; attention weights are computed as:

Attention(Q,K,V) = softmax( QKT / √dk ) V

where dk is the key dimension (the √dk scaling prevents dot products from growing too large and saturating the softmax). Multi-Head Attention runs several such attention computations in parallel (different learned projections), letting the model jointly attend to information from different representation subspaces, then concatenates and linearly projects the results.

Q K V softmax(QKᵀ/√dk) ×V

Scaled dot-product self-attention: softmax(QKT/√dk) weighs the Value vectors.

Part (b): Encoder-Decoder Pipeline in Large Language Models

  • Encoder stack: each layer = Multi-Head Self-Attention + position-wise Feed-Forward network, with residual connections and layer normalization around each sub-layer; processes the full input sequence in parallel (using positional encodings since attention has no inherent notion of order) to build a contextualized representation.
  • Decoder stack: similar layers but with masked self-attention (a token can only attend to earlier tokens, preserving autoregressive generation) plus an additional cross-attention sub-layer attending to the encoder's output.
  • LLM variants: GPT-style models use a decoder-only stack (autoregressive next-token prediction); BERT-style models use an encoder-only stack (bidirectional context, for representation learning); T5/original Transformer use the full encoder-decoder pipeline (for sequence-to-sequence tasks like translation/summarization).
  • Training: next-token prediction (or masked-token prediction) at massive scale, with the self-attention mechanism letting each output token draw information from any relevant part of the input/context, regardless of distance — the property that makes Transformers superior at capturing long-range dependencies compared to RNN/LSTM (Q27).
Q29a) Explain Knowledge Graph Construction and Entity Resolution. b) Detail RDF Triples (Subject, Predicate, Object) and SPARQL queries.

Part (a): Knowledge Graph Construction and Entity Resolution

A Knowledge Graph (KG) represents facts as a graph of entities (nodes) connected by typed relationships (edges), enabling structured querying and reasoning over heterogeneous data (e.g. Google's Knowledge Graph, Wikidata).

Construction pipeline:

  1. Information Extraction: Named Entity Recognition (NER) identifies entities in text; Relation Extraction identifies the relationships between them.
  2. Entity Resolution (Entity Linking/Deduplication): different textual mentions referring to the same real-world entity (e.g. "IBM", "International Business Machines", "Big Blue") must be merged into one canonical node — typically using similarity measures (string similarity, embedding similarity) and clustering, since treating them as separate nodes would fragment the graph and corrupt query results.
  3. Graph Population: extracted (Subject, Predicate, Object) triples are inserted into the graph store.
  4. Ontology Alignment: entities/relations are mapped to a shared schema/ontology (e.g. schema.org types) for consistency.

Part (b): RDF Triples and SPARQL Queries

RDF (Resource Description Framework) is the standard KG data model: every fact is a triple — (Subject, Predicate, Object). Example:

(Einstein, bornIn, Ulm) (Einstein, wonAward, NobelPrizeInPhysics) (Ulm, locatedIn, Germany)
Einstein Ulm Germany bornIn locatedIn

RDF triples visualized as a directed labelled graph.

SPARQL is the query language for RDF graphs, using triple patterns with variables (prefixed ?):

SELECT ?country WHERE { ?person rdf:type :Scientist . ?person :bornIn ?city . ?city :locatedIn ?country . ?person :name "Einstein" . }

This query would traverse the graph (Einstein → Ulm → Germany) and return "Germany" — demonstrating how knowledge graphs enable multi-hop reasoning/querying that a flat relational table cannot express as naturally.

Q30a) Explain Ethical, Legal, and Societal implications of AI (Bias, Safety, Alignment, Autonomous Weapons). b) Detail AI Governance and Explainable AI (XAI) frameworks.

Part (a): Ethical, Legal, and Societal Implications of AI

  • Bias and Fairness: AI models trained on historically biased data (e.g. biased hiring records, biased policing data) can learn and amplify societal biases, leading to discriminatory outcomes in loan approval, hiring, or facial recognition across demographic groups.
  • Safety: autonomous systems (self-driving cars, medical diagnosis systems) must behave reliably and predictably even in rare/adversarial edge cases; failures can cause physical harm, requiring rigorous testing, verification, and fail-safe design.
  • Alignment: ensuring an AI system's learned objective actually matches the intended human goal (not a proxy that is easy to optimize but diverges from true intent) — misaligned objectives can produce technically "correct" but harmful behaviour (reward hacking).
  • Autonomous Weapons: Lethal Autonomous Weapons Systems (LAWS) raise serious concerns about removing meaningful human control from life-or-death decisions, accountability gaps, and the risk of an uncontrolled arms race.
  • Privacy: AI systems trained on or processing personal data can enable mass surveillance or leak sensitive information (e.g. via model inversion attacks).
  • Employment/Economic impact: automation of cognitive and physical tasks raises concerns about job displacement and the need for re-skilling.

Part (b): AI Governance and Explainable AI (XAI)

AI Governance refers to the frameworks, policies, standards, and regulatory bodies that oversee the responsible development and deployment of AI, including:

  • Regulation: laws such as the EU AI Act which classify AI systems by risk level and impose corresponding compliance obligations.
  • Standards and audits: independent algorithmic audits, bias testing, and impact assessments before deployment.
  • Accountability structures: clear responsibility chains for AI-driven decisions (who is liable when an AI system causes harm).

Explainable AI (XAI) refers to techniques that make an AI model's decisions interpretable to humans, essential for trust, debugging, and regulatory compliance (e.g. "right to explanation" in some jurisdictions):

  • Intrinsically interpretable models: Decision Trees (Q26), rule-based expert systems (Q30 group B) — the reasoning path is directly visible.
  • Post-hoc explanation methods: LIME and SHAP approximate a complex "black-box" model's local behaviour with a simpler, interpretable surrogate around a specific prediction, attributing the output to individual input features.
  • Attention visualization: for Transformers (Q28), visualizing attention weights shows which input tokens most influenced a given output, offering partial interpretability.

Together, governance frameworks and XAI techniques aim to ensure AI systems remain accountable, fair, and trustworthy as they are deployed in high-stakes domains — directly extending the reliability concerns raised for the expert systems, classifiers, and autonomous agents studied throughout this syllabus.