# Is every distribution factorizable by an MRF also factorizable via a Bayesian network? And vice versa?

This has probably been asked before, so if it has please provide a link to the original question and close this as a duplicate -- I was not able to find the original question myself.

Question: Let's say we are given a joint probability distribution $$\mathbb{P}$$ of some random variables $$X_1, \dots, X_n$$, and we know that there exists an undirected graph $$G$$ such that $$\mathbb{P}$$ is a distribution compatible with the Markov random field defined by $$G$$. Then does there exist a directed acyclic graph $$N$$ such that $$\mathbb{P}$$ is a distribution compatible with the Bayesian network defined by $$N$$?

And conversely, let's say that we know $$\mathbb{P}$$ is a distribution compatible with the Bayesian network defined by the directed acyclic graph $$N$$. Then does there exist an undirected graph $$G$$ for which $$\mathbb{P}$$ is compatible with the Markov random field defined by $$G$$?

I would also be interested in knowing whether this is true only when given some restrictions on $$\mathbb{P}$$, e.g. that it be strictly positive. I found some lecture slides talking about how we can triangulate a graph $$G$$ corresponding to a Markov random field and get something called an "I-map" that corresponds to a Bayesian network, and something similar by "moralizing" a Bayesian network to get a Markov random field. But I am interested in the statement at the level of specific, concrete probability distributions and am having difficulty translating it to that level.