\documentclass{report}

%\usepackage{psfig}
\usepackage{epsfig}
\usepackage{pstricks}
\usepackage{pst-node}
\usepackage{amsmath}
\usepackage{amssymb} % blacksquare

\usepackage{times}


\newcommand{\hidden}[1]{\pscirclebox{#1}}
\newcommand{\Dhidden}[1]{\psframebox{#1}}
\newcommand{\obs}[1]{\pscirclebox[fillstyle=solid,fillcolor=lightgray]{#1}}

\begin{document}

\begin{figure}[htb!]
%\centerline{\myinput{HHMM/hhmm_dbn.pstex_t}}
\centerline{
\begin{psmatrix}[rowsep=6mm,colsep=6mm]
&[name=F11]\hidden{$F_1^1$} && [name=F21]\hidden{$F_2^1$} && [name=F31]\hidden{$F_3^1$} \\ 
[name=Q11]\hidden{$Q_1^1$}  && [name=Q21]\hidden{$Q_2^1$} && [name=Q31]\hidden{$Q_3^1$} \\ 
&[name=F12]\hidden{$F_1^2$} && [name=F22]\hidden{$F_2^2$} && [name=F32]\hidden{$F_3^2$} \\ 
[name=Q12]\hidden{$Q_1^2$}  && [name=Q22]\hidden{$Q_2^2$} && [name=Q32]\hidden{$Q_3^2$} \\ 
&[name=F13]\hidden{$F_1^3$} && [name=F23]\hidden{$F_2^3$} && [name=F33]\hidden{$F_3^3$} \\ 
[name=Q13]\hidden{$Q_1^3$}  && [name=Q23]\hidden{$Q_2^3$} && [name=Q33]\hidden{$Q_3^3$} \\ 
[name=Y1]\obs{$Y_1$} && [name=Y2]\obs{$Y_2$}&& [name=Y3]\obs{$Y_3$}
\end{psmatrix}
\psset{arrows=->,arrowscale=2}
\ncline{Q11}{F12}
\ncline{Q11}{F13}
\ncline{Q12}{F13}
\ncline{F12}{Q21}
\ncline{F13}{Q22}
%
\ncline{Q21}{F22}
\ncline{Q21}{F23}
\ncline{Q22}{F23}
\ncline{F22}{Q31}
\ncline{F23}{Q32}
%
\ncline{F11}{Q21}
\ncline{F21}{Q31}
\ncline{Q11}{Q21}
\ncline{Q11}{F11}
\ncline{Q21}{F21}
\ncline{Q21}{Q31}
\ncline{Q31}{F31}
%
\ncline{F12}{Q22}
\ncline{F22}{Q32}
\ncline{Q12}{Q22}
\ncline{Q12}{F12}
\ncline{Q22}{F22}
\ncline{Q22}{Q32}
\ncline{Q32}{F32}
%
\ncline{F13}{Q23}
\ncline{F23}{Q33}
\ncline{Q13}{Q23}
\ncline{Q13}{F13}
\ncline{Q23}{F23}
\ncline{Q23}{Q33}
\ncline{Q33}{F33}
%
\ncline{Q11}{Q12}
\ncline{Q12}{Q13}
\ncline{F13}{F12}
\ncline{F12}{F11}
%
\ncline{Q21}{Q22}
\ncline{Q22}{Q23}
\ncline{F23}{F22}
\ncline{F22}{F21}
%
\ncline{Q31}{Q32}
\ncline{Q32}{Q33}
\ncline{F33}{F32}
\ncline{F32}{F31}
\ncline{Q31}{F32}
\ncline{Q31}{F33}
\ncline{Q32}{F32}
%
\ncline{Q13}{Y1}
\ncline{Q23}{Y2}
\ncline{Q33}{Y3}
\psset{linestyle=dashed,arcangle=40}
\ncarc{Q12}{Y1}
\ncarc{Q22}{Y2}
\ncarc{Q32}{Y3}
\psset{linestyle=dotted,arcangle=20}
\ncarc{Q11}{Q13}
\ncarc{Q21}{Q23}
\ncarc{Q31}{Q33}
%
\ncarc{Q11}{Y1}
\ncarc{Q21}{Y2}
\ncarc{Q31}{Y3}
}
\caption{
A 3-level HHMM represented as a DBN.
$Q_t^d$ is the state at time $t$, level $d$;
$F_t^d = 1$ if the HMM at level $d$ has finished (entered its exit
state), otherwise $F_t^d=0$.
Shaded nodes are observed; the remaining nodes are hidden.
%We may optionally clamp $F_T^d = 1$, where $T$ is the length of the observation
%sequence, to ensure all models have finished by the end of the
%sequence.
%When this model is used for speech recognition, the dotted arcs from
%$Q^1$ to lower levels are omitted.
In some applications, the dotted arcs from $Q^1$ and the dashed arcs
from $Q^2$ may be omitted.
}
\label{fig:hhmm_as_dbn}
\end{figure}


\end{document}