The general inference by enumeration algorithm :
(1) For each possible value combiation x \in Val(X), compute P(x,y) via enumeration
(2) Compute denominator = normalisation constant P(y) from these P(x,y)
(3) normalise P(X,y) to obtain conditional distribution P(X|y)