# Factorization of a Markov random field

Consider the Markov random field in the following figure, some literature and textbooks say that the MRF $G$ can be factorized as $P_1(G) = \phi_1(A,B) \times \phi_2(A,C) \times \phi_3(C,D) \times \phi_4(B,D)$. My understanding is that each factor represents a second order clique function to model the relationship between two random variables. My question is how does it model the prior belief of the random variables $A$, $B$, $C$, $D$? If I want to add the prior distribution of random variables into the factorization, can I use $P_2(G) =\phi_1(A,B) \times \phi_2(A,C) \times \phi_3(C,D) \times \phi_4(B,D) \times \phi_5(A) \times \phi_6(B) \times \phi_7(C) \times \phi_8(D)$

to factorize the MRF where it involves first order and second order clique functions? If $P_2$ is also correct, what's the difference between factorizations $P_1$ and $P_2$ over the given MRF?

• Note that as you've written it, $P_1$ does not factorize over the graph, since neither the edge $B \mathrel{-} C$ nor the edge $A \mathrel{-} D$ exist in the graph. Please edit your question accordingly to make it clear what you're asking. – tddevlin Aug 17 '17 at 19:48
• Sorry. It is corrected. – Yi Yang Aug 17 '17 at 20:38