function [intra, inter, node_sizes, obs] = mk_water_topology()
% MK_WATER_TOPOLOGY Make the Water DBN
% [intra, inter, node_sizes, obs] = mk_water_topology()
%
% This is a model of the biological processes of a water purification plant, developed
% by Finn V. Jensen, Uffe Kj�ærulff, Kristian G. Olesen, and Jan Pedersen.
% See http://www-nt.cs.berkeley.edu/home/nir/public_html/Repository/water.htm
% See also Boyen and Koller, "Tractable Inference for Complex Stochastic Processes", UAI98

ss = 12;
intra = zeros(ss);
intra(1,9) = 1;
intra(3,10) = 1;
intra(4,11) = 1;
intra(8,12) = 1;

inter = zeros(ss);
inter(1,1)=1; inter(1,3)=1;
inter(2,2)=1; inter(2,3)=1; inter(2,7)=1;
inter(3,3)=1; inter(3,4)=1; inter(3,5)=1;
inter(4,3)=1; inter(4,4)=1; inter(4,6)=1;
inter(5,3)=1; inter(5,5)=1; inter(5,6)=1;
inter(6,4)=1; inter(6,5)=1; inter(6,6)=1;
inter(7,7)=1; inter(7,8)=1;
inter(8,6)=1; inter(8,7)=1; inter(8,8)=1;

obs = 9:12;
node_sizes = twos(1,ss);
