Automata

Topics: Nondeterministic finite state machine, Automata theory, Regular expression Pages: 27 (8841 words) Published: August 28, 2013
Alphabets, Strings and Languages
Example :  Consider the string 011 over the binary alphabet. All the prefixes, suffixes and substrings of this string are listed below. Prefixes: e, 0, 01, 011.
Suffixes: e, 1, 11, 011.
Substrings: e, 0, 1, 01, 11, 011.
Note that x is a prefix (suffix or substring) to x, for any string x and e is a prefix (suffix or substring) to any string. A string x is a proper prefix (suffix) of string y if x is a prefix (suffix) of y and x  y. In the above example, all prefixes except 011 are proper prefixes. Powers of Strings : For any string x and integer , we use  to denote the string formed by sequentially concatenating n copies of x. We can also give an inductive definition of  as follows:  = e, if n = 0 ; otherwise 

Example : If x = 011, then  = 011011011,  = 011 and  Powers of Alphabets :
We write  (for some integer k) to denote the set of strings of length k with symbols from . In other words,  = { w | w is a string over  and  | w | = k}. Hence, for any alphabet,  denotes the set of all strings of length zero. That is,  = { e }. For the binary alphabet { 0, 1 } we have the following.

The set of all strings over an alphabet  is denoted by  . That is,

The set  contains all the strings that can be generated by iteratively concatenating symbols from   any number of times.

Example : If  = { a, b }, then  =  { e, a, b, aa, ab, ba, bb, aaa, aab, aba, abb, baa, …}. Please note that if , then   that is . It may look odd that one can proceed from the empty set to a non-empty set by iterated concatenation. But there is a reason for this and we accept this convention. The set of all nonempty strings over an alphabet  is denoted by  . That is,

Note that is infinite. It contains no infinite strings but strings of arbitrary lengths. Reversal :
For any string  the reversal of the string is .
An inductive definition of reversal can be given as follows: Languages :
A language over an alphabet is a set of strings over  that alphabet. Therefore, a language L is any subset of . That is,  any  is a language.

Example :
1. F is the empty language.
2.  is a language for any .
3. {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. 4. The set of all strings over { 0, 1 } containing equal number of 0's and 1's. 5. 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 

Example :  { 0, 11, 01, 011 }  { 1, 01, 110 } = { 0, 11, 01, 011, 111 } Intersection :  A string     iff    and .

Example : { 0, 11, 01, 011 }  { 1, 01, 110 } = { 01 }
Complement : Usually,  is the universe that a complement is taken with respect to. Thus for a language L, the complement is  L(bar) = {  |  }. Example : Let L = { x | |x| is even }. Then its complement is the language { | |x| is odd }. Similarly we can define other usual set operations on languages like relative complement, symmetric difference, etc. Reversal of a language :

The reversal of a language L, denoted as , is defined as:  . Example :
1.  Let L = { 0, 11, 01, 011 }. Then    = { 0, 11, 10, 110 }. 2. Let L = {  | n is an integer }. Then  =  {  | n is an integer }. Language concatenation : The concatenation of languages  and  is defined as  = { xy |  and }.

Example :  { a, ab }{ b, ba } = { ab, aba, abb, abba }. Note that ,  
     1.       in general. 
     2.    
     3.    
Iterated concatenation of languages :  Since we can concatenate two languages, we also repeat this to concatenate any number of languages. Or we can concatenate a language with itself any number of times. The operation  denotes the concatenation of L with...
Continue Reading

Please join StudyMode to read the full document

You May Also Find These Documents Helpful

  • finite automata Essay
  • Languages, Grammars and Automata Theory Essay
  • Essay on Finite Automata
  • Essay on RE to NFA to DFA, code explanation
  • Automata: Equivalence of Finite Automata and Regular Expressions Essay
  • Automata Theory and Discuss Gate Essay
  • Deque Automata for All Classes of Formal Languages Essay
  • Essay about Automata Theory

Become a StudyMode Member

Sign Up - It's Free