In an earlier paper the authors described a very fast method which, for the root lattices

, their duals and certain other lattices, finds the closest lattice point to an arbitrary point of the underlying space. If the lattices are used as codes for a Gaussian channel, the algorithm provides a fast decoding procedure, or if they are used as vector quantizers the algorithm performs the analog-to-digital conversion efficiently. The present paper offers a solution to the inverse problem for the same lattices (the encoding problem for channel codes or the digital-to-analog part of quantizing), namely, given an integer

, to find the kth code vector, and to the closely related problem of finding the index

of a given code vector.