Viterbi decoder
The provided code has convolutional encoder which can work for all non-recursive generator matrices with rate 1/2
The viterbi decoder is optimized in terms of run time by recursively updating the total weight at each state stream in trellis, also the decoding to select the minimum weight branch is made using the minimum weight contributing parent selection at each time step. Therefore at each time step, for each state the index of minimum weight contributing parent is stored instead of total weight. This helps in improving time and avoid back search to find minimum weight path.