locally testable
A regular language L over an alphabet Σ is locally testable if, loosely speaking, testing whether or not an arbitrary word u (over Σ) is in L is completely determined by its subwords of some fixed length. The name locally testable comes from the fact that properties of u, and not L, determine the membership of u in L.
To formalize this notion, we first define, for any word u over Σ, the set swk(u) of all subwords of
#u# |
of length k, where # is a symbol not in Σ.
Definition. We say that a regular language L is k-testable if for any u,v∈Σ* such that
swk(u)=swk(v), |
we have u∈L iff v∈L. The equation above says three things at once:
-
•
the set of subwords of u of length k is equal to the set of subwords of v of length k,
-
•
the prefix of u of length k is equal to the prefix of v of length k, and
-
•
the suffix of u of length k is equal to the suffix of v of length k.
We say that L is locally testable if it is k-testable for some k≥0.
If we denote 𝒯(k) the family of all k-testable languages, and 𝒯(∞) the family of all locally testable languages, then
𝒯(∞)=∞⋃k=0𝒯(k). |
Note that there are only two 0-testable languages: Σ* and ∅.
Proposition 1.
Let D be the family of definite languages. Then
-
1.
𝒯(k)⊂𝒯(k+1) for any k≥0, and the inclusion is strict.
-
2.
𝒟 and 𝒯(k) are not comparable for any k>0. In other words, for every k, there is a k-testable language that is not definite, and a definite language that is not k-testable.
-
3.
𝒟⊂𝒯(∞), and the inclusion is strict.
We only sketch the proof here. For the first assertion, note that for every k≥0,
swk+1(u)=swk+1(v) |
In addition, the language is -testable but not -testable. For the second statement, note that is not definite for any . On the other hand, a finite language containing a single word of length is not -testable. The last assertion is a direct consequence of the second one.
Thus, the families provide us with an example of an infinite chain of subfamilies of the family of regular languages.
With regard to the closure properties in , it is easily see that for all including , is closed under complementation and intersection, and hence all Boolean operations. The star-closure of is , the family of all regular languages.
Remark. Every locally testable language is star-free, but not conversely.
References
-
1
A. Salomaa, Formal Languages
, Academic Press, New York (1973).
Title | locally testable |
---|---|
Canonical name | LocallyTestable |
Date of creation | 2013-03-22 18:59:03 |
Last modified on | 2013-03-22 18:59:03 |
Owner | CWoo (3771) |
Last modified by | CWoo (3771) |
Numerical id | 7 |
Author | CWoo (3771) |
Entry type | Definition |
Classification | msc 68Q45 |
Classification | msc 68Q42 |
Synonym | k-testable |
Defines | -testable |