In this paper, we propose a new representation for k-trees - the compact code, which reduces the required memory space from O(nk) to O(n). The encoding and decoding algorithms, based on a simplification of a priority queue, are linear and very simple. As long as the k-tree is represented by its compact code, the exact vertex coloring problem can be solved in time O(n).
k-trees; Prüfer code; compact code