An algorithm for optimal prefix parsing of a noiseless and memoryless channel

We discuss the prefix encoding of a Q -ary source (Q \geq 2) into an L -symbol channel alphabet with L \geq Q . We present an optimal encoding scheme that minimizes the expected cost per symbol in the case of equally probable source symbols and arbitrary channel symbol costs.