A novel general approach to the optimal synthesis of Trellis codes for arbitrary noisy discrete memoryless channels