Added lookup table inversion function.

Used to determine which states transition to a given state.
Implemented forward (alpha) metric calculation.