Properties of "fail-safe" languages

46 Views Asked by At

I'm wondering if anyone has any experience with the concept of a "fail-safe" language. And, if so, where could I find more information on the subject.

To explain what a "fail-safe" language is:

Let S be my alphabet, and S* be my set of strings of any length. We'll say L a subset of S* is our language. A language L is fail-safe iff for any u in S*, there exists a v in S* such that uv is in L.

Restated, this is saying that, given any string, there is another string that I can put onto the end of it such that the concatenation is in L.

For the following examples, we'll let S = (0,1)

L = {w in S* | w begins with a '0'}
This language is not fail-safe because any word that starts with a '1' cannot be accepted.

L = {w in S* | w is of even length}
This language is fail-safe because for any word, if it is of even length, you can append epsilon (or 00), and if it is of odd length, you can append '0'.

There are also context-free examples.

L = {w in S* | w = 0^(n)1^(n)}
This is not fail-safe because any word that begins '010' is cannot be accepted.

L = {w in S* | #(0) = #(1)}: where #(x) is the number of times 'x' appears in the word u.
This is fail-safe because given a prefix 'u' we can do the following we can append #(0) - #(1) 1's to it. If this value is negative we'll append 0's.

I hope this gives you an idea of what I mean by a "fail-safe" language. Any help or insight you can offer would be greatly appreciated!

1

There are 1 best solutions below

0
On

Your languages are known as right dense languages. This notion has been used in particular in the theory of variable length codes. See the book Codes and Automata by J. Berstel, D. Perrin and C. Reutenauer.