The main result is a finite-state version of the Kraft McMillan theorem cha
racterizing the generating sequence of a k-ary regular tree. The proof uses
a new construction called the multiset construction, which is a version wi
th multiplicities of the well-known subset construction of automata theory.