Noncommutative factorization of variable-length codes

Abstract We prove a noncommutative version of a theorem of Schutzenberger on the factorization of variable-length codes. As consequences, we obtain a positive answer to a weak form of the `factorization conjecture, a complete characterization of maximal and finite codes and a noncommutative extension of an invariance property due to Hansel and Perrin.