Algorithm 2 outputs a critical factorization for a given input partial word w with p'(w) > 1 and with one hole of length at least two when such a factorization exists, and outputs "no critical factorization exists" otherwise.
 

Partial Word w
 

**Note: This program uses the special character '^' to represent a hole (do not know symbol) in a partial word.  Only one hole ('^') is allowed.