Generalizations of Code Languages with Marginal Errors
The [Formula: see text]-prefix-free, [Formula: see text]-suffix-free and [Formula: see text]-infix-free languages generalize the prefix-free, suffix-free and infix-free languages by allowing marginal errors. For example, a string [Formula: see text] in a [Formula: see text]-prefix-free language [Formula: see text] can be a prefix of up to [Formula: see text] different strings in [Formula: see text]. We also define finitely prefix-free languages in which a string [Formula: see text] can be a prefix of finitely many strings. We present efficient algorithms that determine whether or not a given regular language is [Formula: see text]-prefix-free, [Formula: see text]-suffix-free or [Formula: see text]-infix-free, and analyze the time complexity of the algorithms. We establish undecidability results for deciding these properties for (linear) context-free languages.