|
Example :
-
F is the empty language.
- is a language for any .
- {e} is a language for any . Note that, . Because the language F does not contain any string but {e} contains one string of length zero.
- The set of all strings over { 0, 1 } containing equal number of 0's and 1's.
- The set of all strings over {a, b, c} that starts with a.
Convention : Capital letters A, B, C, L, etc. with or without subscripts are normally used to denote languages.
Set operations on languages : Since languages are set of strings we can apply set operations to languages. Here are some simple examples (though there is nothing new in it). Union : A string iff or |