  We derive various consistency requirements for Vachaspati-Vilenkin type
Monte-Carlo simulations of cosmic string formation or disclination formation in
liquid crystals. We argue for the use of a tetrakaidekahedral lattice in such
simulations. We also show that these calculations can be carried out on
lattices which are formally infinite, and do not necessitate the specification
of any boundary conditions. This way string defects can be traced up to much
larger lengths than on finite lattices. The simulations then fall into a more
general class of simulations of self-interacting walks, which occupy the
underlying lattice very sparsely. An efficient search algorithm is essential.
We discuss various search strategies, and demonstrate how to implement hash
tables with collision resolution by open addressing. The time to trace a string
defect is then proportional only to the string length.
