The Bahl-Cocke-Jelinek-Raviv (BCJR) algorithm is an algorithm for maximum a posteriori decoding of error correcting codes defined on trellises (principally convolutional codes). The algorithm was introduced in 1974 by Lalit R. Bahl, John Cocke, Frederick Jelinek and Josef Raviv, whose surnames give it its name. It applies to both linear block codes and convolutional codes.
BCJR-based decoders provide soft outputs, which express the relative probabilities of possible symbol values. They are used as component decoders in iterative turbo decoding.
The algorithm combines a forward pass and a backward pass through the trellis. Let denote the encoder state at time , and the received sequence. Its metrics are
For continuous observations, the corresponding probability densities are used. The branch metric incorporates the channel observation and the prior probability of the transition.
The forward and backward recursions are
Initialisation reflects the available information about the encoder's initial and final states. The posterior probability of a transition is proportional to
Summing over transitions associated with a particular input symbol and normalising gives that symbol's posterior probability.
Based on the trellis:
The simplified Berrou-Glavieux-Thitimajshima (SBGT) algorithm retains the structure of the BGT formulation while removing redundant divisions from its forward and backward recursions.
The Log-MAP algorithm performs the BCJR calculations in the logarithmic domain. This replaces probability multiplications with additions and reduces numerical difficulties associated with very small probabilities. When evaluated exactly, Log-MAP is equivalent to the probability-domain MAP algorithm. Max-Log-MAP simplifies the calculations further by approximating a logarithm of a sum of exponentials with the largest exponent; this approximation can reduce decoding accuracy.
The distinction is expressed by the identity
Log-MAP retains the correction term , whereas Max-Log-MAP omits it.
A modified version that processes the trellis in segments to reduce computational complexity and memory requirements. This approach is particularly useful for very long sequences where full trellis storage becomes impractical. The windowed version maintains near-optimal performance while significantly lowering latency and hardware resource utilization in implementations.