MAP decoding or approximations thereof based on trellis or lattice decoding