Course / Lectures / Lecture 14 / Lab Lab 14

Three suspects.

A six-gate selector, two observed outputs and a monitor. Set the inputs, set what you saw, and the lab enumerates every fault set consistent with the observation. Then it rebuilds the same answer from conflict sets and minimal hitting sets.

6 gates 3 inputs · 3 outputs 64 fault sets, enumerated No install · runs in the browser

The circuit diagnosis lab

Six-gate selector circuit with current values Inputs a, b, s feed NOT and AND gates; the OR output feeds a complement and a monitor. Faulty gates are highlighted and their witness values are shown. a = 1 b = 0 s = 0 N1NOT A1AND A2AND O1OR N2NOT O2OR ns = 1 p = 1 q = 0 out = 1 outn = 0 mon = 1
Inputs
Observed
Presets

P1 loaded: three minimal diagnoses. Choose a diagnosis to see its witness.

Minimal diagnoses

—

    —

    Hitting-set trace

      Witness

      Select a diagnosis to see one consistent behavior.

      Ranking by prior

      Minimal diagnoses ranked by prior probability
      RankDiagnosisSizePrior weightPosteriorShare

      Posterior assumes every consistent diagnosis explains the observation equally well. The likelihood term is not modeled; the priors are illustrative, not measured failure rates.

      WHAT TO NOTICE

      One observation, several repairs.

      P1 · THREE SUSPECTS

      The observation does not choose

      {N1}, {A1}, and {O1} all explain the wrong output. They are all single faults, so parsimony cannot separate them. Only a prior or a probe can.

      P2 · UNIQUE CAUSE

      Sometimes it does

      When the two outputs disagree with the complement relation, the inverter is pinned: {N2} is the only minimal diagnosis. An observation can identify a gate when it contradicts a gate’s defining relation.

      P3 · PAIRS

      More evidence, more faults

      Observing outn = 0 alongside out = 0 pins the inverter: a correct N2 would output 1. Every diagnosis now includes N2 plus one of the output-path gates. The set is still ambiguous, but the structure is different.

      P5 · DORMANT GATE

      A gate off the active path

      With both inputs 0, the unselected AND A2 should output 0. A fault that forces it to 1 still reaches the output. “Not selected” is not “not a suspect.”

      What the lab is not

      It is a six-gate toy with a coarse fault model: a faulty gate’s output is unconstrained, not stuck at a specific value. The diagnosis counts are exact for that model — the lab enumerates all 64 fault sets — but they are not a claim about a real chip. Consistency is upward-closed: any superset of a diagnosis is also consistent, which is why P1 shows 56 consistent fault sets but only 3 minimal ones. The priors are illustrative. The lesson is the mechanism: consistency gives a set, hitting sets compute it, and a prior ranks it.

      Read the diagnosis section · Read why ambiguity is structural · Open the slides