Local language (formal language)

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search

In mathematics, a local language is a formal language for which membership of a word in the language can be determined by looking at the first and last symbol and each two-symbol substring of the word.[1] Equivalently, it is a language recognised by a local automaton, a particular kind of deterministic finite automaton.[2]

Formally, a language L over an alphabet A is defined to be local if there are subsets R and S of A and a subset F of A×A such that a word w is in L if and only if the first letter of w is in R, the last letter of w is in S and no factor of length 2 in w is in F.[3] This corresponds to the regular expression[1][4]

(RA*A*S)A*FA* .

More generally, a k-testable language L is one for which membership of a word w in L depends only on the prefix and suffix of length k and the set of factors of w of length k;[5] a language is locally testable if it is k-testable for some k.[6] A local language is 2-testable.[1]

Examples

[edit | edit source]
  • Over the alphabet {a,b,[,]}[4]
aa*, [ab] .

Properties

[edit | edit source]

References

[edit | edit source]
  1. ^ a b c d Salomaa (1981) p.97
  2. ^ Lawson (2004) p.130
  3. ^ Lawson (2004) p.129
  4. ^ a b c Sakarovitch (2009) p.228
  5. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  6. ^ McNaughton & Papert (1971) p.14
  7. ^ Lawson (2004) p.132
  8. ^ McNaughton & Papert (1971) p.18
  • Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  • Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  • Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  • Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).