An important point for computational efficiency in the parameter learning algorithm is the pruning of unreachable states. Before any probabilistic parameters are even considered, the algorithm finds all the reachable hidden states at each time step, given the whole observation sequence. The algorithm works as follows.
The only reachable state at time 0 is the start state. Then
for each time from 0 to
, all the transitions from
that agree with the current observation
are used to
produce the set of reachable states
. At this stage, the
states are reachable given the observation sequence so far. Finally
for each time
back from
to 0, those states in
whose
transitions lead outside
, are removed. This takes into
account the whole observation sequence.
Note that this procedure resembles the forward-backward algorithm for HMMs. As a by-product, it can be used to check whether an observation sequence could have been generated with the LOHMM. If not, the sets of reachable states are empty.