摘要
We propose an algorithm that given as input a full word of length , and positive integers and , outputs, if any exists, a maximal -periodic partial word contained in with the property that no two holes are within distance (so-called -valid). Our algorithm runs in time and is used for the study of repetition-freeness of partial words. Furthermore, we construct an infinite word over a five-letter alphabet that is overlap-free even after holes are inserted in arbitrary 2-valid positions, answering affirmatively a conjecture from Blanchet-Sadri, Merca艧, and Scott.