βˆ‘GateAndNet
PlannerSign Up
INTERMEDIATEFrequently Tested 4 min read 3 views

Informed Search (A*, IDA*), Adversarial Game Trees & CSP Arc Consistency (AC-3)

Tree-search vs Graph-search A* optimality conditions, heuristic dominance & relaxed problems, IDA* linear memory bound, Minimax Alpha-Beta cutoffs, and CSP MRV/LCV & AC-3 complexity.

1. Subtle Exam Distinctions in Aβˆ—A^* Search (f(n)=g(n)+h(n)f(n) = g(n) + h(n))

  1. Tree-Search Aβˆ—A^* is optimal whenever h(n)h(n) is Admissible (h(n)≀hβˆ—(n)h(n) \le h^*(n), never overestimates true cost to goal).
  2. Graph-Search Aβˆ—A^* (with a CLOSED / explored set that never re-expands visited states) requires h(n)h(n) to be Consistent (Monotonic): h(n)≀c(n,a,nβ€²)+h(nβ€²)h(n) \le c(n, a, n') + h(n'). An admissible but inconsistent heuristic can expand a state via a suboptimal path first and discard the optimal path later unless closed nodes can be reopened!
  3. Combining Admissible Heuristics: If h1,h2,…,hmh_1, h_2, \dots, h_m are all admissible, then:
hmax⁑(n)=max⁑(h1(n),h2(n),…,hm(n))h_{\max}(n) = \max\big(h_1(n), h_2(n), \dots, h_m(n)\big)

is guaranteed admissible AND dominates every hih_i (expands the fewest nodes)! Conversely, h1(n)+h2(n)h_1(n) + h_2(n) may overestimate hβˆ—(n)h^*(n) unless subproblems are strictly disjoint pattern databases. 4. IDA (Iterative Deepening Aβˆ—A^*):* Performs DFS with increasing ff-cost thresholds (nextΒ threshold=min⁑f(n)\text{next threshold} = \min f(n) among pruned nodes exceeding current bound), reducing memory from O(bd)\mathcal{O}(b^d) to O(bβ‹…d)\mathcal{O}(b \cdot d)!

2. Constraint Satisfaction Problems (CSPs): Ordering & AC-3

A CSP (X,D,C)(X, D, C) uses factored state representations to prune huge search spaces before branching:

  • Variable Ordering β€” MRV (Minimum Remaining Values / Fail-First): Pick the unassigned variable with the smallest current legal domain ∣Di∣|D_i|. Ties broken by Degree Heuristic (most constraints on remaining unassigned variables).
  • Value Ordering β€” LCV (Least Constraining Value / Succeed-First): Try the value that rules out the fewest choices for neighboring variables!
  • Arc Consistency (AC-3): Directed arc Xiβ†’XjX_i \to X_j is consistent iff βˆ€x∈Di,β€…β€Šβˆƒy∈Dj\forall x \in D_i, \; \exists y \in D_j satisfying Cij(x,y)C_{ij}(x, y). Each of 2e2e directed arcs can be re-enqueued at most dd times, and checking an arc takes O(d2)β€…β€ŠβŸΉβ€…β€ŠO(ed3)\mathcal{O}(d^2) \implies \mathcal{O}(e d^3).
Quick Tip

Tree-Structured CSP Shortcut: If the constraint graph of a CSP has no loops (is a tree) with nn variables and max domain size dd, it can be solved in O(nβ‹…d2)\mathcal{O}(n \cdot d^2) polynomial time (topological directional arc consistency + backtrack-free assignment)!

Key Formulas Summary
Admissible vs Consistent (Monotonic) Heuristics in A*
Admissible:Β 0≀h(n)≀hβˆ—(n),Consistent:Β h(n)≀c(n,a,nβ€²)+h(nβ€²)\text{Admissible: } 0 \le h(n) \le h^*(n), \qquad \text{Consistent: } h(n) \le c(n, a, n') + h(n')
Note: Consistency => Admissibility (with h(goal)=0), and makes f(n) non-decreasing along any path!
AC-3 Arc Consistency Worst-Case Time Complexity
O(eβ‹…d3)\mathcal{O}(e \cdot d^3)
Note: e = number of binary constraint arcs, d = maximum domain size |D_i| per variable
#Artificial Intelligence#A-Star#Heuristics#Alpha-Beta Pruning#CSP#AC-3#GATE DA

Practice Questions on This Chapter (3)

Q1GATE DA / NET AIMCQMEDIUM
+2M β€’ -0.67

Suppose h1(n)h_1(n) and h2(n)h_2(n) are both admissible heuristics for an Aβˆ—A^* search problem. Which composite heuristic below is always guaranteed to be admissible and expands no more nodes than either h1h_1 or h2h_2?

⚑ Click an option above to verify instantly
Q2GATE DA AIMCQEASY
+2M β€’ -0.67

In a two-player deterministic zero-sum game tree with branching factor b=9b = 9 and depth d=6d = 6, how many terminal leaf evaluations are required by Alpha-Beta Pruning under optimal move ordering (O(bd/2)\mathcal{O}(b^{d/2}) scale)?

⚑ Click an option above to verify instantly
Q3GATE DA CSPMCQEASY
+1M β€’ -0.33

When solving a Constraint Satisfaction Problem (CSP), why is MRV (Minimum Remaining Values) used for choosing the next variable while LCV (Least Constraining Value) is used for ordering its values?

⚑ Click an option above to verify instantly
Previous TopicSequence Labeling (HMM Viterbi) & Transformers (Self-Attention, BERT vs GPT)Next Topic First-Order Logic Resolution, Bayesian Networks, D-Separation & Markov Blankets