15 MCQs at 0.5 points each. On Exam 1, about half were Poole–Mackworth (PM) one-line definitions and half were quick DPV facts. This page is the definitions and the "exam phrasing → answer" rules. Drill them on the MCQ drill bank.
| Trap statement | Truth |
| "F → T is false." | Wrong. \(p \to q\) is false only when p is T and q is F. F → T and F → F are both T. |
| "A definite-clause query answered no means the atom is false." | Wrong. "No" means not entailed: the atom is false in the minimal model but true in other models. |
| "GAC left every domain non-empty, so a solution exists." | Wrong. Non-empty but not all singletons means "don't know yet". Example: X, Y, Z ∈ {red, green}, all pairs ≠: GAC deletes nothing, no solution. |
| "Local search ran an hour without success, so there is no solution." | Wrong. Local search is incomplete: it can never prove unsatisfiability. |
| "BFS needs memory linear in solution depth." | Wrong. BFS memory is exponential, \(O(b^d)\). DFS (and iterative deepening, DF branch and bound) is linear, \(O(bd)\). |
| "A* always returns an optimal path." | Only if h is admissible (never overestimates), the branching factor is finite and arc costs are bounded above zero. |
| "Iterative deepening wastes most of its time redoing shallow levels." | Wrong. Overhead is a constant factor, about \(b/(b-1)\): the last level dominates. |
| "Dijkstra works with negative edges if there are no negative cycles." | Wrong. One negative edge can improve an already-finalized vertex. Use Bellman–Ford (or the DAG pass if acyclic). |
| "Add a constant to every edge to remove negative lengths, then run Dijkstra." | Wrong (DPV 4.8). Adding c adds \(c \cdot (\#\text{edges})\), so paths with more edges are penalized and shortest paths change. Multiplying every length by a positive constant does not change them. |
| "DFS from s finds distances." | Wrong. BFS does (unit lengths). DFS depth is not distance. |
| "O(nW) knapsack is polynomial." | Pseudo-polynomial: W takes only \(\log W\) bits to write. |
| "Greedy by value/weight is optimal for 0/1 knapsack." | Only for fractional knapsack. |
| "A contradictory KB entails nothing." | It entails everything (no models, so g is true in all of them vacuously). |
| "Adding facts can only add conclusions." | False with negation as failure: it is nonmonotonic. |
| "Every valid proposition is satisfiable" / "every satisfiable one is valid." | First is true; second is false (p → q is satisfiable, not valid). |
| "Hash table search is O(1)." | Expected \(O(1)\) under assumptions (simple uniform / universal hashing). Worst case \(\Theta(n)\). |
| Phrase | Answer |
| Inputs to an agent | Abilities, goals/preferences, prior knowledge, past experiences, observations ("All of the above") |
| Deterministic | Next state is predictable from current state + action (not "knows its state": that is full observability) |
| Memory of the past used for current and future actions | Belief state |
| Search that uses arc costs | Lowest-cost-first (also A*, which adds a heuristic) |
| Search that uses a heuristic function | A* (also greedy best-first) |
| Term | Meaning |
| Frontier | The set of paths generated but not yet expanded. The strategy = how you pick from it. |
| Branching factor b | Number of neighbours (forward branching factor) of a node. |
| Heuristic h(n) | Estimate of the cost of the cheapest path from n to a goal. Non-negative, cheap to compute. |
| Admissible h | Never overestimates: \(h(n) \le\) actual cost of the cheapest path from n to a goal. \(h \equiv 0\) is admissible (and useless). |
| Consistent (monotone) h | \(h(n) \le \text{cost}(n, n') + h(n')\). Consistent implies admissible (with h(goal) = 0). Needed so multiple-path pruning keeps A* optimal. |
| Cycle pruning | Discard a path whose last node already appears earlier on that same path. Cheap. |
| Multiple-path pruning | Keep an explored set (closed list); discard a path to a node already reached. Can cost exponential memory, like BFS. |
| Iterative deepening | Depth-bounded DFS with bound 1, 2, 3, …. Linear space and finds fewest-arc paths; overhead factor about \(b/(b-1)\). |
| Depth-first branch and bound | DFS that keeps the best solution cost so far as a bound; prunes a path p when \(\text{cost}(p) + h(p) \ge\) bound (h admissible). Linear space; finds a least-cost path given an initial bound above the optimum. |
| Greedy best-first | Pick the path whose end has smallest h(p), ignoring cost so far. Not guaranteed to find a path or the best one. |
"Path found" assumes finite branching factor and arc costs bounded above zero.
| Term | Meaning |
| Possible world | A total assignment: a value for every variable. Count = product of domain sizes (\(d^n\) if all equal). |
| Constraint | Scope (set of variables) + relation. Intensional (formula, A < B) or extensional (table of allowed tuples). |
| Unary / binary / k-ary | Scope of size 1 / 2 / k. B ≠ 3 unary; A = D binary; X + Y = Z ternary; alldifferent(9 cells) 9-ary. |
| Model (solution) | A possible world satisfying every constraint. |
| Generate-and-test | Check every total assignment. Correct, exponential. |
| Backtracking | DFS over partial assignments; check a constraint as soon as its whole scope is assigned; prune on failure. |
| Forward checking | After assigning, delete now-impossible values from unassigned neighbours; back up if one becomes empty. |
| Most constrained variable (MRV) | Pick the variable with the fewest remaining values ("fail first"). Ties: most constraining variable (most constraints with unassigned variables). |
| Least constraining value | Try first the value ruling out the fewest neighbour values ("succeed first"). |
| Arc <X, c> consistent | Every value of X has a support: values of c's other variables satisfying c. |
| GAC | To-do list of arcs; prune unsupported values; when dom(X) shrinks, re-add <Z, c'> for every other constraint c' on X and other variable Z in c'. Final domains don't depend on arc order. Binary: \(O(cd^3)\). |
| Domain splitting | Split a domain into cases, rerun GAC on each. With GAC, complete. |
| Variable elimination | Join all constraints on X, project X out. Cost = largest relation built; depends on elimination order (treewidth). |
| Local search | Start from a total assignment; move to neighbours to reduce h = number of violated constraints. Scales; incomplete. |
| Local minimum / plateau | All neighbours worse / all neighbours equal. |
| Random restart / random walk | Big jump (new random assignment) / small random move with probability p. |
| Tabu list | Don't undo any of the last t changes; avoids cycling on plateaus. |
| Simulated annealing | Accept a worse move by Δ with probability \(e^{-\Delta/T}\); lower T over time. High T ≈ random walk, low T ≈ greedy. |
| Beam / stochastic beam / GA | Keep k best / keep k chosen at random weighted by quality / crossover + mutation of parents. |
| Runtime distribution | Fraction of runs solved within k steps. Restarts every k steps with success q: fail r times in a row with probability \((1-q)^r\). |
| Soft constraint / branch and bound | Cost function on scope; minimize total. Prune partial assignment whose lower bound ≥ best found. |
Quick GAC on \(A < B\), both {1,2,3,4}: A loses 4, B loses 1. On \(A \le B - 2\): A = {1, 2}, B = {3, 4}.
| Term | Meaning |
| Interpretation | Assigns T/F to every atom. n atoms → \(2^n\) interpretations. |
| Model of KB | Interpretation making every proposition in KB true. |
| Valid / satisfiable / unsatisfiable | True in all / some / no interpretations. p ∨ ¬p / p → q / p ∧ ¬p. |
| KB ⊨ g (entails) | g true in every model of KB. Semantic. Equivalent: KB ∪ {¬g} unsatisfiable. |
| KB ⊢ g (derives) | A proof procedure derives g. Syntactic. |
| Sound | KB ⊢ g ⇒ KB ⊨ g (derives only consequences). |
| Complete | KB ⊨ g ⇒ KB ⊢ g (derives all consequences). |
| Clause / DPLL | Disjunction of literals. DPLL = backtracking + unit propagation (+ pure symbols). Unit propagation is arc consistency for clauses. |
| Definite clause | h ← a1 ∧ … ∧ am, exactly one atom in the head. m = 0: a fact. Cannot say anything is false; always has a minimal model. |
| Bottom-up (forward chaining) | Fire clauses whose bodies are derived until fixpoint. Result = minimal model. Sound and complete for atoms; linear time. Derives everything. |
| Top-down (SLD resolution) | Start with yes ← query; replace a selected atom by a clause body; success at "yes ←". Only touches relevant clauses; depth-first can loop (a ← b, b ← a). |
| Askable atom | The user is asked about it only when a proof needs it. |
| Integrity constraint | false ← a1 ∧ … ∧ ak. Definite clauses + integrity constraints = Horn clauses. A Horn KB can be inconsistent. |
| Assumable / conflict | Atom assumed true unless contradicted / set of assumables that with KB implies false. Minimal if no proper subset is a conflict. |
| Consistency-based diagnosis | Minimal hitting set of the minimal conflicts. |
| Complete knowledge assumption | The clauses for a are the only ways a can be true: Clark's completion a ↔ b1 ∨ … ∨ bn. Atom with no clauses is false. |
| Negation as failure ~a | Succeeds when a cannot be proved. Nonmonotonic. |
| Abduction | Explanation of g: set H of assumables with KB ∪ H ⊨ g and KB ∪ H consistent. Effects → possible causes. |
| Causal vs evidential | Causal: effect ← cause (lit_l1 ← live_w1 ∧ ok_l1). Evidential: cause ← effect (fire ← smoke). |
| Knowledge-level debugging | Incorrect answer: find a clause with true body and false head. Missing answer: a true atom with no clause whose body is all true. Uses only the intended interpretation. |
Array layout (1-indexed): children of i at 2i and 2i + 1, parent at \(\lfloor i/2 \rfloor\). d-ary heap: deletemin \(O(d\log n/\log d)\), insert/decreasekey \(O(\log n/\log d)\).
| ADT | Operations / policy |
| Queue (FIFO) | add-last + remove-first. BFS. |
| Stack (LIFO) | push = add-last, pop = remove-last. DFS. |
| Priority queue | remove by priority. Heap. Dijkstra, Prim, Huffman. |
| Deque | add-first, remove-first, add-last, remove-last. |
| List | size, get(i), set(i,y), add(i,x), remove(i). add-first = add(0,x); remove-last = remove(size()−1). |
| USet | size, add, remove, find; unique, unordered. Dictionary/map = USet of (key, value) pairs. |
| SSet | Total order; find(x) = successor search: smallest y ≥ x, or null. |
Array-based: O(1) get/set. Pointer-based: faster insert/delete.