  The main source of performance degradation in cell-free massive MIMO is pilot
contamination, which causes interference during uplink training and affects
channel estimation negatively. Contamination occurs when the same pilot
sequence is assigned to more than one user. This is in general inevitable, as
the number of mutually orthogonal pilot sequences corresponds to only a
fraction of the coherence interval. We introduce an algorithm for pilot
assignment that has an approximation ratio close to 1 for a plausibly large
number of orthogonal pilot sequences. It also has low computational complexity
under massive parallelism.
