We prove that any N-rational sequence s = (s(n))(n greater than or equal to
1) of nonnegative integers satisfying the Kraft strict inequality Sigma(n
greater than or equal to 1)s(n)k(-n) < 1 is the enumerative sequence of lea
ves by height of a rational k-ary tree. We give an efficient algorithm to g
et a k-ary rational tree. Particular cases of this result had been previous
ly proven. We give some partial results in the case of equality. Especially
we study the similar problem of characterizing the enumerative sequences o
f nodes of k-ary rational trees and solve this question when the sequence h
as a primitive linear representation. (C) 1999 Elsevier Science B.V. All ri
ghts reserved.