Generalized trellis-based reduced-state soft-input/soft-output algorithms