A Bayesian network has a root and children , with arrows , all variables binary. To compute with no evidence, compare the cost of eliminating first against eliminating first. What is the induced width in each case?
Probabilistic models, Exact inference
Level L3 Intermediate. Length Medium. Nature Th+Mat Both.
What's being asked
Whether you understand that the cost of variable elimination depends on the elimination order, through the size of the intermediate factors.
Key idea
Eliminating a variable multiplies all factors that mention it and sums it out. The new factor involves all its neighbours at that moment, so its size is .
Steps
- The joint is . For the query , we must sum out .
- Order 1: eliminate first. All factors mention , so we multiply them into one factor over and sum out . The new factor has entries. Cost is exponential in .
- Order 2: eliminate first. Only mentions it, and , so we get a factor over alone with 2 entries.
- Repeat for . Each step creates a factor of size 2. Finally . Total cost is .
- Induced width (largest clique created minus 1): order 1 creates a clique on of size , giving width . Order 2 creates cliques of size 2, giving width 1.
- Lesson: finding the best order is NP-hard in general, but greedy rules such as min-neighbours or min-fill work well in practice.
Common mistakes
- Thinking the cost of variable elimination does not depend on the order. It can change from linear to exponential.
- Believing the answer changes with the order. The result is the same, only the cost differs.
- Forgetting that eliminating a variable connects all its neighbours (fill-in edges in the moral graph).
How long your answer should be
Half a page.
Last checked on 4 December 2026.
Read this
Previous in Probabilistic models: In a network (burglary, alarm, earthquake), and . The alarm probabilities are , , and . What are and , and why do they differ?
Next in Probabilistic models: Three binary variables form a chain with unary factors , , (for values 0 and 1), and the same pairwise factor on both edges, if and otherwise. Using sum-product messages, what are and ?