AI Search · Exam notes

Model-Based Diagnosis: Conflicts, Hitting Sets + Quick Revision

Diagnosis turns a wrong device output into sets of suspects: which components cannot all be OK? which suspect sets hit every conflict? which is minimal? One chain answers all: predict with everything OK, clash with the observation to get conflicts, keep the sets that touch each conflict, then apply Occam. The second half of this page revises every earlier topic in one table each.

Points 1 and 2 are the rules. Point 3 diagnoses a multiplier-adder device. Point 4 revises every topic. Point 5 has two drills to solve with a pen.

1. Rules in two tables

TermMeaning
Component modelIf OK, behavior is fixed: multiplier gives \(out = in1 \times in2\); adder gives \(out = in1 + in2\). Wires never fail, only components do.
ObservationMeasured output, e.g. \(F1 = 10\). Prediction with all OK was 12: mismatch means something broke.
ConflictA set of components that cannot ALL be OK: assuming each OK reproduces the mismatch. At least one member is faulty.
Diagnosis (hitting set)A faulty set touching EVERY conflict. Miss one conflict and that conflict stays unexplained.
Minimal + OccamMinimal: no subset still hits all conflicts. Occam's razor: simplest (smallest) explanation is best; ties need more measurements.

2. The three checks

  1. Conflict: assume the members OK, propagate values, compare with the observation. Predicted 12 vs observed 10: the assumption set is a conflict.
  2. Hitting set: a candidate must share at least one member with each conflict. Test singles first (one member in every conflict), then pairs.
  3. Minimal + Occam: drop any candidate containing a smaller diagnosis. Among survivors, smallest size wins; report ties as ties.

3. Worked example: three multipliers, two adders

3a. Device and observations (solve from this, then check the walkthrough)

M1
3x2=6
C1
M2
3x2=6
C2
M3
3x2=6
C3
-->
A1
6+6
pred 12
obs 10
A2
6+6
pred 12
obs 12

A1 takes C1, C2 and outputs F1. A2 takes C3 (and a second feed) and outputs F2. All-OK prediction: \(F1 = F2 = 12\). Observed: \(F1 = 10\) (wrong), \(F2 = 12\) (right).

3b. Walkthrough: conflicts first, then candidates

Step 0 | filled chip = OK-assumed / hits the conflict, dashed chip = faulty / misses it

Why this step

Tracker

3c. The three questions

Device and observations as above. Wires cannot fail.

  1. Which component sets are conflicts? (Given: {M1,M2,A1} and {A1,A2,M1,M3}.)
  2. Which minimal sets hit every conflict?
  3. What does Occam's razor pick?

3d. Answers first, then the working

Conflicts: {M1,M2,A1}, {A1,A2,M1,M3}. Minimal diagnoses: M1; A1; M2+M3; M2+A2. Occam: M1 or A1 (single faults first).

  1. Conflict 1: M1, M2, A1 all OK gives C1=C2=6, F1=12, but F1 reads 10: these three cannot all be OK.
  2. Conflict 2 ({A1,A2,M1,M3}) comes from the same reasoning extended over the F2=12 observation: it rules out M2 alone (a lone M2 fault cannot keep F2 right while F1 goes wrong).
  3. Singles: M1 sits in both conflicts: diagnosis. A1 sits in both: diagnosis. M2 misses conflict 2, M3 and A2 miss conflict 1: out.
  4. Doubles: cover conflict 1 from {M1,M2,A1} and conflict 2 from {A1,A2,M1,M3}, dropping pairs that contain a single diagnosis: M2+M3 and M2+A2. The rest (e.g. M3+A2) miss conflict 1 entirely.
  5. Occam: two single-fault explanations tie: M1 or A1. One more measurement (e.g. probe C1) would split them.

4. Quick revision: every topic in one table each

Search (river grid)

StrategyPath
BestS,D,A,G
A*S,F,A,G
B&BS,F,E,C,G (shortest)

Shortest = B&B. Heuristic inadmissible. Theory appendix (Search point 7): DFID needs new as well as closed; unknown heuristic with unit costs takes BFS, Dijkstra, B and B (general costs: Dijkstra, B and B only); wA* at large w is Best-First and not optimal, at w = 0 is Dijkstra and optimal.

TSP branch and bound

PaperRefined / optimalCities / tour
2024T1 FNb1,c1,d1,d2 / e2,4026 / A,C,B,E,D,F
2024T2 FNb1,c2,d1,b2 / d3,2445 / A,C,B,D,E
2024T3 ANb1,c2,d1 / d1,1625 / A,D,B,C,E
2024T3 FNb1,b2,c3 / d1,2305 / A,C,E,B,D
2025T2 FNb1,c2,b2,c3 / d3,4345 / A,B,D,E,C

Games

PaperMinimax / strategy / best / pruned / solved
2024T256 / A,B + D,G,H / I,J / C,E,F,G,H,K / A,D,I,J
2024T1- / A,C + D,F,G / D,E / C,F,G,I,J / A,D,E,H
2024T3 FN- / C,D,E,G,H + F,G,H / A,B / D,E,G,H unaffected / A,B,C,F
Eval assign FNminimax 3 / cuts 0 alpha, 2 beta / pruned B,D
Eval assign ANminimax 2 / cuts 2 alpha, 0 beta / pruned B,D
N-cutoff oddN = 11 or 13 / Beta Cutoff
N-cutoff evenN = 2 or 4 / Alpha Cutoff

AO* (expanded / S after 1st,2nd,3rd / final)

2024T2 FNS,C,A / 12,28,36 / 56
2024T1 FNS,A,B / 22,32,24 / 38
2024T3 FNS,C,B / 16,22,24 / 30
2024T3 ANS,C,A / 16,22,24 / 32

Loop: expand S, walk the marked path, AND sums, OR mins, backpropagate, re-mark cheapest. Fourth question (some papers): all four heuristics above are admissible (every h at or below true cost); official keys seen elsewhere are admissible twice, inadmissible twice, never sometimes.

Rete net

Conflict set: (F1-Car,104,107,109), (Luxury-Car,103,106,108), (Truck,101,102,105). Specificity (most tests): Truck (12 vs 9, 9). Recency (max timestamp): F1-Car (109 vs 108 vs 105).

Planning (Blocks World)

Applicable: Unstack(D,A), Unstack(E,B), Pickup(C). Relevant: Stack(A,B), Stack(B,C). Mutex actions: (Unstack(D,A),Pickup(C)), (Unstack(D,A),Unstack(E,B)). Mutex props: (clear(A),holding(E)), (clear(A),clear(B)).

CSP (modulo relations)

\(R_{AC}\): (1,2),(2,1),(2,4). \(R_{BA}\): (1,3),(2,2),(3,1). Arc consistent? No (C=3 dead). After enforcing: path consistent. Solution: 2,2,1.

GraphPlan (mid-flight layers)

Layer k cannot be the start (has mutexes). Applicable: Putdown(A), Stack(A,B), Unstack(A,B) (Unstack(B,C) dies on mutex pres). Mutex: all three queried pairs. Non-mutex props via Putdown(A)+nop-4. Theory keys: one ordering feasible iff P in pre(a) + del(b); both feasible with different outcomes iff P in add(a) + del(b); action mutex = all four at once; props mutex = every producer pair, non-mutex = one clean pair.

Goal trees (backward chaining)

Evening: X=beach, Y=matrix, Z=saravanaBhavan (mall and pizzaHut fail likes-checks). Nice toy: X=D via rule 2. Leftmost goal, leftmost fact, backtrack on failure.

5. Practice: two drills

Solve each with a pen before opening the answer. Each drill is self contained.

Drill N1: chained conflicts

Conflicts: {X,Y}, {Y,Z}. Q1: which singles are diagnoses? Q2: which minimal doubles? Q3: Occam pick?

Step 0

Why this step

Tracker

Answer N1

Q1: Y only (sits in both; X misses the second, Z misses the first). Q2: X+Z (X covers the first, Z the second; pairs with Y are non-minimal). Q3: Y, the single fault.

Drill N2: disjoint conflicts

Conflicts: {A,B}, {C,D}. Q1: any single diagnosis? Q2: list minimal diagnoses. Q3: Occam pick?

Step 0

Why this step

Tracker

Answer N2

Q1: none (no component sits in both). Q2: four minimal doubles: A+C, A+D, B+C, B+D. Q3: four-way tie at size 2: Occam cannot choose; probe a component (e.g. test A) to split them.

6. Exam checklist (write this on the rough sheet)

  1. Predict with all OK first. Observation mismatch = at least one fault in the chain.
  2. Conflict = assumption set that reproduces the mismatch. Each needs its own propagation.
  3. Test singles before pairs: one member in every conflict ends the search early.
  4. Hitting set must touch each conflict. Check the conflict a candidate misses to reject it.
  5. Minimal first, then Occam: smallest size wins; ties mean measure more.
  6. Revision order on the day: search paths, TSP tours, game values, AO* S-values, rete tuples, planning verdicts, CSP domains, GraphPlan mutexes, logic substitutions, diagnosis sets.